diff --git a/.apiversion b/.apiversion index 760606e1..c026ac82 100644 --- a/.apiversion +++ b/.apiversion @@ -1 +1 @@ -5.7 +9.6 diff --git a/.butcher/enums/BotCommandScopeType.yml b/.butcher/enums/BotCommandScopeType.yml new file mode 100644 index 00000000..8d2f50bd --- /dev/null +++ b/.butcher/enums/BotCommandScopeType.yml @@ -0,0 +1,16 @@ +name: BotCommandScopeType +description: | + This object represents the scope to which bot commands are applied. + + Source: https://core.telegram.org/bots/api#botcommandscope +multi_parse: + attribute: type + regexp: "must be ([a-z_]+)" + entities: + - BotCommandScopeDefault + - BotCommandScopeAllPrivateChats + - BotCommandScopeAllGroupChats + - BotCommandScopeAllChatAdministrators + - BotCommandScopeChat + - BotCommandScopeChatAdministrators + - BotCommandScopeChatMember 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/ChatActions.yml b/.butcher/enums/ChatActions.yml new file mode 100644 index 00000000..49710dc3 --- /dev/null +++ b/.butcher/enums/ChatActions.yml @@ -0,0 +1,22 @@ +name: ChatAction +description: | + This object represents bot actions. + + 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. + + Source: https://core.telegram.org/bots/api#sendchataction +parse: + format: rst + entity: sendChatAction + category: methods + attribute: action + regexp: '\*([a-z_]+)\*' diff --git a/.butcher/enums/ChatBoostSourceType.yml b/.butcher/enums/ChatBoostSourceType.yml new file mode 100644 index 00000000..ce28625c --- /dev/null +++ b/.butcher/enums/ChatBoostSourceType.yml @@ -0,0 +1,12 @@ +name: ChatBoostSourceType +description: | + This object represents a type of chat boost source. + + Source: https://core.telegram.org/bots/api#chatboostsource +multi_parse: + attribute: source + regexp: "'([a-z_]+)'" + entities: + - ChatBoostSourcePremium + - ChatBoostSourceGiftCode + - ChatBoostSourceGiveaway diff --git a/.butcher/enums/ChatMemberStatus.yml b/.butcher/enums/ChatMemberStatus.yml new file mode 100644 index 00000000..037e8717 --- /dev/null +++ b/.butcher/enums/ChatMemberStatus.yml @@ -0,0 +1,15 @@ +name: ChatMemberStatus +description: | + This object represents chat member status. + + Source: https://core.telegram.org/bots/api#chatmember +multi_parse: + attribute: status + regexp: "'([a-z_]+)'" + entities: + - ChatMemberOwner + - ChatMemberAdministrator + - ChatMemberMember + - ChatMemberRestricted + - ChatMemberLeft + - ChatMemberBanned diff --git a/.butcher/enums/ChatType.yml b/.butcher/enums/ChatType.yml new file mode 100644 index 00000000..39125b26 --- /dev/null +++ b/.butcher/enums/ChatType.yml @@ -0,0 +1,11 @@ +name: ChatType +description: | + This object represents a chat type + + Source: https://core.telegram.org/bots/api#chat +parse: + entity: Chat + attribute: type + regexp: "'([a-z]+)'" +static: + SENDER: sender diff --git a/.butcher/enums/ContentType.yml b/.butcher/enums/ContentType.yml new file mode 100644 index 00000000..8f7ec557 --- /dev/null +++ b/.butcher/enums/ContentType.yml @@ -0,0 +1,52 @@ +name: ContentType +description: + This object represents a type of content in message +static: + UNKNOWN: unknown + ANY: any +extract: + entity: Message + exclude: + - message_id + - message_thread_id + - from + - sender_chat + - date + - chat + - forward_from + - forward_from_chat + - forward_from_message_id + - forward_signature + - forward_sender_name + - forward_date + - is_topic_message + - is_automatic_forward + - via_bot + - edit_date + - has_protected_content + - media_group_id + - author_signature + - reply_markup + - entities + - caption + - caption_entities + - reply_to_message + - quote + - forward_origin + - external_reply + - link_preview_options + - sender_boost_count + - 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/Currency.yml b/.butcher/enums/Currency.yml new file mode 100644 index 00000000..92045813 --- /dev/null +++ b/.butcher/enums/Currency.yml @@ -0,0 +1,93 @@ +name: Currency +description: | + Currencies supported by Telegram Bot API + + Source: https://core.telegram.org/bots/payments#supported-currencies + +static: + AED: "AED" # United Arab Emirates Dirham + AFN: "AFN" # Afghan Afghani + ALL: "ALL" # Albanian Lek + AMD: "AMD" # Armenian Dram + ARS: "ARS" # Argentine Peso + AUD: "AUD" # Australian Dollar + AZN: "AZN" # Azerbaijani Manat + BAM: "BAM" # Bosnia & Herzegovina Convertible Mark + BDT: "BDT" # Bangladeshi Taka + BGN: "BGN" # Bulgarian Lev + BND: "BND" # Brunei Dollar + BOB: "BOB" # Bolivian Boliviano + BRL: "BRL" # Brazilian Real + BYN: "BYN" # Belarusian ruble + CAD: "CAD" # Canadian Dollar + CHF: "CHF" # Swiss Franc + CLP: "CLP" # Chilean Peso + CNY: "CNY" # Chinese Renminbi Yuan + COP: "COP" # Colombian Peso + CRC: "CRC" # Costa Rican Colón + CZK: "CZK" # Czech Koruna + DKK: "DKK" # Danish Krone + DOP: "DOP" # Dominican Peso + DZD: "DZD" # Algerian Dinar + EGP: "EGP" # Egyptian Pound + ETB: "ETB" # Ethiopian Birr + EUR: "EUR" # Euro + GBP: "GBP" # British Pound + GEL: "GEL" # Georgian Lari + GTQ: "GTQ" # Guatemalan Quetzal + HKD: "HKD" # Hong Kong Dollar + HNL: "HNL" # Honduran Lempira + HRK: "HRK" # Croatian Kuna + HUF: "HUF" # Hungarian Forint + IDR: "IDR" # Indonesian Rupiah + ILS: "ILS" # Israeli New Sheqel + INR: "INR" # Indian Rupee + ISK: "ISK" # Icelandic Króna + JMD: "JMD" # Jamaican Dollar + JPY: "JPY" # Japanese Yen + KES: "KES" # Kenyan Shilling + KGS: "KGS" # Kyrgyzstani Som + KRW: "KRW" # South Korean Won + KZT: "KZT" # Kazakhstani Tenge + LBP: "LBP" # Lebanese Pound + LKR: "LKR" # Sri Lankan Rupee + MAD: "MAD" # Moroccan Dirham + MDL: "MDL" # Moldovan Leu + MNT: "MNT" # Mongolian Tögrög + MUR: "MUR" # Mauritian Rupee + MVR: "MVR" # Maldivian Rufiyaa + MXN: "MXN" # Mexican Peso + MYR: "MYR" # Malaysian Ringgit + MZN: "MZN" # Mozambican Metical + NGN: "NGN" # Nigerian Naira + NIO: "NIO" # Nicaraguan Córdoba + NOK: "NOK" # Norwegian Krone + NPR: "NPR" # Nepalese Rupee + NZD: "NZD" # New Zealand Dollar + PAB: "PAB" # Panamanian Balboa + PEN: "PEN" # Peruvian Nuevo Sol + PHP: "PHP" # Philippine Peso + PKR: "PKR" # Pakistani Rupee + PLN: "PLN" # Polish Złoty + PYG: "PYG" # Paraguayan Guaraní + QAR: "QAR" # Qatari Riyal + RON: "RON" # Romanian Leu + RSD: "RSD" # Serbian Dinar + RUB: "RUB" # Russian Ruble + SAR: "SAR" # Saudi Riyal + SEK: "SEK" # Swedish Krona + SGD: "SGD" # Singapore Dollar + THB: "THB" # Thai Baht + TJS: "TJS" # Tajikistani Somoni + TRY: "TRY" # Turkish Lira + TTD: "TTD" # Trinidad and Tobago Dollar + TWD: "TWD" # New Taiwan Dollar + TZS: "TZS" # Tanzanian Shilling + UAH: "UAH" # Ukrainian Hryvnia + UGX: "UGX" # Ugandan Shilling + USD: "USD" # United States Dollar + UYU: "UYU" # Uruguayan Peso + UZS: "UZS" # Uzbekistani Som + VND: "VND" # Vietnamese Đồng + YER: "YER" # Yemeni Rial + ZAR: "ZAR" # South African Rand diff --git a/.butcher/enums/DiceEmoji.yml b/.butcher/enums/DiceEmoji.yml new file mode 100644 index 00000000..bf7576dc --- /dev/null +++ b/.butcher/enums/DiceEmoji.yml @@ -0,0 +1,12 @@ +name: DiceEmoji +description: | + Emoji on which the dice throw animation is based + + Source: https://core.telegram.org/bots/api#dice +static: + DICE: 🎲 + DART: 🎯 + BASKETBALL: 🏀 + FOOTBALL: ⚽ + SLOT_MACHINE: 🎰 + BOWLING: 🎳 diff --git a/.butcher/enums/EncryptedPassportElement.yml b/.butcher/enums/EncryptedPassportElement.yml new file mode 100644 index 00000000..e0540d7f --- /dev/null +++ b/.butcher/enums/EncryptedPassportElement.yml @@ -0,0 +1,10 @@ +name: EncryptedPassportElement +description: | + This object represents type of encrypted passport element. + + Source: https://core.telegram.org/bots/api#encryptedpassportelement +parse: + entity: EncryptedPassportElement + category: types + attribute: type + regexp: "'([a-z_]+)'" diff --git a/.butcher/enums/InlineQueryResultType.yml b/.butcher/enums/InlineQueryResultType.yml new file mode 100644 index 00000000..2d823438 --- /dev/null +++ b/.butcher/enums/InlineQueryResultType.yml @@ -0,0 +1,29 @@ +name: InlineQueryResultType +description: | + Type of inline query result + + Source: https://core.telegram.org/bots/api#inlinequeryresult +multi_parse: + attribute: type + regexp: "must be ([a-z_0-9]+)" + entities: + - InlineQueryResultCachedAudio + - InlineQueryResultCachedDocument + - InlineQueryResultCachedGif + - InlineQueryResultCachedMpeg4Gif + - InlineQueryResultCachedPhoto + - InlineQueryResultCachedSticker + - InlineQueryResultCachedVideo + - InlineQueryResultCachedVoice + - InlineQueryResultArticle + - InlineQueryResultAudio + - InlineQueryResultContact + - InlineQueryResultGame + - InlineQueryResultDocument + - InlineQueryResultGif + - InlineQueryResultLocation + - InlineQueryResultMpeg4Gif + - InlineQueryResultPhoto + - InlineQueryResultVenue + - InlineQueryResultVideo + - InlineQueryResultVoice diff --git a/.butcher/enums/InputMediaType.yml b/.butcher/enums/InputMediaType.yml new file mode 100644 index 00000000..39e7e2f1 --- /dev/null +++ b/.butcher/enums/InputMediaType.yml @@ -0,0 +1,14 @@ +name: InputMediaType +description: | + This object represents input media type + + Source: https://core.telegram.org/bots/api#inputmedia +multi_parse: + attribute: type + regexp: 'must be ([a-z_]+)' + entities: + - InputMediaAnimation + - InputMediaAudio + - InputMediaDocument + - InputMediaPhoto + - InputMediaVideo diff --git a/.butcher/enums/InputPaidMediaType.yml b/.butcher/enums/InputPaidMediaType.yml new file mode 100644 index 00000000..4ca8e5d4 --- /dev/null +++ b/.butcher/enums/InputPaidMediaType.yml @@ -0,0 +1,12 @@ +name: InputPaidMediaType +description: | + This object represents the type of a media in a paid message. + + Source: https://core.telegram.org/bots/api#inputpaidmedia +multi_parse: + format: rst + attribute: type + regexp: '\*([a-z_]+)\*' + entities: + - InputPaidMediaPhoto + - InputPaidMediaVideo 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/KeyboardButtonPollTypeType.yml b/.butcher/enums/KeyboardButtonPollTypeType.yml new file mode 100644 index 00000000..ee7cb122 --- /dev/null +++ b/.butcher/enums/KeyboardButtonPollTypeType.yml @@ -0,0 +1,8 @@ +name: KeyboardButtonPollTypeType +description: | + This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. + + Source: https://core.telegram.org/bots/api#keyboardbuttonpolltype +static: + QUIZ: "quiz" + REGULAR: "regular" diff --git a/.butcher/enums/MaskPositionPoint.yml b/.butcher/enums/MaskPositionPoint.yml new file mode 100644 index 00000000..4b1da922 --- /dev/null +++ b/.butcher/enums/MaskPositionPoint.yml @@ -0,0 +1,9 @@ +name: MaskPositionPoint +description: | + The part of the face relative to which the mask should be placed. + + Source: https://core.telegram.org/bots/api#maskposition +parse: + entity: MaskPosition + attribute: point + regexp: "'([a-z_]+)'" diff --git a/.butcher/enums/MenuButtonType.yml b/.butcher/enums/MenuButtonType.yml new file mode 100644 index 00000000..a539d058 --- /dev/null +++ b/.butcher/enums/MenuButtonType.yml @@ -0,0 +1,13 @@ +name: MenuButtonType +description: | + This object represents an type of Menu button + + Source: https://core.telegram.org/bots/api#menubuttondefault +multi_parse: + format: rst + attribute: type + regexp: '\*([a-z_]+)\*' + entities: + - MenuButtonDefault + - MenuButtonCommands + - MenuButtonWebApp diff --git a/.butcher/enums/MessageEntityType.yml b/.butcher/enums/MessageEntityType.yml new file mode 100644 index 00000000..95719bc9 --- /dev/null +++ b/.butcher/enums/MessageEntityType.yml @@ -0,0 +1,10 @@ +name: MessageEntityType +description: | + This object represents type of message entity + + Source: https://core.telegram.org/bots/api#messageentity +parse: + entity: MessageEntity + category: types + attribute: type + regexp: "'([a-z_]+)'" diff --git a/.butcher/enums/MessageOriginType.yml b/.butcher/enums/MessageOriginType.yml new file mode 100644 index 00000000..09b32c59 --- /dev/null +++ b/.butcher/enums/MessageOriginType.yml @@ -0,0 +1,13 @@ +name: MessageOriginType +description: | + This object represents origin of a message. + + Source: https://core.telegram.org/bots/api#messageorigin +multi_parse: + attribute: type + regexp: "'([a-z_]+)'" + entities: + - MessageOriginUser + - MessageOriginHiddenUser + - MessageOriginChat + - MessageOriginChannel 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/PaidMediaType.yml b/.butcher/enums/PaidMediaType.yml new file mode 100644 index 00000000..acbf8176 --- /dev/null +++ b/.butcher/enums/PaidMediaType.yml @@ -0,0 +1,13 @@ +name: PaidMediaType +description: | + This object represents the type of a media in a paid message. + + Source: https://core.telegram.org/bots/api#paidmedia +multi_parse: + format: rst + attribute: type + regexp: "'([a-z]+)'" + entities: + - PaidMediaPhoto + - PaidMediaPreview + - PaidMediaVideo diff --git a/.butcher/enums/ParseMode.yml b/.butcher/enums/ParseMode.yml new file mode 100644 index 00000000..5ccb98b8 --- /dev/null +++ b/.butcher/enums/ParseMode.yml @@ -0,0 +1,9 @@ +name: ParseMode +description: | + Formatting options + + Source: https://core.telegram.org/bots/api#formatting-options +static: + MARKDOWN_V2: MarkdownV2 + MARKDOWN: Markdown + HTML: HTML diff --git a/.butcher/enums/PassportElementErrorType.yml b/.butcher/enums/PassportElementErrorType.yml new file mode 100644 index 00000000..d5d52aeb --- /dev/null +++ b/.butcher/enums/PassportElementErrorType.yml @@ -0,0 +1,18 @@ +name: PassportElementErrorType +description: | + This object represents a passport element error type. + + Source: https://core.telegram.org/bots/api#passportelementerror +multi_parse: + attribute: source + regexp: 'must be ([a-z_]+)' + entities: + - PassportElementErrorDataField + - PassportElementErrorFrontSide + - PassportElementErrorReverseSide + - PassportElementErrorSelfie + - PassportElementErrorFile + - PassportElementErrorFiles + - PassportElementErrorTranslationFile + - PassportElementErrorTranslationFiles + - PassportElementErrorUnspecified diff --git a/.butcher/enums/PollType.yml b/.butcher/enums/PollType.yml new file mode 100644 index 00000000..02bf95de --- /dev/null +++ b/.butcher/enums/PollType.yml @@ -0,0 +1,9 @@ +name: PollType +description: | + This object represents poll type + + Source: https://core.telegram.org/bots/api#poll +parse: + entity: Poll + attribute: type + regexp: "'([a-z]+)'" diff --git a/.butcher/enums/ReactionTypeType.yml b/.butcher/enums/ReactionTypeType.yml new file mode 100644 index 00000000..d1c46cc1 --- /dev/null +++ b/.butcher/enums/ReactionTypeType.yml @@ -0,0 +1,12 @@ +name: ReactionTypeType +description: | + This object represents reaction type. + + Source: https://core.telegram.org/bots/api#reactiontype +multi_parse: + attribute: type + regexp: "'([a-z_]+)'" + entities: + - ReactionTypeEmoji + - ReactionTypeCustomEmoji + - ReactionTypePaid diff --git a/.butcher/enums/RevenueWithdrawalStateType.yml b/.butcher/enums/RevenueWithdrawalStateType.yml new file mode 100644 index 00000000..4f90e3ca --- /dev/null +++ b/.butcher/enums/RevenueWithdrawalStateType.yml @@ -0,0 +1,12 @@ +name: RevenueWithdrawalStateType +description: | + This object represents a revenue withdrawal state type + + Source: https://core.telegram.org/bots/api#revenuewithdrawalstate +multi_parse: + attribute: type + regexp: "'([a-z_]+)'" + entities: + - RevenueWithdrawalStateFailed + - RevenueWithdrawalStatePending + - RevenueWithdrawalStateSucceeded diff --git a/.butcher/enums/StickerFormat.yml b/.butcher/enums/StickerFormat.yml new file mode 100644 index 00000000..acfbb00c --- /dev/null +++ b/.butcher/enums/StickerFormat.yml @@ -0,0 +1,10 @@ +name: StickerFormat +description: | + Format of the sticker + + Source: https://core.telegram.org/bots/api#createnewstickerset +parse: + category: methods + entity: createNewStickerSet + attribute: sticker_format + regexp: "'([a-z_]+)'" diff --git a/.butcher/enums/StickerType.yml b/.butcher/enums/StickerType.yml new file mode 100644 index 00000000..5fd3542e --- /dev/null +++ b/.butcher/enums/StickerType.yml @@ -0,0 +1,9 @@ +name: StickerType +description: | + The part of the face relative to which the mask should be placed. + + Source: https://core.telegram.org/bots/api#maskposition +parse: + entity: Sticker + attribute: type + regexp: "'([a-z_]+)'" 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/TopicIconColor.yml b/.butcher/enums/TopicIconColor.yml new file mode 100644 index 00000000..a60e73c6 --- /dev/null +++ b/.butcher/enums/TopicIconColor.yml @@ -0,0 +1,13 @@ +name: TopicIconColor +description: | + Color of the topic icon in RGB format. + + Source: https://github.com/telegramdesktop/tdesktop/blob/991fe491c5ae62705d77aa8fdd44a79caf639c45/Telegram/SourceFiles/data/data_forum_topic.cpp#L51-L56 +type: int +static: + BLUE: "0x6FB9F0" + YELLOW: "0xFFD67E" + VIOLET: "0xCB86DB" + GREEN: "0x8EEE98" + ROSE: "0xFF93B2" + RED: "0xFB6F5F" diff --git a/.butcher/enums/TransactionPartnerType.yml b/.butcher/enums/TransactionPartnerType.yml new file mode 100644 index 00000000..26250867 --- /dev/null +++ b/.butcher/enums/TransactionPartnerType.yml @@ -0,0 +1,16 @@ +name: TransactionPartnerType +description: | + This object represents a type of transaction partner. + + Source: https://core.telegram.org/bots/api#transactionpartner +multi_parse: + attribute: type + regexp: "'([a-z_]+)'" + entities: + - TransactionPartnerFragment + - 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/enums/UpdateType.yml b/.butcher/enums/UpdateType.yml new file mode 100644 index 00000000..ad18ef2f --- /dev/null +++ b/.butcher/enums/UpdateType.yml @@ -0,0 +1,9 @@ +name: UpdateType +description: | + This object represents the complete list of allowed update types + + Source: https://core.telegram.org/bots/api#update +extract: + entity: Update + exclude: + - update_id diff --git a/.butcher/methods/addStickerToSet/entity.json b/.butcher/methods/addStickerToSet/entity.json new file mode 100644 index 00000000..e9cd5f42 --- /dev/null +++ b/.butcher/methods/addStickerToSet/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "addstickertoset", + "name": "addStickerToSet", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of sticker set owner", + "html_description": "User identifier of sticker set owner", + "rst_description": "User identifier of sticker set owner\n", + "name": "user_id" + }, + { + "type": "String", + "required": true, + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name" + }, + { + "type": "InputSticker", + "required": true, + "description": "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 isn't changed.", + "html_description": "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 isn't changed.", + "rst_description": "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 isn't changed.\n", + "name": "sticker" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/answerCallbackQuery/entity.json b/.butcher/methods/answerCallbackQuery/entity.json new file mode 100644 index 00000000..d4d5bf0f --- /dev/null +++ b/.butcher/methods/answerCallbackQuery/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "answercallbackquery", + "name": "answerCallbackQuery", + "description": "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, True is returned.\nAlternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.", + "html_description": "

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, True is returned.

\n

Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.

\n
", + "rst_description": "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.\n\n Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@BotFather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter.", + "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": "callback_query_id" + }, + { + "type": "String", + "required": false, + "description": "Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters", + "html_description": "Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters", + "rst_description": "Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters\n", + "name": "text" + }, + { + "type": "Boolean", + "required": false, + "description": "If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.", + "html_description": "If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.", + "rst_description": "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*.\n", + "name": "show_alert" + }, + { + "type": "String", + "required": false, + "description": "URL that will be opened by the user's client. If you have created a 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 callback_game button.\n\nOtherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.", + "html_description": "URL that will be opened by the user's client. If you have created a 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 callback_game button.
\n
\nOtherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.", + "rst_description": "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.\n\n\n\nOtherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter.\n", + "name": "url" + }, + { + "type": "Integer", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "cache_time" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/answerInlineQuery/entity.json b/.butcher/methods/answerInlineQuery/entity.json new file mode 100644 index 00000000..0a15ee68 --- /dev/null +++ b/.butcher/methods/answerInlineQuery/entity.json @@ -0,0 +1,89 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "answerinlinequery", + "name": "answerInlineQuery", + "description": "Use this method to send answers to an inline query. On success, True is returned.\nNo more than 50 results per query are allowed.", + "html_description": "

Use this method to send answers to an inline query. On success, True is returned.
\nNo more than 50 results per query are allowed.

", + "rst_description": "Use this method to send answers to an inline query. On success, :code:`True` is returned.\n\nNo more than **50** results per query are allowed.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier for the answered query", + "html_description": "Unique identifier for the answered query", + "rst_description": "Unique identifier for the answered query\n", + "name": "inline_query_id" + }, + { + "type": "Array of InlineQueryResult", + "required": true, + "description": "A JSON-serialized array of results for the inline query", + "html_description": "A JSON-serialized array of results for the inline query", + "rst_description": "A JSON-serialized array of results for the inline query\n", + "name": "results" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.", + "html_description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.", + "rst_description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.\n", + "name": "cache_time" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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.", + "html_description": "Pass 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.", + "rst_description": "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.\n", + "name": "is_personal" + }, + { + "type": "String", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "next_offset" + }, + { + "type": "InlineQueryResultsButton", + "required": false, + "description": "A JSON-serialized object describing a button to be shown above inline query results", + "html_description": "A JSON-serialized object describing a button to be shown above inline query results", + "rst_description": "A JSON-serialized object describing a button to be shown above inline query results\n", + "name": "button" + }, + { + "type": "String", + "required": false, + "description": "Deep-linking parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.\n\nExample: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.", + "html_description": "Deep-linking parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.
\n
\nExample: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.", + "rst_description": "`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.\n\n\n\n*Example:* An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a `https://core.telegram.org/bots/api#inlinekeyboardmarkup `_ *switch_inline* button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.\n", + "name": "switch_pm_parameter", + "deprecated": { + "version": "6.7", + "release_date": "2023-04-21" + } + }, + { + "type": "String", + "required": false, + "description": "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", + "html_description": "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", + "rst_description": "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*\n", + "name": "switch_pm_text", + "deprecated": { + "version": "6.7", + "release_date": "2023-04-21" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/answerPreCheckoutQuery/entity.json b/.butcher/methods/answerPreCheckoutQuery/entity.json new file mode 100644 index 00000000..275c85d6 --- /dev/null +++ b/.butcher/methods/answerPreCheckoutQuery/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "answerprecheckoutquery", + "name": "answerPreCheckoutQuery", + "description": "Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.", + "html_description": "

Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.

", + "rst_description": "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.", + "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": "pre_checkout_query_id" + }, + { + "type": "Boolean", + "required": true, + "description": "Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.", + "html_description": "Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.", + "rst_description": "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.\n", + "name": "ok" + }, + { + "type": "String", + "required": false, + "description": "Required if ok is 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.", + "html_description": "Required if ok is 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.", + "rst_description": "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.\n", + "name": "error_message" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/answerShippingQuery/entity.json b/.butcher/methods/answerShippingQuery/entity.json new file mode 100644 index 00000000..6320349c --- /dev/null +++ b/.butcher/methods/answerShippingQuery/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "answershippingquery", + "name": "answerShippingQuery", + "description": "If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.", + "html_description": "

If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.

", + "rst_description": "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.", + "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": "shipping_query_id" + }, + { + "type": "Boolean", + "required": true, + "description": "Pass True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)", + "html_description": "Pass True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)", + "rst_description": "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)\n", + "name": "ok" + }, + { + "type": "Array of ShippingOption", + "required": false, + "description": "Required if ok is True. A JSON-serialized array of available shipping options.", + "html_description": "Required if ok is True. A JSON-serialized array of available shipping options.", + "rst_description": "Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options.\n", + "name": "shipping_options" + }, + { + "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", + "name": "error_message" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/answerWebAppQuery/entity.json b/.butcher/methods/answerWebAppQuery/entity.json new file mode 100644 index 00000000..82ae4124 --- /dev/null +++ b/.butcher/methods/answerWebAppQuery/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "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" + } +} diff --git a/.butcher/methods/approveChatJoinRequest/entity.json b/.butcher/methods/approveChatJoinRequest/entity.json new file mode 100644 index 00000000..19620b97 --- /dev/null +++ b/.butcher/methods/approveChatJoinRequest/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "approvechatjoinrequest", + "name": "approveChatJoinRequest", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "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/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/banChatMember/entity.json b/.butcher/methods/banChatMember/entity.json new file mode 100644 index 00000000..9a5eda0d --- /dev/null +++ b/.butcher/methods/banChatMember/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "banchatmember", + "name": "banChatMember", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)\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": "Integer", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "until_date" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels.", + "html_description": "Pass True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels.", + "rst_description": "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.\n", + "name": "revoke_messages" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/banChatMember/replace.yml b/.butcher/methods/banChatMember/replace.yml new file mode 100644 index 00000000..04eda49f --- /dev/null +++ b/.butcher/methods/banChatMember/replace.yml @@ -0,0 +1,11 @@ +annotations: + until_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/banChatSenderChat/entity.json b/.butcher/methods/banChatSenderChat/entity.json new file mode 100644 index 00000000..425f4c72 --- /dev/null +++ b/.butcher/methods/banChatSenderChat/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "banchatsenderchat", + "name": "banChatSenderChat", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target sender chat", + "html_description": "Unique identifier of the target sender chat", + "rst_description": "Unique identifier of the target sender chat\n", + "name": "sender_chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/close/entity.json b/.butcher/methods/close/entity.json new file mode 100644 index 00000000..5a374104 --- /dev/null +++ b/.butcher/methods/close/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "close", + "name": "close", + "description": "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 True on success. Requires no parameters.", + "html_description": "

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 True on success. Requires no parameters.

", + "rst_description": "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.", + "annotations": [], + "category": "methods" + } +} diff --git a/.butcher/methods/closeForumTopic/entity.json b/.butcher/methods/closeForumTopic/entity.json new file mode 100644 index 00000000..efe086a7 --- /dev/null +++ b/.butcher/methods/closeForumTopic/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "closeforumtopic", + "name": "closeForumTopic", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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 for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/closeGeneralForumTopic/entity.json b/.butcher/methods/closeGeneralForumTopic/entity.json new file mode 100644 index 00000000..42c6f3bf --- /dev/null +++ b/.butcher/methods/closeGeneralForumTopic/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "closegeneralforumtopic", + "name": "closeGeneralForumTopic", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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" + } + ], + "category": "methods" + } +} 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/default.yml b/.butcher/methods/copyMessage/default.yml new file mode 100644 index 00000000..50d7b57d --- /dev/null +++ b/.butcher/methods/copyMessage/default.yml @@ -0,0 +1,3 @@ +parse_mode: parse_mode +protect_content: protect_content +show_caption_above_media: show_caption_above_media diff --git a/.butcher/methods/copyMessage/entity.json b/.butcher/methods/copyMessage/entity.json new file mode 100644 index 00000000..3818a19b --- /dev/null +++ b/.butcher/methods/copyMessage/entity.json @@ -0,0 +1,177 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "copymessage", + "name": "copyMessage", + "description": "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 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 forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.", + "html_description": "

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 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 forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": 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 or String", + "required": true, + "description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)", + "html_description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)", + "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": true, + "description": "Message identifier in the chat specified in from_chat_id", + "html_description": "Message identifier in the chat specified in from_chat_id", + "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, + "description": "New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept", + "html_description": "New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept", + "rst_description": "New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the new caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the new caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the new 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 new caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if the caption must be shown above the message media. Ignored if a new caption isn't specified.", + "html_description": "Pass True, if the caption must be shown above the message media. Ignored if a new caption isn't specified.", + "rst_description": "Pass :code:`True`, if the caption must be shown above the message media. Ignored if a new caption isn't specified.\n", + "name": "show_caption_above_media" + }, + { + "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": "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} 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 new file mode 100644 index 00000000..c6b38dc8 --- /dev/null +++ b/.butcher/methods/copyMessages/entity.json @@ -0,0 +1,81 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "copymessages", + "name": "copyMessages", + "description": "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 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 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 MessageId of the sent messages is returned.", + "html_description": "

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 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 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 MessageId of the sent messages is returned.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": 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 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, + "description": "Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)", + "html_description": "Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)", + "rst_description": "Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)\n", + "name": "from_chat_id" + }, + { + "type": "Array of Integer", + "required": true, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "message_ids" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the messages silently. Users will receive a notification with no sound.", + "html_description": "Sends the messages silently. Users will receive a notification with no sound.", + "rst_description": "Sends the messages `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent messages from forwarding and saving", + "html_description": "Protects the contents of the sent messages from forwarding and saving", + "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 copy the messages without their captions", + "html_description": "Pass True to copy the messages without their captions", + "rst_description": "Pass :code:`True` to copy the messages without their captions\n", + "name": "remove_caption" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/createChatInviteLink/entity.json b/.butcher/methods/createChatInviteLink/entity.json new file mode 100644 index 00000000..459edcd8 --- /dev/null +++ b/.butcher/methods/createChatInviteLink/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "createchatinvitelink", + "name": "createChatInviteLink", + "description": "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 revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.", + "html_description": "

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 revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.

", + "rst_description": "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.", + "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": 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": false, + "description": "Point in time (Unix timestamp) when the link will expire", + "html_description": "Point in time (Unix timestamp) when the link will expire", + "rst_description": "Point in time (Unix timestamp) when the link will expire\n", + "name": "expire_date" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "html_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "rst_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999\n", + "name": "member_limit" + }, + { + "type": "Boolean", + "required": false, + "description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified", + "html_description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified", + "rst_description": ":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\n", + "name": "creates_join_request" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/createChatInviteLink/replace.yml b/.butcher/methods/createChatInviteLink/replace.yml new file mode 100644 index 00000000..d5817af7 --- /dev/null +++ b/.butcher/methods/createChatInviteLink/replace.yml @@ -0,0 +1,11 @@ +annotations: + expire_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/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 new file mode 100644 index 00000000..e3f744b3 --- /dev/null +++ b/.butcher/methods/createForumTopic/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "createforumtopic", + "name": "createForumTopic", + "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", + "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": "String", + "required": true, + "description": "Topic name, 1-128 characters", + "html_description": "Topic name, 1-128 characters", + "rst_description": "Topic name, 1-128 characters\n", + "name": "name" + }, + { + "type": "Integer", + "required": false, + "description": "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)", + "html_description": "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)", + "rst_description": "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)\n", + "name": "icon_color" + }, + { + "type": "String", + "required": false, + "description": "Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.", + "html_description": "Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.", + "rst_description": "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.\n", + "name": "icon_custom_emoji_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/createInvoiceLink/entity.json b/.butcher/methods/createInvoiceLink/entity.json new file mode 100644 index 00000000..daa2da71 --- /dev/null +++ b/.butcher/methods/createInvoiceLink/entity.json @@ -0,0 +1,193 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "createinvoicelink", + "name": "createInvoiceLink", + "description": "Use this method to create a link for an invoice. Returns the created invoice link as String on success.", + "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, + "description": "Product name, 1-32 characters", + "html_description": "Product name, 1-32 characters", + "rst_description": "Product name, 1-32 characters\n", + "name": "title" + }, + { + "type": "String", + "required": true, + "description": "Product description, 1-255 characters", + "html_description": "Product description, 1-255 characters", + "rst_description": "Product description, 1-255 characters\n", + "name": "description" + }, + { + "type": "String", + "required": true, + "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" + }, + { + "type": "String", + "required": false, + "description": "Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.", + "html_description": "Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.", + "rst_description": "Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.\n", + "name": "provider_token" + }, + { + "type": "String", + "required": true, + "description": "Three-letter ISO 4217 currency code, see more on currencies. Pass 'XTR' for payments in Telegram Stars.", + "html_description": "Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars.", + "rst_description": "Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.\n", + "name": "currency" + }, + { + "type": "Array of LabeledPrice", + "required": true, + "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.", + "html_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.", + "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, + "description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass 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.", + "html_description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass 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.", + "rst_description": "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 `_.\n", + "name": "max_tip_amount" + }, + { + "type": "Array of Integer", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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*.\n", + "name": "suggested_tip_amounts" + }, + { + "type": "String", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "provider_data" + }, + { + "type": "String", + "required": false, + "description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.", + "html_description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.", + "rst_description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.\n", + "name": "photo_url" + }, + { + "type": "Integer", + "required": false, + "description": "Photo size in bytes", + "html_description": "Photo size in bytes", + "rst_description": "Photo size in bytes\n", + "name": "photo_size" + }, + { + "type": "Integer", + "required": false, + "description": "Photo width", + "html_description": "Photo width", + "rst_description": "Photo width\n", + "name": "photo_width" + }, + { + "type": "Integer", + "required": false, + "description": "Photo height", + "html_description": "Photo height", + "rst_description": "Photo height\n", + "name": "photo_height" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_name" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_phone_number" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_email" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_shipping_address" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_.\n", + "name": "send_phone_number_to_provider" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_.\n", + "name": "send_email_to_provider" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_.\n", + "name": "is_flexible" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/createNewStickerSet/entity.json b/.butcher/methods/createNewStickerSet/entity.json new file mode 100644 index 00000000..3d9b7b7b --- /dev/null +++ b/.butcher/methods/createNewStickerSet/entity.json @@ -0,0 +1,77 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "createnewstickerset", + "name": "createNewStickerSet", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of created sticker set owner", + "html_description": "User identifier of created sticker set owner", + "rst_description": "User identifier of created sticker set owner\n", + "name": "user_id" + }, + { + "type": "String", + "required": true, + "description": "Short name of sticker set, to be used in 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 \"_by_\". is case insensitive. 1-64 characters.", + "html_description": "Short name of sticker set, to be used in 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 \"_by_<bot_username>\". <bot_username> is case insensitive. 1-64 characters.", + "rst_description": "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.\n", + "name": "name" + }, + { + "type": "String", + "required": true, + "description": "Sticker set title, 1-64 characters", + "html_description": "Sticker set title, 1-64 characters", + "rst_description": "Sticker set title, 1-64 characters\n", + "name": "title" + }, + { + "type": "Array of InputSticker", + "required": true, + "description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set", + "html_description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set", + "rst_description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set\n", + "name": "stickers" + }, + { + "type": "String", + "required": false, + "description": "Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.", + "html_description": "Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. By default, a regular sticker set is created.", + "rst_description": "Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.\n", + "name": "sticker_type" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "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\n", + "name": "needs_repainting" + }, + { + "type": "String", + "required": false, + "description": "Format of stickers in the set, must be one of 'static', 'animated', 'video'", + "html_description": "Format of stickers in the set, must be one of “static”, “animated”, “video”", + "rst_description": "Format of stickers in the set, must be one of 'static', 'animated', 'video'\n", + "name": "sticker_format", + "deprecated": { + "version": "7.2", + "release_date": "2024-03-31" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/declineChatJoinRequest/entity.json b/.butcher/methods/declineChatJoinRequest/entity.json new file mode 100644 index 00000000..c3935ffc --- /dev/null +++ b/.butcher/methods/declineChatJoinRequest/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "declinechatjoinrequest", + "name": "declineChatJoinRequest", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "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/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/deleteChatPhoto/entity.json b/.butcher/methods/deleteChatPhoto/entity.json new file mode 100644 index 00000000..ec2b6f4b --- /dev/null +++ b/.butcher/methods/deleteChatPhoto/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "deletechatphoto", + "name": "deleteChatPhoto", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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/deleteChatStickerSet/entity.json b/.butcher/methods/deleteChatStickerSet/entity.json new file mode 100644 index 00000000..e1399fc4 --- /dev/null +++ b/.butcher/methods/deleteChatStickerSet/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "deletechatstickerset", + "name": "deleteChatStickerSet", + "description": "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 getChat requests to check if the bot can use this method. Returns True on success.", + "html_description": "

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 getChat requests to check if the bot can use this method. Returns True on success.

", + "rst_description": "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.", + "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" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/deleteForumTopic/entity.json b/.butcher/methods/deleteForumTopic/entity.json new file mode 100644 index 00000000..5afe09b0 --- /dev/null +++ b/.butcher/methods/deleteForumTopic/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "deleteforumtopic", + "name": "deleteForumTopic", + "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", + "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 for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/deleteMessage/entity.json b/.butcher/methods/deleteMessage/entity.json new file mode 100644 index 00000000..45a81fd5 --- /dev/null +++ b/.butcher/methods/deleteMessage/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "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 administrator right in a supergroup or a channel, it can delete any message there.\n- If the bot has can_manage_direct_messages administrator right in a channel, it can delete any message in the corresponding direct messages chat.\nReturns True on success.", + "html_description": "

Use this method to delete a message, including service messages, with the following limitations:
\n- A message can only be deleted if it was sent less than 48 hours ago.
\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.
\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.
\n- Bots can delete outgoing messages in private chats, groups, and supergroups.
\n- Bots can delete incoming messages in private chats.
\n- Bots granted can_post_messages permissions can delete outgoing messages in channels.
\n- If the bot is an administrator of a group, it can delete any message there.
\n- If the bot has can_delete_messages administrator right in a supergroup or a channel, it can delete any message there.
\n- If the bot has can_manage_direct_messages administrator right in a channel, it can delete any message in the corresponding direct messages chat.
\nReturns True on success.

", + "rst_description": "Use this method to delete a message, including service messages, with the following limitations:\n\n- A message can only be deleted if it was sent less than 48 hours ago.\n\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.\n\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.\n\n- Bots can delete outgoing messages in private chats, groups, and supergroups.\n\n- Bots can delete incoming messages in private chats.\n\n- Bots granted *can_post_messages* permissions can delete outgoing messages in channels.\n\n- If the bot is an administrator of a group, it can delete any message there.\n\n- If the bot has *can_delete_messages* administrator right in a supergroup or a channel, it can delete any message there.\n\n- If the bot has *can_manage_direct_messages* administrator right in a channel, it can delete any message in the corresponding direct messages chat.\n\nReturns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Identifier of the message to delete", + "html_description": "Identifier of the message to delete", + "rst_description": "Identifier of the message to delete\n", + "name": "message_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/deleteMessages/entity.json b/.butcher/methods/deleteMessages/entity.json new file mode 100644 index 00000000..5533110f --- /dev/null +++ b/.butcher/methods/deleteMessages/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "deletemessages", + "name": "deleteMessages", + "description": "Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns True on success.", + "html_description": "

Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns True on success.

", + "rst_description": "Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Array of Integer", + "required": true, + "description": "A JSON-serialized list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted", + "html_description": "A JSON-serialized list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted", + "rst_description": "A JSON-serialized list of 1-100 identifiers of messages to delete. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted\n", + "name": "message_ids" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/deleteMyCommands/entity.json b/.butcher/methods/deleteMyCommands/entity.json new file mode 100644 index 00000000..09b79f30 --- /dev/null +++ b/.butcher/methods/deleteMyCommands/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "deletemycommands", + "name": "deleteMyCommands", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "BotCommandScope", + "required": false, + "description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "html_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "rst_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.\n", + "name": "scope" + }, + { + "type": "String", + "required": false, + "description": "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", + "html_description": "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", + "rst_description": "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\n", + "name": "language_code" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/deleteStickerFromSet/entity.json b/.butcher/methods/deleteStickerFromSet/entity.json new file mode 100644 index 00000000..1792317f --- /dev/null +++ b/.butcher/methods/deleteStickerFromSet/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "deletestickerfromset", + "name": "deleteStickerFromSet", + "description": "Use this method to delete a sticker from a set created by the bot. Returns True on success.", + "html_description": "

Use this method to delete a sticker from a set created by the bot. Returns True on success.

", + "rst_description": "Use this method to delete a sticker from a set created by the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier of the sticker", + "html_description": "File identifier of the sticker", + "rst_description": "File identifier of the sticker\n", + "name": "sticker" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/deleteStickerSet/entity.json b/.butcher/methods/deleteStickerSet/entity.json new file mode 100644 index 00000000..c33a8833 --- /dev/null +++ b/.butcher/methods/deleteStickerSet/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "deletestickerset", + "name": "deleteStickerSet", + "description": "Use this method to delete a sticker set that was created by the bot. Returns True on success.", + "html_description": "

Use this method to delete a sticker set that was created by the bot. Returns True on success.

", + "rst_description": "Use this method to delete a sticker set that was created by the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name" + } + ], + "category": "methods" + } +} 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/deleteWebhook/entity.json b/.butcher/methods/deleteWebhook/entity.json new file mode 100644 index 00000000..bab4c013 --- /dev/null +++ b/.butcher/methods/deleteWebhook/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Getting updates", + "anchor": "getting-updates" + }, + "object": { + "anchor": "deletewebhook", + "name": "deleteWebhook", + "description": "Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.", + "html_description": "

Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Boolean", + "required": false, + "description": "Pass True to drop all pending updates", + "html_description": "Pass True to drop all pending updates", + "rst_description": "Pass :code:`True` to drop all pending updates\n", + "name": "drop_pending_updates" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editChatInviteLink/entity.json b/.butcher/methods/editChatInviteLink/entity.json new file mode 100644 index 00000000..67d40ac9 --- /dev/null +++ b/.butcher/methods/editChatInviteLink/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "editchatinvitelink", + "name": "editChatInviteLink", + "description": "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 ChatInviteLink object.", + "html_description": "

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 ChatInviteLink object.

", + "rst_description": "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.", + "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" + }, + { + "type": "Integer", + "required": false, + "description": "Point in time (Unix timestamp) when the link will expire", + "html_description": "Point in time (Unix timestamp) when the link will expire", + "rst_description": "Point in time (Unix timestamp) when the link will expire\n", + "name": "expire_date" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "html_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "rst_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999\n", + "name": "member_limit" + }, + { + "type": "Boolean", + "required": false, + "description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified", + "html_description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified", + "rst_description": ":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\n", + "name": "creates_join_request" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editChatInviteLink/replace.yml b/.butcher/methods/editChatInviteLink/replace.yml new file mode 100644 index 00000000..d5817af7 --- /dev/null +++ b/.butcher/methods/editChatInviteLink/replace.yml @@ -0,0 +1,11 @@ +annotations: + expire_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/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 new file mode 100644 index 00000000..ebbdfbe3 --- /dev/null +++ b/.butcher/methods/editForumTopic/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "editforumtopic", + "name": "editForumTopic", + "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", + "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 for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + }, + { + "type": "String", + "required": false, + "description": "New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept", + "html_description": "New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept", + "rst_description": "New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept\n", + "name": "name" + }, + { + "type": "String", + "required": false, + "description": "New unique identifier of the custom emoji shown as the topic icon. Use 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", + "html_description": "New unique identifier of the custom emoji shown as the topic icon. Use 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", + "rst_description": "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\n", + "name": "icon_custom_emoji_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editGeneralForumTopic/entity.json b/.butcher/methods/editGeneralForumTopic/entity.json new file mode 100644 index 00000000..64065e3a --- /dev/null +++ b/.butcher/methods/editGeneralForumTopic/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "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 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", + "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": "String", + "required": true, + "description": "New topic name, 1-128 characters", + "html_description": "New topic name, 1-128 characters", + "rst_description": "New topic name, 1-128 characters\n", + "name": "name" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editMessageCaption/default.yml b/.butcher/methods/editMessageCaption/default.yml new file mode 100644 index 00000000..a6b90bc0 --- /dev/null +++ b/.butcher/methods/editMessageCaption/default.yml @@ -0,0 +1,2 @@ +parse_mode: parse_mode +show_caption_above_media: show_caption_above_media diff --git a/.butcher/methods/editMessageCaption/entity.json b/.butcher/methods/editMessageCaption/entity.json new file mode 100644 index 00000000..2f154f9b --- /dev/null +++ b/.butcher/methods/editMessageCaption/entity.json @@ -0,0 +1,89 @@ +{ + "meta": {}, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "editmessagecaption", + "name": "editMessageCaption", + "description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", + "html_description": "

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

", + "rst_description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "html_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "String", + "required": false, + "description": "New caption of the message, 0-1024 characters after entities parsing", + "html_description": "New caption of the message, 0-1024 characters after entities parsing", + "rst_description": "New caption of the message, 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the message caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the message caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the message caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.", + "html_description": "Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.", + "rst_description": "Pass :code:`True`, if the caption must be shown above the message media. Supported only for animation, photo and video messages.\n", + "name": "show_caption_above_media" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard.", + "html_description": "A JSON-serialized object for an inline keyboard.", + "rst_description": "A JSON-serialized object for an `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} 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/editMessageLiveLocation/entity.json b/.butcher/methods/editMessageLiveLocation/entity.json new file mode 100644 index 00000000..decfbacc --- /dev/null +++ b/.butcher/methods/editMessageLiveLocation/entity.json @@ -0,0 +1,105 @@ +{ + "meta": {}, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "editmessagelivelocation", + "name": "editMessageLiveLocation", + "description": "Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", + "html_description": "

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

", + "rst_description": "Use this method to edit live location messages. A location can be edited until its *live_period* expires or editing is explicitly disabled by a call to :class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "html_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "Float", + "required": true, + "description": "Latitude of new location", + "html_description": "Latitude of new location", + "rst_description": "Latitude of new location\n", + "name": "latitude" + }, + { + "type": "Float", + "required": true, + "description": "Longitude of new location", + "html_description": "Longitude of new location", + "rst_description": "Longitude of new location\n", + "name": "longitude" + }, + { + "type": "Integer", + "required": false, + "description": "New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then live_period remains unchanged", + "html_description": "New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then live_period remains unchanged", + "rst_description": "New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current *live_period* by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then *live_period* remains unchanged\n", + "name": "live_period" + }, + { + "type": "Float", + "required": false, + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy" + }, + { + "type": "Integer", + "required": false, + "description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "html_description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "rst_description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", + "name": "heading" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "html_description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "rst_description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.\n", + "name": "proximity_alert_radius" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new inline keyboard.", + "html_description": "A JSON-serialized object for a new inline keyboard.", + "rst_description": "A JSON-serialized object for a new `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editMessageMedia/entity.json b/.butcher/methods/editMessageMedia/entity.json new file mode 100644 index 00000000..6910b3c7 --- /dev/null +++ b/.butcher/methods/editMessageMedia/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "editmessagemedia", + "name": "editMessageMedia", + "description": "Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", + "html_description": "

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

", + "rst_description": "Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "html_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "InputMedia", + "required": true, + "description": "A JSON-serialized object for a new media content of the message", + "html_description": "A JSON-serialized object for a new media content of the message", + "rst_description": "A JSON-serialized object for a new media content of the message\n", + "name": "media" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new inline keyboard.", + "html_description": "A JSON-serialized object for a new inline keyboard.", + "rst_description": "A JSON-serialized object for a new `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editMessageReplyMarkup/entity.json b/.butcher/methods/editMessageReplyMarkup/entity.json new file mode 100644 index 00000000..5c0bd7f8 --- /dev/null +++ b/.butcher/methods/editMessageReplyMarkup/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "editmessagereplymarkup", + "name": "editMessageReplyMarkup", + "description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", + "html_description": "

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

", + "rst_description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "html_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard.", + "html_description": "A JSON-serialized object for an inline keyboard.", + "rst_description": "A JSON-serialized object for an `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editMessageText/default.yml b/.butcher/methods/editMessageText/default.yml new file mode 100644 index 00000000..f549c63d --- /dev/null +++ b/.butcher/methods/editMessageText/default.yml @@ -0,0 +1,3 @@ +disable_web_page_preview: link_preview_is_disabled +link_preview_options: link_preview +parse_mode: parse_mode diff --git a/.butcher/methods/editMessageText/entity.json b/.butcher/methods/editMessageText/entity.json new file mode 100644 index 00000000..03176f3d --- /dev/null +++ b/.butcher/methods/editMessageText/entity.json @@ -0,0 +1,101 @@ +{ + "meta": {}, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "editmessagetext", + "name": "editMessageText", + "description": "Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", + "html_description": "

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

", + "rst_description": "Use this method to edit text and `game `_ messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "html_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "String", + "required": true, + "description": "New text of the message, 1-4096 characters after entities parsing", + "html_description": "New text of the message, 1-4096 characters after entities parsing", + "rst_description": "New text of the message, 1-4096 characters after entities parsing\n", + "name": "text" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the message text. See formatting options for more details.", + "html_description": "Mode for parsing entities in the message text. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the message text. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*\n", + "name": "entities" + }, + { + "type": "LinkPreviewOptions", + "required": false, + "description": "Link preview generation options for the message", + "html_description": "Link preview generation options for the message", + "rst_description": "Link preview generation options for the message\n", + "name": "link_preview_options" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard.", + "html_description": "A JSON-serialized object for an inline keyboard.", + "rst_description": "A JSON-serialized object for an `inline keyboard `_.\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Disables link previews for links in this message", + "html_description": "Disables link previews for links in this message", + "rst_description": "Disables link previews for links in this message\n", + "name": "disable_web_page_preview", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} 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/exportChatInviteLink/entity.json b/.butcher/methods/exportChatInviteLink/entity.json new file mode 100644 index 00000000..4b6f0b6f --- /dev/null +++ b/.butcher/methods/exportChatInviteLink/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "exportchatinvitelink", + "name": "exportChatInviteLink", + "description": "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.\nNote: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again.", + "html_description": "

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.

\n

Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again.

\n
", + "rst_description": "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.\n\n Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again.", + "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/forwardMessage/default.yml b/.butcher/methods/forwardMessage/default.yml new file mode 100644 index 00000000..bb0cb2e2 --- /dev/null +++ b/.butcher/methods/forwardMessage/default.yml @@ -0,0 +1 @@ +protect_content: protect_content diff --git a/.butcher/methods/forwardMessage/entity.json b/.butcher/methods/forwardMessage/entity.json new file mode 100644 index 00000000..13bd8cb4 --- /dev/null +++ b/.butcher/methods/forwardMessage/entity.json @@ -0,0 +1,97 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "forwardmessage", + "name": "forwardMessage", + "description": "Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent Message is returned.", + "html_description": "

Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent Message is returned.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": 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 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, + "description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)", + "html_description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)", + "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, + "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 forwarded message from forwarding and saving", + "html_description": "Protects the contents of the forwarded message from forwarding and saving", + "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, + "description": "Message identifier in the chat specified in from_chat_id", + "html_description": "Message identifier in the chat specified in from_chat_id", + "rst_description": "Message identifier in the chat specified in *from_chat_id*\n", + "name": "message_id" + } + ], + "category": "methods" + } +} 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 new file mode 100644 index 00000000..c08b6722 --- /dev/null +++ b/.butcher/methods/forwardMessages/entity.json @@ -0,0 +1,73 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "forwardmessages", + "name": "forwardMessages", + "description": "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 MessageId of the sent messages is returned.", + "html_description": "

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 MessageId of the sent messages is returned.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": 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 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, + "description": "Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)", + "html_description": "Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)", + "rst_description": "Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)\n", + "name": "from_chat_id" + }, + { + "type": "Array of Integer", + "required": true, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "message_ids" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the messages silently. Users will receive a notification with no sound.", + "html_description": "Sends the messages silently. Users will receive a notification with no sound.", + "rst_description": "Sends the messages `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the forwarded messages from forwarding and saving", + "html_description": "Protects the contents of the forwarded messages from forwarding and saving", + "rst_description": "Protects the contents of the forwarded messages from forwarding and saving\n", + "name": "protect_content" + } + ], + "category": "methods" + } +} 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/getBusinessConnection/entity.json b/.butcher/methods/getBusinessConnection/entity.json new file mode 100644 index 00000000..8005a363 --- /dev/null +++ b/.butcher/methods/getBusinessConnection/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getbusinessconnection", + "name": "getBusinessConnection", + "description": "Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.", + "html_description": "

Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.

", + "rst_description": "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.", + "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/getChat/entity.json b/.butcher/methods/getChat/entity.json new file mode 100644 index 00000000..586bf6dd --- /dev/null +++ b/.butcher/methods/getChat/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getchat", + "name": "getChat", + "description": "Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success.", + "html_description": "

Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success.

", + "rst_description": "Use this method to get up-to-date information about the chat. Returns a :class:`aiogram.types.chat_full_info.ChatFullInfo` object on success.", + "annotations": [ + { + "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", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getChatAdministrators/entity.json b/.butcher/methods/getChatAdministrators/entity.json new file mode 100644 index 00000000..7273570e --- /dev/null +++ b/.butcher/methods/getChatAdministrators/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getchatadministrators", + "name": "getChatAdministrators", + "description": "Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects.", + "html_description": "

Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects.

", + "rst_description": "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.", + "annotations": [ + { + "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", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getChatAdministrators/replace.yml b/.butcher/methods/getChatAdministrators/replace.yml new file mode 100644 index 00000000..5b17d2f6 --- /dev/null +++ b/.butcher/methods/getChatAdministrators/replace.yml @@ -0,0 +1,30 @@ +returning: + parsed_type: + type: array + items: + type: union + items: + - type: entity + references: + category: types + name: ChatMemberOwner + - type: entity + references: + category: types + name: ChatMemberAdministrator + - type: entity + references: + category: types + name: ChatMemberMember + - type: entity + references: + category: types + name: ChatMemberRestricted + - type: entity + references: + category: types + name: ChatMemberLeft + - type: entity + references: + category: types + name: ChatMemberBanned 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/getChatMember/entity.json b/.butcher/methods/getChatMember/entity.json new file mode 100644 index 00000000..96b0148f --- /dev/null +++ b/.butcher/methods/getChatMember/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getchatmember", + "name": "getChatMember", + "description": "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 ChatMember object on success.", + "html_description": "

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 ChatMember object on success.

", + "rst_description": "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.", + "annotations": [ + { + "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", + "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" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getChatMember/replace.yml b/.butcher/methods/getChatMember/replace.yml new file mode 100644 index 00000000..3af68560 --- /dev/null +++ b/.butcher/methods/getChatMember/replace.yml @@ -0,0 +1,28 @@ +returning: + parsed_type: + type: union + items: + - type: entity + references: + category: types + name: ChatMemberOwner + - type: entity + references: + category: types + name: ChatMemberAdministrator + - type: entity + references: + category: types + name: ChatMemberMember + - type: entity + references: + category: types + name: ChatMemberRestricted + - type: entity + references: + category: types + name: ChatMemberLeft + - type: entity + references: + category: types + name: ChatMemberBanned diff --git a/.butcher/methods/getChatMemberCount/entity.json b/.butcher/methods/getChatMemberCount/entity.json new file mode 100644 index 00000000..d5d06653 --- /dev/null +++ b/.butcher/methods/getChatMemberCount/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getchatmembercount", + "name": "getChatMemberCount", + "description": "Use this method to get the number of members in a chat. Returns Int on success.", + "html_description": "

Use this method to get the number of members in a chat. Returns Int on success.

", + "rst_description": "Use this method to get the number of members in a chat. Returns *Int* on success.", + "annotations": [ + { + "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", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getChatMenuButton/entity.json b/.butcher/methods/getChatMenuButton/entity.json new file mode 100644 index 00000000..6a47ae2d --- /dev/null +++ b/.butcher/methods/getChatMenuButton/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getchatmenubutton", + "name": "getChatMenuButton", + "description": "Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.", + "html_description": "

Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be returned", + "html_description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be returned", + "rst_description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be returned\n", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getChatMenuButton/replace.yml b/.butcher/methods/getChatMenuButton/replace.yml new file mode 100644 index 00000000..66c6d5b6 --- /dev/null +++ b/.butcher/methods/getChatMenuButton/replace.yml @@ -0,0 +1,16 @@ +returning: + parsed_type: + type: union + items: + - type: entity + references: + category: types + name: MenuButtonDefault + - type: entity + references: + category: types + name: MenuButtonWebApp + - type: entity + references: + category: types + name: MenuButtonCommands diff --git a/.butcher/methods/getCustomEmojiStickers/entity.json b/.butcher/methods/getCustomEmojiStickers/entity.json new file mode 100644 index 00000000..8f3132f1 --- /dev/null +++ b/.butcher/methods/getCustomEmojiStickers/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "getcustomemojistickers", + "name": "getCustomEmojiStickers", + "description": "Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.", + "html_description": "

Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.

", + "rst_description": "Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects.", + "annotations": [ + { + "type": "Array of String", + "required": true, + "description": "A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.", + "html_description": "A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.", + "rst_description": "A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.\n", + "name": "custom_emoji_ids" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getFile/entity.json b/.butcher/methods/getFile/entity.json new file mode 100644 index 00000000..29cc98c6 --- /dev/null +++ b/.butcher/methods/getFile/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getfile", + "name": "getFile", + "description": "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 File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot/, where 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 getFile again.\nNote: This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.", + "html_description": "

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 File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> 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 getFile again.

Note: This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.

", + "rst_description": "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.\n**Note:** This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier to get information about", + "html_description": "File identifier to get information about", + "rst_description": "File identifier to get information about\n", + "name": "file_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getForumTopicIconStickers/entity.json b/.butcher/methods/getForumTopicIconStickers/entity.json new file mode 100644 index 00000000..81673b9e --- /dev/null +++ b/.butcher/methods/getForumTopicIconStickers/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getforumtopiciconstickers", + "name": "getForumTopicIconStickers", + "description": "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 Sticker objects.", + "html_description": "

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 Sticker objects.

", + "rst_description": "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.", + "annotations": [], + "category": "methods" + } +} diff --git a/.butcher/methods/getGameHighScores/entity.json b/.butcher/methods/getGameHighScores/entity.json new file mode 100644 index 00000000..c536fd4b --- /dev/null +++ b/.butcher/methods/getGameHighScores/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Games", + "anchor": "games" + }, + "object": { + "anchor": "getgamehighscores", + "name": "getGameHighScores", + "description": "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 GameHighScore objects.\nThis method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change.", + "html_description": "

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 GameHighScore objects.

\n

This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change.

\n
", + "rst_description": "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.\n\n This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Target user id", + "html_description": "Target user id", + "rst_description": "Target user id\n", + "name": "user_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the sent message", + "html_description": "Required if inline_message_id is not specified. Identifier of the sent message", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the sent message\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + } + ], + "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/getMe/entity.json b/.butcher/methods/getMe/entity.json new file mode 100644 index 00000000..d009d229 --- /dev/null +++ b/.butcher/methods/getMe/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getme", + "name": "getMe", + "description": "A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.", + "html_description": "

A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.

", + "rst_description": "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.", + "annotations": [], + "category": "methods" + } +} diff --git a/.butcher/methods/getMyCommands/entity.json b/.butcher/methods/getMyCommands/entity.json new file mode 100644 index 00000000..2114d814 --- /dev/null +++ b/.butcher/methods/getMyCommands/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getmycommands", + "name": "getMyCommands", + "description": "Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned.", + "html_description": "

Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned.

", + "rst_description": "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.", + "annotations": [ + { + "type": "BotCommandScope", + "required": false, + "description": "A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.", + "html_description": "A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.", + "rst_description": "A JSON-serialized object, describing scope of users. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.\n", + "name": "scope" + }, + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code or an empty string", + "html_description": "A two-letter ISO 639-1 language code or an empty string", + "rst_description": "A two-letter ISO 639-1 language code or an empty string\n", + "name": "language_code" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getMyDefaultAdministratorRights/entity.json b/.butcher/methods/getMyDefaultAdministratorRights/entity.json new file mode 100644 index 00000000..640074f8 --- /dev/null +++ b/.butcher/methods/getMyDefaultAdministratorRights/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getmydefaultadministratorrights", + "name": "getMyDefaultAdministratorRights", + "description": "Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.", + "html_description": "

Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.

", + "rst_description": "Use this method to get the current default administrator rights of the bot. Returns :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` on success.", + "annotations": [ + { + "type": "Boolean", + "required": false, + "description": "Pass 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.", + "html_description": "Pass 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.", + "rst_description": "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.\n", + "name": "for_channels" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getMyDescription/entity.json b/.butcher/methods/getMyDescription/entity.json new file mode 100644 index 00000000..aa9501cb --- /dev/null +++ b/.butcher/methods/getMyDescription/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getmydescription", + "name": "getMyDescription", + "description": "Use this method to get the current bot description for the given user language. Returns BotDescription on success.", + "html_description": "

Use this method to get the current bot description for the given user language. Returns BotDescription on success.

", + "rst_description": "Use this method to get the current bot description for the given user language. Returns :class:`aiogram.types.bot_description.BotDescription` on success.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code or an empty string", + "html_description": "A two-letter ISO 639-1 language code or an empty string", + "rst_description": "A two-letter ISO 639-1 language code or an empty string\n", + "name": "language_code" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getMyName/entity.json b/.butcher/methods/getMyName/entity.json new file mode 100644 index 00000000..848fcb86 --- /dev/null +++ b/.butcher/methods/getMyName/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getmyname", + "name": "getMyName", + "description": "Use this method to get the current bot name for the given user language. Returns BotName on success.", + "html_description": "

Use this method to get the current bot name for the given user language. Returns BotName on success.

", + "rst_description": "Use this method to get the current bot name for the given user language. Returns :class:`aiogram.types.bot_name.BotName` on success.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code or an empty string", + "html_description": "A two-letter ISO 639-1 language code or an empty string", + "rst_description": "A two-letter ISO 639-1 language code or an empty string\n", + "name": "language_code" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getMyShortDescription/entity.json b/.butcher/methods/getMyShortDescription/entity.json new file mode 100644 index 00000000..451f6985 --- /dev/null +++ b/.butcher/methods/getMyShortDescription/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getmyshortdescription", + "name": "getMyShortDescription", + "description": "Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.", + "html_description": "

Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code or an empty string", + "html_description": "A two-letter ISO 639-1 language code or an empty string", + "rst_description": "A two-letter ISO 639-1 language code or an empty string\n", + "name": "language_code" + } + ], + "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/getStarTransactions/entity.json b/.butcher/methods/getStarTransactions/entity.json new file mode 100644 index 00000000..d13a5720 --- /dev/null +++ b/.butcher/methods/getStarTransactions/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "getstartransactions", + "name": "getStarTransactions", + "description": "Returns the bot's Telegram Star transactions in chronological order. On success, returns a StarTransactions object.", + "html_description": "

Returns the bot's Telegram Star transactions in chronological order. On success, returns a StarTransactions object.

", + "rst_description": "Returns the bot's Telegram Star transactions in chronological order. On success, returns a :class:`aiogram.types.star_transactions.StarTransactions` object.", + "annotations": [ + { + "type": "Integer", + "required": false, + "description": "Number of transactions to skip in the response", + "html_description": "Number of transactions to skip in the response", + "rst_description": "Number of transactions to skip in the response\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "html_description": "The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "rst_description": "The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.\n", + "name": "limit" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getStickerSet/entity.json b/.butcher/methods/getStickerSet/entity.json new file mode 100644 index 00000000..ca1e5879 --- /dev/null +++ b/.butcher/methods/getStickerSet/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "getstickerset", + "name": "getStickerSet", + "description": "Use this method to get a sticker set. On success, a StickerSet object is returned.", + "html_description": "

Use this method to get a sticker set. On success, a StickerSet object is returned.

", + "rst_description": "Use this method to get a sticker set. On success, a :class:`aiogram.types.sticker_set.StickerSet` object is returned.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Name of the sticker set", + "html_description": "Name of the sticker set", + "rst_description": "Name of the sticker set\n", + "name": "name" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getUpdates/entity.json b/.butcher/methods/getUpdates/entity.json new file mode 100644 index 00000000..dc9cbad1 --- /dev/null +++ b/.butcher/methods/getUpdates/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Getting updates", + "anchor": "getting-updates" + }, + "object": { + "anchor": "getupdates", + "name": "getUpdates", + "description": "Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.\nNotes\n1. This method will not work if an outgoing webhook is set up.\n2. In order to avoid getting duplicate updates, recalculate offset after each server response.", + "html_description": "

Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.

\n

Notes
\n1. This method will not work if an outgoing webhook is set up.
\n2. In order to avoid getting duplicate updates, recalculate offset after each server response.

\n
", + "rst_description": "Use this method to receive incoming updates using long polling (`wiki `_). Returns an Array of :class:`aiogram.types.update.Update` objects.\n\n **Notes**\n \n **1.** This method will not work if an outgoing webhook is set up.\n \n **2.** In order to avoid getting duplicate updates, recalculate *offset* after each server response.", + "annotations": [ + { + "type": "Integer", + "required": false, + "description": "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 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.", + "html_description": "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 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.", + "rst_description": "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.\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "html_description": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "rst_description": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.\n", + "name": "limit" + }, + { + "type": "Integer", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "timeout" + }, + { + "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 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" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getUserChatBoosts/entity.json b/.butcher/methods/getUserChatBoosts/entity.json new file mode 100644 index 00000000..2242f983 --- /dev/null +++ b/.butcher/methods/getUserChatBoosts/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getuserchatboosts", + "name": "getUserChatBoosts", + "description": "Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object.", + "html_description": "

Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the chat or username of the channel (in the format @channelusername)", + "html_description": "Unique identifier for the chat or username of the channel (in the format @channelusername)", + "rst_description": "Unique identifier for the chat or username of the channel (in the format :code:`@channelusername`)\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" + } + ], + "category": "methods" + } +} 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/getUserProfilePhotos/entity.json b/.butcher/methods/getUserProfilePhotos/entity.json new file mode 100644 index 00000000..0af8cc6e --- /dev/null +++ b/.butcher/methods/getUserProfilePhotos/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getuserprofilephotos", + "name": "getUserProfilePhotos", + "description": "Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.", + "html_description": "

Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.

", + "rst_description": "Use this method to get a list of profile pictures for a user. Returns a :class:`aiogram.types.user_profile_photos.UserProfilePhotos` 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 photo to be returned. By default, all photos are returned.", + "html_description": "Sequential number of the first photo to be returned. By default, all photos are returned.", + "rst_description": "Sequential number of the first photo to be returned. By default, all photos are returned.\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "html_description": "Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "rst_description": "Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.\n", + "name": "limit" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getWebhookInfo/entity.json b/.butcher/methods/getWebhookInfo/entity.json new file mode 100644 index 00000000..e14144d3 --- /dev/null +++ b/.butcher/methods/getWebhookInfo/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Getting updates", + "anchor": "getting-updates" + }, + "object": { + "anchor": "getwebhookinfo", + "name": "getWebhookInfo", + "description": "Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.", + "html_description": "

Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.

", + "rst_description": "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.", + "annotations": [], + "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/hideGeneralForumTopic/entity.json b/.butcher/methods/hideGeneralForumTopic/entity.json new file mode 100644 index 00000000..514160aa --- /dev/null +++ b/.butcher/methods/hideGeneralForumTopic/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "hidegeneralforumtopic", + "name": "hideGeneralForumTopic", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/leaveChat/entity.json b/.butcher/methods/leaveChat/entity.json new file mode 100644 index 00000000..676bdcf7 --- /dev/null +++ b/.butcher/methods/leaveChat/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "leavechat", + "name": "leaveChat", + "description": "Use this method for your bot to leave a group, supergroup or channel. Returns True on success.", + "html_description": "

Use this method for your bot to leave a group, supergroup or channel. Returns True on success.

", + "rst_description": "Use this method for your bot to leave a group, supergroup or channel. 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 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" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/logOut/entity.json b/.butcher/methods/logOut/entity.json new file mode 100644 index 00000000..b9e30ba1 --- /dev/null +++ b/.butcher/methods/logOut/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "logout", + "name": "logOut", + "description": "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 True on success. Requires no parameters.", + "html_description": "

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 True on success. Requires no parameters.

", + "rst_description": "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.", + "annotations": [], + "category": "methods" + } +} diff --git a/.butcher/methods/pinChatMessage/entity.json b/.butcher/methods/pinChatMessage/entity.json new file mode 100644 index 00000000..f7d0b00f --- /dev/null +++ b/.butcher/methods/pinChatMessage/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "pinchatmessage", + "name": "pinChatMessage", + "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, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Identifier of a message to pin", + "html_description": "Identifier of a message to pin", + "rst_description": "Identifier of a message to pin\n", + "name": "message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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.", + "html_description": "Pass 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.", + "rst_description": "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.\n", + "name": "disable_notification" + } + ], + "category": "methods" + } +} 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 new file mode 100644 index 00000000..5495c781 --- /dev/null +++ b/.butcher/methods/promoteChatMember/entity.json @@ -0,0 +1,169 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "promotechatmember", + "name": "promoteChatMember", + "description": "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 False for all boolean parameters to demote a user. Returns True on success.", + "html_description": "

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 False for all boolean parameters to demote a user. Returns True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "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": "Boolean", + "required": false, + "description": "Pass True if the administrator's presence in the chat is hidden", + "html_description": "Pass True if the administrator's presence in the chat is hidden", + "rst_description": "Pass :code:`True` if the administrator's presence in the chat is hidden\n", + "name": "is_anonymous" + }, + { + "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, 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" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can delete messages of other users", + "html_description": "Pass True if the administrator can delete messages of other users", + "rst_description": "Pass :code:`True` if the administrator can delete messages of other users\n", + "name": "can_delete_messages" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can manage video chats", + "html_description": "Pass True if the administrator can manage video chats", + "rst_description": "Pass :code:`True` if the administrator can manage video chats\n", + "name": "can_manage_video_chats" + }, + { + "type": "Boolean", + "required": false, + "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" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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)", + "html_description": "Pass 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)", + "rst_description": "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)\n", + "name": "can_promote_members" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can change chat title, photo and other settings", + "html_description": "Pass True if the administrator can change chat title, photo and other settings", + "rst_description": "Pass :code:`True` if the administrator can change chat title, photo and other settings\n", + "name": "can_change_info" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can invite new users to the chat", + "html_description": "Pass True if the administrator can invite new users to the chat", + "rst_description": "Pass :code:`True` if the administrator can invite new users to the chat\n", + "name": "can_invite_users" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can post stories to the chat", + "html_description": "Pass True if the administrator can post stories to the chat", + "rst_description": "Pass :code:`True` if the administrator can post stories to the chat\n", + "name": "can_post_stories" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "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\n", + "name": "can_edit_stories" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can delete stories posted by other users", + "html_description": "Pass True if the administrator can delete stories posted by other users", + "rst_description": "Pass :code:`True` if the administrator can delete stories posted by other users\n", + "name": "can_delete_stories" + }, + { + "type": "Boolean", + "required": false, + "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" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can edit messages of other users and can pin messages; for channels only", + "html_description": "Pass True if the administrator can edit messages of other users and can pin messages; for channels only", + "rst_description": "Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only\n", + "name": "can_edit_messages" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can pin messages; for supergroups only", + "html_description": "Pass True if the administrator can pin messages; for supergroups only", + "rst_description": "Pass :code:`True` if the administrator can pin messages; for supergroups only\n", + "name": "can_pin_messages" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only", + "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/refundStarPayment/entity.json b/.butcher/methods/refundStarPayment/entity.json new file mode 100644 index 00000000..f48ba9e2 --- /dev/null +++ b/.butcher/methods/refundStarPayment/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "refundstarpayment", + "name": "refundStarPayment", + "description": "Refunds a successful payment in Telegram Stars. Returns True on success.", + "html_description": "

Refunds a successful payment in Telegram Stars. Returns True on success.

", + "rst_description": "Refunds a successful payment in `Telegram Stars `_. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Identifier of the user whose payment will be refunded", + "html_description": "Identifier of the user whose payment will be refunded", + "rst_description": "Identifier of the user whose payment will be refunded\n", + "name": "user_id" + }, + { + "type": "String", + "required": true, + "description": "Telegram payment identifier", + "html_description": "Telegram payment identifier", + "rst_description": "Telegram payment identifier\n", + "name": "telegram_payment_charge_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/reopenForumTopic/entity.json b/.butcher/methods/reopenForumTopic/entity.json new file mode 100644 index 00000000..187f6f6b --- /dev/null +++ b/.butcher/methods/reopenForumTopic/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "reopenforumtopic", + "name": "reopenForumTopic", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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 for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/reopenGeneralForumTopic/entity.json b/.butcher/methods/reopenGeneralForumTopic/entity.json new file mode 100644 index 00000000..e1f968c4 --- /dev/null +++ b/.butcher/methods/reopenGeneralForumTopic/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "reopengeneralforumtopic", + "name": "reopenGeneralForumTopic", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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" + } + ], + "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/replaceStickerInSet/entity.json b/.butcher/methods/replaceStickerInSet/entity.json new file mode 100644 index 00000000..8ef0e9a3 --- /dev/null +++ b/.butcher/methods/replaceStickerInSet/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "replacestickerinset", + "name": "replaceStickerInSet", + "description": "Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet. Returns True on success.", + "html_description": "

Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet. Returns True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of the sticker set owner", + "html_description": "User identifier of the sticker set owner", + "rst_description": "User identifier of the sticker set owner\n", + "name": "user_id" + }, + { + "type": "String", + "required": true, + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name" + }, + { + "type": "String", + "required": true, + "description": "File identifier of the replaced sticker", + "html_description": "File identifier of the replaced sticker", + "rst_description": "File identifier of the replaced sticker\n", + "name": "old_sticker" + }, + { + "type": "InputSticker", + "required": true, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "sticker" + } + ], + "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/restrictChatMember/entity.json b/.butcher/methods/restrictChatMember/entity.json new file mode 100644 index 00000000..38d78844 --- /dev/null +++ b/.butcher/methods/restrictChatMember/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "restrictchatmember", + "name": "restrictChatMember", + "description": "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 True for all permissions to lift restrictions from a user. Returns True on success.", + "html_description": "

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 True for all permissions to lift restrictions from a user. Returns True on success.

", + "rst_description": "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.", + "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": "ChatPermissions", + "required": true, + "description": "A JSON-serialized object for new user permissions", + "html_description": "A JSON-serialized object for new user permissions", + "rst_description": "A JSON-serialized object for new user permissions\n", + "name": "permissions" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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.", + "html_description": "Pass 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.", + "rst_description": "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.\n", + "name": "use_independent_chat_permissions" + }, + { + "type": "Integer", + "required": false, + "description": "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", + "html_description": "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", + "rst_description": "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\n", + "name": "until_date" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/restrictChatMember/replace.yml b/.butcher/methods/restrictChatMember/replace.yml new file mode 100644 index 00000000..04eda49f --- /dev/null +++ b/.butcher/methods/restrictChatMember/replace.yml @@ -0,0 +1,11 @@ +annotations: + until_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/revokeChatInviteLink/entity.json b/.butcher/methods/revokeChatInviteLink/entity.json new file mode 100644 index 00000000..cddfae1a --- /dev/null +++ b/.butcher/methods/revokeChatInviteLink/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "revokechatinvitelink", + "name": "revokeChatInviteLink", + "description": "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 ChatInviteLink object.", + "html_description": "

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 ChatInviteLink object.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier of the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier of the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier of 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 revoke", + "html_description": "The invite link to revoke", + "rst_description": "The invite link to revoke\n", + "name": "invite_link" + } + ], + "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/default.yml b/.butcher/methods/sendAnimation/default.yml new file mode 100644 index 00000000..50d7b57d --- /dev/null +++ b/.butcher/methods/sendAnimation/default.yml @@ -0,0 +1,3 @@ +parse_mode: parse_mode +protect_content: protect_content +show_caption_above_media: show_caption_above_media diff --git a/.butcher/methods/sendAnimation/entity.json b/.butcher/methods/sendAnimation/entity.json new file mode 100644 index 00000000..38435475 --- /dev/null +++ b/.butcher/methods/sendAnimation/entity.json @@ -0,0 +1,209 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendanimation", + "name": "sendAnimation", + "description": "Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.", + "html_description": "

Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.

", + "rst_description": "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.", + "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", + "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": "InputFile or String", + "required": true, + "description": "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. More information on Sending Files", + "html_description": "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. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "animation" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of sent animation in seconds", + "html_description": "Duration of sent animation in seconds", + "rst_description": "Duration of sent animation in seconds\n", + "name": "duration" + }, + { + "type": "Integer", + "required": false, + "description": "Animation width", + "html_description": "Animation width", + "rst_description": "Animation width\n", + "name": "width" + }, + { + "type": "Integer", + "required": false, + "description": "Animation height", + "html_description": "Animation height", + "rst_description": "Animation height\n", + "name": "height" + }, + { + "type": "InputFile or String", + "required": false, + "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": "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": "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": "String", + "required": false, + "description": "Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing", + "html_description": "Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing", + "rst_description": "Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the animation caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the animation caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the animation caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Pass True, if the caption must be shown above the message media", + "rst_description": "Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the animation needs to be covered with a spoiler animation", + "html_description": "Pass True if the animation needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the animation needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendAnimation/replace.yml b/.butcher/methods/sendAnimation/replace.yml new file mode 100644 index 00000000..ef7db8ff --- /dev/null +++ b/.butcher/methods/sendAnimation/replace.yml @@ -0,0 +1,7 @@ +annotations: + thumbnail: + parsed_type: + type: entity + references: + category: types + name: InputFile diff --git a/.butcher/methods/sendAudio/default.yml b/.butcher/methods/sendAudio/default.yml new file mode 100644 index 00000000..4f6fbe94 --- /dev/null +++ b/.butcher/methods/sendAudio/default.yml @@ -0,0 +1,2 @@ +parse_mode: parse_mode +protect_content: protect_content diff --git a/.butcher/methods/sendAudio/entity.json b/.butcher/methods/sendAudio/entity.json new file mode 100644 index 00000000..9886f752 --- /dev/null +++ b/.butcher/methods/sendAudio/entity.json @@ -0,0 +1,193 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendaudio", + "name": "sendAudio", + "description": "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 Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.\nFor sending voice messages, use the sendVoice method instead.", + "html_description": "

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 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 sendVoice method instead.

", + "rst_description": "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.\nFor sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead.", + "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", + "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": "InputFile or String", + "required": true, + "description": "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. More information on Sending Files", + "html_description": "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. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "audio" + }, + { + "type": "String", + "required": false, + "description": "Audio caption, 0-1024 characters after entities parsing", + "html_description": "Audio caption, 0-1024 characters after entities parsing", + "rst_description": "Audio caption, 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the audio 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": "Integer", + "required": false, + "description": "Duration of the audio in seconds", + "html_description": "Duration of the audio in seconds", + "rst_description": "Duration of the audio in seconds\n", + "name": "duration" + }, + { + "type": "String", + "required": false, + "description": "Performer", + "html_description": "Performer", + "rst_description": "Performer\n", + "name": "performer" + }, + { + "type": "String", + "required": false, + "description": "Track name", + "html_description": "Track name", + "rst_description": "Track name\n", + "name": "title" + }, + { + "type": "InputFile or String", + "required": false, + "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": "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": "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": "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendAudio/replace.yml b/.butcher/methods/sendAudio/replace.yml new file mode 100644 index 00000000..ef7db8ff --- /dev/null +++ b/.butcher/methods/sendAudio/replace.yml @@ -0,0 +1,7 @@ +annotations: + thumbnail: + parsed_type: + type: entity + references: + category: types + name: InputFile diff --git a/.butcher/methods/sendChatAction/entity.json b/.butcher/methods/sendChatAction/entity.json new file mode 100644 index 00000000..80ef4215 --- /dev/null +++ b/.butcher/methods/sendChatAction/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendchataction", + "name": "sendChatAction", + "description": "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 True on success.\nExample: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please wait…', the bot may use sendChatAction with action = upload_photo. The user will see a 'sending photo' status for the bot.\nWe only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.", + "html_description": "

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 True on success.

\n

Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of “Retrieving image, please wait…”, the bot may use sendChatAction with action = upload_photo. The user will see a “sending photo” status for the bot.

\n

We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.

", + "rst_description": "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.\n\n Example: The `ImageBot `_ needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please wait…', the bot may use :class:`aiogram.methods.send_chat_action.SendChatAction` with *action* = *upload_photo*. The user will see a 'sending photo' status for the bot.\n\nWe only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "Unique identifier of the business connection on behalf of which the action will be sent", + "html_description": "Unique identifier of the business connection on behalf of which the action will be sent", + "rst_description": "Unique identifier of the business connection on behalf of which the action 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 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 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" + }, + { + "type": "String", + "required": true, + "description": "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.", + "html_description": "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.", + "rst_description": "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 `_.\n", + "name": "action" + } + ], + "category": "methods" + } +} 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/default.yml b/.butcher/methods/sendContact/default.yml new file mode 100644 index 00000000..bb0cb2e2 --- /dev/null +++ b/.butcher/methods/sendContact/default.yml @@ -0,0 +1 @@ +protect_content: protect_content diff --git a/.butcher/methods/sendContact/entity.json b/.butcher/methods/sendContact/entity.json new file mode 100644 index 00000000..d713e739 --- /dev/null +++ b/.butcher/methods/sendContact/entity.json @@ -0,0 +1,161 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendcontact", + "name": "sendContact", + "description": "Use this method to send phone contacts. On success, the sent Message is returned.", + "html_description": "

Use this method to send phone contacts. On success, the sent Message is returned.

", + "rst_description": "Use this method to send phone contacts. 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", + "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": "String", + "required": true, + "description": "Contact's phone number", + "html_description": "Contact's phone number", + "rst_description": "Contact's phone number\n", + "name": "phone_number" + }, + { + "type": "String", + "required": true, + "description": "Contact's first name", + "html_description": "Contact's first name", + "rst_description": "Contact's first name\n", + "name": "first_name" + }, + { + "type": "String", + "required": false, + "description": "Contact's last name", + "html_description": "Contact's last name", + "rst_description": "Contact's last name\n", + "name": "last_name" + }, + { + "type": "String", + "required": false, + "description": "Additional data about the contact in the form of a vCard, 0-2048 bytes", + "html_description": "Additional data about the contact in the form of a vCard, 0-2048 bytes", + "rst_description": "Additional data about the contact in the form of a `vCard `_, 0-2048 bytes\n", + "name": "vcard" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendDice/default.yml b/.butcher/methods/sendDice/default.yml new file mode 100644 index 00000000..bb0cb2e2 --- /dev/null +++ b/.butcher/methods/sendDice/default.yml @@ -0,0 +1 @@ +protect_content: protect_content diff --git a/.butcher/methods/sendDice/entity.json b/.butcher/methods/sendDice/entity.json new file mode 100644 index 00000000..0d001776 --- /dev/null +++ b/.butcher/methods/sendDice/entity.json @@ -0,0 +1,137 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "senddice", + "name": "sendDice", + "description": "Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.", + "html_description": "

Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.

", + "rst_description": "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.", + "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", + "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": "String", + "required": false, + "description": "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 ''", + "html_description": "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 “\"🎲\"/”", + "rst_description": "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 '🎲'\n", + "name": "emoji" + }, + { + "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", + "html_description": "Protects the contents of the sent message from forwarding", + "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, + "description": "Unique identifier of the message effect to be added to the message; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendDocument/default.yml b/.butcher/methods/sendDocument/default.yml new file mode 100644 index 00000000..4f6fbe94 --- /dev/null +++ b/.butcher/methods/sendDocument/default.yml @@ -0,0 +1,2 @@ +parse_mode: parse_mode +protect_content: protect_content diff --git a/.butcher/methods/sendDocument/entity.json b/.butcher/methods/sendDocument/entity.json new file mode 100644 index 00000000..320f1d54 --- /dev/null +++ b/.butcher/methods/sendDocument/entity.json @@ -0,0 +1,177 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "senddocument", + "name": "sendDocument", + "description": "Use this method to send general files. On success, the sent 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.", + "html_description": "

Use this method to send general files. On success, the sent 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.

", + "rst_description": "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.", + "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", + "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": "InputFile or String", + "required": true, + "description": "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. More information on Sending Files", + "html_description": "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. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "document" + }, + { + "type": "InputFile or String", + "required": false, + "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": "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": "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": "String", + "required": false, + "description": "Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing", + "html_description": "Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing", + "rst_description": "Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the document caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Disables automatic server-side content type detection for files uploaded using multipart/form-data", + "html_description": "Disables automatic server-side content type detection for files uploaded using multipart/form-data", + "rst_description": "Disables automatic server-side content type detection for files uploaded using multipart/form-data\n", + "name": "disable_content_type_detection" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendDocument/replace.yml b/.butcher/methods/sendDocument/replace.yml new file mode 100644 index 00000000..ef7db8ff --- /dev/null +++ b/.butcher/methods/sendDocument/replace.yml @@ -0,0 +1,7 @@ +annotations: + thumbnail: + parsed_type: + type: entity + references: + category: types + name: InputFile diff --git a/.butcher/methods/sendGame/default.yml b/.butcher/methods/sendGame/default.yml new file mode 100644 index 00000000..bb0cb2e2 --- /dev/null +++ b/.butcher/methods/sendGame/default.yml @@ -0,0 +1 @@ +protect_content: protect_content diff --git a/.butcher/methods/sendGame/entity.json b/.butcher/methods/sendGame/entity.json new file mode 100644 index 00000000..594ed09f --- /dev/null +++ b/.butcher/methods/sendGame/entity.json @@ -0,0 +1,121 @@ +{ + "meta": {}, + "group": { + "title": "Games", + "anchor": "games" + }, + "object": { + "anchor": "sendgame", + "name": "sendGame", + "description": "Use this method to send a game. On success, the sent Message is returned.", + "html_description": "

Use this method to send a game. On success, the sent Message is returned.

", + "rst_description": "Use this method to send a game. 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", + "required": true, + "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 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": "String", + "required": true, + "description": "Short name of the game, serves as the unique identifier for the game. Set up your games via @BotFather.", + "html_description": "Short name of the game, serves as the unique identifier for the game. Set up your games via @BotFather.", + "rst_description": "Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_.\n", + "name": "game_short_name" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", + "name": "message_effect_id" + }, + { + "type": "ReplyParameters", + "required": false, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} 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/default.yml b/.butcher/methods/sendInvoice/default.yml new file mode 100644 index 00000000..bb0cb2e2 --- /dev/null +++ b/.butcher/methods/sendInvoice/default.yml @@ -0,0 +1 @@ +protect_content: protect_content diff --git a/.butcher/methods/sendInvoice/entity.json b/.butcher/methods/sendInvoice/entity.json new file mode 100644 index 00000000..99612e23 --- /dev/null +++ b/.butcher/methods/sendInvoice/entity.json @@ -0,0 +1,289 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "sendinvoice", + "name": "sendInvoice", + "description": "Use this method to send invoices. On success, the sent Message is returned.", + "html_description": "

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

", + "rst_description": "Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": 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": "String", + "required": true, + "description": "Product name, 1-32 characters", + "html_description": "Product name, 1-32 characters", + "rst_description": "Product name, 1-32 characters\n", + "name": "title" + }, + { + "type": "String", + "required": true, + "description": "Product description, 1-255 characters", + "html_description": "Product description, 1-255 characters", + "rst_description": "Product description, 1-255 characters\n", + "name": "description" + }, + { + "type": "String", + "required": true, + "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" + }, + { + "type": "String", + "required": false, + "description": "Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.", + "html_description": "Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.", + "rst_description": "Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.\n", + "name": "provider_token" + }, + { + "type": "String", + "required": true, + "description": "Three-letter ISO 4217 currency code, see more on currencies. Pass 'XTR' for payments in Telegram Stars.", + "html_description": "Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars.", + "rst_description": "Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.\n", + "name": "currency" + }, + { + "type": "Array of LabeledPrice", + "required": true, + "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.", + "html_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.", + "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 maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass 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.", + "html_description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass 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.", + "rst_description": "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 `_.\n", + "name": "max_tip_amount" + }, + { + "type": "Array of Integer", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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*.\n", + "name": "suggested_tip_amounts" + }, + { + "type": "String", + "required": false, + "description": "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", + "html_description": "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", + "rst_description": "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\n", + "name": "start_parameter" + }, + { + "type": "String", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "provider_data" + }, + { + "type": "String", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "photo_url" + }, + { + "type": "Integer", + "required": false, + "description": "Photo size in bytes", + "html_description": "Photo size in bytes", + "rst_description": "Photo size in bytes\n", + "name": "photo_size" + }, + { + "type": "Integer", + "required": false, + "description": "Photo width", + "html_description": "Photo width", + "rst_description": "Photo width\n", + "name": "photo_width" + }, + { + "type": "Integer", + "required": false, + "description": "Photo height", + "html_description": "Photo height", + "rst_description": "Photo height\n", + "name": "photo_height" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_name" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_phone_number" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_email" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_shipping_address" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_.\n", + "name": "send_phone_number_to_provider" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_.\n", + "name": "send_email_to_provider" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_.\n", + "name": "is_flexible" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.", + "html_description": "A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.", + "rst_description": "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.\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendLocation/default.yml b/.butcher/methods/sendLocation/default.yml new file mode 100644 index 00000000..bb0cb2e2 --- /dev/null +++ b/.butcher/methods/sendLocation/default.yml @@ -0,0 +1 @@ +protect_content: protect_content diff --git a/.butcher/methods/sendLocation/entity.json b/.butcher/methods/sendLocation/entity.json new file mode 100644 index 00000000..ede4fdbf --- /dev/null +++ b/.butcher/methods/sendLocation/entity.json @@ -0,0 +1,177 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendlocation", + "name": "sendLocation", + "description": "Use this method to send point on the map. On success, the sent Message is returned.", + "html_description": "

Use this method to send point on the map. On success, the sent Message is returned.

", + "rst_description": "Use this method to send point on the map. 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", + "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": "Float", + "required": true, + "description": "Latitude of the location", + "html_description": "Latitude of the location", + "rst_description": "Latitude of the location\n", + "name": "latitude" + }, + { + "type": "Float", + "required": true, + "description": "Longitude of the location", + "html_description": "Longitude of the location", + "rst_description": "Longitude of the location\n", + "name": "longitude" + }, + { + "type": "Float", + "required": false, + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy" + }, + { + "type": "Integer", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "live_period" + }, + { + "type": "Integer", + "required": false, + "description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "html_description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "rst_description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", + "name": "heading" + }, + { + "type": "Integer", + "required": false, + "description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "html_description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "rst_description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.\n", + "name": "proximity_alert_radius" + }, + { + "type": "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendMediaGroup/default.yml b/.butcher/methods/sendMediaGroup/default.yml new file mode 100644 index 00000000..bb0cb2e2 --- /dev/null +++ b/.butcher/methods/sendMediaGroup/default.yml @@ -0,0 +1 @@ +protect_content: protect_content diff --git a/.butcher/methods/sendMediaGroup/entity.json b/.butcher/methods/sendMediaGroup/entity.json new file mode 100644 index 00000000..841f9b77 --- /dev/null +++ b/.butcher/methods/sendMediaGroup/entity.json @@ -0,0 +1,121 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "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 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", + "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", + "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 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, + "description": "A JSON-serialized array describing messages to be sent, must include 2-10 items", + "html_description": "A JSON-serialized array describing messages to be sent, must include 2-10 items", + "rst_description": "A JSON-serialized array describing messages to be sent, must include 2-10 items\n", + "name": "media" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends messages silently. Users will receive a notification with no sound.", + "html_description": "Sends messages silently. Users will receive a notification with no sound.", + "rst_description": "Sends messages `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent messages from forwarding and saving", + "html_description": "Protects the contents of the sent messages from forwarding and saving", + "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, + "description": "Unique identifier of the message effect to be added to the message; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", + "name": "message_effect_id" + }, + { + "type": "ReplyParameters", + "required": false, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the messages are a reply, ID of the original message", + "html_description": "If the messages are a reply, ID of the original message", + "rst_description": "If the messages are a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendMessage/default.yml b/.butcher/methods/sendMessage/default.yml new file mode 100644 index 00000000..7f495730 --- /dev/null +++ b/.butcher/methods/sendMessage/default.yml @@ -0,0 +1,4 @@ +disable_web_page_preview: link_preview_is_disabled +parse_mode: parse_mode +protect_content: protect_content +link_preview_options: link_preview diff --git a/.butcher/methods/sendMessage/entity.json b/.butcher/methods/sendMessage/entity.json new file mode 100644 index 00000000..d4eff7f7 --- /dev/null +++ b/.butcher/methods/sendMessage/entity.json @@ -0,0 +1,173 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendmessage", + "name": "sendMessage", + "description": "Use this method to send text messages. On success, the sent Message is returned.", + "html_description": "

Use this method to send text messages. On success, the sent Message is returned.

", + "rst_description": "Use this method to send text messages. 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", + "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": "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" + }, + { + "type": "LinkPreviewOptions", + "required": false, + "description": "Link preview generation options for the message", + "html_description": "Link preview generation options for the message", + "rst_description": "Link preview generation options for the message\n", + "name": "link_preview_options" + }, + { + "type": "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Boolean", + "required": false, + "description": "Disables link previews for links in this message", + "html_description": "Disables link previews for links in this message", + "rst_description": "Disables link previews for links in this message\n", + "name": "disable_web_page_preview", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} 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 new file mode 100644 index 00000000..708eb6cd --- /dev/null +++ b/.butcher/methods/sendPaidMedia/entity.json @@ -0,0 +1,153 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendpaidmedia", + "name": "sendPaidMedia", + "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). 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; 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" + }, + { + "type": "Array of InputPaidMedia", + "required": true, + "description": "A JSON-serialized array describing the media to be sent; up to 10 items", + "html_description": "A JSON-serialized array describing the media to be sent; up to 10 items", + "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, + "description": "Media caption, 0-1024 characters after entities parsing", + "html_description": "Media caption, 0-1024 characters after entities parsing", + "rst_description": "Media caption, 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the media caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the media caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the media caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Pass True, if the caption must be shown above the message media", + "rst_description": "Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media" + }, + { + "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": "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendPhoto/default.yml b/.butcher/methods/sendPhoto/default.yml new file mode 100644 index 00000000..50d7b57d --- /dev/null +++ b/.butcher/methods/sendPhoto/default.yml @@ -0,0 +1,3 @@ +parse_mode: parse_mode +protect_content: protect_content +show_caption_above_media: show_caption_above_media diff --git a/.butcher/methods/sendPhoto/entity.json b/.butcher/methods/sendPhoto/entity.json new file mode 100644 index 00000000..594f00e2 --- /dev/null +++ b/.butcher/methods/sendPhoto/entity.json @@ -0,0 +1,177 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendphoto", + "name": "sendPhoto", + "description": "Use this method to send photos. On success, the sent Message is returned.", + "html_description": "

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

", + "rst_description": "Use this method to send photos. 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", + "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": "InputFile or String", + "required": true, + "description": "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. More information on Sending Files", + "html_description": "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. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "photo" + }, + { + "type": "String", + "required": false, + "description": "Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing", + "html_description": "Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing", + "rst_description": "Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the photo caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Pass True, if the caption must be shown above the message media", + "rst_description": "Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the photo needs to be covered with a spoiler animation", + "html_description": "Pass True if the photo needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the photo needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendPoll/default.yml b/.butcher/methods/sendPoll/default.yml new file mode 100644 index 00000000..de1aec36 --- /dev/null +++ b/.butcher/methods/sendPoll/default.yml @@ -0,0 +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 new file mode 100644 index 00000000..39afab83 --- /dev/null +++ b/.butcher/methods/sendPoll/entity.json @@ -0,0 +1,293 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendpoll", + "name": "sendPoll", + "description": "Use this method to send a native poll. On success, the sent Message is returned.", + "html_description": "

Use this method to send a native poll. On success, the sent Message is returned.

", + "rst_description": "Use this method to send a native poll. 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). 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 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": "String", + "required": true, + "description": "Poll question, 1-300 characters", + "html_description": "Poll question, 1-300 characters", + "rst_description": "Poll question, 1-300 characters\n", + "name": "question" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the question. See formatting options for more details. Currently, only custom emoji entities are allowed", + "html_description": "Mode for parsing entities in the question. See formatting options for more details. Currently, only custom emoji entities are allowed", + "rst_description": "Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed\n", + "name": "question_parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of question_parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of question_parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode*\n", + "name": "question_entities" + }, + { + "type": "Array of InputPollOption", + "required": true, + "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" + }, + { + "type": "Boolean", + "required": false, + "description": "True, if the poll needs to be anonymous, defaults to True", + "html_description": "True, if the poll needs to be anonymous, defaults to True", + "rst_description": ":code:`True`, if the poll needs to be anonymous, defaults to :code:`True`\n", + "name": "is_anonymous" + }, + { + "type": "String", + "required": false, + "description": "Poll type, 'quiz' or 'regular', defaults to 'regular'", + "html_description": "Poll type, “quiz” or “regular”, defaults to “regular”", + "rst_description": "Poll type, 'quiz' or 'regular', defaults to 'regular'\n", + "name": "type" + }, + { + "type": "Boolean", + "required": false, + "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": "Boolean", + "required": false, + "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", + "required": false, + "description": "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", + "html_description": "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", + "rst_description": "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\n", + "name": "explanation" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the explanation. See formatting options for more details.", + "html_description": "Mode for parsing entities in the explanation. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the explanation. See `formatting options `_ for more details.\n", + "name": "explanation_parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of explanation_parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of explanation_parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode*\n", + "name": "explanation_entities" + }, + { + "type": "Integer", + "required": false, + "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 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" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the poll needs to be immediately closed. This can be useful for poll preview.", + "html_description": "Pass True if the poll needs to be immediately closed. This can be useful for poll preview.", + "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, + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", + "name": "message_effect_id" + }, + { + "type": "ReplyParameters", + "required": false, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "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, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendPoll/replace.yml b/.butcher/methods/sendPoll/replace.yml new file mode 100644 index 00000000..4bd38a64 --- /dev/null +++ b/.butcher/methods/sendPoll/replace.yml @@ -0,0 +1,23 @@ +annotations: + close_date: + parsed_type: + type: union + items: + - type: std + name: datetime.datetime + - type: std + name: datetime.timedelta + - type: std + name: int + options: + parsed_type: + type: array + items: + type: union + items: + - type: entity + references: + category: types + name: InputPollOption + - type: std + name: str diff --git a/.butcher/methods/sendSticker/default.yml b/.butcher/methods/sendSticker/default.yml new file mode 100644 index 00000000..bb0cb2e2 --- /dev/null +++ b/.butcher/methods/sendSticker/default.yml @@ -0,0 +1 @@ +protect_content: protect_content diff --git a/.butcher/methods/sendSticker/entity.json b/.butcher/methods/sendSticker/entity.json new file mode 100644 index 00000000..b922d274 --- /dev/null +++ b/.butcher/methods/sendSticker/entity.json @@ -0,0 +1,145 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "sendsticker", + "name": "sendSticker", + "description": "Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.", + "html_description": "

Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.

", + "rst_description": "Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. 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", + "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": "InputFile or String", + "required": true, + "description": "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. More information on Sending Files. Video and animated stickers can't be sent via an HTTP URL.", + "html_description": "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. More information on Sending Files ». Video and animated stickers can't be sent via an HTTP URL.", + "rst_description": "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.\n", + "name": "sticker" + }, + { + "type": "String", + "required": false, + "description": "Emoji associated with the sticker; only for just uploaded stickers", + "html_description": "Emoji associated with the sticker; only for just uploaded stickers", + "rst_description": "Emoji associated with the sticker; only for just uploaded stickers\n", + "name": "emoji" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendVenue/default.yml b/.butcher/methods/sendVenue/default.yml new file mode 100644 index 00000000..bb0cb2e2 --- /dev/null +++ b/.butcher/methods/sendVenue/default.yml @@ -0,0 +1 @@ +protect_content: protect_content diff --git a/.butcher/methods/sendVenue/entity.json b/.butcher/methods/sendVenue/entity.json new file mode 100644 index 00000000..6475e4b4 --- /dev/null +++ b/.butcher/methods/sendVenue/entity.json @@ -0,0 +1,193 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendvenue", + "name": "sendVenue", + "description": "Use this method to send information about a venue. On success, the sent Message is returned.", + "html_description": "

Use this method to send information about a venue. On success, the sent Message is returned.

", + "rst_description": "Use this method to send information about a venue. 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", + "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": "Float", + "required": true, + "description": "Latitude of the venue", + "html_description": "Latitude of the venue", + "rst_description": "Latitude of the venue\n", + "name": "latitude" + }, + { + "type": "Float", + "required": true, + "description": "Longitude of the venue", + "html_description": "Longitude of the venue", + "rst_description": "Longitude of the venue\n", + "name": "longitude" + }, + { + "type": "String", + "required": true, + "description": "Name of the venue", + "html_description": "Name of the venue", + "rst_description": "Name of the venue\n", + "name": "title" + }, + { + "type": "String", + "required": true, + "description": "Address of the venue", + "html_description": "Address of the venue", + "rst_description": "Address of the venue\n", + "name": "address" + }, + { + "type": "String", + "required": false, + "description": "Foursquare identifier of the venue", + "html_description": "Foursquare identifier of the venue", + "rst_description": "Foursquare identifier of the venue\n", + "name": "foursquare_id" + }, + { + "type": "String", + "required": false, + "description": "Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)", + "html_description": "Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)", + "rst_description": "Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)\n", + "name": "foursquare_type" + }, + { + "type": "String", + "required": false, + "description": "Google Places identifier of the venue", + "html_description": "Google Places identifier of the venue", + "rst_description": "Google Places identifier of the venue\n", + "name": "google_place_id" + }, + { + "type": "String", + "required": false, + "description": "Google Places type of the venue. (See supported types.)", + "html_description": "Google Places type of the venue. (See supported types.)", + "rst_description": "Google Places type of the venue. (See `supported types `_.)\n", + "name": "google_place_type" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendVideo/default.yml b/.butcher/methods/sendVideo/default.yml new file mode 100644 index 00000000..50d7b57d --- /dev/null +++ b/.butcher/methods/sendVideo/default.yml @@ -0,0 +1,3 @@ +parse_mode: parse_mode +protect_content: protect_content +show_caption_above_media: show_caption_above_media diff --git a/.butcher/methods/sendVideo/entity.json b/.butcher/methods/sendVideo/entity.json new file mode 100644 index 00000000..68391db5 --- /dev/null +++ b/.butcher/methods/sendVideo/entity.json @@ -0,0 +1,233 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendvideo", + "name": "sendVideo", + "description": "Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.", + "html_description": "

Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.

", + "rst_description": "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.", + "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", + "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": "InputFile or String", + "required": true, + "description": "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. More information on Sending Files", + "html_description": "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. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "video" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of sent video in seconds", + "html_description": "Duration of sent video in seconds", + "rst_description": "Duration of sent video in seconds\n", + "name": "duration" + }, + { + "type": "Integer", + "required": false, + "description": "Video width", + "html_description": "Video width", + "rst_description": "Video width\n", + "name": "width" + }, + { + "type": "Integer", + "required": false, + "description": "Video height", + "html_description": "Video height", + "rst_description": "Video height\n", + "name": "height" + }, + { + "type": "InputFile or String", + "required": false, + "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": "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": "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, + "description": "Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing", + "html_description": "Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing", + "rst_description": "Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the video caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Pass True, if the caption must be shown above the message media", + "rst_description": "Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the video needs to be covered with a spoiler animation", + "html_description": "Pass True if the video needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the video needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the uploaded video is suitable for streaming", + "html_description": "Pass True if the uploaded video is suitable for streaming", + "rst_description": "Pass :code:`True` if the uploaded video is suitable for streaming\n", + "name": "supports_streaming" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendVideo/replace.yml b/.butcher/methods/sendVideo/replace.yml new file mode 100644 index 00000000..044eceda --- /dev/null +++ b/.butcher/methods/sendVideo/replace.yml @@ -0,0 +1,17 @@ +annotations: + 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/methods/sendVideoNote/default.yml b/.butcher/methods/sendVideoNote/default.yml new file mode 100644 index 00000000..bb0cb2e2 --- /dev/null +++ b/.butcher/methods/sendVideoNote/default.yml @@ -0,0 +1 @@ +protect_content: protect_content diff --git a/.butcher/methods/sendVideoNote/entity.json b/.butcher/methods/sendVideoNote/entity.json new file mode 100644 index 00000000..5f15f5e8 --- /dev/null +++ b/.butcher/methods/sendVideoNote/entity.json @@ -0,0 +1,161 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendvideonote", + "name": "sendVideoNote", + "description": "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 Message is returned.", + "html_description": "

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 Message is returned.

", + "rst_description": "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.", + "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", + "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": "InputFile or String", + "required": true, + "description": "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. More information on Sending Files. Sending video notes by a URL is currently unsupported", + "html_description": "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. More information on Sending Files ». Sending video notes by a URL is currently unsupported", + "rst_description": "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\n", + "name": "video_note" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of sent video in seconds", + "html_description": "Duration of sent video in seconds", + "rst_description": "Duration of sent video in seconds\n", + "name": "duration" + }, + { + "type": "Integer", + "required": false, + "description": "Video width and height, i.e. diameter of the video message", + "html_description": "Video width and height, i.e. diameter of the video message", + "rst_description": "Video width and height, i.e. diameter of the video message\n", + "name": "length" + }, + { + "type": "InputFile or String", + "required": false, + "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": "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": "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": "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendVideoNote/replace.yml b/.butcher/methods/sendVideoNote/replace.yml new file mode 100644 index 00000000..ef7db8ff --- /dev/null +++ b/.butcher/methods/sendVideoNote/replace.yml @@ -0,0 +1,7 @@ +annotations: + thumbnail: + parsed_type: + type: entity + references: + category: types + name: InputFile diff --git a/.butcher/methods/sendVoice/default.yml b/.butcher/methods/sendVoice/default.yml new file mode 100644 index 00000000..4f6fbe94 --- /dev/null +++ b/.butcher/methods/sendVoice/default.yml @@ -0,0 +1,2 @@ +parse_mode: parse_mode +protect_content: protect_content diff --git a/.butcher/methods/sendVoice/entity.json b/.butcher/methods/sendVoice/entity.json new file mode 100644 index 00000000..fa28daad --- /dev/null +++ b/.butcher/methods/sendVoice/entity.json @@ -0,0 +1,169 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendvoice", + "name": "sendVoice", + "description": "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 Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.", + "html_description": "

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 Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.

", + "rst_description": "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.", + "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", + "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": "InputFile or String", + "required": true, + "description": "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. More information on Sending Files", + "html_description": "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. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "voice" + }, + { + "type": "String", + "required": false, + "description": "Voice message caption, 0-1024 characters after entities parsing", + "html_description": "Voice message caption, 0-1024 characters after entities parsing", + "rst_description": "Voice message caption, 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the voice message caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the voice message caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of the voice message in seconds", + "html_description": "Duration of the voice message in seconds", + "rst_description": "Duration of the voice message in seconds\n", + "name": "duration" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id", + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "methods" + } +} 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/setChatAdministratorCustomTitle/entity.json b/.butcher/methods/setChatAdministratorCustomTitle/entity.json new file mode 100644 index 00000000..364befd7 --- /dev/null +++ b/.butcher/methods/setChatAdministratorCustomTitle/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setchatadministratorcustomtitle", + "name": "setChatAdministratorCustomTitle", + "description": "Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.", + "html_description": "

Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.

", + "rst_description": "Use this method to set a custom title for an administrator in a supergroup promoted 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 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": true, + "description": "New custom title for the administrator; 0-16 characters, emoji are not allowed", + "html_description": "New custom title for the administrator; 0-16 characters, emoji are not allowed", + "rst_description": "New custom title for the administrator; 0-16 characters, emoji are not allowed\n", + "name": "custom_title" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setChatDescription/entity.json b/.butcher/methods/setChatDescription/entity.json new file mode 100644 index 00000000..0303dd25 --- /dev/null +++ b/.butcher/methods/setChatDescription/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setchatdescription", + "name": "setChatDescription", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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": false, + "description": "New chat description, 0-255 characters", + "html_description": "New chat description, 0-255 characters", + "rst_description": "New chat description, 0-255 characters\n", + "name": "description" + } + ], + "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/setChatMenuButton/entity.json b/.butcher/methods/setChatMenuButton/entity.json new file mode 100644 index 00000000..6af98260 --- /dev/null +++ b/.butcher/methods/setChatMenuButton/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setchatmenubutton", + "name": "setChatMenuButton", + "description": "Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.", + "html_description": "

Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.

", + "rst_description": "Use this method to change the bot's menu button in a private chat, or the default menu button. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be changed", + "html_description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be changed", + "rst_description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be changed\n", + "name": "chat_id" + }, + { + "type": "MenuButton", + "required": false, + "description": "A JSON-serialized object for the bot's new menu button. Defaults to MenuButtonDefault", + "html_description": "A JSON-serialized object for the bot's new menu button. Defaults to MenuButtonDefault", + "rst_description": "A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault`\n", + "name": "menu_button" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setChatMenuButton/replace.yml b/.butcher/methods/setChatMenuButton/replace.yml new file mode 100644 index 00000000..680cdab7 --- /dev/null +++ b/.butcher/methods/setChatMenuButton/replace.yml @@ -0,0 +1,17 @@ +annotations: + menu_button: + parsed_type: + type: union + items: + - type: entity + references: + category: types + name: MenuButtonDefault + - type: entity + references: + category: types + name: MenuButtonWebApp + - type: entity + references: + category: types + name: MenuButtonCommands diff --git a/.butcher/methods/setChatPermissions/entity.json b/.butcher/methods/setChatPermissions/entity.json new file mode 100644 index 00000000..67a36fa1 --- /dev/null +++ b/.butcher/methods/setChatPermissions/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setchatpermissions", + "name": "setChatPermissions", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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": "ChatPermissions", + "required": true, + "description": "A JSON-serialized object for new default chat permissions", + "html_description": "A JSON-serialized object for new default chat permissions", + "rst_description": "A JSON-serialized object for new default chat permissions\n", + "name": "permissions" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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.", + "html_description": "Pass 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.", + "rst_description": "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.\n", + "name": "use_independent_chat_permissions" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setChatPhoto/entity.json b/.butcher/methods/setChatPhoto/entity.json new file mode 100644 index 00000000..e9a8afd9 --- /dev/null +++ b/.butcher/methods/setChatPhoto/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setchatphoto", + "name": "setChatPhoto", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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": "InputFile", + "required": true, + "description": "New chat photo, uploaded using multipart/form-data", + "html_description": "New chat photo, uploaded using multipart/form-data", + "rst_description": "New chat photo, uploaded using multipart/form-data\n", + "name": "photo" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setChatStickerSet/entity.json b/.butcher/methods/setChatStickerSet/entity.json new file mode 100644 index 00000000..cd6c7f31 --- /dev/null +++ b/.butcher/methods/setChatStickerSet/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setchatstickerset", + "name": "setChatStickerSet", + "description": "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 getChat requests to check if the bot can use this method. Returns True on success.", + "html_description": "

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 getChat requests to check if the bot can use this method. Returns True on success.

", + "rst_description": "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.", + "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": "String", + "required": true, + "description": "Name of the sticker set to be set as the group sticker set", + "html_description": "Name of the sticker set to be set as the group sticker set", + "rst_description": "Name of the sticker set to be set as the group sticker set\n", + "name": "sticker_set_name" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setChatTitle/entity.json b/.butcher/methods/setChatTitle/entity.json new file mode 100644 index 00000000..15b81e91 --- /dev/null +++ b/.butcher/methods/setChatTitle/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setchattitle", + "name": "setChatTitle", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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": "New chat title, 1-128 characters", + "html_description": "New chat title, 1-128 characters", + "rst_description": "New chat title, 1-128 characters\n", + "name": "title" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setCustomEmojiStickerSetThumbnail/entity.json b/.butcher/methods/setCustomEmojiStickerSetThumbnail/entity.json new file mode 100644 index 00000000..11341ce3 --- /dev/null +++ b/.butcher/methods/setCustomEmojiStickerSetThumbnail/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "setcustomemojistickersetthumbnail", + "name": "setCustomEmojiStickerSetThumbnail", + "description": "Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.", + "html_description": "

Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.

", + "rst_description": "Use this method to set the thumbnail of a custom emoji sticker set. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name" + }, + { + "type": "String", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "custom_emoji_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setGameScore/entity.json b/.butcher/methods/setGameScore/entity.json new file mode 100644 index 00000000..45c66522 --- /dev/null +++ b/.butcher/methods/setGameScore/entity.json @@ -0,0 +1,73 @@ +{ + "meta": {}, + "group": { + "title": "Games", + "anchor": "games" + }, + "object": { + "anchor": "setgamescore", + "name": "setGameScore", + "description": "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 Message is returned, otherwise 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 False.", + "html_description": "

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 Message is returned, otherwise 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 False.

", + "rst_description": "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`.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier", + "html_description": "User identifier", + "rst_description": "User identifier\n", + "name": "user_id" + }, + { + "type": "Integer", + "required": true, + "description": "New score, must be non-negative", + "html_description": "New score, must be non-negative", + "rst_description": "New score, must be non-negative\n", + "name": "score" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters", + "html_description": "Pass True if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters", + "rst_description": "Pass :code:`True` if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters\n", + "name": "force" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the game message should not be automatically edited to include the current scoreboard", + "html_description": "Pass True if the game message should not be automatically edited to include the current scoreboard", + "rst_description": "Pass :code:`True` if the game message should not be automatically edited to include the current scoreboard\n", + "name": "disable_edit_message" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the sent message", + "html_description": "Required if inline_message_id is not specified. Identifier of the sent message", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the sent message\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setMessageReaction/entity.json b/.butcher/methods/setMessageReaction/entity.json new file mode 100644 index 00000000..98c0ebe1 --- /dev/null +++ b/.butcher/methods/setMessageReaction/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setmessagereaction", + "name": "setMessageReaction", + "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", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "message_id" + }, + { + "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. 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" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to set the reaction with a big animation", + "html_description": "Pass True to set the reaction with a big animation", + "rst_description": "Pass :code:`True` to set the reaction with a big animation\n", + "name": "is_big" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setMyCommands/entity.json b/.butcher/methods/setMyCommands/entity.json new file mode 100644 index 00000000..23b15e5e --- /dev/null +++ b/.butcher/methods/setMyCommands/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setmycommands", + "name": "setMyCommands", + "description": "Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success.", + "html_description": "

Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Array of BotCommand", + "required": true, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "commands" + }, + { + "type": "BotCommandScope", + "required": false, + "description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "html_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "rst_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.\n", + "name": "scope" + }, + { + "type": "String", + "required": false, + "description": "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", + "html_description": "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", + "rst_description": "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\n", + "name": "language_code" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setMyDefaultAdministratorRights/entity.json b/.butcher/methods/setMyDefaultAdministratorRights/entity.json new file mode 100644 index 00000000..2dbc6589 --- /dev/null +++ b/.butcher/methods/setMyDefaultAdministratorRights/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setmydefaultadministratorrights", + "name": "setMyDefaultAdministratorRights", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "ChatAdministratorRights", + "required": false, + "description": "A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.", + "html_description": "A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.", + "rst_description": "A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.\n", + "name": "rights" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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.", + "html_description": "Pass 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.", + "rst_description": "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.\n", + "name": "for_channels" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setMyDescription/entity.json b/.butcher/methods/setMyDescription/entity.json new file mode 100644 index 00000000..0180b7fb --- /dev/null +++ b/.butcher/methods/setMyDescription/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setmydescription", + "name": "setMyDescription", + "description": "Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success.", + "html_description": "

Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.", + "html_description": "New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.", + "rst_description": "New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.\n", + "name": "description" + }, + { + "type": "String", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "language_code" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setMyName/entity.json b/.butcher/methods/setMyName/entity.json new file mode 100644 index 00000000..e6461251 --- /dev/null +++ b/.butcher/methods/setMyName/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setmyname", + "name": "setMyName", + "description": "Use this method to change the bot's name. Returns True on success.", + "html_description": "

Use this method to change the bot's name. Returns True on success.

", + "rst_description": "Use this method to change the bot's name. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language.", + "html_description": "New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language.", + "rst_description": "New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language.\n", + "name": "name" + }, + { + "type": "String", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "language_code" + } + ], + "category": "methods" + } +} 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/setMyShortDescription/entity.json b/.butcher/methods/setMyShortDescription/entity.json new file mode 100644 index 00000000..7898993a --- /dev/null +++ b/.butcher/methods/setMyShortDescription/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setmyshortdescription", + "name": "setMyShortDescription", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.", + "html_description": "New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.", + "rst_description": "New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.\n", + "name": "short_description" + }, + { + "type": "String", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "language_code" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setPassportDataErrors/entity.json b/.butcher/methods/setPassportDataErrors/entity.json new file mode 100644 index 00000000..410c1b7e --- /dev/null +++ b/.butcher/methods/setPassportDataErrors/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "setpassportdataerrors", + "name": "setPassportDataErrors", + "description": "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 True on success.\nUse this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.", + "html_description": "

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 True on success.

Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.

", + "rst_description": "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.\nUse this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier", + "html_description": "User identifier", + "rst_description": "User identifier\n", + "name": "user_id" + }, + { + "type": "Array of PassportElementError", + "required": true, + "description": "A JSON-serialized array describing the errors", + "html_description": "A JSON-serialized array describing the errors", + "rst_description": "A JSON-serialized array describing the errors\n", + "name": "errors" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setStickerEmojiList/entity.json b/.butcher/methods/setStickerEmojiList/entity.json new file mode 100644 index 00000000..941260f8 --- /dev/null +++ b/.butcher/methods/setStickerEmojiList/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "setstickeremojilist", + "name": "setStickerEmojiList", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier of the sticker", + "html_description": "File identifier of the sticker", + "rst_description": "File identifier of the sticker\n", + "name": "sticker" + }, + { + "type": "Array of String", + "required": true, + "description": "A JSON-serialized list of 1-20 emoji associated with the sticker", + "html_description": "A JSON-serialized list of 1-20 emoji associated with the sticker", + "rst_description": "A JSON-serialized list of 1-20 emoji associated with the sticker\n", + "name": "emoji_list" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setStickerKeywords/entity.json b/.butcher/methods/setStickerKeywords/entity.json new file mode 100644 index 00000000..0391d3df --- /dev/null +++ b/.butcher/methods/setStickerKeywords/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "setstickerkeywords", + "name": "setStickerKeywords", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier of the sticker", + "html_description": "File identifier of the sticker", + "rst_description": "File identifier of the sticker\n", + "name": "sticker" + }, + { + "type": "Array of String", + "required": false, + "description": "A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters", + "html_description": "A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters", + "rst_description": "A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters\n", + "name": "keywords" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setStickerMaskPosition/entity.json b/.butcher/methods/setStickerMaskPosition/entity.json new file mode 100644 index 00000000..f4a481db --- /dev/null +++ b/.butcher/methods/setStickerMaskPosition/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "setstickermaskposition", + "name": "setStickerMaskPosition", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier of the sticker", + "html_description": "File identifier of the sticker", + "rst_description": "File identifier of the sticker\n", + "name": "sticker" + }, + { + "type": "MaskPosition", + "required": false, + "description": "A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.", + "html_description": "A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.", + "rst_description": "A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.\n", + "name": "mask_position" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setStickerPositionInSet/entity.json b/.butcher/methods/setStickerPositionInSet/entity.json new file mode 100644 index 00000000..d5a9cb06 --- /dev/null +++ b/.butcher/methods/setStickerPositionInSet/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "setstickerpositioninset", + "name": "setStickerPositionInSet", + "description": "Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.", + "html_description": "

Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.

", + "rst_description": "Use this method to move a sticker in a set created by the bot to a specific position. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier of the sticker", + "html_description": "File identifier of the sticker", + "rst_description": "File identifier of the sticker\n", + "name": "sticker" + }, + { + "type": "Integer", + "required": true, + "description": "New sticker position in the set, zero-based", + "html_description": "New sticker position in the set, zero-based", + "rst_description": "New sticker position in the set, zero-based\n", + "name": "position" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setStickerSetThumbnail/entity.json b/.butcher/methods/setStickerSetThumbnail/entity.json new file mode 100644 index 00000000..4d2e6add --- /dev/null +++ b/.butcher/methods/setStickerSetThumbnail/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "setstickersetthumbnail", + "name": "setStickerSetThumbnail", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name" + }, + { + "type": "Integer", + "required": true, + "description": "User identifier of the sticker set owner", + "html_description": "User identifier of the sticker set owner", + "rst_description": "User identifier of the sticker set owner\n", + "name": "user_id" + }, + { + "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#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", + "name": "format" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setStickerSetTitle/entity.json b/.butcher/methods/setStickerSetTitle/entity.json new file mode 100644 index 00000000..9840d547 --- /dev/null +++ b/.butcher/methods/setStickerSetTitle/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "setstickersettitle", + "name": "setStickerSetTitle", + "description": "Use this method to set the title of a created sticker set. Returns True on success.", + "html_description": "

Use this method to set the title of a created sticker set. Returns True on success.

", + "rst_description": "Use this method to set the title of a created sticker set. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name" + }, + { + "type": "String", + "required": true, + "description": "Sticker set title, 1-64 characters", + "html_description": "Sticker set title, 1-64 characters", + "rst_description": "Sticker set title, 1-64 characters\n", + "name": "title" + } + ], + "category": "methods" + } +} 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 new file mode 100644 index 00000000..0532b3de --- /dev/null +++ b/.butcher/methods/setWebhook/entity.json @@ -0,0 +1,73 @@ +{ + "meta": {}, + "group": { + "title": "Getting updates", + "anchor": "getting-updates" + }, + "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 (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", + "required": true, + "description": "HTTPS URL to send updates to. Use an empty string to remove webhook integration", + "html_description": "HTTPS URL to send updates to. Use an empty string to remove webhook integration", + "rst_description": "HTTPS URL to send updates to. Use an empty string to remove webhook integration\n", + "name": "url" + }, + { + "type": "InputFile", + "required": false, + "description": "Upload your public key certificate so that the root certificate in use can be checked. See our self-signed guide for details.", + "html_description": "Upload your public key certificate so that the root certificate in use can be checked. See our self-signed guide for details.", + "rst_description": "Upload your public key certificate so that the root certificate in use can be checked. See our `self-signed guide `_ for details.\n", + "name": "certificate" + }, + { + "type": "String", + "required": false, + "description": "The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS", + "html_description": "The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS", + "rst_description": "The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS\n", + "name": "ip_address" + }, + { + "type": "Integer", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "max_connections" + }, + { + "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.\nPlease note that this parameter doesn't affect updates created before the call to the setWebhook, 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.
\nPlease note that this parameter doesn't affect updates created before the call to the setWebhook, 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\nPlease note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.\n", + "name": "allowed_updates" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to drop all pending updates", + "html_description": "Pass True to drop all pending updates", + "rst_description": "Pass :code:`True` to drop all pending updates\n", + "name": "drop_pending_updates" + }, + { + "type": "String", + "required": false, + "description": "A secret token to be sent in a header 'X-Telegram-Bot-Api-Secret-Token' in every webhook request, 1-256 characters. Only characters A-Z, a-z, 0-9, _ and - are allowed. The header is useful to ensure that the request comes from a webhook set by you.", + "html_description": "A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256 characters. Only characters A-Z, a-z, 0-9, _ and - are allowed. The header is useful to ensure that the request comes from a webhook set by you.", + "rst_description": "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.\n", + "name": "secret_token" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/stopMessageLiveLocation/entity.json b/.butcher/methods/stopMessageLiveLocation/entity.json new file mode 100644 index 00000000..dd33f101 --- /dev/null +++ b/.butcher/methods/stopMessageLiveLocation/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "stopmessagelivelocation", + "name": "stopMessageLiveLocation", + "description": "Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.", + "html_description": "

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

", + "rst_description": "Use this method to stop updating a live location message before *live_period* expires. On success, if the message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "html_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message with live location to stop", + "html_description": "Required if inline_message_id is not specified. Identifier of the message with live location to stop", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message with live location to stop\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new inline keyboard.", + "html_description": "A JSON-serialized object for a new inline keyboard.", + "rst_description": "A JSON-serialized object for a new `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/stopPoll/entity.json b/.butcher/methods/stopPoll/entity.json new file mode 100644 index 00000000..c3d58e24 --- /dev/null +++ b/.butcher/methods/stopPoll/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "stoppoll", + "name": "stopPoll", + "description": "Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.", + "html_description": "

Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.

", + "rst_description": "Use this method to stop a poll which was sent by the bot. On success, the stopped :class:`aiogram.types.poll.Poll` is returned.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "html_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Identifier of the original message with the poll", + "html_description": "Identifier of the original message with the poll", + "rst_description": "Identifier of the original message with the poll\n", + "name": "message_id" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new message inline keyboard.", + "html_description": "A JSON-serialized object for a new message inline keyboard.", + "rst_description": "A JSON-serialized object for a new message `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} 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/unbanChatMember/entity.json b/.butcher/methods/unbanChatMember/entity.json new file mode 100644 index 00000000..710ab883 --- /dev/null +++ b/.butcher/methods/unbanChatMember/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "unbanchatmember", + "name": "unbanChatMember", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)\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": "Boolean", + "required": false, + "description": "Do nothing if the user is not banned", + "html_description": "Do nothing if the user is not banned", + "rst_description": "Do nothing if the user is not banned\n", + "name": "only_if_banned" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/unbanChatSenderChat/entity.json b/.butcher/methods/unbanChatSenderChat/entity.json new file mode 100644 index 00000000..aec3e9f6 --- /dev/null +++ b/.butcher/methods/unbanChatSenderChat/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "unbanchatsenderchat", + "name": "unbanChatSenderChat", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target sender chat", + "html_description": "Unique identifier of the target sender chat", + "rst_description": "Unique identifier of the target sender chat\n", + "name": "sender_chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/unhideGeneralForumTopic/entity.json b/.butcher/methods/unhideGeneralForumTopic/entity.json new file mode 100644 index 00000000..8db78a8a --- /dev/null +++ b/.butcher/methods/unhideGeneralForumTopic/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "unhidegeneralforumtopic", + "name": "unhideGeneralForumTopic", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/unpinAllChatMessages/entity.json b/.butcher/methods/unpinAllChatMessages/entity.json new file mode 100644 index 00000000..103cd21b --- /dev/null +++ b/.butcher/methods/unpinAllChatMessages/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "unpinallchatmessages", + "name": "unpinAllChatMessages", + "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", + "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/unpinAllForumTopicMessages/entity.json b/.butcher/methods/unpinAllForumTopicMessages/entity.json new file mode 100644 index 00000000..b3b32d03 --- /dev/null +++ b/.butcher/methods/unpinAllForumTopicMessages/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "unpinallforumtopicmessages", + "name": "unpinAllForumTopicMessages", + "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", + "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 for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/unpinAllGeneralForumTopicMessages/entity.json b/.butcher/methods/unpinAllGeneralForumTopicMessages/entity.json new file mode 100644 index 00000000..c6130087 --- /dev/null +++ b/.butcher/methods/unpinAllGeneralForumTopicMessages/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "unpinallgeneralforumtopicmessages", + "name": "unpinAllGeneralForumTopicMessages", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/unpinChatMessage/entity.json b/.butcher/methods/unpinChatMessage/entity.json new file mode 100644 index 00000000..93f9d8b8 --- /dev/null +++ b/.butcher/methods/unpinChatMessage/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "unpinchatmessage", + "name": "unpinChatMessage", + "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, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "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" + } + ], + "category": "methods" + } +} 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/uploadStickerFile/entity.json b/.butcher/methods/uploadStickerFile/entity.json new file mode 100644 index 00000000..802df831 --- /dev/null +++ b/.butcher/methods/uploadStickerFile/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "uploadstickerfile", + "name": "uploadStickerFile", + "description": "Use this method to upload a file with a sticker for later use in the createNewStickerSet, addStickerToSet, or replaceStickerInSet methods (the file can be used multiple times). Returns the uploaded File on success.", + "html_description": "

Use this method to upload a file with a sticker for later use in the createNewStickerSet, addStickerToSet, or replaceStickerInSet methods (the file can be used multiple times). Returns the uploaded File on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of sticker file owner", + "html_description": "User identifier of sticker file owner", + "rst_description": "User identifier of sticker file owner\n", + "name": "user_id" + }, + { + "type": "InputFile", + "required": true, + "description": "A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See https://core.telegram.org/stickers for technical requirements. More information on Sending Files", + "html_description": "A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See https://core.telegram.org/stickers for technical requirements. More information on Sending Files »", + "rst_description": "A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See `https://core.telegram.org/stickers `_`https://core.telegram.org/stickers `_ for technical requirements. :ref:`More information on Sending Files » `\n", + "name": "sticker" + }, + { + "type": "String", + "required": true, + "description": "Format of the sticker, must be one of 'static', 'animated', 'video'", + "html_description": "Format of the sticker, must be one of “static”, “animated”, “video”", + "rst_description": "Format of the sticker, must be one of 'static', 'animated', 'video'\n", + "name": "sticker_format" + } + ], + "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 new file mode 100644 index 00000000..1d64c596 --- /dev/null +++ b/.butcher/schema/schema.json @@ -0,0 +1,23443 @@ +{ + "api": { + "version": "9.6", + "release_date": "2026-04-03" + }, + "items": [ + { + "title": "Getting updates", + "anchor": "getting-updates", + "children": [ + { + "anchor": "update", + "name": "Update", + "description": "This object represents an incoming update.\nAt most one of the optional parameters can be present in any given update.", + "html_description": "

This object represents an incoming update.
\nAt most one of the optional parameters can be present in any given update.

", + "rst_description": "This `object `_ represents an incoming update.\n\nAt most **one** of the optional parameters can be present in any given update.", + "annotations": [ + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "update_id", + "required": true + }, + { + "type": "Message", + "description": "New incoming message of any kind - text, photo, sticker, etc.", + "html_description": "Optional. New incoming message of any kind - text, photo, sticker, etc.", + "rst_description": "*Optional*. New incoming message of any kind - text, photo, sticker, etc.\n", + "name": "message", + "required": false + }, + { + "type": "Message", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "edited_message", + "required": false + }, + { + "type": "Message", + "description": "New incoming channel post of any kind - text, photo, sticker, etc.", + "html_description": "Optional. New incoming channel post of any kind - text, photo, sticker, etc.", + "rst_description": "*Optional*. New incoming channel post of any kind - text, photo, sticker, etc.\n", + "name": "channel_post", + "required": false + }, + { + "type": "Message", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "edited_channel_post", + "required": false + }, + { + "type": "BusinessConnection", + "description": "The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot", + "html_description": "Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot", + "rst_description": "*Optional*. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot\n", + "name": "business_connection", + "required": false + }, + { + "type": "Message", + "description": "New message from a connected business account", + "html_description": "Optional. New message from a connected business account", + "rst_description": "*Optional*. New message from a connected business account\n", + "name": "business_message", + "required": false + }, + { + "type": "Message", + "description": "New version of a message from a connected business account", + "html_description": "Optional. New version of a message from a connected business account", + "rst_description": "*Optional*. New version of a message from a connected business account\n", + "name": "edited_business_message", + "required": false + }, + { + "type": "BusinessMessagesDeleted", + "description": "Messages were deleted from a connected business account", + "html_description": "Optional. Messages were deleted from a connected business account", + "rst_description": "*Optional*. Messages were deleted from a connected business account\n", + "name": "deleted_business_messages", + "required": false + }, + { + "type": "MessageReactionUpdated", + "description": "A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify \"message_reaction\" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots.", + "html_description": "Optional. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify \"message_reaction\" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots.", + "rst_description": "*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.\n", + "name": "message_reaction", + "required": false + }, + { + "type": "MessageReactionCountUpdated", + "description": "Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify \"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.", + "html_description": "Optional. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify \"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.", + "rst_description": "*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.\n", + "name": "message_reaction_count", + "required": false + }, + { + "type": "InlineQuery", + "description": "New incoming inline query", + "html_description": "Optional. New incoming inline query", + "rst_description": "*Optional*. New incoming `inline `_ query\n", + "name": "inline_query", + "required": false + }, + { + "type": "ChosenInlineResult", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "chosen_inline_result", + "required": false + }, + { + "type": "CallbackQuery", + "description": "New incoming callback query", + "html_description": "Optional. New incoming callback query", + "rst_description": "*Optional*. New incoming callback query\n", + "name": "callback_query", + "required": false + }, + { + "type": "ShippingQuery", + "description": "New incoming shipping query. Only for invoices with flexible price", + "html_description": "Optional. New incoming shipping query. Only for invoices with flexible price", + "rst_description": "*Optional*. New incoming shipping query. Only for invoices with flexible price\n", + "name": "shipping_query", + "required": false + }, + { + "type": "PreCheckoutQuery", + "description": "New incoming pre-checkout query. Contains full information about checkout", + "html_description": "Optional. New incoming pre-checkout query. Contains full information about checkout", + "rst_description": "*Optional*. New incoming pre-checkout query. Contains full information about checkout\n", + "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", + "html_description": "Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot", + "rst_description": "*Optional*. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot\n", + "name": "poll", + "required": false + }, + { + "type": "PollAnswer", + "description": "A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "poll_answer", + "required": false + }, + { + "type": "ChatMemberUpdated", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "my_chat_member", + "required": false + }, + { + "type": "ChatMemberUpdated", + "description": "A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify \"chat_member\" in the list of allowed_updates to receive these updates.", + "html_description": "Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify \"chat_member\" in the list of allowed_updates to receive these updates.", + "rst_description": "*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.\n", + "name": "chat_member", + "required": false + }, + { + "type": "ChatJoinRequest", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "chat_join_request", + "required": false + }, + { + "type": "ChatBoostUpdated", + "description": "A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.", + "html_description": "Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.", + "rst_description": "*Optional*. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.\n", + "name": "chat_boost", + "required": false + }, + { + "type": "ChatBoostRemoved", + "description": "A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.", + "html_description": "Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.", + "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" + }, + { + "anchor": "getupdates", + "name": "getUpdates", + "description": "Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.\nNotes\n1. This method will not work if an outgoing webhook is set up.\n2. In order to avoid getting duplicate updates, recalculate offset after each server response.", + "html_description": "

Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.

\n

Notes
\n1. This method will not work if an outgoing webhook is set up.
\n2. In order to avoid getting duplicate updates, recalculate offset after each server response.

\n
", + "rst_description": "Use this method to receive incoming updates using long polling (`wiki `_). Returns an Array of :class:`aiogram.types.update.Update` objects.\n\n **Notes**\n \n **1.** This method will not work if an outgoing webhook is set up.\n \n **2.** In order to avoid getting duplicate updates, recalculate *offset* after each server response.", + "annotations": [ + { + "type": "Integer", + "required": false, + "description": "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 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.", + "html_description": "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 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.", + "rst_description": "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.\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "html_description": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "rst_description": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.\n", + "name": "limit" + }, + { + "type": "Integer", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "timeout" + }, + { + "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 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" + } + ], + "category": "methods" + }, + { + "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 (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", + "required": true, + "description": "HTTPS URL to send updates to. Use an empty string to remove webhook integration", + "html_description": "HTTPS URL to send updates to. Use an empty string to remove webhook integration", + "rst_description": "HTTPS URL to send updates to. Use an empty string to remove webhook integration\n", + "name": "url" + }, + { + "type": "InputFile", + "required": false, + "description": "Upload your public key certificate so that the root certificate in use can be checked. See our self-signed guide for details.", + "html_description": "Upload your public key certificate so that the root certificate in use can be checked. See our self-signed guide for details.", + "rst_description": "Upload your public key certificate so that the root certificate in use can be checked. See our `self-signed guide `_ for details.\n", + "name": "certificate" + }, + { + "type": "String", + "required": false, + "description": "The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS", + "html_description": "The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS", + "rst_description": "The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS\n", + "name": "ip_address" + }, + { + "type": "Integer", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "max_connections" + }, + { + "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.\nPlease note that this parameter doesn't affect updates created before the call to the setWebhook, 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.
\nPlease note that this parameter doesn't affect updates created before the call to the setWebhook, 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\nPlease note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.\n", + "name": "allowed_updates" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to drop all pending updates", + "html_description": "Pass True to drop all pending updates", + "rst_description": "Pass :code:`True` to drop all pending updates\n", + "name": "drop_pending_updates" + }, + { + "type": "String", + "required": false, + "description": "A secret token to be sent in a header 'X-Telegram-Bot-Api-Secret-Token' in every webhook request, 1-256 characters. Only characters A-Z, a-z, 0-9, _ and - are allowed. The header is useful to ensure that the request comes from a webhook set by you.", + "html_description": "A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256 characters. Only characters A-Z, a-z, 0-9, _ and - are allowed. The header is useful to ensure that the request comes from a webhook set by you.", + "rst_description": "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.\n", + "name": "secret_token" + } + ], + "category": "methods" + }, + { + "anchor": "deletewebhook", + "name": "deleteWebhook", + "description": "Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.", + "html_description": "

Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Boolean", + "required": false, + "description": "Pass True to drop all pending updates", + "html_description": "Pass True to drop all pending updates", + "rst_description": "Pass :code:`True` to drop all pending updates\n", + "name": "drop_pending_updates" + } + ], + "category": "methods" + }, + { + "anchor": "getwebhookinfo", + "name": "getWebhookInfo", + "description": "Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.", + "html_description": "

Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.

", + "rst_description": "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.", + "annotations": [], + "category": "methods" + }, + { + "anchor": "webhookinfo", + "name": "WebhookInfo", + "description": "Describes the current status of a webhook.", + "html_description": "

Describes the current status of a webhook.

", + "rst_description": "Describes the current status of a webhook.", + "annotations": [ + { + "type": "String", + "description": "Webhook URL, may be empty if webhook is not set up", + "html_description": "Webhook URL, may be empty if webhook is not set up", + "rst_description": "Webhook URL, may be empty if webhook is not set up\n", + "name": "url", + "required": true + }, + { + "type": "Boolean", + "description": "True, if a custom certificate was provided for webhook certificate checks", + "html_description": "True, if a custom certificate was provided for webhook certificate checks", + "rst_description": ":code:`True`, if a custom certificate was provided for webhook certificate checks\n", + "name": "has_custom_certificate", + "required": true + }, + { + "type": "Integer", + "description": "Number of updates awaiting delivery", + "html_description": "Number of updates awaiting delivery", + "rst_description": "Number of updates awaiting delivery\n", + "name": "pending_update_count", + "required": true + }, + { + "type": "String", + "description": "Currently used webhook IP address", + "html_description": "Optional. Currently used webhook IP address", + "rst_description": "*Optional*. Currently used webhook IP address\n", + "name": "ip_address", + "required": false + }, + { + "type": "Integer", + "description": "Unix time for the most recent error that happened when trying to deliver an update via webhook", + "html_description": "Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook", + "rst_description": "*Optional*. Unix time for the most recent error that happened when trying to deliver an update via webhook\n", + "name": "last_error_date", + "required": false + }, + { + "type": "String", + "description": "Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook", + "html_description": "Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook", + "rst_description": "*Optional*. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook\n", + "name": "last_error_message", + "required": false + }, + { + "type": "Integer", + "description": "Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters", + "html_description": "Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters", + "rst_description": "*Optional*. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters\n", + "name": "last_synchronization_error_date", + "required": false + }, + { + "type": "Integer", + "description": "The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery", + "html_description": "Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery", + "rst_description": "*Optional*. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery\n", + "name": "max_connections", + "required": false + }, + { + "type": "Array of String", + "description": "A list of update types the bot is subscribed to. Defaults to all update types except chat_member", + "html_description": "Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member", + "rst_description": "*Optional*. A list of update types the bot is subscribed to. Defaults to all update types except *chat_member*\n", + "name": "allowed_updates", + "required": false + } + ], + "category": "types" + } + ], + "description": "There are two mutually exclusive ways of receiving updates for your bot - the getUpdates method on one hand and webhooks on the other. Incoming updates are stored on the server until the bot receives them either way, but they will not be kept longer than 24 hours.\nRegardless of which option you choose, you will receive JSON-serialized Update objects as a result." + }, + { + "title": "Available types", + "anchor": "available-types", + "children": [ + { + "anchor": "user", + "name": "User", + "description": "This object represents a Telegram user or bot.", + "html_description": "

This object represents a Telegram user or bot.

", + "rst_description": "This object represents a Telegram user or bot.", + "annotations": [ + { + "type": "Integer", + "description": "Unique identifier for this user or bot. 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 for this user or bot. 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 for this user or bot. 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": "id", + "required": true + }, + { + "type": "Boolean", + "description": "True, if this user is a bot", + "html_description": "True, if this user is a bot", + "rst_description": ":code:`True`, if this user is a bot\n", + "name": "is_bot", + "required": true + }, + { + "type": "String", + "description": "User's or bot's first name", + "html_description": "User's or bot's first name", + "rst_description": "User's or bot's first name\n", + "name": "first_name", + "required": true + }, + { + "type": "String", + "description": "User's or bot's last name", + "html_description": "Optional. User's or bot's last name", + "rst_description": "*Optional*. User's or bot's last name\n", + "name": "last_name", + "required": false + }, + { + "type": "String", + "description": "User's or bot's username", + "html_description": "Optional. User's or bot's username", + "rst_description": "*Optional*. User's or bot's username\n", + "name": "username", + "required": false + }, + { + "type": "String", + "description": "IETF language tag of the user's language", + "html_description": "Optional. IETF language tag of the user's language", + "rst_description": "*Optional*. `IETF language tag `_ of the user's language\n", + "name": "language_code", + "required": false + }, + { + "type": "True", + "description": "True, if this user is a Telegram Premium user", + "html_description": "Optional. True, if this user is a Telegram Premium user", + "rst_description": "*Optional*. :code:`True`, if this user is a Telegram Premium user\n", + "name": "is_premium", + "required": false + }, + { + "type": "True", + "description": "True, if this user added the bot to the attachment menu", + "html_description": "Optional. True, if this user added the bot to the attachment menu", + "rst_description": "*Optional*. :code:`True`, if this user added the bot to the attachment menu\n", + "name": "added_to_attachment_menu", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the bot can be invited to groups. Returned only in getMe.", + "html_description": "Optional. True, if the bot can be invited to groups. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if the bot can be invited to groups. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "can_join_groups", + "required": false + }, + { + "type": "Boolean", + "description": "True, if privacy mode is disabled for the bot. Returned only in getMe.", + "html_description": "Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if `privacy mode `_ is disabled for the bot. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "can_read_all_group_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the bot supports inline queries. Returned only in getMe.", + "html_description": "Optional. True, if the bot supports inline queries. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if the bot supports inline queries. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "supports_inline_queries", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.", + "html_description": "Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.", + "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" + }, + { + "anchor": "chat", + "name": "Chat", + "description": "This object represents a chat.", + "html_description": "

This object represents a chat.

", + "rst_description": "This object represents a chat.", + "annotations": [ + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Type of the chat, can be either 'private', 'group', 'supergroup' or 'channel'", + "html_description": "Type of the chat, can be either “private”, “group”, “supergroup” or “channel”", + "rst_description": "Type of the chat, can be either 'private', 'group', 'supergroup' or 'channel'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Title, for supergroups, channels and group chats", + "html_description": "Optional. Title, for supergroups, channels and group chats", + "rst_description": "*Optional*. Title, for supergroups, channels and group chats\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Username, for private chats, supergroups and channels if available", + "html_description": "Optional. Username, for private chats, supergroups and channels if available", + "rst_description": "*Optional*. Username, for private chats, supergroups and channels if available\n", + "name": "username", + "required": false + }, + { + "type": "String", + "description": "First name of the other party in a private chat", + "html_description": "Optional. First name of the other party in a private chat", + "rst_description": "*Optional*. First name of the other party in a private chat\n", + "name": "first_name", + "required": false + }, + { + "type": "String", + "description": "Last name of the other party in a private chat", + "html_description": "Optional. Last name of the other party in a private chat", + "rst_description": "*Optional*. Last name of the other party in a private chat\n", + "name": "last_name", + "required": false + }, + { + "type": "True", + "description": "True, if the supergroup chat is a forum (has topics enabled)", + "html_description": "Optional. True, if the supergroup chat is a forum (has topics enabled)", + "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" + }, + { + "anchor": "chatfullinfo", + "name": "ChatFullInfo", + "description": "This object contains full information about a chat.", + "html_description": "

This object contains full information about a chat.

", + "rst_description": "This object contains full information about a chat.", + "annotations": [ + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Type of the chat, can be either 'private', 'group', 'supergroup' or 'channel'", + "html_description": "Type of the chat, can be either “private”, “group”, “supergroup” or “channel”", + "rst_description": "Type of the chat, can be either 'private', 'group', 'supergroup' or 'channel'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Title, for supergroups, channels and group chats", + "html_description": "Optional. Title, for supergroups, channels and group chats", + "rst_description": "*Optional*. Title, for supergroups, channels and group chats\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Username, for private chats, supergroups and channels if available", + "html_description": "Optional. Username, for private chats, supergroups and channels if available", + "rst_description": "*Optional*. Username, for private chats, supergroups and channels if available\n", + "name": "username", + "required": false + }, + { + "type": "String", + "description": "First name of the other party in a private chat", + "html_description": "Optional. First name of the other party in a private chat", + "rst_description": "*Optional*. First name of the other party in a private chat\n", + "name": "first_name", + "required": false + }, + { + "type": "String", + "description": "Last name of the other party in a private chat", + "html_description": "Optional. Last name of the other party in a private chat", + "rst_description": "*Optional*. Last name of the other party in a private chat\n", + "name": "last_name", + "required": false + }, + { + "type": "True", + "description": "True, if the supergroup chat is a forum (has topics enabled)", + "html_description": "Optional. True, if the supergroup chat is a forum (has topics enabled)", + "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 + }, + { + "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.", + "html_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.", + "rst_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.\n", + "name": "accent_color_id", + "required": true + }, + { + "type": "Integer", + "description": "The maximum number of reactions that can be set on a message in the chat", + "html_description": "The maximum number of reactions that can be set on a message in the chat", + "rst_description": "The maximum number of reactions that can be set on a message in the chat\n", + "name": "max_reaction_count", + "required": true + }, + { + "type": "ChatPhoto", + "description": "Chat photo", + "html_description": "Optional. Chat photo", + "rst_description": "*Optional*. Chat photo\n", + "name": "photo", + "required": false + }, + { + "type": "Array of String", + "description": "If non-empty, the list of all active chat usernames; for private chats, supergroups and channels", + "html_description": "Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels", + "rst_description": "*Optional*. If non-empty, the list of all `active chat usernames `_; for private chats, supergroups and channels\n", + "name": "active_usernames", + "required": false + }, + { + "type": "Birthdate", + "description": "For private chats, the date of birth of the user", + "html_description": "Optional. For private chats, the date of birth of the user", + "rst_description": "*Optional*. For private chats, the date of birth of the user\n", + "name": "birthdate", + "required": false + }, + { + "type": "BusinessIntro", + "description": "For private chats with business accounts, the intro of the business", + "html_description": "Optional. For private chats with business accounts, the intro of the business", + "rst_description": "*Optional*. For private chats with business accounts, the intro of the business\n", + "name": "business_intro", + "required": false + }, + { + "type": "BusinessLocation", + "description": "For private chats with business accounts, the location of the business", + "html_description": "Optional. For private chats with business accounts, the location of the business", + "rst_description": "*Optional*. For private chats with business accounts, the location of the business\n", + "name": "business_location", + "required": false + }, + { + "type": "BusinessOpeningHours", + "description": "For private chats with business accounts, the opening hours of the business", + "html_description": "Optional. For private chats with business accounts, the opening hours of the business", + "rst_description": "*Optional*. For private chats with business accounts, the opening hours of the business\n", + "name": "business_opening_hours", + "required": false + }, + { + "type": "Chat", + "description": "For private chats, the personal channel of the user", + "html_description": "Optional. For private chats, the personal channel of the user", + "rst_description": "*Optional*. For private chats, the personal channel of the user\n", + "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.", + "html_description": "Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed.", + "rst_description": "*Optional*. List of available reactions allowed in the chat. If omitted, then all `emoji reactions `_ are allowed.\n", + "name": "available_reactions", + "required": false + }, + { + "type": "String", + "description": "Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background", + "html_description": "Optional. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background", + "rst_description": "*Optional*. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background\n", + "name": "background_custom_emoji_id", + "required": false + }, + { + "type": "Integer", + "description": "Identifier of the accent color for the chat's profile background. See profile accent colors for more details.", + "html_description": "Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more details.", + "rst_description": "*Optional*. Identifier of the accent color for the chat's profile background. See `profile accent colors `_ for more details.\n", + "name": "profile_accent_color_id", + "required": false + }, + { + "type": "String", + "description": "Custom emoji identifier of the emoji chosen by the chat for its profile background", + "html_description": "Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background", + "rst_description": "*Optional*. Custom emoji identifier of the emoji chosen by the chat for its profile background\n", + "name": "profile_background_custom_emoji_id", + "required": false + }, + { + "type": "String", + "description": "Custom emoji identifier of the emoji status of the chat or the other party in a private chat", + "html_description": "Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat", + "rst_description": "*Optional*. Custom emoji identifier of the emoji status of the chat or the other party in a private chat\n", + "name": "emoji_status_custom_emoji_id", + "required": false + }, + { + "type": "Integer", + "description": "Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any", + "html_description": "Optional. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any", + "rst_description": "*Optional*. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any\n", + "name": "emoji_status_expiration_date", + "required": false + }, + { + "type": "String", + "description": "Bio of the other party in a private chat", + "html_description": "Optional. Bio of the other party in a private chat", + "rst_description": "*Optional*. Bio of the other party in a private chat\n", + "name": "bio", + "required": false + }, + { + "type": "True", + "description": "True, if privacy settings of the other party in the private chat allows to use tg://user?id= links only in chats with the user", + "html_description": "Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user", + "rst_description": "*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\n", + "name": "has_private_forwards", + "required": false + }, + { + "type": "True", + "description": "True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat", + "html_description": "Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat", + "rst_description": "*Optional*. :code:`True`, if the privacy settings of the other party restrict sending voice and video note messages in the private chat\n", + "name": "has_restricted_voice_and_video_messages", + "required": false + }, + { + "type": "True", + "description": "True, if users need to join the supergroup before they can send messages", + "html_description": "Optional. True, if users need to join the supergroup before they can send messages", + "rst_description": "*Optional*. :code:`True`, if users need to join the supergroup before they can send messages\n", + "name": "join_to_send_messages", + "required": false + }, + { + "type": "True", + "description": "True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators", + "html_description": "Optional. True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators", + "rst_description": "*Optional*. :code:`True`, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators\n", + "name": "join_by_request", + "required": false + }, + { + "type": "String", + "description": "Description, for groups, supergroups and channel chats", + "html_description": "Optional. Description, for groups, supergroups and channel chats", + "rst_description": "*Optional*. Description, for groups, supergroups and channel chats\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Primary invite link, for groups, supergroups and channel chats", + "html_description": "Optional. Primary invite link, for groups, supergroups and channel chats", + "rst_description": "*Optional*. Primary invite link, for groups, supergroups and channel chats\n", + "name": "invite_link", + "required": false + }, + { + "type": "Message", + "description": "The most recent pinned message (by sending date)", + "html_description": "Optional. The most recent pinned message (by sending date)", + "rst_description": "*Optional*. The most recent pinned message (by sending date)\n", + "name": "pinned_message", + "required": false + }, + { + "type": "ChatPermissions", + "description": "Default chat member permissions, for groups and supergroups", + "html_description": "Optional. Default chat member permissions, for groups and supergroups", + "rst_description": "*Optional*. Default chat member permissions, for groups and supergroups\n", + "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.", + "html_description": "Optional. True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.", + "rst_description": "*Optional*. :code:`True`, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.\n", + "name": "can_send_paid_media", + "required": false + }, + { + "type": "Integer", + "description": "For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds", + "html_description": "Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds", + "rst_description": "*Optional*. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds\n", + "name": "slow_mode_delay", + "required": false + }, + { + "type": "Integer", + "description": "For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions", + "html_description": "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", + "rst_description": "*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\n", + "name": "unrestrict_boost_count", + "required": false + }, + { + "type": "Integer", + "description": "The time after which all messages sent to the chat will be automatically deleted; in seconds", + "html_description": "Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds", + "rst_description": "*Optional*. The time after which all messages sent to the chat will be automatically deleted; in seconds\n", + "name": "message_auto_delete_time", + "required": false + }, + { + "type": "True", + "description": "True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.", + "html_description": "Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.", + "rst_description": "*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.\n", + "name": "has_aggressive_anti_spam_enabled", + "required": false + }, + { + "type": "True", + "description": "True, if non-administrators can only get the list of bots and administrators in the chat", + "html_description": "Optional. True, if non-administrators can only get the list of bots and administrators in the chat", + "rst_description": "*Optional*. :code:`True`, if non-administrators can only get the list of bots and administrators in the chat\n", + "name": "has_hidden_members", + "required": false + }, + { + "type": "True", + "description": "True, if messages from the chat can't be forwarded to other chats", + "html_description": "Optional. True, if messages from the chat can't be forwarded to other chats", + "rst_description": "*Optional*. :code:`True`, if messages from the chat can't be forwarded to other chats\n", + "name": "has_protected_content", + "required": false + }, + { + "type": "True", + "description": "True, if new chat members will have access to old messages; available only to chat administrators", + "html_description": "Optional. True, if new chat members will have access to old messages; available only to chat administrators", + "rst_description": "*Optional*. :code:`True`, if new chat members will have access to old messages; available only to chat administrators\n", + "name": "has_visible_history", + "required": false + }, + { + "type": "String", + "description": "For supergroups, name of the group sticker set", + "html_description": "Optional. For supergroups, name of the group sticker set", + "rst_description": "*Optional*. For supergroups, name of the group sticker set\n", + "name": "sticker_set_name", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can change the group sticker set", + "html_description": "Optional. True, if the bot can change the group sticker set", + "rst_description": "*Optional*. :code:`True`, if the bot can change the group sticker set\n", + "name": "can_set_sticker_set", + "required": false + }, + { + "type": "String", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "custom_emoji_sticker_set_name", + "required": false + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "linked_chat_id", + "required": false + }, + { + "type": "ChatLocation", + "description": "For supergroups, the location to which the supergroup is connected", + "html_description": "Optional. For supergroups, the location to which the supergroup is connected", + "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" + }, + { + "anchor": "message", + "name": "Message", + "description": "This object represents a message.", + "html_description": "

This object represents a message.

", + "rst_description": "This object represents a message.", + "annotations": [ + { + "type": "Integer", + "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 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; 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 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 + }, + { + "type": "Integer", + "description": "If the sender of the message boosted the chat, the number of boosts added by the user", + "html_description": "Optional. If the sender of the message boosted the chat, the number of boosts added by the user", + "rst_description": "*Optional*. If the sender of the message boosted the chat, the number of boosts added by the user\n", + "name": "sender_boost_count", + "required": false + }, + { + "type": "User", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "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.", + "html_description": "Date the message was sent in Unix time. It is always a positive number, representing a valid date.", + "rst_description": "Date the message was sent in Unix time. It is always a positive number, representing a valid date.\n", + "name": "date", + "required": true + }, + { + "type": "String", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "business_connection_id", + "required": false + }, + { + "type": "Chat", + "description": "Chat the message belongs to", + "html_description": "Chat the message belongs to", + "rst_description": "Chat the message belongs to\n", + "name": "chat", + "required": true + }, + { + "type": "MessageOrigin", + "description": "Information about the original message for forwarded messages", + "html_description": "Optional. Information about the original message for forwarded messages", + "rst_description": "*Optional*. Information about the original message for forwarded messages\n", + "name": "forward_origin", + "required": false + }, + { + "type": "True", + "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 + }, + { + "type": "True", + "description": "True, if the message is a channel post that was automatically forwarded to the connected discussion group", + "html_description": "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group", + "rst_description": "*Optional*. :code:`True`, if the message is a channel post that was automatically forwarded to the connected discussion group\n", + "name": "is_automatic_forward", + "required": false + }, + { + "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 :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 + }, + { + "type": "ExternalReplyInfo", + "description": "Information about the message that is being replied to, which may come from another chat or forum topic", + "html_description": "Optional. Information about the message that is being replied to, which may come from another chat or forum topic", + "rst_description": "*Optional*. Information about the message that is being replied to, which may come from another chat or forum topic\n", + "name": "external_reply", + "required": false + }, + { + "type": "TextQuote", + "description": "For replies that quote part of the original message, the quoted part of the message", + "html_description": "Optional. For replies that quote part of the original message, the quoted part of the message", + "rst_description": "*Optional*. For replies that quote part of the original message, the quoted part of the message\n", + "name": "quote", + "required": false + }, + { + "type": "Story", + "description": "For replies to a story, the original story", + "html_description": "Optional. For replies to a story, the original story", + "rst_description": "*Optional*. For replies to a story, the original story\n", + "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", + "html_description": "Optional. Bot through which the message was sent", + "rst_description": "*Optional*. Bot through which the message was sent\n", + "name": "via_bot", + "required": false + }, + { + "type": "Integer", + "description": "Date the message was last edited in Unix time", + "html_description": "Optional. Date the message was last edited in Unix time", + "rst_description": "*Optional*. Date the message was last edited in Unix time\n", + "name": "edit_date", + "required": false + }, + { + "type": "True", + "description": "True, if the message can't be forwarded", + "html_description": "Optional. True, if the message can't be forwarded", + "rst_description": "*Optional*. :code:`True`, if the message can't be forwarded\n", + "name": "has_protected_content", + "required": false + }, + { + "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*. :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 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 + }, + { + "type": "String", + "description": "Signature of the post author for messages in channels, or the custom title of an anonymous group administrator", + "html_description": "Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator", + "rst_description": "*Optional*. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator\n", + "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", + "html_description": "Optional. For text messages, the actual UTF-8 text of the message", + "rst_description": "*Optional*. For text messages, the actual UTF-8 text of the message\n", + "name": "text", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text", + "html_description": "Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text", + "rst_description": "*Optional*. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text\n", + "name": "entities", + "required": false + }, + { + "type": "LinkPreviewOptions", + "description": "Options used for link preview generation for the message, if it is a text message and link preview options were changed", + "html_description": "Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed", + "rst_description": "*Optional*. Options used for link preview generation for the message, if it is a text message and link preview options were changed\n", + "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", + "html_description": "Optional. Unique identifier of the message effect added to the message", + "rst_description": "*Optional*. Unique identifier of the message effect added to the message\n", + "name": "effect_id", + "required": false + }, + { + "type": "Animation", + "description": "Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set", + "html_description": "Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set", + "rst_description": "*Optional*. Message is an animation, information about the animation. For backward compatibility, when this field is set, the *document* field will also be set\n", + "name": "animation", + "required": false + }, + { + "type": "Audio", + "description": "Message is an audio file, information about the file", + "html_description": "Optional. Message is an audio file, information about the file", + "rst_description": "*Optional*. Message is an audio file, information about the file\n", + "name": "audio", + "required": false + }, + { + "type": "Document", + "description": "Message is a general file, information about the file", + "html_description": "Optional. Message is a general file, information about the file", + "rst_description": "*Optional*. Message is a general file, information about the file\n", + "name": "document", + "required": false + }, + { + "type": "PaidMediaInfo", + "description": "Message contains paid media; information about the paid media", + "html_description": "Optional. Message contains paid media; information about the paid media", + "rst_description": "*Optional*. Message contains paid media; information about the paid media\n", + "name": "paid_media", + "required": false + }, + { + "type": "Array of PhotoSize", + "description": "Message is a photo, available sizes of the photo", + "html_description": "Optional. Message is a photo, available sizes of the photo", + "rst_description": "*Optional*. Message is a photo, available sizes of the photo\n", + "name": "photo", + "required": false + }, + { + "type": "Sticker", + "description": "Message is a sticker, information about the sticker", + "html_description": "Optional. Message is a sticker, information about the sticker", + "rst_description": "*Optional*. Message is a sticker, information about the sticker\n", + "name": "sticker", + "required": false + }, + { + "type": "Story", + "description": "Message is a forwarded story", + "html_description": "Optional. Message is a forwarded story", + "rst_description": "*Optional*. Message is a forwarded story\n", + "name": "story", + "required": false + }, + { + "type": "Video", + "description": "Message is a video, information about the video", + "html_description": "Optional. Message is a video, information about the video", + "rst_description": "*Optional*. Message is a video, information about the video\n", + "name": "video", + "required": false + }, + { + "type": "VideoNote", + "description": "Message is a video note, information about the video message", + "html_description": "Optional. Message is a video note, information about the video message", + "rst_description": "*Optional*. Message is a `video note `_, information about the video message\n", + "name": "video_note", + "required": false + }, + { + "type": "Voice", + "description": "Message is a voice message, information about the file", + "html_description": "Optional. Message is a voice message, information about the file", + "rst_description": "*Optional*. Message is a voice message, information about the file\n", + "name": "voice", + "required": false + }, + { + "type": "String", + "description": "Caption for the animation, audio, document, paid media, photo, video or voice", + "html_description": "Optional. Caption for the animation, audio, document, paid media, photo, video or voice", + "rst_description": "*Optional*. Caption for the animation, audio, document, paid media, photo, video or voice\n", + "name": "caption", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption", + "html_description": "Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption", + "rst_description": "*Optional*. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption\n", + "name": "caption_entities", + "required": false + }, + { + "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*. :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "type": "True", + "description": "True, if the message media is covered by a spoiler animation", + "html_description": "Optional. True, if the message media is covered by a spoiler animation", + "rst_description": "*Optional*. :code:`True`, if the message media is covered by a spoiler animation\n", + "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", + "html_description": "Optional. Message is a shared contact, information about the contact", + "rst_description": "*Optional*. Message is a shared contact, information about the contact\n", + "name": "contact", + "required": false + }, + { + "type": "Dice", + "description": "Message is a dice with random value", + "html_description": "Optional. Message is a dice with random value", + "rst_description": "*Optional*. Message is a dice with random value\n", + "name": "dice", + "required": false + }, + { + "type": "Game", + "description": "Message is a game, information about the game.", + "html_description": "Optional. Message is a game, information about the game. More about games »", + "rst_description": "*Optional*. Message is a game, information about the game. `More about games » `_\n", + "name": "game", + "required": false + }, + { + "type": "Poll", + "description": "Message is a native poll, information about the poll", + "html_description": "Optional. Message is a native poll, information about the poll", + "rst_description": "*Optional*. Message is a native poll, information about the poll\n", + "name": "poll", + "required": false + }, + { + "type": "Venue", + "description": "Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set", + "html_description": "Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set", + "rst_description": "*Optional*. Message is a venue, information about the venue. For backward compatibility, when this field is set, the *location* field will also be set\n", + "name": "venue", + "required": false + }, + { + "type": "Location", + "description": "Message is a shared location, information about the location", + "html_description": "Optional. Message is a shared location, information about the location", + "rst_description": "*Optional*. Message is a shared location, information about the location\n", + "name": "location", + "required": false + }, + { + "type": "Array of User", + "description": "New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)", + "html_description": "Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)", + "rst_description": "*Optional*. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)\n", + "name": "new_chat_members", + "required": false + }, + { + "type": "User", + "description": "A member was removed from the group, information about them (this member may be the bot itself)", + "html_description": "Optional. A member was removed from the group, information about them (this member may be the bot itself)", + "rst_description": "*Optional*. A member was removed from the group, information about them (this member may be the bot itself)\n", + "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", + "html_description": "Optional. A chat title was changed to this value", + "rst_description": "*Optional*. A chat title was changed to this value\n", + "name": "new_chat_title", + "required": false + }, + { + "type": "Array of PhotoSize", + "description": "A chat photo was change to this value", + "html_description": "Optional. A chat photo was change to this value", + "rst_description": "*Optional*. A chat photo was change to this value\n", + "name": "new_chat_photo", + "required": false + }, + { + "type": "True", + "description": "Service message: the chat photo was deleted", + "html_description": "Optional. Service message: the chat photo was deleted", + "rst_description": "*Optional*. Service message: the chat photo was deleted\n", + "name": "delete_chat_photo", + "required": false + }, + { + "type": "True", + "description": "Service message: the group has been created", + "html_description": "Optional. Service message: the group has been created", + "rst_description": "*Optional*. Service message: the group has been created\n", + "name": "group_chat_created", + "required": false + }, + { + "type": "True", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "supergroup_chat_created", + "required": false + }, + { + "type": "True", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "channel_chat_created", + "required": false + }, + { + "type": "MessageAutoDeleteTimerChanged", + "description": "Service message: auto-delete timer settings changed in the chat", + "html_description": "Optional. Service message: auto-delete timer settings changed in the chat", + "rst_description": "*Optional*. Service message: auto-delete timer settings changed in the chat\n", + "name": "message_auto_delete_timer_changed", + "required": false + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "migrate_to_chat_id", + "required": false + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "migrate_from_chat_id", + "required": false + }, + { + "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 :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 + }, + { + "type": "Invoice", + "description": "Message is an invoice for a payment, information about the invoice.", + "html_description": "Optional. Message is an invoice for a payment, information about the invoice. More about payments »", + "rst_description": "*Optional*. Message is an invoice for a `payment `_, information about the invoice. `More about payments » `_\n", + "name": "invoice", + "required": false + }, + { + "type": "SuccessfulPayment", + "description": "Message is a service message about a successful payment, information about the payment.", + "html_description": "Optional. Message is a service message about a successful payment, information about the payment. More about payments »", + "rst_description": "*Optional*. Message is a service message about a successful payment, information about the payment. `More about payments » `_\n", + "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", + "html_description": "Optional. Service message: users were shared with the bot", + "rst_description": "*Optional*. Service message: users were shared with the bot\n", + "name": "users_shared", + "required": false + }, + { + "type": "ChatShared", + "description": "Service message: a chat was shared with the bot", + "html_description": "Optional. Service message: a chat was shared with the bot", + "rst_description": "*Optional*. Service message: a chat was shared with the bot\n", + "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.", + "html_description": "Optional. The domain name of the website on which the user has logged in. More about Telegram Login »", + "rst_description": "*Optional*. The domain name of the website on which the user has logged in. `More about Telegram Login » `_\n", + "name": "connected_website", + "required": false + }, + { + "type": "WriteAccessAllowed", + "description": "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", + "html_description": "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", + "rst_description": "*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 `_\n", + "name": "write_access_allowed", + "required": false + }, + { + "type": "PassportData", + "description": "Telegram Passport data", + "html_description": "Optional. Telegram Passport data", + "rst_description": "*Optional*. Telegram Passport data\n", + "name": "passport_data", + "required": false + }, + { + "type": "ProximityAlertTriggered", + "description": "Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.", + "html_description": "Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.", + "rst_description": "*Optional*. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.\n", + "name": "proximity_alert_triggered", + "required": false + }, + { + "type": "ChatBoostAdded", + "description": "Service message: user boosted the chat", + "html_description": "Optional. Service message: user boosted the chat", + "rst_description": "*Optional*. Service message: user boosted the chat\n", + "name": "boost_added", + "required": false + }, + { + "type": "ChatBackground", + "description": "Service message: chat background set", + "html_description": "Optional. Service message: chat background set", + "rst_description": "*Optional*. Service message: chat background set\n", + "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", + "html_description": "Optional. Service message: forum topic created", + "rst_description": "*Optional*. Service message: forum topic created\n", + "name": "forum_topic_created", + "required": false + }, + { + "type": "ForumTopicEdited", + "description": "Service message: forum topic edited", + "html_description": "Optional. Service message: forum topic edited", + "rst_description": "*Optional*. Service message: forum topic edited\n", + "name": "forum_topic_edited", + "required": false + }, + { + "type": "ForumTopicClosed", + "description": "Service message: forum topic closed", + "html_description": "Optional. Service message: forum topic closed", + "rst_description": "*Optional*. Service message: forum topic closed\n", + "name": "forum_topic_closed", + "required": false + }, + { + "type": "ForumTopicReopened", + "description": "Service message: forum topic reopened", + "html_description": "Optional. Service message: forum topic reopened", + "rst_description": "*Optional*. Service message: forum topic reopened\n", + "name": "forum_topic_reopened", + "required": false + }, + { + "type": "GeneralForumTopicHidden", + "description": "Service message: the 'General' forum topic hidden", + "html_description": "Optional. Service message: the 'General' forum topic hidden", + "rst_description": "*Optional*. Service message: the 'General' forum topic hidden\n", + "name": "general_forum_topic_hidden", + "required": false + }, + { + "type": "GeneralForumTopicUnhidden", + "description": "Service message: the 'General' forum topic unhidden", + "html_description": "Optional. Service message: the 'General' forum topic unhidden", + "rst_description": "*Optional*. Service message: the 'General' forum topic unhidden\n", + "name": "general_forum_topic_unhidden", + "required": false + }, + { + "type": "GiveawayCreated", + "description": "Service message: a scheduled giveaway was created", + "html_description": "Optional. Service message: a scheduled giveaway was created", + "rst_description": "*Optional*. Service message: a scheduled giveaway was created\n", + "name": "giveaway_created", + "required": false + }, + { + "type": "Giveaway", + "description": "The message is a scheduled giveaway message", + "html_description": "Optional. The message is a scheduled giveaway message", + "rst_description": "*Optional*. The message is a scheduled giveaway message\n", + "name": "giveaway", + "required": false + }, + { + "type": "GiveawayWinners", + "description": "A giveaway with public winners was completed", + "html_description": "Optional. A giveaway with public winners was completed", + "rst_description": "*Optional*. A giveaway with public winners was completed\n", + "name": "giveaway_winners", + "required": false + }, + { + "type": "GiveawayCompleted", + "description": "Service message: a giveaway without public winners was completed", + "html_description": "Optional. Service message: a giveaway without public winners was completed", + "rst_description": "*Optional*. Service message: a giveaway without public winners was completed\n", + "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", + "html_description": "Optional. Service message: video chat scheduled", + "rst_description": "*Optional*. Service message: video chat scheduled\n", + "name": "video_chat_scheduled", + "required": false + }, + { + "type": "VideoChatStarted", + "description": "Service message: video chat started", + "html_description": "Optional. Service message: video chat started", + "rst_description": "*Optional*. Service message: video chat started\n", + "name": "video_chat_started", + "required": false + }, + { + "type": "VideoChatEnded", + "description": "Service message: video chat ended", + "html_description": "Optional. Service message: video chat ended", + "rst_description": "*Optional*. Service message: video chat ended\n", + "name": "video_chat_ended", + "required": false + }, + { + "type": "VideoChatParticipantsInvited", + "description": "Service message: new participants invited to a video chat", + "html_description": "Optional. Service message: new participants invited to a video chat", + "rst_description": "*Optional*. Service message: new participants invited to a video chat\n", + "name": "video_chat_participants_invited", + "required": false + }, + { + "type": "WebAppData", + "description": "Service message: data sent by a Web App", + "html_description": "Optional. Service message: data sent by a Web App", + "rst_description": "*Optional*. Service message: data sent by a Web App\n", + "name": "web_app_data", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "messageid", + "name": "MessageId", + "description": "This object represents a unique message identifier.", + "html_description": "

This object represents a unique message identifier.

", + "rst_description": "This object represents a unique message identifier.", + "annotations": [ + { + "type": "Integer", + "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 + } + ], + "category": "types" + }, + { + "anchor": "inaccessiblemessage", + "name": "InaccessibleMessage", + "description": "This object describes a message that was deleted or is otherwise inaccessible to the bot.", + "html_description": "

This object describes a message that was deleted or is otherwise inaccessible to the bot.

", + "rst_description": "This object describes a message that was deleted or is otherwise inaccessible to the bot.", + "annotations": [ + { + "type": "Chat", + "description": "Chat the message belonged to", + "html_description": "Chat the message belonged to", + "rst_description": "Chat the message belonged to\n", + "name": "chat", + "required": true + }, + { + "type": "Integer", + "description": "Unique message identifier inside the chat", + "html_description": "Unique message identifier inside the chat", + "rst_description": "Unique message identifier inside the chat\n", + "name": "message_id", + "required": true + }, + { + "type": "Integer", + "description": "Always 0. The field can be used to differentiate regular and inaccessible messages.", + "html_description": "Always 0. The field can be used to differentiate regular and inaccessible messages.", + "rst_description": "Always 0. The field can be used to differentiate regular and inaccessible messages.\n", + "name": "date", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "maybeinaccessiblemessage", + "name": "MaybeInaccessibleMessage", + "description": "This object describes a message that can be inaccessible to the bot. It can be one of\n - Message\n - InaccessibleMessage", + "html_description": "

This object describes a message that can be inaccessible to the bot. It can be one of

", + "rst_description": "This object describes a message that can be inaccessible to the bot. It can be one of\n\n - :class:`aiogram.types.message.Message`\n - :class:`aiogram.types.inaccessible_message.InaccessibleMessage`", + "annotations": [], + "category": "types" + }, + { + "anchor": "messageentity", + "name": "MessageEntity", + "description": "This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.", + "html_description": "

This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.

", + "rst_description": "This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.", + "annotations": [ + { + "type": "String", + "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 + }, + { + "type": "Integer", + "description": "Offset in UTF-16 code units to the start of the entity", + "html_description": "Offset in UTF-16 code units to the start of the entity", + "rst_description": "Offset in `UTF-16 code units `_ to the start of the entity\n", + "name": "offset", + "required": true + }, + { + "type": "Integer", + "description": "Length of the entity in UTF-16 code units", + "html_description": "Length of the entity in UTF-16 code units", + "rst_description": "Length of the entity in `UTF-16 code units `_\n", + "name": "length", + "required": true + }, + { + "type": "String", + "description": "For 'text_link' only, URL that will be opened after user taps on the text", + "html_description": "Optional. For “text_link” only, URL that will be opened after user taps on the text", + "rst_description": "*Optional*. For 'text_link' only, URL that will be opened after user taps on the text\n", + "name": "url", + "required": false + }, + { + "type": "User", + "description": "For 'text_mention' only, the mentioned user", + "html_description": "Optional. For “text_mention” only, the mentioned user", + "rst_description": "*Optional*. For 'text_mention' only, the mentioned user\n", + "name": "user", + "required": false + }, + { + "type": "String", + "description": "For 'pre' only, the programming language of the entity text", + "html_description": "Optional. For “pre” only, the programming language of the entity text", + "rst_description": "*Optional*. For 'pre' only, the programming language of the entity text\n", + "name": "language", + "required": false + }, + { + "type": "String", + "description": "For 'custom_emoji' only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker", + "html_description": "Optional. For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker", + "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" + }, + { + "anchor": "textquote", + "name": "TextQuote", + "description": "This object contains information about the quoted part of a message that is replied to by the given message.", + "html_description": "

This object contains information about the quoted part of a message that is replied to by the given message.

", + "rst_description": "This object contains information about the quoted part of a message that is replied to by the given message.", + "annotations": [ + { + "type": "String", + "description": "Text of the quoted part of a message that is replied to by the given message", + "html_description": "Text of the quoted part of a message that is replied to by the given message", + "rst_description": "Text of the quoted part of a message that is replied to by the given message\n", + "name": "text", + "required": true + }, + { + "type": "Array of MessageEntity", + "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 + }, + { + "type": "Integer", + "description": "Approximate quote position in the original message in UTF-16 code units as specified by the sender", + "html_description": "Approximate quote position in the original message in UTF-16 code units as specified by the sender", + "rst_description": "Approximate quote position in the original message in UTF-16 code units as specified by the sender\n", + "name": "position", + "required": true + }, + { + "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*. :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 + } + ], + "category": "types" + }, + { + "anchor": "externalreplyinfo", + "name": "ExternalReplyInfo", + "description": "This object contains information about a message that is being replied to, which may come from another chat or forum topic.", + "html_description": "

This object contains information about a message that is being replied to, which may come from another chat or forum topic.

", + "rst_description": "This object contains information about a message that is being replied to, which may come from another chat or forum topic.", + "annotations": [ + { + "type": "MessageOrigin", + "description": "Origin of the message replied to by the given message", + "html_description": "Origin of the message replied to by the given message", + "rst_description": "Origin of the message replied to by the given message\n", + "name": "origin", + "required": true + }, + { + "type": "Chat", + "description": "Chat the original message belongs to. Available only if the chat is a supergroup or a channel.", + "html_description": "Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel.", + "rst_description": "*Optional*. Chat the original message belongs to. Available only if the chat is a supergroup or a channel.\n", + "name": "chat", + "required": false + }, + { + "type": "Integer", + "description": "Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.", + "html_description": "Optional. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.", + "rst_description": "*Optional*. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.\n", + "name": "message_id", + "required": false + }, + { + "type": "LinkPreviewOptions", + "description": "Options used for link preview generation for the original message, if it is a text message", + "html_description": "Optional. Options used for link preview generation for the original message, if it is a text message", + "rst_description": "*Optional*. Options used for link preview generation for the original message, if it is a text message\n", + "name": "link_preview_options", + "required": false + }, + { + "type": "Animation", + "description": "Message is an animation, information about the animation", + "html_description": "Optional. Message is an animation, information about the animation", + "rst_description": "*Optional*. Message is an animation, information about the animation\n", + "name": "animation", + "required": false + }, + { + "type": "Audio", + "description": "Message is an audio file, information about the file", + "html_description": "Optional. Message is an audio file, information about the file", + "rst_description": "*Optional*. Message is an audio file, information about the file\n", + "name": "audio", + "required": false + }, + { + "type": "Document", + "description": "Message is a general file, information about the file", + "html_description": "Optional. Message is a general file, information about the file", + "rst_description": "*Optional*. Message is a general file, information about the file\n", + "name": "document", + "required": false + }, + { + "type": "PaidMediaInfo", + "description": "Message contains paid media; information about the paid media", + "html_description": "Optional. Message contains paid media; information about the paid media", + "rst_description": "*Optional*. Message contains paid media; information about the paid media\n", + "name": "paid_media", + "required": false + }, + { + "type": "Array of PhotoSize", + "description": "Message is a photo, available sizes of the photo", + "html_description": "Optional. Message is a photo, available sizes of the photo", + "rst_description": "*Optional*. Message is a photo, available sizes of the photo\n", + "name": "photo", + "required": false + }, + { + "type": "Sticker", + "description": "Message is a sticker, information about the sticker", + "html_description": "Optional. Message is a sticker, information about the sticker", + "rst_description": "*Optional*. Message is a sticker, information about the sticker\n", + "name": "sticker", + "required": false + }, + { + "type": "Story", + "description": "Message is a forwarded story", + "html_description": "Optional. Message is a forwarded story", + "rst_description": "*Optional*. Message is a forwarded story\n", + "name": "story", + "required": false + }, + { + "type": "Video", + "description": "Message is a video, information about the video", + "html_description": "Optional. Message is a video, information about the video", + "rst_description": "*Optional*. Message is a video, information about the video\n", + "name": "video", + "required": false + }, + { + "type": "VideoNote", + "description": "Message is a video note, information about the video message", + "html_description": "Optional. Message is a video note, information about the video message", + "rst_description": "*Optional*. Message is a `video note `_, information about the video message\n", + "name": "video_note", + "required": false + }, + { + "type": "Voice", + "description": "Message is a voice message, information about the file", + "html_description": "Optional. Message is a voice message, information about the file", + "rst_description": "*Optional*. Message is a voice message, information about the file\n", + "name": "voice", + "required": false + }, + { + "type": "True", + "description": "True, if the message media is covered by a spoiler animation", + "html_description": "Optional. True, if the message media is covered by a spoiler animation", + "rst_description": "*Optional*. :code:`True`, if the message media is covered by a spoiler animation\n", + "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", + "html_description": "Optional. Message is a shared contact, information about the contact", + "rst_description": "*Optional*. Message is a shared contact, information about the contact\n", + "name": "contact", + "required": false + }, + { + "type": "Dice", + "description": "Message is a dice with random value", + "html_description": "Optional. Message is a dice with random value", + "rst_description": "*Optional*. Message is a dice with random value\n", + "name": "dice", + "required": false + }, + { + "type": "Game", + "description": "Message is a game, information about the game.", + "html_description": "Optional. Message is a game, information about the game. More about games »", + "rst_description": "*Optional*. Message is a game, information about the game. `More about games » `_\n", + "name": "game", + "required": false + }, + { + "type": "Giveaway", + "description": "Message is a scheduled giveaway, information about the giveaway", + "html_description": "Optional. Message is a scheduled giveaway, information about the giveaway", + "rst_description": "*Optional*. Message is a scheduled giveaway, information about the giveaway\n", + "name": "giveaway", + "required": false + }, + { + "type": "GiveawayWinners", + "description": "A giveaway with public winners was completed", + "html_description": "Optional. A giveaway with public winners was completed", + "rst_description": "*Optional*. A giveaway with public winners was completed\n", + "name": "giveaway_winners", + "required": false + }, + { + "type": "Invoice", + "description": "Message is an invoice for a payment, information about the invoice.", + "html_description": "Optional. Message is an invoice for a payment, information about the invoice. More about payments »", + "rst_description": "*Optional*. Message is an invoice for a `payment `_, information about the invoice. `More about payments » `_\n", + "name": "invoice", + "required": false + }, + { + "type": "Location", + "description": "Message is a shared location, information about the location", + "html_description": "Optional. Message is a shared location, information about the location", + "rst_description": "*Optional*. Message is a shared location, information about the location\n", + "name": "location", + "required": false + }, + { + "type": "Poll", + "description": "Message is a native poll, information about the poll", + "html_description": "Optional. Message is a native poll, information about the poll", + "rst_description": "*Optional*. Message is a native poll, information about the poll\n", + "name": "poll", + "required": false + }, + { + "type": "Venue", + "description": "Message is a venue, information about the venue", + "html_description": "Optional. Message is a venue, information about the venue", + "rst_description": "*Optional*. Message is a venue, information about the venue\n", + "name": "venue", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "replyparameters", + "name": "ReplyParameters", + "description": "Describes reply parameters for the message that is being sent.", + "html_description": "

Describes reply parameters for the message that is being sent.

", + "rst_description": "Describes reply parameters for the message that is being sent.", + "annotations": [ + { + "type": "Integer", + "description": "Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified", + "html_description": "Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified", + "rst_description": "Identifier of the message that will be replied to in the current chat, or in the chat *chat_id* if it is specified\n", + "name": "message_id", + "required": true + }, + { + "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 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 + }, + { + "type": "Boolean", + "description": "Pass True if the message should be sent even if the specified message to be replied to is not found. Always False for replies in another chat or forum topic. Always True for messages sent on behalf of a business account.", + "html_description": "Optional. Pass True if the message should be sent even if the specified message to be replied to is not found. Always False for replies in another chat or forum topic. Always True for messages sent on behalf of a business account.", + "rst_description": "*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.\n", + "name": "allow_sending_without_reply", + "required": false + }, + { + "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, 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 + }, + { + "type": "String", + "description": "Mode for parsing entities in the quote. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the quote. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the quote. See `formatting options `_ for more details.\n", + "name": "quote_parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode.", + "html_description": "Optional. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode.", + "rst_description": "*Optional*. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of *quote_parse_mode*.\n", + "name": "quote_entities", + "required": false + }, + { + "type": "Integer", + "description": "Position of the quote in the original message in UTF-16 code units", + "html_description": "Optional. Position of the quote in the original message in UTF-16 code units", + "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" + }, + { + "anchor": "messageorigin", + "name": "MessageOrigin", + "description": "This object describes the origin of a message. It can be one of\n - MessageOriginUser\n - MessageOriginHiddenUser\n - MessageOriginChat\n - MessageOriginChannel", + "html_description": "

This object describes the origin of a message. It can be one of

", + "rst_description": "This object describes the origin of a message. It can be one of\n\n - :class:`aiogram.types.message_origin_user.MessageOriginUser`\n - :class:`aiogram.types.message_origin_hidden_user.MessageOriginHiddenUser`\n - :class:`aiogram.types.message_origin_chat.MessageOriginChat`\n - :class:`aiogram.types.message_origin_channel.MessageOriginChannel`", + "annotations": [], + "category": "types" + }, + { + "anchor": "messageoriginuser", + "name": "MessageOriginUser", + "description": "The message was originally sent by a known user.", + "html_description": "

The message was originally sent by a known user.

", + "rst_description": "The message was originally sent by a known user.", + "annotations": [ + { + "type": "String", + "description": "Type of the message origin, always 'user'", + "html_description": "Type of the message origin, always “user”", + "rst_description": "Type of the message origin, always 'user'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Date the message was sent originally in Unix time", + "html_description": "Date the message was sent originally in Unix time", + "rst_description": "Date the message was sent originally in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "User", + "description": "User that sent the message originally", + "html_description": "User that sent the message originally", + "rst_description": "User that sent the message originally\n", + "name": "sender_user", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "messageoriginhiddenuser", + "name": "MessageOriginHiddenUser", + "description": "The message was originally sent by an unknown user.", + "html_description": "

The message was originally sent by an unknown user.

", + "rst_description": "The message was originally sent by an unknown user.", + "annotations": [ + { + "type": "String", + "description": "Type of the message origin, always 'hidden_user'", + "html_description": "Type of the message origin, always “hidden_user”", + "rst_description": "Type of the message origin, always 'hidden_user'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Date the message was sent originally in Unix time", + "html_description": "Date the message was sent originally in Unix time", + "rst_description": "Date the message was sent originally in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "String", + "description": "Name of the user that sent the message originally", + "html_description": "Name of the user that sent the message originally", + "rst_description": "Name of the user that sent the message originally\n", + "name": "sender_user_name", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "messageoriginchat", + "name": "MessageOriginChat", + "description": "The message was originally sent on behalf of a chat to a group chat.", + "html_description": "

The message was originally sent on behalf of a chat to a group chat.

", + "rst_description": "The message was originally sent on behalf of a chat to a group chat.", + "annotations": [ + { + "type": "String", + "description": "Type of the message origin, always 'chat'", + "html_description": "Type of the message origin, always “chat”", + "rst_description": "Type of the message origin, always 'chat'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Date the message was sent originally in Unix time", + "html_description": "Date the message was sent originally in Unix time", + "rst_description": "Date the message was sent originally in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "Chat", + "description": "Chat that sent the message originally", + "html_description": "Chat that sent the message originally", + "rst_description": "Chat that sent the message originally\n", + "name": "sender_chat", + "required": true + }, + { + "type": "String", + "description": "For messages originally sent by an anonymous chat administrator, original message author signature", + "html_description": "Optional. For messages originally sent by an anonymous chat administrator, original message author signature", + "rst_description": "*Optional*. For messages originally sent by an anonymous chat administrator, original message author signature\n", + "name": "author_signature", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "messageoriginchannel", + "name": "MessageOriginChannel", + "description": "The message was originally sent to a channel chat.", + "html_description": "

The message was originally sent to a channel chat.

", + "rst_description": "The message was originally sent to a channel chat.", + "annotations": [ + { + "type": "String", + "description": "Type of the message origin, always 'channel'", + "html_description": "Type of the message origin, always “channel”", + "rst_description": "Type of the message origin, always 'channel'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Date the message was sent originally in Unix time", + "html_description": "Date the message was sent originally in Unix time", + "rst_description": "Date the message was sent originally in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "Chat", + "description": "Channel chat to which the message was originally sent", + "html_description": "Channel chat to which the message was originally sent", + "rst_description": "Channel chat to which the message was originally sent\n", + "name": "chat", + "required": true + }, + { + "type": "Integer", + "description": "Unique message identifier inside the chat", + "html_description": "Unique message identifier inside the chat", + "rst_description": "Unique message identifier inside the chat\n", + "name": "message_id", + "required": true + }, + { + "type": "String", + "description": "Signature of the original post author", + "html_description": "Optional. Signature of the original post author", + "rst_description": "*Optional*. Signature of the original post author\n", + "name": "author_signature", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "photosize", + "name": "PhotoSize", + "description": "This object represents one size of a photo or a file / sticker thumbnail.", + "html_description": "

This object represents one size of a photo or a file / sticker thumbnail.

", + "rst_description": "This object represents one size of a photo or a `file `_ / :class:`aiogram.methods.sticker.Sticker` thumbnail.", + "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": "Photo width", + "html_description": "Photo width", + "rst_description": "Photo width\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Photo height", + "html_description": "Photo height", + "rst_description": "Photo height\n", + "name": "height", + "required": true + }, + { + "type": "Integer", + "description": "File size in bytes", + "html_description": "Optional. File size in bytes", + "rst_description": "*Optional*. File size in bytes\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "animation", + "name": "Animation", + "description": "This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).", + "html_description": "

This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).

", + "rst_description": "This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).", + "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 as defined by the sender", + "html_description": "Video width as defined by the sender", + "rst_description": "Video width as defined by the sender\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Video height as defined by the sender", + "html_description": "Video height as defined by the sender", + "rst_description": "Video height as defined by the sender\n", + "name": "height", + "required": true + }, + { + "type": "Integer", + "description": "Duration of the video in seconds as defined by the sender", + "html_description": "Duration of the video in seconds as defined by the sender", + "rst_description": "Duration of the video in seconds as defined by the sender\n", + "name": "duration", + "required": true + }, + { + "type": "PhotoSize", + "description": "Animation thumbnail as defined by the sender", + "html_description": "Optional. Animation thumbnail as defined by the sender", + "rst_description": "*Optional*. Animation thumbnail as defined by the sender\n", + "name": "thumbnail", + "required": false + }, + { + "type": "String", + "description": "Original animation filename as defined by the sender", + "html_description": "Optional. Original animation filename as defined by the sender", + "rst_description": "*Optional*. Original animation filename as defined by the sender\n", + "name": "file_name", + "required": false + }, + { + "type": "String", + "description": "MIME type of the file as defined by the sender", + "html_description": "Optional. MIME type of the file as defined by the sender", + "rst_description": "*Optional*. MIME type of the file as defined by the sender\n", + "name": "mime_type", + "required": false + }, + { + "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": "audio", + "name": "Audio", + "description": "This object represents an audio file to be treated as music by the Telegram clients.", + "html_description": "

This object represents an audio file to be treated as music by the Telegram clients.

", + "rst_description": "This object represents an audio file to be treated as music by the Telegram clients.", + "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": "Duration of the audio in seconds as defined by the sender", + "html_description": "Duration of the audio in seconds as defined by the sender", + "rst_description": "Duration of the audio in seconds as defined by the sender\n", + "name": "duration", + "required": true + }, + { + "type": "String", + "description": "Performer of the audio as defined by the sender or by audio tags", + "html_description": "Optional. Performer of the audio as defined by the sender or by audio tags", + "rst_description": "*Optional*. Performer of the audio as defined by the sender or by audio tags\n", + "name": "performer", + "required": false + }, + { + "type": "String", + "description": "Title of the audio as defined by the sender or by audio tags", + "html_description": "Optional. Title of the audio as defined by the sender or by audio tags", + "rst_description": "*Optional*. Title of the audio as defined by the sender or by audio tags\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Original filename as defined by the sender", + "html_description": "Optional. Original filename as defined by the sender", + "rst_description": "*Optional*. Original filename as defined by the sender\n", + "name": "file_name", + "required": false + }, + { + "type": "String", + "description": "MIME type of the file as defined by the sender", + "html_description": "Optional. MIME type of the file as defined by the sender", + "rst_description": "*Optional*. MIME type of the file as defined by the sender\n", + "name": "mime_type", + "required": false + }, + { + "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 + }, + { + "type": "PhotoSize", + "description": "Thumbnail of the album cover to which the music file belongs", + "html_description": "Optional. Thumbnail of the album cover to which the music file belongs", + "rst_description": "*Optional*. Thumbnail of the album cover to which the music file belongs\n", + "name": "thumbnail", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "document", + "name": "Document", + "description": "This object represents a general file (as opposed to photos, voice messages and audio files).", + "html_description": "

This object represents a general file (as opposed to photos, voice messages and audio files).

", + "rst_description": "This object represents a general file (as opposed to `photos `_, `voice messages `_ and `audio files `_).", + "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": "PhotoSize", + "description": "Document thumbnail as defined by the sender", + "html_description": "Optional. Document thumbnail as defined by the sender", + "rst_description": "*Optional*. Document thumbnail as defined by the sender\n", + "name": "thumbnail", + "required": false + }, + { + "type": "String", + "description": "Original filename as defined by the sender", + "html_description": "Optional. Original filename as defined by the sender", + "rst_description": "*Optional*. Original filename as defined by the sender\n", + "name": "file_name", + "required": false + }, + { + "type": "String", + "description": "MIME type of the file as defined by the sender", + "html_description": "Optional. MIME type of the file as defined by the sender", + "rst_description": "*Optional*. MIME type of the file as defined by the sender\n", + "name": "mime_type", + "required": false + }, + { + "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": "story", + "name": "Story", + "description": "This object represents a story.", + "html_description": "

This object represents a story.

", + "rst_description": "This object represents a story.", + "annotations": [ + { + "type": "Chat", + "description": "Chat that posted the story", + "html_description": "Chat that posted the story", + "rst_description": "Chat that posted the story\n", + "name": "chat", + "required": true + }, + { + "type": "Integer", + "description": "Unique identifier for the story in the chat", + "html_description": "Unique identifier for the story in the chat", + "rst_description": "Unique identifier for the story in the chat\n", + "name": "id", + "required": true + } + ], + "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", + "description": "This object represents a video file.", + "html_description": "

This object represents a video file.

", + "rst_description": "This object represents a video file.", + "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 as defined by the sender", + "html_description": "Video width as defined by the sender", + "rst_description": "Video width as defined by the sender\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Video height as defined by the sender", + "html_description": "Video height as defined by the sender", + "rst_description": "Video height as defined by the sender\n", + "name": "height", + "required": true + }, + { + "type": "Integer", + "description": "Duration of the video in seconds as defined by the sender", + "html_description": "Duration of the video in seconds as defined by the sender", + "rst_description": "Duration of the video in seconds as defined by the sender\n", + "name": "duration", + "required": true + }, + { + "type": "PhotoSize", + "description": "Video thumbnail", + "html_description": "Optional. Video thumbnail", + "rst_description": "*Optional*. Video thumbnail\n", + "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", + "html_description": "Optional. Original filename as defined by the sender", + "rst_description": "*Optional*. Original filename as defined by the sender\n", + "name": "file_name", + "required": false + }, + { + "type": "String", + "description": "MIME type of the file as defined by the sender", + "html_description": "Optional. MIME type of the file as defined by the sender", + "rst_description": "*Optional*. MIME type of the file as defined by the sender\n", + "name": "mime_type", + "required": false + }, + { + "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": "videonote", + "name": "VideoNote", + "description": "This object represents a video message (available in Telegram apps as of v.4.0).", + "html_description": "

This object represents a video message (available in Telegram apps as of v.4.0).

", + "rst_description": "This object represents a `video message `_ (available in Telegram apps as of `v.4.0 `_).", + "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 and height (diameter of the video message) as defined by the sender", + "html_description": "Video width and height (diameter of the video message) as defined by the sender", + "rst_description": "Video width and height (diameter of the video message) as defined by the sender\n", + "name": "length", + "required": true + }, + { + "type": "Integer", + "description": "Duration of the video in seconds as defined by the sender", + "html_description": "Duration of the video in seconds as defined by the sender", + "rst_description": "Duration of the video in seconds as defined by the sender\n", + "name": "duration", + "required": true + }, + { + "type": "PhotoSize", + "description": "Video thumbnail", + "html_description": "Optional. Video thumbnail", + "rst_description": "*Optional*. Video thumbnail\n", + "name": "thumbnail", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes", + "html_description": "Optional. File size in bytes", + "rst_description": "*Optional*. File size in bytes\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "voice", + "name": "Voice", + "description": "This object represents a voice note.", + "html_description": "

This object represents a voice note.

", + "rst_description": "This object represents a voice note.", + "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": "Duration of the audio in seconds as defined by the sender", + "html_description": "Duration of the audio in seconds as defined by the sender", + "rst_description": "Duration of the audio in seconds as defined by the sender\n", + "name": "duration", + "required": true + }, + { + "type": "String", + "description": "MIME type of the file as defined by the sender", + "html_description": "Optional. MIME type of the file as defined by the sender", + "rst_description": "*Optional*. MIME type of the file as defined by the sender\n", + "name": "mime_type", + "required": false + }, + { + "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": "paidmediainfo", + "name": "PaidMediaInfo", + "description": "Describes the paid media added to a message.", + "html_description": "

Describes the paid media added to a message.

", + "rst_description": "Describes the paid media added to a message.", + "annotations": [ + { + "type": "Integer", + "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", + "name": "star_count", + "required": true + }, + { + "type": "Array of PaidMedia", + "description": "Information about the paid media", + "html_description": "Information about the paid media", + "rst_description": "Information about the paid media\n", + "name": "paid_media", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "paidmedia", + "name": "PaidMedia", + "description": "This object describes paid media. Currently, it can be one of\n - PaidMediaPreview\n - PaidMediaPhoto\n - PaidMediaVideo", + "html_description": "

This object describes paid media. Currently, it can be one of

", + "rst_description": "This object describes paid media. Currently, it can be one of\n\n - :class:`aiogram.types.paid_media_preview.PaidMediaPreview`\n - :class:`aiogram.types.paid_media_photo.PaidMediaPhoto`\n - :class:`aiogram.types.paid_media_video.PaidMediaVideo`", + "annotations": [], + "category": "types" + }, + { + "anchor": "paidmediapreview", + "name": "PaidMediaPreview", + "description": "The paid media isn't available before the payment.", + "html_description": "

The paid media isn't available before the payment.

", + "rst_description": "The paid media isn't available before the payment.", + "annotations": [ + { + "type": "String", + "description": "Type of the paid media, always 'preview'", + "html_description": "Type of the paid media, always “preview”", + "rst_description": "Type of the paid media, always 'preview'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Media width as defined by the sender", + "html_description": "Optional. Media width as defined by the sender", + "rst_description": "*Optional*. Media width as defined by the sender\n", + "name": "width", + "required": false + }, + { + "type": "Integer", + "description": "Media height as defined by the sender", + "html_description": "Optional. Media height as defined by the sender", + "rst_description": "*Optional*. Media height as defined by the sender\n", + "name": "height", + "required": false + }, + { + "type": "Integer", + "description": "Duration of the media in seconds as defined by the sender", + "html_description": "Optional. Duration of the media in seconds as defined by the sender", + "rst_description": "*Optional*. Duration of the media in seconds as defined by the sender\n", + "name": "duration", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "paidmediaphoto", + "name": "PaidMediaPhoto", + "description": "The paid media is a photo.", + "html_description": "

The paid media is a photo.

", + "rst_description": "The paid media is a photo.", + "annotations": [ + { + "type": "String", + "description": "Type of the paid media, always 'photo'", + "html_description": "Type of the paid media, always “photo”", + "rst_description": "Type of the paid media, always 'photo'\n", + "name": "type", + "required": true + }, + { + "type": "Array of PhotoSize", + "description": "The photo", + "html_description": "The photo", + "rst_description": "The photo\n", + "name": "photo", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "paidmediavideo", + "name": "PaidMediaVideo", + "description": "The paid media is a video.", + "html_description": "

The paid media is a video.

", + "rst_description": "The paid media is a video.", + "annotations": [ + { + "type": "String", + "description": "Type of the paid media, always 'video'", + "html_description": "Type of the paid media, always “video”", + "rst_description": "Type of the paid media, always 'video'\n", + "name": "type", + "required": true + }, + { + "type": "Video", + "description": "The video", + "html_description": "The video", + "rst_description": "The video\n", + "name": "video", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "contact", + "name": "Contact", + "description": "This object represents a phone contact.", + "html_description": "

This object represents a phone contact.

", + "rst_description": "This object represents a phone contact.", + "annotations": [ + { + "type": "String", + "description": "Contact's phone number", + "html_description": "Contact's phone number", + "rst_description": "Contact's phone number\n", + "name": "phone_number", + "required": true + }, + { + "type": "String", + "description": "Contact's first name", + "html_description": "Contact's first name", + "rst_description": "Contact's first name\n", + "name": "first_name", + "required": true + }, + { + "type": "String", + "description": "Contact's last name", + "html_description": "Optional. Contact's last name", + "rst_description": "*Optional*. Contact's last name\n", + "name": "last_name", + "required": false + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "user_id", + "required": false + }, + { + "type": "String", + "description": "Additional data about the contact in the form of a vCard", + "html_description": "Optional. Additional data about the contact in the form of a vCard", + "rst_description": "*Optional*. Additional data about the contact in the form of a `vCard `_\n", + "name": "vcard", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "dice", + "name": "Dice", + "description": "This object represents an animated emoji that displays a random value.", + "html_description": "

This object represents an animated emoji that displays a random value.

", + "rst_description": "This object represents an animated emoji that displays a random value.", + "annotations": [ + { + "type": "String", + "description": "Emoji on which the dice throw animation is based", + "html_description": "Emoji on which the dice throw animation is based", + "rst_description": "Emoji on which the dice throw animation is based\n", + "name": "emoji", + "required": true + }, + { + "type": "Integer", + "description": "Value of the dice, 1-6 for '', '' and '' base emoji, 1-5 for '' and '' base emoji, 1-64 for '' base emoji", + "html_description": "Value of the dice, 1-6 for “\"🎲\"/”, “\"🎯\"/” and “\"🎳\"/” base emoji, 1-5 for “\"🏀\"/” and “\"⚽\"/” base emoji, 1-64 for “\"🎰\"/” base emoji", + "rst_description": "Value of the dice, 1-6 for '🎲', '🎯' and '🎳' base emoji, 1-5 for '🏀' and '⚽' base emoji, 1-64 for '🎰' base emoji\n", + "name": "value", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "polloption", + "name": "PollOption", + "description": "This object contains information about one answer option in a poll.", + "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", + "html_description": "Option text, 1-100 characters", + "rst_description": "Option text, 1-100 characters\n", + "name": "text", + "required": true + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts", + "html_description": "Optional. Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts", + "rst_description": "*Optional*. Special entities that appear in the option *text*. Currently, only custom emoji entities are allowed in poll option texts\n", + "name": "text_entities", + "required": false + }, + { + "type": "Integer", + "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" + }, + { + "anchor": "inputpolloption", + "name": "InputPollOption", + "description": "This object contains information about one answer option in a poll to be sent.", + "html_description": "

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

", + "rst_description": "This object contains information about one answer option in a poll to be sent.", + "annotations": [ + { + "type": "String", + "description": "Option text, 1-100 characters", + "html_description": "Option text, 1-100 characters", + "rst_description": "Option text, 1-100 characters\n", + "name": "text", + "required": true + }, + { + "type": "String", + "description": "Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed", + "html_description": "Optional. Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed", + "rst_description": "*Optional*. Mode for parsing entities in the text. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed\n", + "name": "text_parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode", + "html_description": "Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode", + "rst_description": "*Optional*. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of *text_parse_mode*\n", + "name": "text_entities", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "pollanswer", + "name": "PollAnswer", + "description": "This object represents an answer of a user in a non-anonymous poll.", + "html_description": "

This object represents an answer of a user in a non-anonymous poll.

", + "rst_description": "This object represents an answer of a user in a non-anonymous poll.", + "annotations": [ + { + "type": "String", + "description": "Unique poll identifier", + "html_description": "Unique poll identifier", + "rst_description": "Unique poll identifier\n", + "name": "poll_id", + "required": true + }, + { + "type": "Chat", + "description": "The chat that changed the answer to the poll, if the voter is anonymous", + "html_description": "Optional. The chat that changed the answer to the poll, if the voter is anonymous", + "rst_description": "*Optional*. The chat that changed the answer to the poll, if the voter is anonymous\n", + "name": "voter_chat", + "required": false + }, + { + "type": "User", + "description": "The user that changed the answer to the poll, if the voter isn't anonymous", + "html_description": "Optional. The user that changed the answer to the poll, if the voter isn't anonymous", + "rst_description": "*Optional*. The user that changed the answer to the poll, if the voter isn't anonymous\n", + "name": "user", + "required": false + }, + { + "type": "Array of Integer", + "description": "0-based identifiers of chosen answer options. May be empty if the vote was retracted.", + "html_description": "0-based identifiers of chosen answer options. May be empty if the vote was retracted.", + "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" + }, + { + "anchor": "poll", + "name": "Poll", + "description": "This object contains information about a poll.", + "html_description": "

This object contains information about a poll.

", + "rst_description": "This object contains information about a poll.", + "annotations": [ + { + "type": "String", + "description": "Unique poll identifier", + "html_description": "Unique poll identifier", + "rst_description": "Unique poll identifier\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Poll question, 1-300 characters", + "html_description": "Poll question, 1-300 characters", + "rst_description": "Poll question, 1-300 characters\n", + "name": "question", + "required": true + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions", + "html_description": "Optional. Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions", + "rst_description": "*Optional*. Special entities that appear in the *question*. Currently, only custom emoji entities are allowed in poll questions\n", + "name": "question_entities", + "required": false + }, + { + "type": "Array of PollOption", + "description": "List of poll options", + "html_description": "List of poll options", + "rst_description": "List of poll options\n", + "name": "options", + "required": true + }, + { + "type": "Integer", + "description": "Total number of users that voted in the poll", + "html_description": "Total number of users that voted in the poll", + "rst_description": "Total number of users that voted in the poll\n", + "name": "total_voter_count", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the poll is closed", + "html_description": "True, if the poll is closed", + "rst_description": ":code:`True`, if the poll is closed\n", + "name": "is_closed", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the poll is anonymous", + "html_description": "True, if the poll is anonymous", + "rst_description": ":code:`True`, if the poll is anonymous\n", + "name": "is_anonymous", + "required": true + }, + { + "type": "String", + "description": "Poll type, currently can be 'regular' or 'quiz'", + "html_description": "Poll type, currently can be “regular” or “quiz”", + "rst_description": "Poll type, currently can be 'regular' or 'quiz'\n", + "name": "type", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the poll allows multiple answers", + "html_description": "True, if the poll allows multiple answers", + "rst_description": ":code:`True`, if the poll allows multiple answers\n", + "name": "allows_multiple_answers", + "required": true + }, + { + "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 + }, + { + "type": "String", + "description": "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", + "html_description": "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", + "rst_description": "*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\n", + "name": "explanation", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "Special entities like usernames, URLs, bot commands, etc. that appear in the explanation", + "html_description": "Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation", + "rst_description": "*Optional*. Special entities like usernames, URLs, bot commands, etc. that appear in the *explanation*\n", + "name": "explanation_entities", + "required": false + }, + { + "type": "Integer", + "description": "Amount of time in seconds the poll will be active after creation", + "html_description": "Optional. Amount of time in seconds the poll will be active after creation", + "rst_description": "*Optional*. Amount of time in seconds the poll will be active after creation\n", + "name": "open_period", + "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the poll will be automatically closed", + "html_description": "Optional. Point in time (Unix timestamp) when the poll will be automatically closed", + "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" + }, + { + "anchor": "location", + "name": "Location", + "description": "This object represents a point on the map.", + "html_description": "

This object represents a point on the map.

", + "rst_description": "This object represents a point on the map.", + "annotations": [ + { + "type": "Float", + "description": "Latitude as defined by the sender", + "html_description": "Latitude as defined by the sender", + "rst_description": "Latitude as defined by the sender\n", + "name": "latitude", + "required": true + }, + { + "type": "Float", + "description": "Longitude as defined by the sender", + "html_description": "Longitude as defined by the sender", + "rst_description": "Longitude as defined by the sender\n", + "name": "longitude", + "required": true + }, + { + "type": "Float", + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "Optional. The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy", + "required": false + }, + { + "type": "Integer", + "description": "Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.", + "html_description": "Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.", + "rst_description": "*Optional*. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.\n", + "name": "live_period", + "required": false + }, + { + "type": "Integer", + "description": "The direction in which user is moving, in degrees; 1-360. For active live locations only.", + "html_description": "Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only.", + "rst_description": "*Optional*. The direction in which user is moving, in degrees; 1-360. For active live locations only.\n", + "name": "heading", + "required": false + }, + { + "type": "Integer", + "description": "The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.", + "html_description": "Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.", + "rst_description": "*Optional*. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.\n", + "name": "proximity_alert_radius", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "venue", + "name": "Venue", + "description": "This object represents a venue.", + "html_description": "

This object represents a venue.

", + "rst_description": "This object represents a venue.", + "annotations": [ + { + "type": "Location", + "description": "Venue location. Can't be a live location", + "html_description": "Venue location. Can't be a live location", + "rst_description": "Venue location. Can't be a live location\n", + "name": "location", + "required": true + }, + { + "type": "String", + "description": "Name of the venue", + "html_description": "Name of the venue", + "rst_description": "Name of the venue\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Address of the venue", + "html_description": "Address of the venue", + "rst_description": "Address of the venue\n", + "name": "address", + "required": true + }, + { + "type": "String", + "description": "Foursquare identifier of the venue", + "html_description": "Optional. Foursquare identifier of the venue", + "rst_description": "*Optional*. Foursquare identifier of the venue\n", + "name": "foursquare_id", + "required": false + }, + { + "type": "String", + "description": "Foursquare type of the venue. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)", + "html_description": "Optional. Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)", + "rst_description": "*Optional*. Foursquare type of the venue. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)\n", + "name": "foursquare_type", + "required": false + }, + { + "type": "String", + "description": "Google Places identifier of the venue", + "html_description": "Optional. Google Places identifier of the venue", + "rst_description": "*Optional*. Google Places identifier of the venue\n", + "name": "google_place_id", + "required": false + }, + { + "type": "String", + "description": "Google Places type of the venue. (See supported types.)", + "html_description": "Optional. Google Places type of the venue. (See supported types.)", + "rst_description": "*Optional*. Google Places type of the venue. (See `supported types `_.)\n", + "name": "google_place_type", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "webappdata", + "name": "WebAppData", + "description": "Describes data sent from a Web App to the bot.", + "html_description": "

Describes data sent from a Web App to the bot.

", + "rst_description": "Describes data sent from a `Web App `_ to the bot.", + "annotations": [ + { + "type": "String", + "description": "The data. Be aware that a bad client can send arbitrary data in this field.", + "html_description": "The data. Be aware that a bad client can send arbitrary data in this field.", + "rst_description": "The data. Be aware that a bad client can send arbitrary data in this field.\n", + "name": "data", + "required": true + }, + { + "type": "String", + "description": "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.", + "html_description": "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.", + "rst_description": "Text of the *web_app* keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.\n", + "name": "button_text", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "proximityalerttriggered", + "name": "ProximityAlertTriggered", + "description": "This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.", + "html_description": "

This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.

", + "rst_description": "This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.", + "annotations": [ + { + "type": "User", + "description": "User that triggered the alert", + "html_description": "User that triggered the alert", + "rst_description": "User that triggered the alert\n", + "name": "traveler", + "required": true + }, + { + "type": "User", + "description": "User that set the alert", + "html_description": "User that set the alert", + "rst_description": "User that set the alert\n", + "name": "watcher", + "required": true + }, + { + "type": "Integer", + "description": "The distance between the users", + "html_description": "The distance between the users", + "rst_description": "The distance between the users\n", + "name": "distance", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "messageautodeletetimerchanged", + "name": "MessageAutoDeleteTimerChanged", + "description": "This object represents a service message about a change in auto-delete timer settings.", + "html_description": "

This object represents a service message about a change in auto-delete timer settings.

", + "rst_description": "This object represents a service message about a change in auto-delete timer settings.", + "annotations": [ + { + "type": "Integer", + "description": "New auto-delete time for messages in the chat; in seconds", + "html_description": "New auto-delete time for messages in the chat; in seconds", + "rst_description": "New auto-delete time for messages in the chat; in seconds\n", + "name": "message_auto_delete_time", + "required": true + } + ], + "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", + "description": "This object represents a service message about a user boosting a chat.", + "html_description": "

This object represents a service message about a user boosting a chat.

", + "rst_description": "This object represents a service message about a user boosting a chat.", + "annotations": [ + { + "type": "Integer", + "description": "Number of boosts added by the user", + "html_description": "Number of boosts added by the user", + "rst_description": "Number of boosts added by the user\n", + "name": "boost_count", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "backgroundfill", + "name": "BackgroundFill", + "description": "This object describes the way a background is filled based on the selected colors. Currently, it can be one of\n - BackgroundFillSolid\n - BackgroundFillGradient\n - BackgroundFillFreeformGradient", + "html_description": "

This object describes the way a background is filled based on the selected colors. Currently, it can be one of

", + "rst_description": "This object describes the way a background is filled based on the selected colors. Currently, it can be one of\n\n - :class:`aiogram.types.background_fill_solid.BackgroundFillSolid`\n - :class:`aiogram.types.background_fill_gradient.BackgroundFillGradient`\n - :class:`aiogram.types.background_fill_freeform_gradient.BackgroundFillFreeformGradient`", + "annotations": [], + "category": "types" + }, + { + "anchor": "backgroundfillsolid", + "name": "BackgroundFillSolid", + "description": "The background is filled using the selected color.", + "html_description": "

The background is filled using the selected color.

", + "rst_description": "The background is filled using the selected color.", + "annotations": [ + { + "type": "String", + "description": "Type of the background fill, always 'solid'", + "html_description": "Type of the background fill, always “solid”", + "rst_description": "Type of the background fill, always 'solid'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "The color of the background fill in the RGB24 format", + "html_description": "The color of the background fill in the RGB24 format", + "rst_description": "The color of the background fill in the RGB24 format\n", + "name": "color", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "backgroundfillgradient", + "name": "BackgroundFillGradient", + "description": "The background is a gradient fill.", + "html_description": "

The background is a gradient fill.

", + "rst_description": "The background is a gradient fill.", + "annotations": [ + { + "type": "String", + "description": "Type of the background fill, always 'gradient'", + "html_description": "Type of the background fill, always “gradient”", + "rst_description": "Type of the background fill, always 'gradient'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Top color of the gradient in the RGB24 format", + "html_description": "Top color of the gradient in the RGB24 format", + "rst_description": "Top color of the gradient in the RGB24 format\n", + "name": "top_color", + "required": true + }, + { + "type": "Integer", + "description": "Bottom color of the gradient in the RGB24 format", + "html_description": "Bottom color of the gradient in the RGB24 format", + "rst_description": "Bottom color of the gradient in the RGB24 format\n", + "name": "bottom_color", + "required": true + }, + { + "type": "Integer", + "description": "Clockwise rotation angle of the background fill in degrees; 0-359", + "html_description": "Clockwise rotation angle of the background fill in degrees; 0-359", + "rst_description": "Clockwise rotation angle of the background fill in degrees; 0-359\n", + "name": "rotation_angle", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "backgroundfillfreeformgradient", + "name": "BackgroundFillFreeformGradient", + "description": "The background is a freeform gradient that rotates after every message in the chat.", + "html_description": "

The background is a freeform gradient that rotates after every message in the chat.

", + "rst_description": "The background is a freeform gradient that rotates after every message in the chat.", + "annotations": [ + { + "type": "String", + "description": "Type of the background fill, always 'freeform_gradient'", + "html_description": "Type of the background fill, always “freeform_gradient”", + "rst_description": "Type of the background fill, always 'freeform_gradient'\n", + "name": "type", + "required": true + }, + { + "type": "Array of Integer", + "description": "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format", + "html_description": "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format", + "rst_description": "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format\n", + "name": "colors", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "backgroundtype", + "name": "BackgroundType", + "description": "This object describes the type of a background. Currently, it can be one of\n - BackgroundTypeFill\n - BackgroundTypeWallpaper\n - BackgroundTypePattern\n - BackgroundTypeChatTheme", + "html_description": "

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

", + "rst_description": "This object describes the type of a background. Currently, it can be one of\n\n - :class:`aiogram.types.background_type_fill.BackgroundTypeFill`\n - :class:`aiogram.types.background_type_wallpaper.BackgroundTypeWallpaper`\n - :class:`aiogram.types.background_type_pattern.BackgroundTypePattern`\n - :class:`aiogram.types.background_type_chat_theme.BackgroundTypeChatTheme`", + "annotations": [], + "category": "types" + }, + { + "anchor": "backgroundtypefill", + "name": "BackgroundTypeFill", + "description": "The background is automatically filled based on the selected colors.", + "html_description": "

The background is automatically filled based on the selected colors.

", + "rst_description": "The background is automatically filled based on the selected colors.", + "annotations": [ + { + "type": "String", + "description": "Type of the background, always 'fill'", + "html_description": "Type of the background, always “fill”", + "rst_description": "Type of the background, always 'fill'\n", + "name": "type", + "required": true + }, + { + "type": "BackgroundFill", + "description": "The background fill", + "html_description": "The background fill", + "rst_description": "The background fill\n", + "name": "fill", + "required": true + }, + { + "type": "Integer", + "description": "Dimming of the background in dark themes, as a percentage; 0-100", + "html_description": "Dimming of the background in dark themes, as a percentage; 0-100", + "rst_description": "Dimming of the background in dark themes, as a percentage; 0-100\n", + "name": "dark_theme_dimming", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "backgroundtypewallpaper", + "name": "BackgroundTypeWallpaper", + "description": "The background is a wallpaper in the JPEG format.", + "html_description": "

The background is a wallpaper in the JPEG format.

", + "rst_description": "The background is a wallpaper in the JPEG format.", + "annotations": [ + { + "type": "String", + "description": "Type of the background, always 'wallpaper'", + "html_description": "Type of the background, always “wallpaper”", + "rst_description": "Type of the background, always 'wallpaper'\n", + "name": "type", + "required": true + }, + { + "type": "Document", + "description": "Document with the wallpaper", + "html_description": "Document with the wallpaper", + "rst_description": "Document with the wallpaper\n", + "name": "document", + "required": true + }, + { + "type": "Integer", + "description": "Dimming of the background in dark themes, as a percentage; 0-100", + "html_description": "Dimming of the background in dark themes, as a percentage; 0-100", + "rst_description": "Dimming of the background in dark themes, as a percentage; 0-100\n", + "name": "dark_theme_dimming", + "required": true + }, + { + "type": "True", + "description": "True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12", + "html_description": "Optional. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12", + "rst_description": "*Optional*. :code:`True`, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12\n", + "name": "is_blurred", + "required": false + }, + { + "type": "True", + "description": "True, if the background moves slightly when the device is tilted", + "html_description": "Optional. True, if the background moves slightly when the device is tilted", + "rst_description": "*Optional*. :code:`True`, if the background moves slightly when the device is tilted\n", + "name": "is_moving", + "required": false + } + ], + "category": "types" + }, + { + "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the background, always 'pattern'", + "html_description": "Type of the background, always “pattern”", + "rst_description": "Type of the background, always 'pattern'\n", + "name": "type", + "required": true + }, + { + "type": "Document", + "description": "Document with the pattern", + "html_description": "Document with the pattern", + "rst_description": "Document with the pattern\n", + "name": "document", + "required": true + }, + { + "type": "BackgroundFill", + "description": "The background fill that is combined with the pattern", + "html_description": "The background fill that is combined with the pattern", + "rst_description": "The background fill that is combined with the pattern\n", + "name": "fill", + "required": true + }, + { + "type": "Integer", + "description": "Intensity of the pattern when it is shown above the filled background; 0-100", + "html_description": "Intensity of the pattern when it is shown above the filled background; 0-100", + "rst_description": "Intensity of the pattern when it is shown above the filled background; 0-100\n", + "name": "intensity", + "required": true + }, + { + "type": "True", + "description": "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", + "html_description": "Optional. 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", + "rst_description": "*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\n", + "name": "is_inverted", + "required": false + }, + { + "type": "True", + "description": "True, if the background moves slightly when the device is tilted", + "html_description": "Optional. True, if the background moves slightly when the device is tilted", + "rst_description": "*Optional*. :code:`True`, if the background moves slightly when the device is tilted\n", + "name": "is_moving", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "backgroundtypechattheme", + "name": "BackgroundTypeChatTheme", + "description": "The background is taken directly from a built-in chat theme.", + "html_description": "

The background is taken directly from a built-in chat theme.

", + "rst_description": "The background is taken directly from a built-in chat theme.", + "annotations": [ + { + "type": "String", + "description": "Type of the background, always 'chat_theme'", + "html_description": "Type of the background, always “chat_theme”", + "rst_description": "Type of the background, always 'chat_theme'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Name of the chat theme, which is usually an emoji", + "html_description": "Name of the chat theme, which is usually an emoji", + "rst_description": "Name of the chat theme, which is usually an emoji\n", + "name": "theme_name", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatbackground", + "name": "ChatBackground", + "description": "This object represents a chat background.", + "html_description": "

This object represents a chat background.

", + "rst_description": "This object represents a chat background.", + "annotations": [ + { + "type": "BackgroundType", + "description": "Type of the background", + "html_description": "Type of the background", + "rst_description": "Type of the background\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "forumtopiccreated", + "name": "ForumTopicCreated", + "description": "This object represents a service message about a new forum topic created in the chat.", + "html_description": "

This object represents a service message about a new forum topic created in the chat.

", + "rst_description": "This object represents a service message about a new forum topic created in the chat.", + "annotations": [ + { + "type": "String", + "description": "Name of the topic", + "html_description": "Name of the topic", + "rst_description": "Name of the topic\n", + "name": "name", + "required": true + }, + { + "type": "Integer", + "description": "Color of the topic icon in RGB format", + "html_description": "Color of the topic icon in RGB format", + "rst_description": "Color of the topic icon in RGB format\n", + "name": "icon_color", + "required": true + }, + { + "type": "String", + "description": "Unique identifier of the custom emoji shown as the topic icon", + "html_description": "Optional. Unique identifier of the custom emoji shown as the topic icon", + "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": "forumtopicclosed", + "name": "ForumTopicClosed", + "description": "This object represents a service message about a forum topic closed in the chat. Currently holds no information.", + "html_description": "

This object represents a service message about a forum topic closed in the chat. Currently holds no information.

", + "rst_description": "This object represents a service message about a forum topic closed in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + }, + { + "anchor": "forumtopicedited", + "name": "ForumTopicEdited", + "description": "This object represents a service message about an edited forum topic.", + "html_description": "

This object represents a service message about an edited forum topic.

", + "rst_description": "This object represents a service message about an edited forum topic.", + "annotations": [ + { + "type": "String", + "description": "New name of the topic, if it was edited", + "html_description": "Optional. New name of the topic, if it was edited", + "rst_description": "*Optional*. New name of the topic, if it was edited\n", + "name": "name", + "required": false + }, + { + "type": "String", + "description": "New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed", + "html_description": "Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed", + "rst_description": "*Optional*. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed\n", + "name": "icon_custom_emoji_id", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "forumtopicreopened", + "name": "ForumTopicReopened", + "description": "This object represents a service message about a forum topic reopened in the chat. Currently holds no information.", + "html_description": "

This object represents a service message about a forum topic reopened in the chat. Currently holds no information.

", + "rst_description": "This object represents a service message about a forum topic reopened in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + }, + { + "anchor": "generalforumtopichidden", + "name": "GeneralForumTopicHidden", + "description": "This object represents a service message about General forum topic hidden in the chat. Currently holds no information.", + "html_description": "

This object represents a service message about General forum topic hidden in the chat. Currently holds no information.

", + "rst_description": "This object represents a service message about General forum topic hidden in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + }, + { + "anchor": "generalforumtopicunhidden", + "name": "GeneralForumTopicUnhidden", + "description": "This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.", + "html_description": "

This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.

", + "rst_description": "This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + }, + { + "anchor": "shareduser", + "name": "SharedUser", + "description": "This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button.", + "html_description": "

This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button.

", + "rst_description": "This object contains information about a user that was shared with the bot using a :class:`aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers` button.", + "annotations": [ + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "user_id", + "required": true + }, + { + "type": "String", + "description": "First name of the user, if the name was requested by the bot", + "html_description": "Optional. First name of the user, if the name was requested by the bot", + "rst_description": "*Optional*. First name of the user, if the name was requested by the bot\n", + "name": "first_name", + "required": false + }, + { + "type": "String", + "description": "Last name of the user, if the name was requested by the bot", + "html_description": "Optional. Last name of the user, if the name was requested by the bot", + "rst_description": "*Optional*. Last name of the user, if the name was requested by the bot\n", + "name": "last_name", + "required": false + }, + { + "type": "String", + "description": "Username of the user, if the username was requested by the bot", + "html_description": "Optional. Username of the user, if the username was requested by the bot", + "rst_description": "*Optional*. Username of the user, if the username was requested by the bot\n", + "name": "username", + "required": false + }, + { + "type": "Array of PhotoSize", + "description": "Available sizes of the chat photo, if the photo was requested by the bot", + "html_description": "Optional. Available sizes of the chat photo, if the photo was requested by the bot", + "rst_description": "*Optional*. Available sizes of the chat photo, if the photo was requested by the bot\n", + "name": "photo", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "usersshared", + "name": "UsersShared", + "description": "This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.", + "html_description": "

This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.

", + "rst_description": "This object contains information about the users whose identifiers were shared with the bot using a :class:`aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers` button.", + "annotations": [ + { + "type": "Integer", + "description": "Identifier of the request", + "html_description": "Identifier of the request", + "rst_description": "Identifier of the request\n", + "name": "request_id", + "required": true + }, + { + "type": "Array of SharedUser", + "description": "Information about users shared with the bot.", + "html_description": "Information about users shared with the bot.", + "rst_description": "Information about users shared with the bot.\n", + "name": "users", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatshared", + "name": "ChatShared", + "description": "This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.", + "html_description": "

This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.

", + "rst_description": "This object contains information about a chat that was shared with the bot using a :class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat` button.", + "annotations": [ + { + "type": "Integer", + "description": "Identifier of the request", + "html_description": "Identifier of the request", + "rst_description": "Identifier of the request\n", + "name": "request_id", + "required": true + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "chat_id", + "required": true + }, + { + "type": "String", + "description": "Title of the chat, if the title was requested by the bot.", + "html_description": "Optional. Title of the chat, if the title was requested by the bot.", + "rst_description": "*Optional*. Title of the chat, if the title was requested by the bot.\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Username of the chat, if the username was requested by the bot and available.", + "html_description": "Optional. Username of the chat, if the username was requested by the bot and available.", + "rst_description": "*Optional*. Username of the chat, if the username was requested by the bot and available.\n", + "name": "username", + "required": false + }, + { + "type": "Array of PhotoSize", + "description": "Available sizes of the chat photo, if the photo was requested by the bot", + "html_description": "Optional. Available sizes of the chat photo, if the photo was requested by the bot", + "rst_description": "*Optional*. Available sizes of the chat photo, if the photo was requested by the bot\n", + "name": "photo", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "writeaccessallowed", + "name": "WriteAccessAllowed", + "description": "This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess.", + "html_description": "

This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess.

", + "rst_description": "This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method `requestWriteAccess `_.", + "annotations": [ + { + "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*. :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 + }, + { + "type": "String", + "description": "Name of the Web App, if the access was granted when the Web App was launched from a link", + "html_description": "Optional. Name of the Web App, if the access was granted when the Web App was launched from a link", + "rst_description": "*Optional*. Name of the Web App, if the access was granted when the Web App was launched from a link\n", + "name": "web_app_name", + "required": false + }, + { + "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*. :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 + } + ], + "category": "types" + }, + { + "anchor": "videochatscheduled", + "name": "VideoChatScheduled", + "description": "This object represents a service message about a video chat scheduled in the chat.", + "html_description": "

This object represents a service message about a video chat scheduled in the chat.

", + "rst_description": "This object represents a service message about a video chat scheduled in the chat.", + "annotations": [ + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator", + "html_description": "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator", + "rst_description": "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator\n", + "name": "start_date", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "videochatstarted", + "name": "VideoChatStarted", + "description": "This object represents a service message about a video chat started in the chat. Currently holds no information.", + "html_description": "

This object represents a service message about a video chat started in the chat. Currently holds no information.

", + "rst_description": "This object represents a service message about a video chat started in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + }, + { + "anchor": "videochatended", + "name": "VideoChatEnded", + "description": "This object represents a service message about a video chat ended in the chat.", + "html_description": "

This object represents a service message about a video chat ended in the chat.

", + "rst_description": "This object represents a service message about a video chat ended in the chat.", + "annotations": [ + { + "type": "Integer", + "description": "Video chat duration in seconds", + "html_description": "Video chat duration in seconds", + "rst_description": "Video chat duration in seconds\n", + "name": "duration", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "videochatparticipantsinvited", + "name": "VideoChatParticipantsInvited", + "description": "This object represents a service message about new members invited to a video chat.", + "html_description": "

This object represents a service message about new members invited to a video chat.

", + "rst_description": "This object represents a service message about new members invited to a video chat.", + "annotations": [ + { + "type": "Array of User", + "description": "New members that were invited to the video chat", + "html_description": "New members that were invited to the video chat", + "rst_description": "New members that were invited to the video chat\n", + "name": "users", + "required": true + } + ], + "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.", + "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" + }, + { + "anchor": "giveaway", + "name": "Giveaway", + "description": "This object represents a message about a scheduled giveaway.", + "html_description": "

This object represents a message about a scheduled giveaway.

", + "rst_description": "This object represents a message about a scheduled giveaway.", + "annotations": [ + { + "type": "Array of Chat", + "description": "The list of chats which the user must join to participate in the giveaway", + "html_description": "The list of chats which the user must join to participate in the giveaway", + "rst_description": "The list of chats which the user must join to participate in the giveaway\n", + "name": "chats", + "required": true + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when winners of the giveaway will be selected", + "html_description": "Point in time (Unix timestamp) when winners of the giveaway will be selected", + "rst_description": "Point in time (Unix timestamp) when winners of the giveaway will be selected\n", + "name": "winners_selection_date", + "required": true + }, + { + "type": "Integer", + "description": "The number of users which are supposed to be selected as winners of the giveaway", + "html_description": "The number of users which are supposed to be selected as winners of the giveaway", + "rst_description": "The number of users which are supposed to be selected as winners of the giveaway\n", + "name": "winner_count", + "required": true + }, + { + "type": "True", + "description": "True, if only users who join the chats after the giveaway started should be eligible to win", + "html_description": "Optional. True, if only users who join the chats after the giveaway started should be eligible to win", + "rst_description": "*Optional*. :code:`True`, if only users who join the chats after the giveaway started should be eligible to win\n", + "name": "only_new_members", + "required": false + }, + { + "type": "True", + "description": "True, if the list of giveaway winners will be visible to everyone", + "html_description": "Optional. True, if the list of giveaway winners will be visible to everyone", + "rst_description": "*Optional*. :code:`True`, if the list of giveaway winners will be visible to everyone\n", + "name": "has_public_winners", + "required": false + }, + { + "type": "String", + "description": "Description of additional giveaway prize", + "html_description": "Optional. Description of additional giveaway prize", + "rst_description": "*Optional*. Description of additional giveaway prize\n", + "name": "prize_description", + "required": false + }, + { + "type": "Array of String", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "country_codes", + "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": "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 + } + ], + "category": "types" + }, + { + "anchor": "giveawaywinners", + "name": "GiveawayWinners", + "description": "This object represents a message about the completion of a giveaway with public winners.", + "html_description": "

This object represents a message about the completion of a giveaway with public winners.

", + "rst_description": "This object represents a message about the completion of a giveaway with public winners.", + "annotations": [ + { + "type": "Chat", + "description": "The chat that created the giveaway", + "html_description": "The chat that created the giveaway", + "rst_description": "The chat that created the giveaway\n", + "name": "chat", + "required": true + }, + { + "type": "Integer", + "description": "Identifier of the message with the giveaway in the chat", + "html_description": "Identifier of the message with the giveaway in the chat", + "rst_description": "Identifier of the message with the giveaway in the chat\n", + "name": "giveaway_message_id", + "required": true + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when winners of the giveaway were selected", + "html_description": "Point in time (Unix timestamp) when winners of the giveaway were selected", + "rst_description": "Point in time (Unix timestamp) when winners of the giveaway were selected\n", + "name": "winners_selection_date", + "required": true + }, + { + "type": "Integer", + "description": "Total number of winners in the giveaway", + "html_description": "Total number of winners in the giveaway", + "rst_description": "Total number of winners in the giveaway\n", + "name": "winner_count", + "required": true + }, + { + "type": "Array of User", + "description": "List of up to 100 winners of the giveaway", + "html_description": "List of up to 100 winners of the giveaway", + "rst_description": "List of up to 100 winners of the giveaway\n", + "name": "winners", + "required": true + }, + { + "type": "Integer", + "description": "The number of other chats the user had to join in order to be eligible for the giveaway", + "html_description": "Optional. The number of other chats the user had to join in order to be eligible for the giveaway", + "rst_description": "*Optional*. The number of other chats the user had to join in order to be eligible for the giveaway\n", + "name": "additional_chat_count", + "required": false + }, + { + "type": "Integer", + "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 + }, + { + "type": "Integer", + "description": "Number of undistributed prizes", + "html_description": "Optional. Number of undistributed prizes", + "rst_description": "*Optional*. Number of undistributed prizes\n", + "name": "unclaimed_prize_count", + "required": false + }, + { + "type": "True", + "description": "True, if only users who had joined the chats after the giveaway started were eligible to win", + "html_description": "Optional. True, if only users who had joined the chats after the giveaway started were eligible to win", + "rst_description": "*Optional*. :code:`True`, if only users who had joined the chats after the giveaway started were eligible to win\n", + "name": "only_new_members", + "required": false + }, + { + "type": "True", + "description": "True, if the giveaway was canceled because the payment for it was refunded", + "html_description": "Optional. True, if the giveaway was canceled because the payment for it was refunded", + "rst_description": "*Optional*. :code:`True`, if the giveaway was canceled because the payment for it was refunded\n", + "name": "was_refunded", + "required": false + }, + { + "type": "String", + "description": "Description of additional giveaway prize", + "html_description": "Optional. Description of additional giveaway prize", + "rst_description": "*Optional*. Description of additional giveaway prize\n", + "name": "prize_description", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "giveawaycompleted", + "name": "GiveawayCompleted", + "description": "This object represents a service message about the completion of a giveaway without public winners.", + "html_description": "

This object represents a service message about the completion of a giveaway without public winners.

", + "rst_description": "This object represents a service message about the completion of a giveaway without public winners.", + "annotations": [ + { + "type": "Integer", + "description": "Number of winners in the giveaway", + "html_description": "Number of winners in the giveaway", + "rst_description": "Number of winners in the giveaway\n", + "name": "winner_count", + "required": true + }, + { + "type": "Integer", + "description": "Number of undistributed prizes", + "html_description": "Optional. Number of undistributed prizes", + "rst_description": "*Optional*. Number of undistributed prizes\n", + "name": "unclaimed_prize_count", + "required": false + }, + { + "type": "Message", + "description": "Message with the giveaway that was completed, if it wasn't deleted", + "html_description": "Optional. Message with the giveaway that was completed, if it wasn't deleted", + "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" + }, + { + "anchor": "linkpreviewoptions", + "name": "LinkPreviewOptions", + "description": "Describes the options used for link preview generation.", + "html_description": "

Describes the options used for link preview generation.

", + "rst_description": "Describes the options used for link preview generation.", + "annotations": [ + { + "type": "Boolean", + "description": "True, if the link preview is disabled", + "html_description": "Optional. True, if the link preview is disabled", + "rst_description": "*Optional*. :code:`True`, if the link preview is disabled\n", + "name": "is_disabled", + "required": false + }, + { + "type": "String", + "description": "URL to use for the link preview. If empty, then the first URL found in the message text will be used", + "html_description": "Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used", + "rst_description": "*Optional*. URL to use for the link preview. If empty, then the first URL found in the message text will be used\n", + "name": "url", + "required": false + }, + { + "type": "Boolean", + "description": "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", + "html_description": "Optional. 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", + "rst_description": "*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\n", + "name": "prefer_small_media", + "required": false + }, + { + "type": "Boolean", + "description": "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", + "html_description": "Optional. 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", + "rst_description": "*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\n", + "name": "prefer_large_media", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text", + "html_description": "Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text", + "rst_description": "*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\n", + "name": "show_above_text", + "required": false + } + ], + "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", + "description": "This object represent a user's profile pictures.", + "html_description": "

This object represent a user's profile pictures.

", + "rst_description": "This object represent a user's profile pictures.", + "annotations": [ + { + "type": "Integer", + "description": "Total number of profile pictures the target user has", + "html_description": "Total number of profile pictures the target user has", + "rst_description": "Total number of profile pictures the target user has\n", + "name": "total_count", + "required": true + }, + { + "type": "Array of Array of PhotoSize", + "description": "Requested profile pictures (in up to 4 sizes each)", + "html_description": "Requested profile pictures (in up to 4 sizes each)", + "rst_description": "Requested profile pictures (in up to 4 sizes each)\n", + "name": "photos", + "required": true + } + ], + "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", + "description": "This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot/. 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 getFile.\nThe maximum file size to download is 20 MB", + "html_description": "

This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. 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 getFile.

\n

The maximum file size to download is 20 MB

\n
", + "rst_description": "This object represents a file ready to be downloaded. The file can be downloaded via the link :code:`https://api.telegram.org/file/bot/`. 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`.\n\n The maximum file size to download is 20 MB", + "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": "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 + }, + { + "type": "String", + "description": "File path. Use https://api.telegram.org/file/bot/ to get the file.", + "html_description": "Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.", + "rst_description": "*Optional*. File path. Use :code:`https://api.telegram.org/file/bot/` to get the file.\n", + "name": "file_path", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "webappinfo", + "name": "WebAppInfo", + "description": "Describes a Web App.", + "html_description": "

Describes a Web App.

", + "rst_description": "Describes a `Web App `_.", + "annotations": [ + { + "type": "String", + "description": "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps", + "html_description": "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps", + "rst_description": "An HTTPS URL of a Web App to be opened with additional data as specified in `Initializing Web Apps `_\n", + "name": "url", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "replykeyboardmarkup", + "name": "ReplyKeyboardMarkup", + "description": "This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account.", + "html_description": "

This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account.

", + "rst_description": "This object represents a `custom keyboard `_ with reply options (see `Introduction to bots `_ for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account.", + "annotations": [ + { + "type": "Array of Array of KeyboardButton", + "description": "Array of button rows, each represented by an Array of KeyboardButton objects", + "html_description": "Array of button rows, each represented by an Array of KeyboardButton objects", + "rst_description": "Array of button rows, each represented by an Array of :class:`aiogram.types.keyboard_button.KeyboardButton` objects\n", + "name": "keyboard", + "required": true + }, + { + "type": "Boolean", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "is_persistent", + "required": false + }, + { + "type": "Boolean", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "resize_keyboard", + "required": false + }, + { + "type": "Boolean", + "description": "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.", + "html_description": "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.", + "rst_description": "*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*.\n", + "name": "one_time_keyboard", + "required": false + }, + { + "type": "String", + "description": "The placeholder to be shown in the input field when the keyboard is active; 1-64 characters", + "html_description": "Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters", + "rst_description": "*Optional*. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters\n", + "name": "input_field_placeholder", + "required": false + }, + { + "type": "Boolean", + "description": "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 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.\n\nExample: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.", + "html_description": "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 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.
\n
\nExample: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.", + "rst_description": "*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.\n\n\n\n*Example:* A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.\n", + "name": "selective", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "keyboardbutton", + "name": "KeyboardButton", + "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 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", + "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", + "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.", + "html_description": "Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.", + "rst_description": "*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.\n", + "name": "request_contact", + "required": false + }, + { + "type": "Boolean", + "description": "If True, the user's current location will be sent when the button is pressed. Available in private chats only.", + "html_description": "Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only.", + "rst_description": "*Optional*. If :code:`True`, the user's current location will be sent when the button is pressed. Available in private chats only.\n", + "name": "request_location", + "required": false + }, + { + "type": "KeyboardButtonPollType", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "request_poll", + "required": false + }, + { + "type": "WebAppInfo", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "web_app", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "keyboardbuttonrequestusers", + "name": "KeyboardButtonRequestUsers", + "description": "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.", + "html_description": "

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 »

", + "rst_description": "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 » `_", + "annotations": [ + { + "type": "Integer", + "description": "Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message", + "html_description": "Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message", + "rst_description": "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\n", + "name": "request_id", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request bots, pass :code:`False` to request regular users. If not specified, no additional restrictions are applied.\n", + "name": "user_is_bot", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request premium users, pass :code:`False` to request non-premium users. If not specified, no additional restrictions are applied.\n", + "name": "user_is_premium", + "required": false + }, + { + "type": "Integer", + "description": "The maximum number of users to be selected; 1-10. Defaults to 1.", + "html_description": "Optional. The maximum number of users to be selected; 1-10. Defaults to 1.", + "rst_description": "*Optional*. The maximum number of users to be selected; 1-10. Defaults to 1.\n", + "name": "max_quantity", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request the users' first and last names", + "html_description": "Optional. Pass True to request the users' first and last names", + "rst_description": "*Optional*. Pass :code:`True` to request the users' first and last names\n", + "name": "request_name", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request the users' usernames", + "html_description": "Optional. Pass True to request the users' usernames", + "rst_description": "*Optional*. Pass :code:`True` to request the users' usernames\n", + "name": "request_username", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request the users' photos", + "html_description": "Optional. Pass True to request the users' photos", + "rst_description": "*Optional*. Pass :code:`True` to request the users' photos\n", + "name": "request_photo", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "keyboardbuttonrequestchat", + "name": "KeyboardButtonRequestChat", + "description": "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..", + "html_description": "

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 ».

", + "rst_description": "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 » `_.", + "annotations": [ + { + "type": "Integer", + "description": "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message", + "html_description": "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message", + "rst_description": "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\n", + "name": "request_id", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True to request a channel chat, pass False to request a group or a supergroup chat.", + "html_description": "Pass True to request a channel chat, pass False to request a group or a supergroup chat.", + "rst_description": "Pass :code:`True` to request a channel chat, pass :code:`False` to request a group or a supergroup chat.\n", + "name": "chat_is_channel", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.", + "rst_description": "*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.\n", + "name": "chat_is_forum", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.", + "rst_description": "*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.\n", + "name": "chat_has_username", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a chat owned by the user. Otherwise, no additional restrictions are applied.\n", + "name": "chat_is_created", + "required": false + }, + { + "type": "ChatAdministratorRights", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "user_administrator_rights", + "required": false + }, + { + "type": "ChatAdministratorRights", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "bot_administrator_rights", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.\n", + "name": "bot_is_member", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request the chat's title", + "html_description": "Optional. Pass True to request the chat's title", + "rst_description": "*Optional*. Pass :code:`True` to request the chat's title\n", + "name": "request_title", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request the chat's username", + "html_description": "Optional. Pass True to request the chat's username", + "rst_description": "*Optional*. Pass :code:`True` to request the chat's username\n", + "name": "request_username", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request the chat's photo", + "html_description": "Optional. Pass True to request the chat's photo", + "rst_description": "*Optional*. Pass :code:`True` to request the chat's photo\n", + "name": "request_photo", + "required": false + } + ], + "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", + "description": "This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.", + "html_description": "

This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.

", + "rst_description": "This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.", + "annotations": [ + { + "type": "String", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "type", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "replykeyboardremove", + "name": "ReplyKeyboardRemove", + "description": "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 ReplyKeyboardMarkup). Not supported in channels and for messages sent on behalf of a Telegram Business account.", + "html_description": "

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 ReplyKeyboardMarkup). Not supported in channels and for messages sent on behalf of a Telegram Business account.

", + "rst_description": "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`). Not supported in channels and for messages sent on behalf of a Telegram Business account.", + "annotations": [ + { + "type": "True", + "description": "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 ReplyKeyboardMarkup)", + "html_description": "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 ReplyKeyboardMarkup)", + "rst_description": "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`)\n", + "name": "remove_keyboard", + "required": true + }, + { + "type": "Boolean", + "description": "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 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.\n\nExample: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.", + "html_description": "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 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.
\n
\nExample: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.", + "rst_description": "*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.\n\n\n\n*Example:* A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.\n", + "name": "selective", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinekeyboardmarkup", + "name": "InlineKeyboardMarkup", + "description": "This object represents an inline keyboard that appears right next to the message it belongs to.", + "html_description": "

This object represents an inline keyboard that appears right next to the message it belongs to.

", + "rst_description": "This object represents an `inline keyboard `_ that appears right next to the message it belongs to.", + "annotations": [ + { + "type": "Array of Array of InlineKeyboardButton", + "description": "Array of button rows, each represented by an Array of InlineKeyboardButton objects", + "html_description": "Array of button rows, each represented by an Array of InlineKeyboardButton objects", + "rst_description": "Array of button rows, each represented by an Array of :class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton` objects\n", + "name": "inline_keyboard", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "inlinekeyboardbutton", + "name": "InlineKeyboardButton", + "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", + "description": "Label text on the button", + "html_description": "Label text on the button", + "rst_description": "Label text on the button\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": "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.", + "html_description": "Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings.", + "rst_description": "*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.\n", + "name": "url", + "required": false + }, + { + "type": "String", + "description": "Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes", + "html_description": "Optional. Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes", + "rst_description": "*Optional*. Data to be sent in a `callback query `_ to the bot when the button is pressed, 1-64 bytes\n", + "name": "callback_data", + "required": false + }, + { + "type": "WebAppInfo", + "description": "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 answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account.", + "html_description": "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 answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account.", + "rst_description": "*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.\n", + "name": "web_app", + "required": false + }, + { + "type": "LoginUrl", + "description": "An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.", + "html_description": "Optional. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.", + "rst_description": "*Optional*. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the `Telegram Login Widget `_.\n", + "name": "login_url", + "required": false + }, + { + "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 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 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 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.", + "html_description": "Optional. 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.", + "rst_description": "*Optional*. Description of the game that will be launched when the user presses the button.\n\n\n\n**NOTE:** This type of button **must** always be the first button in the first row.\n", + "name": "callback_game", + "required": false + }, + { + "type": "Boolean", + "description": "Specify True, to send a Pay button. Substrings '' and 'XTR' in the buttons's text will be replaced with a Telegram Star icon.\n\nNOTE: This type of button must always be the first button in the first row and can only be used in invoice messages.", + "html_description": "Optional. Specify True, to send a Pay button. Substrings “\"⭐\"/” and “XTR” in the buttons's text will be replaced with a Telegram Star icon.
\n
\nNOTE: This type of button must always be the first button in the first row and can only be used in invoice messages.", + "rst_description": "*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.\n\n\n\n**NOTE:** This type of button **must** always be the first button in the first row and can only be used in invoice messages.\n", + "name": "pay", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "loginurl", + "name": "LoginUrl", + "description": "This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:\nTelegram apps support these buttons as of version 5.7.\nSample bot: @discussbot", + "html_description": "

This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:

Telegram apps support these buttons as of version 5.7.

\n

Sample bot: @discussbot

\n
", + "rst_description": "This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the `Telegram Login Widget `_ when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:\nTelegram apps support these buttons as of `version 5.7 `_.\n\n Sample bot: `@discussbot `_", + "annotations": [ + { + "type": "String", + "description": "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.\n\nNOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.", + "html_description": "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.
\n
\nNOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.", + "rst_description": "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 `_.\n\n\n\n**NOTE:** You **must** always check the hash of the received data to verify the authentication and the integrity of the data as described in `Checking authorization `_.\n", + "name": "url", + "required": true + }, + { + "type": "String", + "description": "New text of the button in forwarded messages.", + "html_description": "Optional. New text of the button in forwarded messages.", + "rst_description": "*Optional*. New text of the button in forwarded messages.\n", + "name": "forward_text", + "required": false + }, + { + "type": "String", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "bot_username", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request the permission for your bot to send messages to the user.", + "html_description": "Optional. Pass True to request the permission for your bot to send messages to the user.", + "rst_description": "*Optional*. Pass :code:`True` to request the permission for your bot to send messages to the user.\n", + "name": "request_write_access", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "switchinlinequerychosenchat", + "name": "SwitchInlineQueryChosenChat", + "description": "This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.", + "html_description": "

This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.

", + "rst_description": "This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.", + "annotations": [ + { + "type": "String", + "description": "The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted", + "html_description": "Optional. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted", + "rst_description": "*Optional*. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted\n", + "name": "query", + "required": false + }, + { + "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*. :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*. :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*. :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*. :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", + "description": "This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.\nNOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed (e.g., without specifying any of the optional parameters).", + "html_description": "

This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.

\n

NOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed (e.g., without specifying any of the optional parameters).

\n
", + "rst_description": "This object represents an incoming callback query from a callback button in an `inline keyboard `_. If the button that originated the query was attached to a message sent by the bot, the field *message* will be present. If the button was attached to a message sent via the bot (in `inline mode `_), the field *inline_message_id* will be present. Exactly one of the fields *data* or *game_short_name* will be present.\n\n **NOTE:** After the user presses a callback button, Telegram clients will display a progress bar until you call :class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery`. It is, therefore, necessary to react by calling :class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery` even if no notification to the user is needed (e.g., without specifying any of the optional parameters).", + "annotations": [ + { + "type": "String", + "description": "Unique identifier for this query", + "html_description": "Unique identifier for this query", + "rst_description": "Unique identifier for this query\n", + "name": "id", + "required": true + }, + { + "type": "User", + "description": "Sender", + "html_description": "Sender", + "rst_description": "Sender\n", + "name": "from", + "required": true + }, + { + "type": "MaybeInaccessibleMessage", + "description": "Message sent by the bot with the callback button that originated the query", + "html_description": "Optional. Message sent by the bot with the callback button that originated the query", + "rst_description": "*Optional*. Message sent by the bot with the callback button that originated the query\n", + "name": "message", + "required": false + }, + { + "type": "String", + "description": "Identifier of the message sent via the bot in inline mode, that originated the query.", + "html_description": "Optional. Identifier of the message sent via the bot in inline mode, that originated the query.", + "rst_description": "*Optional*. Identifier of the message sent via the bot in inline mode, that originated the query.\n", + "name": "inline_message_id", + "required": false + }, + { + "type": "String", + "description": "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.", + "html_description": "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.", + "rst_description": "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`.\n", + "name": "chat_instance", + "required": true + }, + { + "type": "String", + "description": "Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.", + "html_description": "Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.", + "rst_description": "*Optional*. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.\n", + "name": "data", + "required": false + }, + { + "type": "String", + "description": "Short name of a Game to be returned, serves as the unique identifier for the game", + "html_description": "Optional. Short name of a Game to be returned, serves as the unique identifier for the game", + "rst_description": "*Optional*. Short name of a `Game `_ to be returned, serves as the unique identifier for the game\n", + "name": "game_short_name", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "forcereply", + "name": "ForceReply", + "description": "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. Not supported in channels and for messages sent on behalf of a Telegram Business account.\nExample: A poll bot for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:\n\nExplain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish.\nGuide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'.\nThe last option is definitely more attractive. And if you use ForceReply in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user.", + "html_description": "

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. Not supported in channels and for messages sent on behalf of a Telegram Business account.

\n

Example: A poll bot for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:

\n
    \n
  • Explain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish.
  • \n
  • Guide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'.
  • \n
\n

The last option is definitely more attractive. And if you use ForceReply in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user.

\n
", + "rst_description": "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 `_. Not supported in channels and for messages sent on behalf of a Telegram Business account.\n\n **Example:** A `poll bot `_ for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:\n \n - Explain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish.\n - Guide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'.\n \n The last option is definitely more attractive. And if you use :class:`aiogram.types.force_reply.ForceReply` in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user.", + "annotations": [ + { + "type": "True", + "description": "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'", + "html_description": "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'", + "rst_description": "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'\n", + "name": "force_reply", + "required": true + }, + { + "type": "String", + "description": "The placeholder to be shown in the input field when the reply is active; 1-64 characters", + "html_description": "Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters", + "rst_description": "*Optional*. The placeholder to be shown in the input field when the reply is active; 1-64 characters\n", + "name": "input_field_placeholder", + "required": false + }, + { + "type": "Boolean", + "description": "Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the 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.", + "html_description": "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 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.", + "rst_description": "*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.\n", + "name": "selective", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "chatphoto", + "name": "ChatPhoto", + "description": "This object represents a chat photo.", + "html_description": "

This object represents a chat photo.

", + "rst_description": "This object represents a chat photo.", + "annotations": [ + { + "type": "String", + "description": "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.", + "html_description": "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.", + "rst_description": "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.\n", + "name": "small_file_id", + "required": true + }, + { + "type": "String", + "description": "Unique file identifier of small (160x160) chat photo, 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 file identifier of small (160x160) chat photo, 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 file identifier of small (160x160) chat photo, 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": "small_file_unique_id", + "required": true + }, + { + "type": "String", + "description": "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.", + "html_description": "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.", + "rst_description": "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.\n", + "name": "big_file_id", + "required": true + }, + { + "type": "String", + "description": "Unique file identifier of big (640x640) chat photo, 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 file identifier of big (640x640) chat photo, 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 file identifier of big (640x640) chat photo, 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": "big_file_unique_id", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatinvitelink", + "name": "ChatInviteLink", + "description": "Represents an invite link for a chat.", + "html_description": "

Represents an invite link for a chat.

", + "rst_description": "Represents an invite link for a chat.", + "annotations": [ + { + "type": "String", + "description": "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with '…'.", + "html_description": "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”.", + "rst_description": "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with '…'.\n", + "name": "invite_link", + "required": true + }, + { + "type": "User", + "description": "Creator of the link", + "html_description": "Creator of the link", + "rst_description": "Creator of the link\n", + "name": "creator", + "required": true + }, + { + "type": "Boolean", + "description": "True, if users joining the chat via the link need to be approved by chat administrators", + "html_description": "True, if users joining the chat via the link need to be approved by chat administrators", + "rst_description": ":code:`True`, if users joining the chat via the link need to be approved by chat administrators\n", + "name": "creates_join_request", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the link is primary", + "html_description": "True, if the link is primary", + "rst_description": ":code:`True`, if the link is primary\n", + "name": "is_primary", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the link is revoked", + "html_description": "True, if the link is revoked", + "rst_description": ":code:`True`, if the link is revoked\n", + "name": "is_revoked", + "required": true + }, + { + "type": "String", + "description": "Invite link name", + "html_description": "Optional. Invite link name", + "rst_description": "*Optional*. Invite link name\n", + "name": "name", + "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the link will expire or has been expired", + "html_description": "Optional. Point in time (Unix timestamp) when the link will expire or has been expired", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the link will expire or has been expired\n", + "name": "expire_date", + "required": false + }, + { + "type": "Integer", + "description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "html_description": "Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "rst_description": "*Optional*. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999\n", + "name": "member_limit", + "required": false + }, + { + "type": "Integer", + "description": "Number of pending join requests created using this link", + "html_description": "Optional. Number of pending join requests created using this link", + "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" + }, + { + "anchor": "chatadministratorrights", + "name": "ChatAdministratorRights", + "description": "Represents the rights of an administrator in a chat.", + "html_description": "

Represents the rights of an administrator in a chat.

", + "rst_description": "Represents the rights of an administrator in a chat.", + "annotations": [ + { + "type": "Boolean", + "description": "True, if the user's presence in the chat is hidden", + "html_description": "True, if the user's presence in the chat is hidden", + "rst_description": ":code:`True`, if the user's presence in the chat is hidden\n", + "name": "is_anonymous", + "required": true + }, + { + "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, 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 + }, + { + "type": "Boolean", + "description": "True, if the administrator can delete messages of other users", + "html_description": "True, if the administrator can delete messages of other users", + "rst_description": ":code:`True`, if the administrator can delete messages of other users\n", + "name": "can_delete_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can manage video chats", + "html_description": "True, if the administrator can manage video chats", + "rst_description": ":code:`True`, if the administrator can manage video chats\n", + "name": "can_manage_video_chats", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics", + "html_description": "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics", + "rst_description": ":code:`True`, if the administrator can restrict, ban or unban chat members, or access supergroup statistics\n", + "name": "can_restrict_members", + "required": true + }, + { + "type": "Boolean", + "description": "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 the user)", + "html_description": "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 the user)", + "rst_description": ":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 the user)\n", + "name": "can_promote_members", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to change the chat title, photo and other settings", + "html_description": "True, if the user is allowed to change the chat title, photo and other settings", + "rst_description": ":code:`True`, if the user is allowed to change the chat title, photo and other settings\n", + "name": "can_change_info", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to invite new users to the chat", + "html_description": "True, if the user is allowed to invite new users to the chat", + "rst_description": ":code:`True`, if the user is allowed to invite new users to the chat\n", + "name": "can_invite_users", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can post stories to the chat", + "html_description": "True, if the administrator can post stories to the chat", + "rst_description": ":code:`True`, if the administrator can post stories to the chat\n", + "name": "can_post_stories", + "required": true + }, + { + "type": "Boolean", + "description": "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", + "html_description": "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", + "rst_description": ":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\n", + "name": "can_edit_stories", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can delete stories posted by other users", + "html_description": "True, if the administrator can delete stories posted by other users", + "rst_description": ":code:`True`, if the administrator can delete stories posted by other users\n", + "name": "can_delete_stories", + "required": true + }, + { + "type": "Boolean", + "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 + }, + { + "type": "Boolean", + "description": "True, if the administrator can edit messages of other users and can pin messages; for channels only", + "html_description": "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only\n", + "name": "can_edit_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to pin messages; for groups and supergroups only", + "html_description": "Optional. True, if the user is allowed to pin messages; for groups and supergroups only", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only\n", + "name": "can_pin_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only", + "html_description": "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only", + "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" + }, + { + "anchor": "chatmemberupdated", + "name": "ChatMemberUpdated", + "description": "This object represents changes in the status of a chat member.", + "html_description": "

This object represents changes in the status of a chat member.

", + "rst_description": "This object represents changes in the status of a chat member.", + "annotations": [ + { + "type": "Chat", + "description": "Chat the user belongs to", + "html_description": "Chat the user belongs to", + "rst_description": "Chat the user belongs to\n", + "name": "chat", + "required": true + }, + { + "type": "User", + "description": "Performer of the action, which resulted in the change", + "html_description": "Performer of the action, which resulted in the change", + "rst_description": "Performer of the action, which resulted in the change\n", + "name": "from", + "required": true + }, + { + "type": "Integer", + "description": "Date the change was done in Unix time", + "html_description": "Date the change was done in Unix time", + "rst_description": "Date the change was done in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "ChatMember", + "description": "Previous information about the chat member", + "html_description": "Previous information about the chat member", + "rst_description": "Previous information about the chat member\n", + "name": "old_chat_member", + "required": true + }, + { + "type": "ChatMember", + "description": "New information about the chat member", + "html_description": "New information about the chat member", + "rst_description": "New information about the chat member\n", + "name": "new_chat_member", + "required": true + }, + { + "type": "ChatInviteLink", + "description": "Chat invite link, which was used by the user to join the chat; for joining by invite link events only.", + "html_description": "Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.", + "rst_description": "*Optional*. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.\n", + "name": "invite_link", + "required": false + }, + { + "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*. :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*. :code:`True`, if the user joined the chat via a chat folder invite link\n", + "name": "via_chat_folder_invite_link", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "chatmember", + "name": "ChatMember", + "description": "This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:\n - ChatMemberOwner\n - ChatMemberAdministrator\n - ChatMemberMember\n - ChatMemberRestricted\n - ChatMemberLeft\n - ChatMemberBanned", + "html_description": "

This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:

", + "rst_description": "This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:\n\n - :class:`aiogram.types.chat_member_owner.ChatMemberOwner`\n - :class:`aiogram.types.chat_member_administrator.ChatMemberAdministrator`\n - :class:`aiogram.types.chat_member_member.ChatMemberMember`\n - :class:`aiogram.types.chat_member_restricted.ChatMemberRestricted`\n - :class:`aiogram.types.chat_member_left.ChatMemberLeft`\n - :class:`aiogram.types.chat_member_banned.ChatMemberBanned`", + "annotations": [], + "category": "types" + }, + { + "anchor": "chatmemberowner", + "name": "ChatMemberOwner", + "description": "Represents a chat member that owns the chat and has all administrator privileges.", + "html_description": "

Represents a chat member that owns the chat and has all administrator privileges.

", + "rst_description": "Represents a `chat member `_ that owns the chat and has all administrator privileges.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'creator'", + "html_description": "The member's status in the chat, always “creator”", + "rst_description": "The member's status in the chat, always 'creator'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user's presence in the chat is hidden", + "html_description": "True, if the user's presence in the chat is hidden", + "rst_description": ":code:`True`, if the user's presence in the chat is hidden\n", + "name": "is_anonymous", + "required": true + }, + { + "type": "String", + "description": "Custom title for this user", + "html_description": "Optional. Custom title for this user", + "rst_description": "*Optional*. Custom title for this user\n", + "name": "custom_title", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "chatmemberadministrator", + "name": "ChatMemberAdministrator", + "description": "Represents a chat member that has some additional privileges.", + "html_description": "

Represents a chat member that has some additional privileges.

", + "rst_description": "Represents a `chat member `_ that has some additional privileges.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'administrator'", + "html_description": "The member's status in the chat, always “administrator”", + "rst_description": "The member's status in the chat, always 'administrator'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the bot is allowed to edit administrator privileges of that user", + "html_description": "True, if the bot is allowed to edit administrator privileges of that user", + "rst_description": ":code:`True`, if the bot is allowed to edit administrator privileges of that user\n", + "name": "can_be_edited", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user's presence in the chat is hidden", + "html_description": "True, if the user's presence in the chat is hidden", + "rst_description": ":code:`True`, if the user's presence in the chat is hidden\n", + "name": "is_anonymous", + "required": true + }, + { + "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, 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 + }, + { + "type": "Boolean", + "description": "True, if the administrator can delete messages of other users", + "html_description": "True, if the administrator can delete messages of other users", + "rst_description": ":code:`True`, if the administrator can delete messages of other users\n", + "name": "can_delete_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can manage video chats", + "html_description": "True, if the administrator can manage video chats", + "rst_description": ":code:`True`, if the administrator can manage video chats\n", + "name": "can_manage_video_chats", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics", + "html_description": "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics", + "rst_description": ":code:`True`, if the administrator can restrict, ban or unban chat members, or access supergroup statistics\n", + "name": "can_restrict_members", + "required": true + }, + { + "type": "Boolean", + "description": "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 the user)", + "html_description": "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 the user)", + "rst_description": ":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 the user)\n", + "name": "can_promote_members", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to change the chat title, photo and other settings", + "html_description": "True, if the user is allowed to change the chat title, photo and other settings", + "rst_description": ":code:`True`, if the user is allowed to change the chat title, photo and other settings\n", + "name": "can_change_info", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to invite new users to the chat", + "html_description": "True, if the user is allowed to invite new users to the chat", + "rst_description": ":code:`True`, if the user is allowed to invite new users to the chat\n", + "name": "can_invite_users", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can post stories to the chat", + "html_description": "True, if the administrator can post stories to the chat", + "rst_description": ":code:`True`, if the administrator can post stories to the chat\n", + "name": "can_post_stories", + "required": true + }, + { + "type": "Boolean", + "description": "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", + "html_description": "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", + "rst_description": ":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\n", + "name": "can_edit_stories", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can delete stories posted by other users", + "html_description": "True, if the administrator can delete stories posted by other users", + "rst_description": ":code:`True`, if the administrator can delete stories posted by other users\n", + "name": "can_delete_stories", + "required": true + }, + { + "type": "Boolean", + "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 + }, + { + "type": "Boolean", + "description": "True, if the administrator can edit messages of other users and can pin messages; for channels only", + "html_description": "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only\n", + "name": "can_edit_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to pin messages; for groups and supergroups only", + "html_description": "Optional. True, if the user is allowed to pin messages; for groups and supergroups only", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only\n", + "name": "can_pin_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only", + "html_description": "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only", + "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 + }, + { + "type": "String", + "description": "Custom title for this user", + "html_description": "Optional. Custom title for this user", + "rst_description": "*Optional*. Custom title for this user\n", + "name": "custom_title", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "chatmembermember", + "name": "ChatMemberMember", + "description": "Represents a chat member that has no additional privileges or restrictions.", + "html_description": "

Represents a chat member that has no additional privileges or restrictions.

", + "rst_description": "Represents a `chat member `_ that has no additional privileges or restrictions.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'member'", + "html_description": "The member's status in the chat, always “member”", + "rst_description": "The member's status in the chat, always 'member'\n", + "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", + "html_description": "Information about the user", + "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" + }, + { + "anchor": "chatmemberrestricted", + "name": "ChatMemberRestricted", + "description": "Represents a chat member that is under certain restrictions in the chat. Supergroups only.", + "html_description": "

Represents a chat member that is under certain restrictions in the chat. Supergroups only.

", + "rst_description": "Represents a `chat member `_ that is under certain restrictions in the chat. Supergroups only.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'restricted'", + "html_description": "The member's status in the chat, always “restricted”", + "rst_description": "The member's status in the chat, always 'restricted'\n", + "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", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is a member of the chat at the moment of the request", + "html_description": "True, if the user is a member of the chat at the moment of the request", + "rst_description": ":code:`True`, if the user is a member of the chat at the moment of the request\n", + "name": "is_member", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues", + "html_description": "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues", + "rst_description": ":code:`True`, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues\n", + "name": "can_send_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send audios", + "html_description": "True, if the user is allowed to send audios", + "rst_description": ":code:`True`, if the user is allowed to send audios\n", + "name": "can_send_audios", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send documents", + "html_description": "True, if the user is allowed to send documents", + "rst_description": ":code:`True`, if the user is allowed to send documents\n", + "name": "can_send_documents", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send photos", + "html_description": "True, if the user is allowed to send photos", + "rst_description": ":code:`True`, if the user is allowed to send photos\n", + "name": "can_send_photos", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send videos", + "html_description": "True, if the user is allowed to send videos", + "rst_description": ":code:`True`, if the user is allowed to send videos\n", + "name": "can_send_videos", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send video notes", + "html_description": "True, if the user is allowed to send video notes", + "rst_description": ":code:`True`, if the user is allowed to send video notes\n", + "name": "can_send_video_notes", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send voice notes", + "html_description": "True, if the user is allowed to send voice notes", + "rst_description": ":code:`True`, if the user is allowed to send voice notes\n", + "name": "can_send_voice_notes", + "required": true + }, + { + "type": "Boolean", + "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 + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send animations, games, stickers and use inline bots", + "html_description": "True, if the user is allowed to send animations, games, stickers and use inline bots", + "rst_description": ":code:`True`, if the user is allowed to send animations, games, stickers and use inline bots\n", + "name": "can_send_other_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to add web page previews to their messages", + "html_description": "True, if the user is allowed to add web page previews to their messages", + "rst_description": ":code:`True`, if the user is allowed to add web page previews to their messages\n", + "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", + "html_description": "True, if the user is allowed to change the chat title, photo and other settings", + "rst_description": ":code:`True`, if the user is allowed to change the chat title, photo and other settings\n", + "name": "can_change_info", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to invite new users to the chat", + "html_description": "True, if the user is allowed to invite new users to the chat", + "rst_description": ":code:`True`, if the user is allowed to invite new users to the chat\n", + "name": "can_invite_users", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to pin messages", + "html_description": "True, if the user is allowed to pin messages", + "rst_description": ":code:`True`, if the user is allowed to pin messages\n", + "name": "can_pin_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to create forum topics", + "html_description": "True, if the user is allowed to create forum topics", + "rst_description": ":code:`True`, if the user is allowed to create forum topics\n", + "name": "can_manage_topics", + "required": true + }, + { + "type": "Integer", + "description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever", + "html_description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever", + "rst_description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever\n", + "name": "until_date", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatmemberleft", + "name": "ChatMemberLeft", + "description": "Represents a chat member that isn't currently a member of the chat, but may join it themselves.", + "html_description": "

Represents a chat member that isn't currently a member of the chat, but may join it themselves.

", + "rst_description": "Represents a `chat member `_ that isn't currently a member of the chat, but may join it themselves.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'left'", + "html_description": "The member's status in the chat, always “left”", + "rst_description": "The member's status in the chat, always 'left'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatmemberbanned", + "name": "ChatMemberBanned", + "description": "Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.", + "html_description": "

Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.

", + "rst_description": "Represents a `chat member `_ that was banned in the chat and can't return to the chat or view chat messages.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'kicked'", + "html_description": "The member's status in the chat, always “kicked”", + "rst_description": "The member's status in the chat, always 'kicked'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + }, + { + "type": "Integer", + "description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever", + "html_description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever", + "rst_description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever\n", + "name": "until_date", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatjoinrequest", + "name": "ChatJoinRequest", + "description": "Represents a join request sent to a chat.", + "html_description": "

Represents a join request sent to a chat.

", + "rst_description": "Represents a join request sent to a chat.", + "annotations": [ + { + "type": "Chat", + "description": "Chat to which the request was sent", + "html_description": "Chat to which the request was sent", + "rst_description": "Chat to which the request was sent\n", + "name": "chat", + "required": true + }, + { + "type": "User", + "description": "User that sent the join request", + "html_description": "User that sent the join request", + "rst_description": "User that sent the join request\n", + "name": "from", + "required": true + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "user_chat_id", + "required": true + }, + { + "type": "Integer", + "description": "Date the request was sent in Unix time", + "html_description": "Date the request was sent in Unix time", + "rst_description": "Date the request was sent in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "String", + "description": "Bio of the user.", + "html_description": "Optional. Bio of the user.", + "rst_description": "*Optional*. Bio of the user.\n", + "name": "bio", + "required": false + }, + { + "type": "ChatInviteLink", + "description": "Chat invite link that was used by the user to send the join request", + "html_description": "Optional. Chat invite link that was used by the user to send the join request", + "rst_description": "*Optional*. Chat invite link that was used by the user to send the join request\n", + "name": "invite_link", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "chatpermissions", + "name": "ChatPermissions", + "description": "Describes actions that a non-administrator user is allowed to take in a chat.", + "html_description": "

Describes actions that a non-administrator user is allowed to take in a chat.

", + "rst_description": "Describes actions that a non-administrator user is allowed to take in a chat.", + "annotations": [ + { + "type": "Boolean", + "description": "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues", + "html_description": "Optional. True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues\n", + "name": "can_send_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send audios", + "html_description": "Optional. True, if the user is allowed to send audios", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send audios\n", + "name": "can_send_audios", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send documents", + "html_description": "Optional. True, if the user is allowed to send documents", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send documents\n", + "name": "can_send_documents", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send photos", + "html_description": "Optional. True, if the user is allowed to send photos", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send photos\n", + "name": "can_send_photos", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send videos", + "html_description": "Optional. True, if the user is allowed to send videos", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send videos\n", + "name": "can_send_videos", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send video notes", + "html_description": "Optional. True, if the user is allowed to send video notes", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send video notes\n", + "name": "can_send_video_notes", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send voice notes", + "html_description": "Optional. True, if the user is allowed to send voice notes", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send voice notes\n", + "name": "can_send_voice_notes", + "required": false + }, + { + "type": "Boolean", + "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 + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send animations, games, stickers and use inline bots", + "html_description": "Optional. True, if the user is allowed to send animations, games, stickers and use inline bots", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots\n", + "name": "can_send_other_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to add web page previews to their messages", + "html_description": "Optional. True, if the user is allowed to add web page previews to their messages", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages\n", + "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", + "html_description": "Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups\n", + "name": "can_change_info", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to invite new users to the chat", + "html_description": "Optional. True, if the user is allowed to invite new users to the chat", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to invite new users to the chat\n", + "name": "can_invite_users", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to pin messages. Ignored in public supergroups", + "html_description": "Optional. True, if the user is allowed to pin messages. Ignored in public supergroups", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to pin messages. Ignored in public supergroups\n", + "name": "can_pin_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages", + "html_description": "Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages\n", + "name": "can_manage_topics", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "birthdate", + "name": "Birthdate", + "description": "Describes the birthdate of a user.", + "html_description": "

Describes the birthdate of a user.

", + "rst_description": "Describes the birthdate of a user.", + "annotations": [ + { + "type": "Integer", + "description": "Day of the user's birth; 1-31", + "html_description": "Day of the user's birth; 1-31", + "rst_description": "Day of the user's birth; 1-31\n", + "name": "day", + "required": true + }, + { + "type": "Integer", + "description": "Month of the user's birth; 1-12", + "html_description": "Month of the user's birth; 1-12", + "rst_description": "Month of the user's birth; 1-12\n", + "name": "month", + "required": true + }, + { + "type": "Integer", + "description": "Year of the user's birth", + "html_description": "Optional. Year of the user's birth", + "rst_description": "*Optional*. Year of the user's birth\n", + "name": "year", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "businessintro", + "name": "BusinessIntro", + "description": "Contains information about the start page settings of a Telegram Business account.", + "html_description": "

Contains information about the start page settings of a Telegram Business account.

", + "rst_description": "Contains information about the start page settings of a Telegram Business account.", + "annotations": [ + { + "type": "String", + "description": "Title text of the business intro", + "html_description": "Optional. Title text of the business intro", + "rst_description": "*Optional*. Title text of the business intro\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Message text of the business intro", + "html_description": "Optional. Message text of the business intro", + "rst_description": "*Optional*. Message text of the business intro\n", + "name": "message", + "required": false + }, + { + "type": "Sticker", + "description": "Sticker of the business intro", + "html_description": "Optional. Sticker of the business intro", + "rst_description": "*Optional*. Sticker of the business intro\n", + "name": "sticker", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "businesslocation", + "name": "BusinessLocation", + "description": "Contains information about the location of a Telegram Business account.", + "html_description": "

Contains information about the location of a Telegram Business account.

", + "rst_description": "Contains information about the location of a Telegram Business account.", + "annotations": [ + { + "type": "String", + "description": "Address of the business", + "html_description": "Address of the business", + "rst_description": "Address of the business\n", + "name": "address", + "required": true + }, + { + "type": "Location", + "description": "Location of the business", + "html_description": "Optional. Location of the business", + "rst_description": "*Optional*. Location of the business\n", + "name": "location", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "businessopeninghoursinterval", + "name": "BusinessOpeningHoursInterval", + "description": "Describes an interval of time during which a business is open.", + "html_description": "

Describes an interval of time during which a business is open.

", + "rst_description": "Describes an interval of time during which a business is open.", + "annotations": [ + { + "type": "Integer", + "description": "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", + "html_description": "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", + "rst_description": "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\n", + "name": "opening_minute", + "required": true + }, + { + "type": "Integer", + "description": "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", + "html_description": "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", + "rst_description": "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\n", + "name": "closing_minute", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "businessopeninghours", + "name": "BusinessOpeningHours", + "description": "Describes the opening hours of a business.", + "html_description": "

Describes the opening hours of a business.

", + "rst_description": "Describes the opening hours of a business.", + "annotations": [ + { + "type": "String", + "description": "Unique name of the time zone for which the opening hours are defined", + "html_description": "Unique name of the time zone for which the opening hours are defined", + "rst_description": "Unique name of the time zone for which the opening hours are defined\n", + "name": "time_zone_name", + "required": true + }, + { + "type": "Array of BusinessOpeningHoursInterval", + "description": "List of time intervals describing business opening hours", + "html_description": "List of time intervals describing business opening hours", + "rst_description": "List of time intervals describing business opening hours\n", + "name": "opening_hours", + "required": true + } + ], + "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", + "description": "Represents a location to which a chat is connected.", + "html_description": "

Represents a location to which a chat is connected.

", + "rst_description": "Represents a location to which a chat is connected.", + "annotations": [ + { + "type": "Location", + "description": "The location to which the supergroup is connected. Can't be a live location.", + "html_description": "The location to which the supergroup is connected. Can't be a live location.", + "rst_description": "The location to which the supergroup is connected. Can't be a live location.\n", + "name": "location", + "required": true + }, + { + "type": "String", + "description": "Location address; 1-64 characters, as defined by the chat owner", + "html_description": "Location address; 1-64 characters, as defined by the chat owner", + "rst_description": "Location address; 1-64 characters, as defined by the chat owner\n", + "name": "address", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "reactiontype", + "name": "ReactionType", + "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" + }, + { + "anchor": "reactiontypeemoji", + "name": "ReactionTypeEmoji", + "description": "The reaction is based on an emoji.", + "html_description": "

The reaction is based on an emoji.

", + "rst_description": "The reaction is based on an emoji.", + "annotations": [ + { + "type": "String", + "description": "Type of the reaction, always 'emoji'", + "html_description": "Type of the reaction, always “emoji”", + "rst_description": "Type of the reaction, always 'emoji'\n", + "name": "type", + "required": true + }, + { + "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", + "name": "emoji", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "reactiontypecustomemoji", + "name": "ReactionTypeCustomEmoji", + "description": "The reaction is based on a custom emoji.", + "html_description": "

The reaction is based on a custom emoji.

", + "rst_description": "The reaction is based on a custom emoji.", + "annotations": [ + { + "type": "String", + "description": "Type of the reaction, always 'custom_emoji'", + "html_description": "Type of the reaction, always “custom_emoji”", + "rst_description": "Type of the reaction, always 'custom_emoji'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Custom emoji identifier", + "html_description": "Custom emoji identifier", + "rst_description": "Custom emoji identifier\n", + "name": "custom_emoji_id", + "required": true + } + ], + "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", + "description": "Represents a reaction added to a message along with the number of times it was added.", + "html_description": "

Represents a reaction added to a message along with the number of times it was added.

", + "rst_description": "Represents a reaction added to a message along with the number of times it was added.", + "annotations": [ + { + "type": "ReactionType", + "description": "Type of the reaction", + "html_description": "Type of the reaction", + "rst_description": "Type of the reaction\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Number of times the reaction was added", + "html_description": "Number of times the reaction was added", + "rst_description": "Number of times the reaction was added\n", + "name": "total_count", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "messagereactionupdated", + "name": "MessageReactionUpdated", + "description": "This object represents a change of a reaction on a message performed by a user.", + "html_description": "

This object represents a change of a reaction on a message performed by a user.

", + "rst_description": "This object represents a change of a reaction on a message performed by a user.", + "annotations": [ + { + "type": "Chat", + "description": "The chat containing the message the user reacted to", + "html_description": "The chat containing the message the user reacted to", + "rst_description": "The chat containing the message the user reacted to\n", + "name": "chat", + "required": true + }, + { + "type": "Integer", + "description": "Unique identifier of the message inside the chat", + "html_description": "Unique identifier of the message inside the chat", + "rst_description": "Unique identifier of the message inside the chat\n", + "name": "message_id", + "required": true + }, + { + "type": "User", + "description": "The user that changed the reaction, if the user isn't anonymous", + "html_description": "Optional. The user that changed the reaction, if the user isn't anonymous", + "rst_description": "*Optional*. The user that changed the reaction, if the user isn't anonymous\n", + "name": "user", + "required": false + }, + { + "type": "Chat", + "description": "The chat on behalf of which the reaction was changed, if the user is anonymous", + "html_description": "Optional. The chat on behalf of which the reaction was changed, if the user is anonymous", + "rst_description": "*Optional*. The chat on behalf of which the reaction was changed, if the user is anonymous\n", + "name": "actor_chat", + "required": false + }, + { + "type": "Integer", + "description": "Date of the change in Unix time", + "html_description": "Date of the change in Unix time", + "rst_description": "Date of the change in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "Array of ReactionType", + "description": "Previous list of reaction types that were set by the user", + "html_description": "Previous list of reaction types that were set by the user", + "rst_description": "Previous list of reaction types that were set by the user\n", + "name": "old_reaction", + "required": true + }, + { + "type": "Array of ReactionType", + "description": "New list of reaction types that have been set by the user", + "html_description": "New list of reaction types that have been set by the user", + "rst_description": "New list of reaction types that have been set by the user\n", + "name": "new_reaction", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "messagereactioncountupdated", + "name": "MessageReactionCountUpdated", + "description": "This object represents reaction changes on a message with anonymous reactions.", + "html_description": "

This object represents reaction changes on a message with anonymous reactions.

", + "rst_description": "This object represents reaction changes on a message with anonymous reactions.", + "annotations": [ + { + "type": "Chat", + "description": "The chat containing the message", + "html_description": "The chat containing the message", + "rst_description": "The chat containing the message\n", + "name": "chat", + "required": true + }, + { + "type": "Integer", + "description": "Unique message identifier inside the chat", + "html_description": "Unique message identifier inside the chat", + "rst_description": "Unique message identifier inside the chat\n", + "name": "message_id", + "required": true + }, + { + "type": "Integer", + "description": "Date of the change in Unix time", + "html_description": "Date of the change in Unix time", + "rst_description": "Date of the change in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "Array of ReactionCount", + "description": "List of reactions that are present on the message", + "html_description": "List of reactions that are present on the message", + "rst_description": "List of reactions that are present on the message\n", + "name": "reactions", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "forumtopic", + "name": "ForumTopic", + "description": "This object represents a forum topic.", + "html_description": "

This object represents a forum topic.

", + "rst_description": "This object represents a forum topic.", + "annotations": [ + { + "type": "Integer", + "description": "Unique identifier of the forum topic", + "html_description": "Unique identifier of the forum topic", + "rst_description": "Unique identifier of the forum topic\n", + "name": "message_thread_id", + "required": true + }, + { + "type": "String", + "description": "Name of the topic", + "html_description": "Name of the topic", + "rst_description": "Name of the topic\n", + "name": "name", + "required": true + }, + { + "type": "Integer", + "description": "Color of the topic icon in RGB format", + "html_description": "Color of the topic icon in RGB format", + "rst_description": "Color of the topic icon in RGB format\n", + "name": "icon_color", + "required": true + }, + { + "type": "String", + "description": "Unique identifier of the custom emoji shown as the topic icon", + "html_description": "Optional. Unique identifier of the custom emoji shown as the topic icon", + "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" + }, + { + "anchor": "botcommand", + "name": "BotCommand", + "description": "This object represents a bot command.", + "html_description": "

This object represents a bot command.

", + "rst_description": "This object represents a bot command.", + "annotations": [ + { + "type": "String", + "description": "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.", + "html_description": "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.", + "rst_description": "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.\n", + "name": "command", + "required": true + }, + { + "type": "String", + "description": "Description of the command; 1-256 characters.", + "html_description": "Description of the command; 1-256 characters.", + "rst_description": "Description of the command; 1-256 characters.\n", + "name": "description", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "botcommandscope", + "name": "BotCommandScope", + "description": "This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:\n - BotCommandScopeDefault\n - BotCommandScopeAllPrivateChats\n - BotCommandScopeAllGroupChats\n - BotCommandScopeAllChatAdministrators\n - BotCommandScopeChat\n - BotCommandScopeChatAdministrators\n - BotCommandScopeChatMember", + "html_description": "

This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:

", + "rst_description": "This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:\n\n - :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`\n - :class:`aiogram.types.bot_command_scope_all_private_chats.BotCommandScopeAllPrivateChats`\n - :class:`aiogram.types.bot_command_scope_all_group_chats.BotCommandScopeAllGroupChats`\n - :class:`aiogram.types.bot_command_scope_all_chat_administrators.BotCommandScopeAllChatAdministrators`\n - :class:`aiogram.types.bot_command_scope_chat.BotCommandScopeChat`\n - :class:`aiogram.types.bot_command_scope_chat_administrators.BotCommandScopeChatAdministrators`\n - :class:`aiogram.types.bot_command_scope_chat_member.BotCommandScopeChatMember`", + "annotations": [], + "category": "types" + }, + { + "anchor": "botcommandscopedefault", + "name": "BotCommandScopeDefault", + "description": "Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.", + "html_description": "

Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.

", + "rst_description": "Represents the default `scope `_ of bot commands. Default commands are used if no commands with a `narrower scope `_ are specified for the user.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be default", + "html_description": "Scope type, must be default", + "rst_description": "Scope type, must be *default*\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "botcommandscopeallprivatechats", + "name": "BotCommandScopeAllPrivateChats", + "description": "Represents the scope of bot commands, covering all private chats.", + "html_description": "

Represents the scope of bot commands, covering all private chats.

", + "rst_description": "Represents the `scope `_ of bot commands, covering all private chats.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be all_private_chats", + "html_description": "Scope type, must be all_private_chats", + "rst_description": "Scope type, must be *all_private_chats*\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "botcommandscopeallgroupchats", + "name": "BotCommandScopeAllGroupChats", + "description": "Represents the scope of bot commands, covering all group and supergroup chats.", + "html_description": "

Represents the scope of bot commands, covering all group and supergroup chats.

", + "rst_description": "Represents the `scope `_ of bot commands, covering all group and supergroup chats.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be all_group_chats", + "html_description": "Scope type, must be all_group_chats", + "rst_description": "Scope type, must be *all_group_chats*\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "botcommandscopeallchatadministrators", + "name": "BotCommandScopeAllChatAdministrators", + "description": "Represents the scope of bot commands, covering all group and supergroup chat administrators.", + "html_description": "

Represents the scope of bot commands, covering all group and supergroup chat administrators.

", + "rst_description": "Represents the `scope `_ of bot commands, covering all group and supergroup chat administrators.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be all_chat_administrators", + "html_description": "Scope type, must be all_chat_administrators", + "rst_description": "Scope type, must be *all_chat_administrators*\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "botcommandscopechat", + "name": "BotCommandScopeChat", + "description": "Represents the scope of bot commands, covering a specific chat.", + "html_description": "

Represents the scope of bot commands, covering a specific chat.

", + "rst_description": "Represents the `scope `_ of bot commands, covering a specific chat.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be chat", + "html_description": "Scope type, must be chat", + "rst_description": "Scope type, must be *chat*\n", + "name": "type", + "required": true + }, + { + "type": "Integer or String", + "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 + } + ], + "category": "types" + }, + { + "anchor": "botcommandscopechatadministrators", + "name": "BotCommandScopeChatAdministrators", + "description": "Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.", + "html_description": "

Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.

", + "rst_description": "Represents the `scope `_ of bot commands, covering all administrators of a specific group or supergroup chat.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be chat_administrators", + "html_description": "Scope type, must be chat_administrators", + "rst_description": "Scope type, must be *chat_administrators*\n", + "name": "type", + "required": true + }, + { + "type": "Integer or String", + "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 + } + ], + "category": "types" + }, + { + "anchor": "botcommandscopechatmember", + "name": "BotCommandScopeChatMember", + "description": "Represents the scope of bot commands, covering a specific member of a group or supergroup chat.", + "html_description": "

Represents the scope of bot commands, covering a specific member of a group or supergroup chat.

", + "rst_description": "Represents the `scope `_ of bot commands, covering a specific member of a group or supergroup chat.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be chat_member", + "html_description": "Scope type, must be chat_member", + "rst_description": "Scope type, must be *chat_member*\n", + "name": "type", + "required": true + }, + { + "type": "Integer or String", + "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 + }, + { + "type": "Integer", + "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", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "botname", + "name": "BotName", + "description": "This object represents the bot's name.", + "html_description": "

This object represents the bot's name.

", + "rst_description": "This object represents the bot's name.", + "annotations": [ + { + "type": "String", + "description": "The bot's name", + "html_description": "The bot's name", + "rst_description": "The bot's name\n", + "name": "name", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "botdescription", + "name": "BotDescription", + "description": "This object represents the bot's description.", + "html_description": "

This object represents the bot's description.

", + "rst_description": "This object represents the bot's description.", + "annotations": [ + { + "type": "String", + "description": "The bot's description", + "html_description": "The bot's description", + "rst_description": "The bot's description\n", + "name": "description", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "botshortdescription", + "name": "BotShortDescription", + "description": "This object represents the bot's short description.", + "html_description": "

This object represents the bot's short description.

", + "rst_description": "This object represents the bot's short description.", + "annotations": [ + { + "type": "String", + "description": "The bot's short description", + "html_description": "The bot's short description", + "rst_description": "The bot's short description\n", + "name": "short_description", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "menubutton", + "name": "MenuButton", + "description": "This object describes the bot's menu button in a private chat. It should be one of\n - MenuButtonCommands\n - MenuButtonWebApp\n - MenuButtonDefault\nIf a menu button other than MenuButtonDefault is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.", + "html_description": "

This object describes the bot's menu button in a private chat. It should be one of

If a menu button other than MenuButtonDefault is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.

", + "rst_description": "This object describes the bot's menu button in a private chat. It should be one of\n\n - :class:`aiogram.types.menu_button_commands.MenuButtonCommands`\n - :class:`aiogram.types.menu_button_web_app.MenuButtonWebApp`\n - :class:`aiogram.types.menu_button_default.MenuButtonDefault`\n\nIf a menu button other than :class:`aiogram.types.menu_button_default.MenuButtonDefault` is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.", + "annotations": [], + "category": "types" + }, + { + "anchor": "menubuttoncommands", + "name": "MenuButtonCommands", + "description": "Represents a menu button, which opens the bot's list of commands.", + "html_description": "

Represents a menu button, which opens the bot's list of commands.

", + "rst_description": "Represents a menu button, which opens the bot's list of commands.", + "annotations": [ + { + "type": "String", + "description": "Type of the button, must be commands", + "html_description": "Type of the button, must be commands", + "rst_description": "Type of the button, must be *commands*\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "menubuttonwebapp", + "name": "MenuButtonWebApp", + "description": "Represents a menu button, which launches a Web App.", + "html_description": "

Represents a menu button, which launches a Web App.

", + "rst_description": "Represents a menu button, which launches a `Web App `_.", + "annotations": [ + { + "type": "String", + "description": "Type of the button, must be web_app", + "html_description": "Type of the button, must be web_app", + "rst_description": "Type of the button, must be *web_app*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Text on the button", + "html_description": "Text on the button", + "rst_description": "Text on the button\n", + "name": "text", + "required": true + }, + { + "type": "WebAppInfo", + "description": "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 answerWebAppQuery. Alternatively, a 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.", + "html_description": "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 answerWebAppQuery. Alternatively, a 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.", + "rst_description": "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.\n", + "name": "web_app", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "menubuttondefault", + "name": "MenuButtonDefault", + "description": "Describes that no specific value for the menu button was set.", + "html_description": "

Describes that no specific value for the menu button was set.

", + "rst_description": "Describes that no specific value for the menu button was set.", + "annotations": [ + { + "type": "String", + "description": "Type of the button, must be default", + "html_description": "Type of the button, must be default", + "rst_description": "Type of the button, must be *default*\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatboostsource", + "name": "ChatBoostSource", + "description": "This object describes the source of a chat boost. It can be one of\n - ChatBoostSourcePremium\n - ChatBoostSourceGiftCode\n - ChatBoostSourceGiveaway", + "html_description": "

This object describes the source of a chat boost. It can be one of

", + "rst_description": "This object describes the source of a chat boost. It can be one of\n\n - :class:`aiogram.types.chat_boost_source_premium.ChatBoostSourcePremium`\n - :class:`aiogram.types.chat_boost_source_gift_code.ChatBoostSourceGiftCode`\n - :class:`aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway`", + "annotations": [], + "category": "types" + }, + { + "anchor": "chatboostsourcepremium", + "name": "ChatBoostSourcePremium", + "description": "The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.", + "html_description": "

The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.

", + "rst_description": "The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.", + "annotations": [ + { + "type": "String", + "description": "Source of the boost, always 'premium'", + "html_description": "Source of the boost, always “premium”", + "rst_description": "Source of the boost, always 'premium'\n", + "name": "source", + "required": true + }, + { + "type": "User", + "description": "User that boosted the chat", + "html_description": "User that boosted the chat", + "rst_description": "User that boosted the chat\n", + "name": "user", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatboostsourcegiftcode", + "name": "ChatBoostSourceGiftCode", + "description": "The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.", + "html_description": "

The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.

", + "rst_description": "The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.", + "annotations": [ + { + "type": "String", + "description": "Source of the boost, always 'gift_code'", + "html_description": "Source of the boost, always “gift_code”", + "rst_description": "Source of the boost, always 'gift_code'\n", + "name": "source", + "required": true + }, + { + "type": "User", + "description": "User for which the gift code was created", + "html_description": "User for which the gift code was created", + "rst_description": "User for which the gift code was created\n", + "name": "user", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatboostsourcegiveaway", + "name": "ChatBoostSourceGiveaway", + "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", + "description": "Source of the boost, always 'giveaway'", + "html_description": "Source of the boost, always “giveaway”", + "rst_description": "Source of the boost, always 'giveaway'\n", + "name": "source", + "required": true + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "giveaway_message_id", + "required": true + }, + { + "type": "User", + "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*. :code:`True`, if the giveaway was completed, but there was no user to win the prize\n", + "name": "is_unclaimed", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "chatboost", + "name": "ChatBoost", + "description": "This object contains information about a chat boost.", + "html_description": "

This object contains information about a chat boost.

", + "rst_description": "This object contains information about a chat boost.", + "annotations": [ + { + "type": "String", + "description": "Unique identifier of the boost", + "html_description": "Unique identifier of the boost", + "rst_description": "Unique identifier of the boost\n", + "name": "boost_id", + "required": true + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the chat was boosted", + "html_description": "Point in time (Unix timestamp) when the chat was boosted", + "rst_description": "Point in time (Unix timestamp) when the chat was boosted\n", + "name": "add_date", + "required": true + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged", + "html_description": "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged", + "rst_description": "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged\n", + "name": "expiration_date", + "required": true + }, + { + "type": "ChatBoostSource", + "description": "Source of the added boost", + "html_description": "Source of the added boost", + "rst_description": "Source of the added boost\n", + "name": "source", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatboostupdated", + "name": "ChatBoostUpdated", + "description": "This object represents a boost added to a chat or changed.", + "html_description": "

This object represents a boost added to a chat or changed.

", + "rst_description": "This object represents a boost added to a chat or changed.", + "annotations": [ + { + "type": "Chat", + "description": "Chat which was boosted", + "html_description": "Chat which was boosted", + "rst_description": "Chat which was boosted\n", + "name": "chat", + "required": true + }, + { + "type": "ChatBoost", + "description": "Information about the chat boost", + "html_description": "Information about the chat boost", + "rst_description": "Information about the chat boost\n", + "name": "boost", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatboostremoved", + "name": "ChatBoostRemoved", + "description": "This object represents a boost removed from a chat.", + "html_description": "

This object represents a boost removed from a chat.

", + "rst_description": "This object represents a boost removed from a chat.", + "annotations": [ + { + "type": "Chat", + "description": "Chat which was boosted", + "html_description": "Chat which was boosted", + "rst_description": "Chat which was boosted\n", + "name": "chat", + "required": true + }, + { + "type": "String", + "description": "Unique identifier of the boost", + "html_description": "Unique identifier of the boost", + "rst_description": "Unique identifier of the boost\n", + "name": "boost_id", + "required": true + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the boost was removed", + "html_description": "Point in time (Unix timestamp) when the boost was removed", + "rst_description": "Point in time (Unix timestamp) when the boost was removed\n", + "name": "remove_date", + "required": true + }, + { + "type": "ChatBoostSource", + "description": "Source of the removed boost", + "html_description": "Source of the removed boost", + "rst_description": "Source of the removed boost\n", + "name": "source", + "required": true + } + ], + "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", + "description": "This object represents a list of boosts added to a chat by a user.", + "html_description": "

This object represents a list of boosts added to a chat by a user.

", + "rst_description": "This object represents a list of boosts added to a chat by a user.", + "annotations": [ + { + "type": "Array of ChatBoost", + "description": "The list of boosts added to the chat by the user", + "html_description": "The list of boosts added to the chat by the user", + "rst_description": "The list of boosts added to the chat by the user\n", + "name": "boosts", + "required": true + } + ], + "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", + "description": "Describes the connection of the bot with a business account.", + "html_description": "

Describes the connection of the bot with a business account.

", + "rst_description": "Describes the connection of the bot with a business account.", + "annotations": [ + { + "type": "String", + "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": "id", + "required": true + }, + { + "type": "User", + "description": "Business account user that created the business connection", + "html_description": "Business account user that created the business connection", + "rst_description": "Business account user that created the business connection\n", + "name": "user", + "required": true + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "user_chat_id", + "required": true + }, + { + "type": "Integer", + "description": "Date the connection was established in Unix time", + "html_description": "Date the connection was established in Unix time", + "rst_description": "Date the connection was established in Unix time\n", + "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 + } + ], + "category": "types" + }, + { + "anchor": "businessmessagesdeleted", + "name": "BusinessMessagesDeleted", + "description": "This object is received when messages are deleted from a connected business account.", + "html_description": "

This object is received when messages are deleted from a connected business account.

", + "rst_description": "This object is received when messages are deleted from a connected business account.", + "annotations": [ + { + "type": "String", + "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", + "required": true + }, + { + "type": "Chat", + "description": "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user.", + "html_description": "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user.", + "rst_description": "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user.\n", + "name": "chat", + "required": true + }, + { + "type": "Array of Integer", + "description": "The list of identifiers of deleted messages in the chat of the business account", + "html_description": "The list of identifiers of deleted messages in the chat of the business account", + "rst_description": "The list of identifiers of deleted messages in the chat of the business account\n", + "name": "message_ids", + "required": true + } + ], + "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", + "description": "Describes why a request was unsuccessful.", + "html_description": "

Describes why a request was unsuccessful.

", + "rst_description": "Describes why a request was unsuccessful.", + "annotations": [ + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "migrate_to_chat_id", + "required": false + }, + { + "type": "Integer", + "description": "In case of exceeding flood control, the number of seconds left to wait before the request can be repeated", + "html_description": "Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated", + "rst_description": "*Optional*. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated\n", + "name": "retry_after", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputmedia", + "name": "InputMedia", + "description": "This object represents the content of a media message to be sent. It should be one of\n - InputMediaAnimation\n - InputMediaDocument\n - InputMediaAudio\n - InputMediaPhoto\n - InputMediaVideo", + "html_description": "

This object represents the content of a media message to be sent. It should be one of

", + "rst_description": "This object represents the content of a media message to be sent. It should be one of\n\n - :class:`aiogram.types.input_media_animation.InputMediaAnimation`\n - :class:`aiogram.types.input_media_document.InputMediaDocument`\n - :class:`aiogram.types.input_media_audio.InputMediaAudio`\n - :class:`aiogram.types.input_media_photo.InputMediaPhoto`\n - :class:`aiogram.types.input_media_video.InputMediaVideo`", + "annotations": [], + "category": "types" + }, + { + "anchor": "inputmediaphoto", + "name": "InputMediaPhoto", + "description": "Represents a photo to be sent.", + "html_description": "

Represents a photo to be sent.

", + "rst_description": "Represents a photo to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be photo", + "html_description": "Type of the result, must be photo", + "rst_description": "Type of the result, must be *photo*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "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. More information on Sending Files", + "html_description": "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://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "media", + "required": true + }, + { + "type": "String", + "description": "Caption of the photo to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the photo caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the photo caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the photo needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the photo needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the photo needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputmediavideo", + "name": "InputMediaVideo", + "description": "Represents a video to be sent.", + "html_description": "

Represents a video to be sent.

", + "rst_description": "Represents a video to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be video", + "html_description": "Type of the result, must be video", + "rst_description": "Type of the result, must be *video*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "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. More information on Sending Files", + "html_description": "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://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "media", + "required": true + }, + { + "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", + "html_description": "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the video caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the video caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "type": "Integer", + "description": "Video width", + "html_description": "Optional. Video width", + "rst_description": "*Optional*. Video width\n", + "name": "width", + "required": false + }, + { + "type": "Integer", + "description": "Video height", + "html_description": "Optional. Video height", + "rst_description": "*Optional*. Video height\n", + "name": "height", + "required": false + }, + { + "type": "Integer", + "description": "Video duration in seconds", + "html_description": "Optional. Video duration in seconds", + "rst_description": "*Optional*. Video duration in seconds\n", + "name": "duration", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the uploaded video is suitable for streaming", + "html_description": "Optional. Pass True if the uploaded video is suitable for streaming", + "rst_description": "*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming\n", + "name": "supports_streaming", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the video needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the video needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the video needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputmediaanimation", + "name": "InputMediaAnimation", + "description": "Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.", + "html_description": "

Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.

", + "rst_description": "Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be animation", + "html_description": "Type of the result, must be animation", + "rst_description": "Type of the result, must be *animation*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "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. More information on Sending Files", + "html_description": "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://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "media", + "required": true + }, + { + "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": "Caption of the animation to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the animation to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the animation caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the animation caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the animation caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "type": "Integer", + "description": "Animation width", + "html_description": "Optional. Animation width", + "rst_description": "*Optional*. Animation width\n", + "name": "width", + "required": false + }, + { + "type": "Integer", + "description": "Animation height", + "html_description": "Optional. Animation height", + "rst_description": "*Optional*. Animation height\n", + "name": "height", + "required": false + }, + { + "type": "Integer", + "description": "Animation duration in seconds", + "html_description": "Optional. Animation duration in seconds", + "rst_description": "*Optional*. Animation duration in seconds\n", + "name": "duration", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the animation needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the animation needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the animation needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputmediaaudio", + "name": "InputMediaAudio", + "description": "Represents an audio file to be treated as music to be sent.", + "html_description": "

Represents an audio file to be treated as music to be sent.

", + "rst_description": "Represents an audio file to be treated as music to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be audio", + "html_description": "Type of the result, must be audio", + "rst_description": "Type of the result, must be *audio*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "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. More information on Sending Files", + "html_description": "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://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "media", + "required": true + }, + { + "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": "Caption of the audio to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the audio to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the audio caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the audio caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Integer", + "description": "Duration of the audio in seconds", + "html_description": "Optional. Duration of the audio in seconds", + "rst_description": "*Optional*. Duration of the audio in seconds\n", + "name": "duration", + "required": false + }, + { + "type": "String", + "description": "Performer of the audio", + "html_description": "Optional. Performer of the audio", + "rst_description": "*Optional*. Performer of the audio\n", + "name": "performer", + "required": false + }, + { + "type": "String", + "description": "Title of the audio", + "html_description": "Optional. Title of the audio", + "rst_description": "*Optional*. Title of the audio\n", + "name": "title", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputmediadocument", + "name": "InputMediaDocument", + "description": "Represents a general file to be sent.", + "html_description": "

Represents a general file to be sent.

", + "rst_description": "Represents a general file to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be document", + "html_description": "Type of the result, must be document", + "rst_description": "Type of the result, must be *document*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "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. More information on Sending Files", + "html_description": "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://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "media", + "required": true + }, + { + "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": "Caption of the document to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the document caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the document caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album.", + "html_description": "Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album.", + "rst_description": "*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.\n", + "name": "disable_content_type_detection", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputfile", + "name": "InputFile", + "description": "This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.", + "html_description": "

This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.

", + "rst_description": "This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.", + "annotations": [], + "category": "types" + }, + { + "anchor": "inputpaidmedia", + "name": "InputPaidMedia", + "description": "This object describes the paid media to be sent. Currently, it can be one of\n - InputPaidMediaPhoto\n - InputPaidMediaVideo", + "html_description": "

This object describes the paid media to be sent. Currently, it can be one of

", + "rst_description": "This object describes the paid media to be sent. Currently, it can be one of\n\n - :class:`aiogram.types.input_paid_media_photo.InputPaidMediaPhoto`\n - :class:`aiogram.types.input_paid_media_video.InputPaidMediaVideo`", + "annotations": [], + "category": "types" + }, + { + "anchor": "inputpaidmediaphoto", + "name": "InputPaidMediaPhoto", + "description": "The paid media to send is a photo.", + "html_description": "

The paid media to send is a photo.

", + "rst_description": "The paid media to send is a photo.", + "annotations": [ + { + "type": "String", + "description": "Type of the media, must be photo", + "html_description": "Type of the media, must be photo", + "rst_description": "Type of the media, must be *photo*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "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. More information on Sending Files", + "html_description": "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://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "media", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "inputpaidmediavideo", + "name": "InputPaidMediaVideo", + "description": "The paid media to send is a video.", + "html_description": "

The paid media to send is a video.

", + "rst_description": "The paid media to send is a video.", + "annotations": [ + { + "type": "String", + "description": "Type of the media, must be video", + "html_description": "Type of the media, must be video", + "rst_description": "Type of the media, must be *video*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "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. More information on Sending Files", + "html_description": "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://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "media", + "required": true + }, + { + "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", + "html_description": "Optional. Video width", + "rst_description": "*Optional*. Video width\n", + "name": "width", + "required": false + }, + { + "type": "Integer", + "description": "Video height", + "html_description": "Optional. Video height", + "rst_description": "*Optional*. Video height\n", + "name": "height", + "required": false + }, + { + "type": "Integer", + "description": "Video duration in seconds", + "html_description": "Optional. Video duration in seconds", + "rst_description": "*Optional*. Video duration in seconds\n", + "name": "duration", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the uploaded video is suitable for streaming", + "html_description": "Optional. Pass True if the uploaded video is suitable for streaming", + "rst_description": "*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming\n", + "name": "supports_streaming", + "required": false + } + ], + "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." + }, + { + "title": "Available methods", + "anchor": "available-methods", + "children": [ + { + "anchor": "getme", + "name": "getMe", + "description": "A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.", + "html_description": "

A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.

", + "rst_description": "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.", + "annotations": [], + "category": "methods" + }, + { + "anchor": "logout", + "name": "logOut", + "description": "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 True on success. Requires no parameters.", + "html_description": "

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 True on success. Requires no parameters.

", + "rst_description": "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.", + "annotations": [], + "category": "methods" + }, + { + "anchor": "close", + "name": "close", + "description": "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 True on success. Requires no parameters.", + "html_description": "

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 True on success. Requires no parameters.

", + "rst_description": "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.", + "annotations": [], + "category": "methods" + }, + { + "anchor": "sendmessage", + "name": "sendMessage", + "description": "Use this method to send text messages. On success, the sent Message is returned.", + "html_description": "

Use this method to send text messages. On success, the sent Message is returned.

", + "rst_description": "Use this method to send text messages. 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", + "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": "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" + }, + { + "type": "LinkPreviewOptions", + "required": false, + "description": "Link preview generation options for the message", + "html_description": "Link preview generation options for the message", + "rst_description": "Link preview generation options for the message\n", + "name": "link_preview_options" + }, + { + "type": "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "forwardmessage", + "name": "forwardMessage", + "description": "Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent Message is returned.", + "html_description": "

Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent Message is returned.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": 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 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, + "description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)", + "html_description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)", + "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, + "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 forwarded message from forwarding and saving", + "html_description": "Protects the contents of the forwarded message from forwarding and saving", + "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, + "description": "Message identifier in the chat specified in from_chat_id", + "html_description": "Message identifier in the chat specified in from_chat_id", + "rst_description": "Message identifier in the chat specified in *from_chat_id*\n", + "name": "message_id" + } + ], + "category": "methods" + }, + { + "anchor": "forwardmessages", + "name": "forwardMessages", + "description": "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 MessageId of the sent messages is returned.", + "html_description": "

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 MessageId of the sent messages is returned.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": 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 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, + "description": "Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)", + "html_description": "Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)", + "rst_description": "Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)\n", + "name": "from_chat_id" + }, + { + "type": "Array of Integer", + "required": true, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "message_ids" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the messages silently. Users will receive a notification with no sound.", + "html_description": "Sends the messages silently. Users will receive a notification with no sound.", + "rst_description": "Sends the messages `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the forwarded messages from forwarding and saving", + "html_description": "Protects the contents of the forwarded messages from forwarding and saving", + "rst_description": "Protects the contents of the forwarded messages from forwarding and saving\n", + "name": "protect_content" + } + ], + "category": "methods" + }, + { + "anchor": "copymessage", + "name": "copyMessage", + "description": "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 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 forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.", + "html_description": "

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 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 forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": 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 or String", + "required": true, + "description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)", + "html_description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)", + "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": true, + "description": "Message identifier in the chat specified in from_chat_id", + "html_description": "Message identifier in the chat specified in from_chat_id", + "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, + "description": "New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept", + "html_description": "New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept", + "rst_description": "New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the new caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the new caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the new 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 new caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if the caption must be shown above the message media. Ignored if a new caption isn't specified.", + "html_description": "Pass True, if the caption must be shown above the message media. Ignored if a new caption isn't specified.", + "rst_description": "Pass :code:`True`, if the caption must be shown above the message media. Ignored if a new caption isn't specified.\n", + "name": "show_caption_above_media" + }, + { + "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": "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "copymessages", + "name": "copyMessages", + "description": "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 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 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 MessageId of the sent messages is returned.", + "html_description": "

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 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 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 MessageId of the sent messages is returned.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": 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 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, + "description": "Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)", + "html_description": "Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)", + "rst_description": "Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)\n", + "name": "from_chat_id" + }, + { + "type": "Array of Integer", + "required": true, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "message_ids" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the messages silently. Users will receive a notification with no sound.", + "html_description": "Sends the messages silently. Users will receive a notification with no sound.", + "rst_description": "Sends the messages `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent messages from forwarding and saving", + "html_description": "Protects the contents of the sent messages from forwarding and saving", + "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 copy the messages without their captions", + "html_description": "Pass True to copy the messages without their captions", + "rst_description": "Pass :code:`True` to copy the messages without their captions\n", + "name": "remove_caption" + } + ], + "category": "methods" + }, + { + "anchor": "sendphoto", + "name": "sendPhoto", + "description": "Use this method to send photos. On success, the sent Message is returned.", + "html_description": "

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

", + "rst_description": "Use this method to send photos. 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", + "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": "InputFile or String", + "required": true, + "description": "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. More information on Sending Files", + "html_description": "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. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "photo" + }, + { + "type": "String", + "required": false, + "description": "Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing", + "html_description": "Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing", + "rst_description": "Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the photo caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Pass True, if the caption must be shown above the message media", + "rst_description": "Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the photo needs to be covered with a spoiler animation", + "html_description": "Pass True if the photo needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the photo needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendaudio", + "name": "sendAudio", + "description": "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 Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.\nFor sending voice messages, use the sendVoice method instead.", + "html_description": "

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 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 sendVoice method instead.

", + "rst_description": "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.\nFor sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead.", + "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", + "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": "InputFile or String", + "required": true, + "description": "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. More information on Sending Files", + "html_description": "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. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "audio" + }, + { + "type": "String", + "required": false, + "description": "Audio caption, 0-1024 characters after entities parsing", + "html_description": "Audio caption, 0-1024 characters after entities parsing", + "rst_description": "Audio caption, 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the audio 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": "Integer", + "required": false, + "description": "Duration of the audio in seconds", + "html_description": "Duration of the audio in seconds", + "rst_description": "Duration of the audio in seconds\n", + "name": "duration" + }, + { + "type": "String", + "required": false, + "description": "Performer", + "html_description": "Performer", + "rst_description": "Performer\n", + "name": "performer" + }, + { + "type": "String", + "required": false, + "description": "Track name", + "html_description": "Track name", + "rst_description": "Track name\n", + "name": "title" + }, + { + "type": "InputFile or String", + "required": false, + "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": "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": "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": "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "senddocument", + "name": "sendDocument", + "description": "Use this method to send general files. On success, the sent 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.", + "html_description": "

Use this method to send general files. On success, the sent 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.

", + "rst_description": "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.", + "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", + "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": "InputFile or String", + "required": true, + "description": "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. More information on Sending Files", + "html_description": "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. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "document" + }, + { + "type": "InputFile or String", + "required": false, + "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": "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": "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": "String", + "required": false, + "description": "Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing", + "html_description": "Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing", + "rst_description": "Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the document caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Disables automatic server-side content type detection for files uploaded using multipart/form-data", + "html_description": "Disables automatic server-side content type detection for files uploaded using multipart/form-data", + "rst_description": "Disables automatic server-side content type detection for files uploaded using multipart/form-data\n", + "name": "disable_content_type_detection" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendvideo", + "name": "sendVideo", + "description": "Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.", + "html_description": "

Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.

", + "rst_description": "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.", + "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", + "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": "InputFile or String", + "required": true, + "description": "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. More information on Sending Files", + "html_description": "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. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "video" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of sent video in seconds", + "html_description": "Duration of sent video in seconds", + "rst_description": "Duration of sent video in seconds\n", + "name": "duration" + }, + { + "type": "Integer", + "required": false, + "description": "Video width", + "html_description": "Video width", + "rst_description": "Video width\n", + "name": "width" + }, + { + "type": "Integer", + "required": false, + "description": "Video height", + "html_description": "Video height", + "rst_description": "Video height\n", + "name": "height" + }, + { + "type": "InputFile or String", + "required": false, + "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": "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": "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, + "description": "Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing", + "html_description": "Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing", + "rst_description": "Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the video caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Pass True, if the caption must be shown above the message media", + "rst_description": "Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the video needs to be covered with a spoiler animation", + "html_description": "Pass True if the video needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the video needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the uploaded video is suitable for streaming", + "html_description": "Pass True if the uploaded video is suitable for streaming", + "rst_description": "Pass :code:`True` if the uploaded video is suitable for streaming\n", + "name": "supports_streaming" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendanimation", + "name": "sendAnimation", + "description": "Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.", + "html_description": "

Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.

", + "rst_description": "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.", + "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", + "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": "InputFile or String", + "required": true, + "description": "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. More information on Sending Files", + "html_description": "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. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "animation" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of sent animation in seconds", + "html_description": "Duration of sent animation in seconds", + "rst_description": "Duration of sent animation in seconds\n", + "name": "duration" + }, + { + "type": "Integer", + "required": false, + "description": "Animation width", + "html_description": "Animation width", + "rst_description": "Animation width\n", + "name": "width" + }, + { + "type": "Integer", + "required": false, + "description": "Animation height", + "html_description": "Animation height", + "rst_description": "Animation height\n", + "name": "height" + }, + { + "type": "InputFile or String", + "required": false, + "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": "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": "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": "String", + "required": false, + "description": "Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing", + "html_description": "Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing", + "rst_description": "Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the animation caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the animation caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the animation caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Pass True, if the caption must be shown above the message media", + "rst_description": "Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the animation needs to be covered with a spoiler animation", + "html_description": "Pass True if the animation needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the animation needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendvoice", + "name": "sendVoice", + "description": "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 Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.", + "html_description": "

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 Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.

", + "rst_description": "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.", + "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", + "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": "InputFile or String", + "required": true, + "description": "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. More information on Sending Files", + "html_description": "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. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "voice" + }, + { + "type": "String", + "required": false, + "description": "Voice message caption, 0-1024 characters after entities parsing", + "html_description": "Voice message caption, 0-1024 characters after entities parsing", + "rst_description": "Voice message caption, 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the voice message caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the voice message caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of the voice message in seconds", + "html_description": "Duration of the voice message in seconds", + "rst_description": "Duration of the voice message in seconds\n", + "name": "duration" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendvideonote", + "name": "sendVideoNote", + "description": "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 Message is returned.", + "html_description": "

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 Message is returned.

", + "rst_description": "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.", + "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", + "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": "InputFile or String", + "required": true, + "description": "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. More information on Sending Files. Sending video notes by a URL is currently unsupported", + "html_description": "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. More information on Sending Files ». Sending video notes by a URL is currently unsupported", + "rst_description": "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\n", + "name": "video_note" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of sent video in seconds", + "html_description": "Duration of sent video in seconds", + "rst_description": "Duration of sent video in seconds\n", + "name": "duration" + }, + { + "type": "Integer", + "required": false, + "description": "Video width and height, i.e. diameter of the video message", + "html_description": "Video width and height, i.e. diameter of the video message", + "rst_description": "Video width and height, i.e. diameter of the video message\n", + "name": "length" + }, + { + "type": "InputFile or String", + "required": false, + "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": "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": "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": "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendpaidmedia", + "name": "sendPaidMedia", + "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). 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; 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" + }, + { + "type": "Array of InputPaidMedia", + "required": true, + "description": "A JSON-serialized array describing the media to be sent; up to 10 items", + "html_description": "A JSON-serialized array describing the media to be sent; up to 10 items", + "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, + "description": "Media caption, 0-1024 characters after entities parsing", + "html_description": "Media caption, 0-1024 characters after entities parsing", + "rst_description": "Media caption, 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the media caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the media caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the media caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Pass True, if the caption must be shown above the message media", + "rst_description": "Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media" + }, + { + "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": "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "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 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", + "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", + "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 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, + "description": "A JSON-serialized array describing messages to be sent, must include 2-10 items", + "html_description": "A JSON-serialized array describing messages to be sent, must include 2-10 items", + "rst_description": "A JSON-serialized array describing messages to be sent, must include 2-10 items\n", + "name": "media" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends messages silently. Users will receive a notification with no sound.", + "html_description": "Sends messages silently. Users will receive a notification with no sound.", + "rst_description": "Sends messages `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent messages from forwarding and saving", + "html_description": "Protects the contents of the sent messages from forwarding and saving", + "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, + "description": "Unique identifier of the message effect to be added to the message; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", + "name": "message_effect_id" + }, + { + "type": "ReplyParameters", + "required": false, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + } + ], + "category": "methods" + }, + { + "anchor": "sendlocation", + "name": "sendLocation", + "description": "Use this method to send point on the map. On success, the sent Message is returned.", + "html_description": "

Use this method to send point on the map. On success, the sent Message is returned.

", + "rst_description": "Use this method to send point on the map. 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", + "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": "Float", + "required": true, + "description": "Latitude of the location", + "html_description": "Latitude of the location", + "rst_description": "Latitude of the location\n", + "name": "latitude" + }, + { + "type": "Float", + "required": true, + "description": "Longitude of the location", + "html_description": "Longitude of the location", + "rst_description": "Longitude of the location\n", + "name": "longitude" + }, + { + "type": "Float", + "required": false, + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy" + }, + { + "type": "Integer", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "live_period" + }, + { + "type": "Integer", + "required": false, + "description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "html_description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "rst_description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", + "name": "heading" + }, + { + "type": "Integer", + "required": false, + "description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "html_description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "rst_description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.\n", + "name": "proximity_alert_radius" + }, + { + "type": "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendvenue", + "name": "sendVenue", + "description": "Use this method to send information about a venue. On success, the sent Message is returned.", + "html_description": "

Use this method to send information about a venue. On success, the sent Message is returned.

", + "rst_description": "Use this method to send information about a venue. 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", + "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": "Float", + "required": true, + "description": "Latitude of the venue", + "html_description": "Latitude of the venue", + "rst_description": "Latitude of the venue\n", + "name": "latitude" + }, + { + "type": "Float", + "required": true, + "description": "Longitude of the venue", + "html_description": "Longitude of the venue", + "rst_description": "Longitude of the venue\n", + "name": "longitude" + }, + { + "type": "String", + "required": true, + "description": "Name of the venue", + "html_description": "Name of the venue", + "rst_description": "Name of the venue\n", + "name": "title" + }, + { + "type": "String", + "required": true, + "description": "Address of the venue", + "html_description": "Address of the venue", + "rst_description": "Address of the venue\n", + "name": "address" + }, + { + "type": "String", + "required": false, + "description": "Foursquare identifier of the venue", + "html_description": "Foursquare identifier of the venue", + "rst_description": "Foursquare identifier of the venue\n", + "name": "foursquare_id" + }, + { + "type": "String", + "required": false, + "description": "Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)", + "html_description": "Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)", + "rst_description": "Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)\n", + "name": "foursquare_type" + }, + { + "type": "String", + "required": false, + "description": "Google Places identifier of the venue", + "html_description": "Google Places identifier of the venue", + "rst_description": "Google Places identifier of the venue\n", + "name": "google_place_id" + }, + { + "type": "String", + "required": false, + "description": "Google Places type of the venue. (See supported types.)", + "html_description": "Google Places type of the venue. (See supported types.)", + "rst_description": "Google Places type of the venue. (See `supported types `_.)\n", + "name": "google_place_type" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendcontact", + "name": "sendContact", + "description": "Use this method to send phone contacts. On success, the sent Message is returned.", + "html_description": "

Use this method to send phone contacts. On success, the sent Message is returned.

", + "rst_description": "Use this method to send phone contacts. 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", + "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": "String", + "required": true, + "description": "Contact's phone number", + "html_description": "Contact's phone number", + "rst_description": "Contact's phone number\n", + "name": "phone_number" + }, + { + "type": "String", + "required": true, + "description": "Contact's first name", + "html_description": "Contact's first name", + "rst_description": "Contact's first name\n", + "name": "first_name" + }, + { + "type": "String", + "required": false, + "description": "Contact's last name", + "html_description": "Contact's last name", + "rst_description": "Contact's last name\n", + "name": "last_name" + }, + { + "type": "String", + "required": false, + "description": "Additional data about the contact in the form of a vCard, 0-2048 bytes", + "html_description": "Additional data about the contact in the form of a vCard, 0-2048 bytes", + "rst_description": "Additional data about the contact in the form of a `vCard `_, 0-2048 bytes\n", + "name": "vcard" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendpoll", + "name": "sendPoll", + "description": "Use this method to send a native poll. On success, the sent Message is returned.", + "html_description": "

Use this method to send a native poll. On success, the sent Message is returned.

", + "rst_description": "Use this method to send a native poll. 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). 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 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": "String", + "required": true, + "description": "Poll question, 1-300 characters", + "html_description": "Poll question, 1-300 characters", + "rst_description": "Poll question, 1-300 characters\n", + "name": "question" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the question. See formatting options for more details. Currently, only custom emoji entities are allowed", + "html_description": "Mode for parsing entities in the question. See formatting options for more details. Currently, only custom emoji entities are allowed", + "rst_description": "Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed\n", + "name": "question_parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of question_parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of question_parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode*\n", + "name": "question_entities" + }, + { + "type": "Array of InputPollOption", + "required": true, + "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" + }, + { + "type": "Boolean", + "required": false, + "description": "True, if the poll needs to be anonymous, defaults to True", + "html_description": "True, if the poll needs to be anonymous, defaults to True", + "rst_description": ":code:`True`, if the poll needs to be anonymous, defaults to :code:`True`\n", + "name": "is_anonymous" + }, + { + "type": "String", + "required": false, + "description": "Poll type, 'quiz' or 'regular', defaults to 'regular'", + "html_description": "Poll type, “quiz” or “regular”, defaults to “regular”", + "rst_description": "Poll type, 'quiz' or 'regular', defaults to 'regular'\n", + "name": "type" + }, + { + "type": "Boolean", + "required": false, + "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": "Boolean", + "required": false, + "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", + "required": false, + "description": "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", + "html_description": "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", + "rst_description": "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\n", + "name": "explanation" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the explanation. See formatting options for more details.", + "html_description": "Mode for parsing entities in the explanation. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the explanation. See `formatting options `_ for more details.\n", + "name": "explanation_parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of explanation_parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of explanation_parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode*\n", + "name": "explanation_entities" + }, + { + "type": "Integer", + "required": false, + "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 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" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the poll needs to be immediately closed. This can be useful for poll preview.", + "html_description": "Pass True if the poll needs to be immediately closed. This can be useful for poll preview.", + "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, + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", + "name": "message_effect_id" + }, + { + "type": "ReplyParameters", + "required": false, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "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", + "description": "Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.", + "html_description": "

Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.

", + "rst_description": "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.", + "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", + "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": "String", + "required": false, + "description": "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 ''", + "html_description": "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 “\"🎲\"/”", + "rst_description": "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 '🎲'\n", + "name": "emoji" + }, + { + "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", + "html_description": "Protects the contents of the sent message from forwarding", + "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, + "description": "Unique identifier of the message effect to be added to the message; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "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", + "description": "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 True on success.\nExample: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please wait…', the bot may use sendChatAction with action = upload_photo. The user will see a 'sending photo' status for the bot.\nWe only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.", + "html_description": "

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 True on success.

\n

Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of “Retrieving image, please wait…”, the bot may use sendChatAction with action = upload_photo. The user will see a “sending photo” status for the bot.

\n

We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.

", + "rst_description": "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.\n\n Example: The `ImageBot `_ needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please wait…', the bot may use :class:`aiogram.methods.send_chat_action.SendChatAction` with *action* = *upload_photo*. The user will see a 'sending photo' status for the bot.\n\nWe only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "Unique identifier of the business connection on behalf of which the action will be sent", + "html_description": "Unique identifier of the business connection on behalf of which the action will be sent", + "rst_description": "Unique identifier of the business connection on behalf of which the action 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 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 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" + }, + { + "type": "String", + "required": true, + "description": "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.", + "html_description": "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.", + "rst_description": "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 `_.\n", + "name": "action" + } + ], + "category": "methods" + }, + { + "anchor": "setmessagereaction", + "name": "setMessageReaction", + "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", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "message_id" + }, + { + "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. 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" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to set the reaction with a big animation", + "html_description": "Pass True to set the reaction with a big animation", + "rst_description": "Pass :code:`True` to set the reaction with a big animation\n", + "name": "is_big" + } + ], + "category": "methods" + }, + { + "anchor": "getuserprofilephotos", + "name": "getUserProfilePhotos", + "description": "Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.", + "html_description": "

Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.

", + "rst_description": "Use this method to get a list of profile pictures for a user. Returns a :class:`aiogram.types.user_profile_photos.UserProfilePhotos` 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 photo to be returned. By default, all photos are returned.", + "html_description": "Sequential number of the first photo to be returned. By default, all photos are returned.", + "rst_description": "Sequential number of the first photo to be returned. By default, all photos are returned.\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "html_description": "Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "rst_description": "Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.\n", + "name": "limit" + } + ], + "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", + "description": "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 File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot/, where 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 getFile again.\nNote: This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.", + "html_description": "

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 File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> 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 getFile again.

Note: This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.

", + "rst_description": "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.\n**Note:** This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier to get information about", + "html_description": "File identifier to get information about", + "rst_description": "File identifier to get information about\n", + "name": "file_id" + } + ], + "category": "methods" + }, + { + "anchor": "banchatmember", + "name": "banChatMember", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)\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": "Integer", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "until_date" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels.", + "html_description": "Pass True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels.", + "rst_description": "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.\n", + "name": "revoke_messages" + } + ], + "category": "methods" + }, + { + "anchor": "unbanchatmember", + "name": "unbanChatMember", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)\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": "Boolean", + "required": false, + "description": "Do nothing if the user is not banned", + "html_description": "Do nothing if the user is not banned", + "rst_description": "Do nothing if the user is not banned\n", + "name": "only_if_banned" + } + ], + "category": "methods" + }, + { + "anchor": "restrictchatmember", + "name": "restrictChatMember", + "description": "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 True for all permissions to lift restrictions from a user. Returns True on success.", + "html_description": "

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 True for all permissions to lift restrictions from a user. Returns True on success.

", + "rst_description": "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.", + "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": "ChatPermissions", + "required": true, + "description": "A JSON-serialized object for new user permissions", + "html_description": "A JSON-serialized object for new user permissions", + "rst_description": "A JSON-serialized object for new user permissions\n", + "name": "permissions" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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.", + "html_description": "Pass 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.", + "rst_description": "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.\n", + "name": "use_independent_chat_permissions" + }, + { + "type": "Integer", + "required": false, + "description": "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", + "html_description": "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", + "rst_description": "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\n", + "name": "until_date" + } + ], + "category": "methods" + }, + { + "anchor": "promotechatmember", + "name": "promoteChatMember", + "description": "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 False for all boolean parameters to demote a user. Returns True on success.", + "html_description": "

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 False for all boolean parameters to demote a user. Returns True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "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": "Boolean", + "required": false, + "description": "Pass True if the administrator's presence in the chat is hidden", + "html_description": "Pass True if the administrator's presence in the chat is hidden", + "rst_description": "Pass :code:`True` if the administrator's presence in the chat is hidden\n", + "name": "is_anonymous" + }, + { + "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, 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" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can delete messages of other users", + "html_description": "Pass True if the administrator can delete messages of other users", + "rst_description": "Pass :code:`True` if the administrator can delete messages of other users\n", + "name": "can_delete_messages" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can manage video chats", + "html_description": "Pass True if the administrator can manage video chats", + "rst_description": "Pass :code:`True` if the administrator can manage video chats\n", + "name": "can_manage_video_chats" + }, + { + "type": "Boolean", + "required": false, + "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" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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)", + "html_description": "Pass 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)", + "rst_description": "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)\n", + "name": "can_promote_members" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can change chat title, photo and other settings", + "html_description": "Pass True if the administrator can change chat title, photo and other settings", + "rst_description": "Pass :code:`True` if the administrator can change chat title, photo and other settings\n", + "name": "can_change_info" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can invite new users to the chat", + "html_description": "Pass True if the administrator can invite new users to the chat", + "rst_description": "Pass :code:`True` if the administrator can invite new users to the chat\n", + "name": "can_invite_users" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can post stories to the chat", + "html_description": "Pass True if the administrator can post stories to the chat", + "rst_description": "Pass :code:`True` if the administrator can post stories to the chat\n", + "name": "can_post_stories" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "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\n", + "name": "can_edit_stories" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can delete stories posted by other users", + "html_description": "Pass True if the administrator can delete stories posted by other users", + "rst_description": "Pass :code:`True` if the administrator can delete stories posted by other users\n", + "name": "can_delete_stories" + }, + { + "type": "Boolean", + "required": false, + "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" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can edit messages of other users and can pin messages; for channels only", + "html_description": "Pass True if the administrator can edit messages of other users and can pin messages; for channels only", + "rst_description": "Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only\n", + "name": "can_edit_messages" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can pin messages; for supergroups only", + "html_description": "Pass True if the administrator can pin messages; for supergroups only", + "rst_description": "Pass :code:`True` if the administrator can pin messages; for supergroups only\n", + "name": "can_pin_messages" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only", + "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" + }, + { + "anchor": "setchatadministratorcustomtitle", + "name": "setChatAdministratorCustomTitle", + "description": "Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.", + "html_description": "

Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.

", + "rst_description": "Use this method to set a custom title for an administrator in a supergroup promoted 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 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": true, + "description": "New custom title for the administrator; 0-16 characters, emoji are not allowed", + "html_description": "New custom title for the administrator; 0-16 characters, emoji are not allowed", + "rst_description": "New custom title for the administrator; 0-16 characters, emoji are not allowed\n", + "name": "custom_title" + } + ], + "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", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target sender chat", + "html_description": "Unique identifier of the target sender chat", + "rst_description": "Unique identifier of the target sender chat\n", + "name": "sender_chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "unbanchatsenderchat", + "name": "unbanChatSenderChat", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target sender chat", + "html_description": "Unique identifier of the target sender chat", + "rst_description": "Unique identifier of the target sender chat\n", + "name": "sender_chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "setchatpermissions", + "name": "setChatPermissions", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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": "ChatPermissions", + "required": true, + "description": "A JSON-serialized object for new default chat permissions", + "html_description": "A JSON-serialized object for new default chat permissions", + "rst_description": "A JSON-serialized object for new default chat permissions\n", + "name": "permissions" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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.", + "html_description": "Pass 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.", + "rst_description": "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.\n", + "name": "use_independent_chat_permissions" + } + ], + "category": "methods" + }, + { + "anchor": "exportchatinvitelink", + "name": "exportChatInviteLink", + "description": "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.\nNote: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again.", + "html_description": "

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.

\n

Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again.

\n
", + "rst_description": "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.\n\n Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again.", + "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": "createchatinvitelink", + "name": "createChatInviteLink", + "description": "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 revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.", + "html_description": "

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 revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.

", + "rst_description": "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.", + "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": 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": false, + "description": "Point in time (Unix timestamp) when the link will expire", + "html_description": "Point in time (Unix timestamp) when the link will expire", + "rst_description": "Point in time (Unix timestamp) when the link will expire\n", + "name": "expire_date" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "html_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "rst_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999\n", + "name": "member_limit" + }, + { + "type": "Boolean", + "required": false, + "description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified", + "html_description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified", + "rst_description": ":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\n", + "name": "creates_join_request" + } + ], + "category": "methods" + }, + { + "anchor": "editchatinvitelink", + "name": "editChatInviteLink", + "description": "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 ChatInviteLink object.", + "html_description": "

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 ChatInviteLink object.

", + "rst_description": "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.", + "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" + }, + { + "type": "Integer", + "required": false, + "description": "Point in time (Unix timestamp) when the link will expire", + "html_description": "Point in time (Unix timestamp) when the link will expire", + "rst_description": "Point in time (Unix timestamp) when the link will expire\n", + "name": "expire_date" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "html_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "rst_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999\n", + "name": "member_limit" + }, + { + "type": "Boolean", + "required": false, + "description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified", + "html_description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified", + "rst_description": ":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\n", + "name": "creates_join_request" + } + ], + "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", + "description": "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 ChatInviteLink object.", + "html_description": "

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 ChatInviteLink object.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier of the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier of the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier of 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 revoke", + "html_description": "The invite link to revoke", + "rst_description": "The invite link to revoke\n", + "name": "invite_link" + } + ], + "category": "methods" + }, + { + "anchor": "approvechatjoinrequest", + "name": "approveChatJoinRequest", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "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": "declinechatjoinrequest", + "name": "declineChatJoinRequest", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "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": "setchatphoto", + "name": "setChatPhoto", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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": "InputFile", + "required": true, + "description": "New chat photo, uploaded using multipart/form-data", + "html_description": "New chat photo, uploaded using multipart/form-data", + "rst_description": "New chat photo, uploaded using multipart/form-data\n", + "name": "photo" + } + ], + "category": "methods" + }, + { + "anchor": "deletechatphoto", + "name": "deleteChatPhoto", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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": "setchattitle", + "name": "setChatTitle", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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": "New chat title, 1-128 characters", + "html_description": "New chat title, 1-128 characters", + "rst_description": "New chat title, 1-128 characters\n", + "name": "title" + } + ], + "category": "methods" + }, + { + "anchor": "setchatdescription", + "name": "setChatDescription", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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": false, + "description": "New chat description, 0-255 characters", + "html_description": "New chat description, 0-255 characters", + "rst_description": "New chat description, 0-255 characters\n", + "name": "description" + } + ], + "category": "methods" + }, + { + "anchor": "pinchatmessage", + "name": "pinChatMessage", + "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, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Identifier of a message to pin", + "html_description": "Identifier of a message to pin", + "rst_description": "Identifier of a message to pin\n", + "name": "message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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.", + "html_description": "Pass 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.", + "rst_description": "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.\n", + "name": "disable_notification" + } + ], + "category": "methods" + }, + { + "anchor": "unpinchatmessage", + "name": "unpinChatMessage", + "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, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "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" + } + ], + "category": "methods" + }, + { + "anchor": "unpinallchatmessages", + "name": "unpinAllChatMessages", + "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", + "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": "leavechat", + "name": "leaveChat", + "description": "Use this method for your bot to leave a group, supergroup or channel. Returns True on success.", + "html_description": "

Use this method for your bot to leave a group, supergroup or channel. Returns True on success.

", + "rst_description": "Use this method for your bot to leave a group, supergroup or channel. 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 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" + } + ], + "category": "methods" + }, + { + "anchor": "getchat", + "name": "getChat", + "description": "Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success.", + "html_description": "

Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success.

", + "rst_description": "Use this method to get up-to-date information about the chat. Returns a :class:`aiogram.types.chat_full_info.ChatFullInfo` object on success.", + "annotations": [ + { + "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", + "name": "chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "getchatadministrators", + "name": "getChatAdministrators", + "description": "Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects.", + "html_description": "

Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects.

", + "rst_description": "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.", + "annotations": [ + { + "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", + "name": "chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "getchatmembercount", + "name": "getChatMemberCount", + "description": "Use this method to get the number of members in a chat. Returns Int on success.", + "html_description": "

Use this method to get the number of members in a chat. Returns Int on success.

", + "rst_description": "Use this method to get the number of members in a chat. Returns *Int* on success.", + "annotations": [ + { + "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", + "name": "chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "getchatmember", + "name": "getChatMember", + "description": "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 ChatMember object on success.", + "html_description": "

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 ChatMember object on success.

", + "rst_description": "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.", + "annotations": [ + { + "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", + "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" + } + ], + "category": "methods" + }, + { + "anchor": "setchatstickerset", + "name": "setChatStickerSet", + "description": "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 getChat requests to check if the bot can use this method. Returns True on success.", + "html_description": "

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 getChat requests to check if the bot can use this method. Returns True on success.

", + "rst_description": "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.", + "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": "String", + "required": true, + "description": "Name of the sticker set to be set as the group sticker set", + "html_description": "Name of the sticker set to be set as the group sticker set", + "rst_description": "Name of the sticker set to be set as the group sticker set\n", + "name": "sticker_set_name" + } + ], + "category": "methods" + }, + { + "anchor": "deletechatstickerset", + "name": "deleteChatStickerSet", + "description": "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 getChat requests to check if the bot can use this method. Returns True on success.", + "html_description": "

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 getChat requests to check if the bot can use this method. Returns True on success.

", + "rst_description": "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.", + "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" + } + ], + "category": "methods" + }, + { + "anchor": "getforumtopiciconstickers", + "name": "getForumTopicIconStickers", + "description": "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 Sticker objects.", + "html_description": "

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 Sticker objects.

", + "rst_description": "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.", + "annotations": [], + "category": "methods" + }, + { + "anchor": "createforumtopic", + "name": "createForumTopic", + "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", + "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": "String", + "required": true, + "description": "Topic name, 1-128 characters", + "html_description": "Topic name, 1-128 characters", + "rst_description": "Topic name, 1-128 characters\n", + "name": "name" + }, + { + "type": "Integer", + "required": false, + "description": "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)", + "html_description": "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)", + "rst_description": "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)\n", + "name": "icon_color" + }, + { + "type": "String", + "required": false, + "description": "Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.", + "html_description": "Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.", + "rst_description": "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.\n", + "name": "icon_custom_emoji_id" + } + ], + "category": "methods" + }, + { + "anchor": "editforumtopic", + "name": "editForumTopic", + "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", + "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 for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + }, + { + "type": "String", + "required": false, + "description": "New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept", + "html_description": "New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept", + "rst_description": "New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept\n", + "name": "name" + }, + { + "type": "String", + "required": false, + "description": "New unique identifier of the custom emoji shown as the topic icon. Use 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", + "html_description": "New unique identifier of the custom emoji shown as the topic icon. Use 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", + "rst_description": "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\n", + "name": "icon_custom_emoji_id" + } + ], + "category": "methods" + }, + { + "anchor": "closeforumtopic", + "name": "closeForumTopic", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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 for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + } + ], + "category": "methods" + }, + { + "anchor": "reopenforumtopic", + "name": "reopenForumTopic", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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 for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + } + ], + "category": "methods" + }, + { + "anchor": "deleteforumtopic", + "name": "deleteForumTopic", + "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", + "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 for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + } + ], + "category": "methods" + }, + { + "anchor": "unpinallforumtopicmessages", + "name": "unpinAllForumTopicMessages", + "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", + "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 for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + } + ], + "category": "methods" + }, + { + "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 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", + "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": "String", + "required": true, + "description": "New topic name, 1-128 characters", + "html_description": "New topic name, 1-128 characters", + "rst_description": "New topic name, 1-128 characters\n", + "name": "name" + } + ], + "category": "methods" + }, + { + "anchor": "closegeneralforumtopic", + "name": "closeGeneralForumTopic", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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" + } + ], + "category": "methods" + }, + { + "anchor": "reopengeneralforumtopic", + "name": "reopenGeneralForumTopic", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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" + } + ], + "category": "methods" + }, + { + "anchor": "hidegeneralforumtopic", + "name": "hideGeneralForumTopic", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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" + } + ], + "category": "methods" + }, + { + "anchor": "unhidegeneralforumtopic", + "name": "unhideGeneralForumTopic", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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" + } + ], + "category": "methods" + }, + { + "anchor": "unpinallgeneralforumtopicmessages", + "name": "unpinAllGeneralForumTopicMessages", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "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" + } + ], + "category": "methods" + }, + { + "anchor": "answercallbackquery", + "name": "answerCallbackQuery", + "description": "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, True is returned.\nAlternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.", + "html_description": "

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, True is returned.

\n

Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.

\n
", + "rst_description": "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.\n\n Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@BotFather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter.", + "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": "callback_query_id" + }, + { + "type": "String", + "required": false, + "description": "Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters", + "html_description": "Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters", + "rst_description": "Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters\n", + "name": "text" + }, + { + "type": "Boolean", + "required": false, + "description": "If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.", + "html_description": "If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.", + "rst_description": "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*.\n", + "name": "show_alert" + }, + { + "type": "String", + "required": false, + "description": "URL that will be opened by the user's client. If you have created a 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 callback_game button.\n\nOtherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.", + "html_description": "URL that will be opened by the user's client. If you have created a 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 callback_game button.
\n
\nOtherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.", + "rst_description": "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.\n\n\n\nOtherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter.\n", + "name": "url" + }, + { + "type": "Integer", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "cache_time" + } + ], + "category": "methods" + }, + { + "anchor": "getuserchatboosts", + "name": "getUserChatBoosts", + "description": "Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object.", + "html_description": "

Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the chat or username of the channel (in the format @channelusername)", + "html_description": "Unique identifier for the chat or username of the channel (in the format @channelusername)", + "rst_description": "Unique identifier for the chat or username of the channel (in the format :code:`@channelusername`)\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" + } + ], + "category": "methods" + }, + { + "anchor": "getbusinessconnection", + "name": "getBusinessConnection", + "description": "Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.", + "html_description": "

Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.

", + "rst_description": "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.", + "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": "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", + "description": "Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success.", + "html_description": "

Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Array of BotCommand", + "required": true, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "commands" + }, + { + "type": "BotCommandScope", + "required": false, + "description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "html_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "rst_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.\n", + "name": "scope" + }, + { + "type": "String", + "required": false, + "description": "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", + "html_description": "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", + "rst_description": "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\n", + "name": "language_code" + } + ], + "category": "methods" + }, + { + "anchor": "deletemycommands", + "name": "deleteMyCommands", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "BotCommandScope", + "required": false, + "description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "html_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "rst_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.\n", + "name": "scope" + }, + { + "type": "String", + "required": false, + "description": "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", + "html_description": "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", + "rst_description": "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\n", + "name": "language_code" + } + ], + "category": "methods" + }, + { + "anchor": "getmycommands", + "name": "getMyCommands", + "description": "Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned.", + "html_description": "

Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned.

", + "rst_description": "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.", + "annotations": [ + { + "type": "BotCommandScope", + "required": false, + "description": "A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.", + "html_description": "A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.", + "rst_description": "A JSON-serialized object, describing scope of users. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.\n", + "name": "scope" + }, + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code or an empty string", + "html_description": "A two-letter ISO 639-1 language code or an empty string", + "rst_description": "A two-letter ISO 639-1 language code or an empty string\n", + "name": "language_code" + } + ], + "category": "methods" + }, + { + "anchor": "setmyname", + "name": "setMyName", + "description": "Use this method to change the bot's name. Returns True on success.", + "html_description": "

Use this method to change the bot's name. Returns True on success.

", + "rst_description": "Use this method to change the bot's name. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language.", + "html_description": "New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language.", + "rst_description": "New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language.\n", + "name": "name" + }, + { + "type": "String", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "language_code" + } + ], + "category": "methods" + }, + { + "anchor": "getmyname", + "name": "getMyName", + "description": "Use this method to get the current bot name for the given user language. Returns BotName on success.", + "html_description": "

Use this method to get the current bot name for the given user language. Returns BotName on success.

", + "rst_description": "Use this method to get the current bot name for the given user language. Returns :class:`aiogram.types.bot_name.BotName` on success.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code or an empty string", + "html_description": "A two-letter ISO 639-1 language code or an empty string", + "rst_description": "A two-letter ISO 639-1 language code or an empty string\n", + "name": "language_code" + } + ], + "category": "methods" + }, + { + "anchor": "setmydescription", + "name": "setMyDescription", + "description": "Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success.", + "html_description": "

Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.", + "html_description": "New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.", + "rst_description": "New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.\n", + "name": "description" + }, + { + "type": "String", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "language_code" + } + ], + "category": "methods" + }, + { + "anchor": "getmydescription", + "name": "getMyDescription", + "description": "Use this method to get the current bot description for the given user language. Returns BotDescription on success.", + "html_description": "

Use this method to get the current bot description for the given user language. Returns BotDescription on success.

", + "rst_description": "Use this method to get the current bot description for the given user language. Returns :class:`aiogram.types.bot_description.BotDescription` on success.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code or an empty string", + "html_description": "A two-letter ISO 639-1 language code or an empty string", + "rst_description": "A two-letter ISO 639-1 language code or an empty string\n", + "name": "language_code" + } + ], + "category": "methods" + }, + { + "anchor": "setmyshortdescription", + "name": "setMyShortDescription", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.", + "html_description": "New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.", + "rst_description": "New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.\n", + "name": "short_description" + }, + { + "type": "String", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "language_code" + } + ], + "category": "methods" + }, + { + "anchor": "getmyshortdescription", + "name": "getMyShortDescription", + "description": "Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.", + "html_description": "

Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code or an empty string", + "html_description": "A two-letter ISO 639-1 language code or an empty string", + "rst_description": "A two-letter ISO 639-1 language code or an empty string\n", + "name": "language_code" + } + ], + "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", + "description": "Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.", + "html_description": "

Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.

", + "rst_description": "Use this method to change the bot's menu button in a private chat, or the default menu button. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be changed", + "html_description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be changed", + "rst_description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be changed\n", + "name": "chat_id" + }, + { + "type": "MenuButton", + "required": false, + "description": "A JSON-serialized object for the bot's new menu button. Defaults to MenuButtonDefault", + "html_description": "A JSON-serialized object for the bot's new menu button. Defaults to MenuButtonDefault", + "rst_description": "A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault`\n", + "name": "menu_button" + } + ], + "category": "methods" + }, + { + "anchor": "getchatmenubutton", + "name": "getChatMenuButton", + "description": "Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.", + "html_description": "

Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be returned", + "html_description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be returned", + "rst_description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be returned\n", + "name": "chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "setmydefaultadministratorrights", + "name": "setMyDefaultAdministratorRights", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "ChatAdministratorRights", + "required": false, + "description": "A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.", + "html_description": "A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.", + "rst_description": "A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.\n", + "name": "rights" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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.", + "html_description": "Pass 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.", + "rst_description": "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.\n", + "name": "for_channels" + } + ], + "category": "methods" + }, + { + "anchor": "getmydefaultadministratorrights", + "name": "getMyDefaultAdministratorRights", + "description": "Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.", + "html_description": "

Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.

", + "rst_description": "Use this method to get the current default administrator rights of the bot. Returns :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` on success.", + "annotations": [ + { + "type": "Boolean", + "required": false, + "description": "Pass 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.", + "html_description": "Pass 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.", + "rst_description": "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.\n", + "name": "for_channels" + } + ], + "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." + }, + { + "title": "Updating messages", + "anchor": "updating-messages", + "children": [ + { + "anchor": "editmessagetext", + "name": "editMessageText", + "description": "Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", + "html_description": "

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.

", + "rst_description": "Use this method to stop a poll which was sent by the bot. On success, the stopped :class:`aiogram.types.poll.Poll` is returned.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "html_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Identifier of the original message with the poll", + "html_description": "Identifier of the original message with the poll", + "rst_description": "Identifier of the original message with the poll\n", + "name": "message_id" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new message inline keyboard.", + "html_description": "A JSON-serialized object for a new message inline keyboard.", + "rst_description": "A JSON-serialized object for a new message `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "approvesuggestedpost", + "name": "approveSuggestedPost", + "description": "Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns True on success.", + "html_description": "

Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns True on success.

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

Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns True on success.

", + "rst_description": "Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target direct messages chat", + "html_description": "Unique identifier for the target direct messages chat", + "rst_description": "Unique identifier for the target direct messages chat\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Identifier of a suggested post message to decline", + "html_description": "Identifier of a suggested post message to decline", + "rst_description": "Identifier of a suggested post message to decline\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Comment for the creator of the suggested post; 0-128 characters", + "html_description": "Comment for the creator of the suggested post; 0-128 characters", + "rst_description": "Comment for the creator of the suggested post; 0-128 characters\n", + "name": "comment" + } + ], + "category": "methods" + }, + { + "anchor": "deletemessage", + "name": "deleteMessage", + "description": "Use this method to delete a message, including service messages, with the following limitations:\n- A message can only be deleted if it was sent less than 48 hours ago.\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.\n- Bots can delete outgoing messages in private chats, groups, and supergroups.\n- Bots can delete incoming messages in private chats.\n- Bots granted can_post_messages permissions can delete outgoing messages in channels.\n- If the bot is an administrator of a group, it can delete any message there.\n- If the bot has can_delete_messages administrator right in a supergroup or a channel, it can delete any message there.\n- If the bot has can_manage_direct_messages administrator right in a channel, it can delete any message in the corresponding direct messages chat.\nReturns True on success.", + "html_description": "

Use this method to delete a message, including service messages, with the following limitations:
\n- A message can only be deleted if it was sent less than 48 hours ago.
\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.
\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.
\n- Bots can delete outgoing messages in private chats, groups, and supergroups.
\n- Bots can delete incoming messages in private chats.
\n- Bots granted can_post_messages permissions can delete outgoing messages in channels.
\n- If the bot is an administrator of a group, it can delete any message there.
\n- If the bot has can_delete_messages administrator right in a supergroup or a channel, it can delete any message there.
\n- If the bot has can_manage_direct_messages administrator right in a channel, it can delete any message in the corresponding direct messages chat.
\nReturns True on success.

", + "rst_description": "Use this method to delete a message, including service messages, with the following limitations:\n\n- A message can only be deleted if it was sent less than 48 hours ago.\n\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.\n\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.\n\n- Bots can delete outgoing messages in private chats, groups, and supergroups.\n\n- Bots can delete incoming messages in private chats.\n\n- Bots granted *can_post_messages* permissions can delete outgoing messages in channels.\n\n- If the bot is an administrator of a group, it can delete any message there.\n\n- If the bot has *can_delete_messages* administrator right in a supergroup or a channel, it can delete any message there.\n\n- If the bot has *can_manage_direct_messages* administrator right in a channel, it can delete any message in the corresponding direct messages chat.\n\nReturns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Identifier of the message to delete", + "html_description": "Identifier of the message to delete", + "rst_description": "Identifier of the message to delete\n", + "name": "message_id" + } + ], + "category": "methods" + }, + { + "anchor": "deletemessages", + "name": "deleteMessages", + "description": "Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns True on success.", + "html_description": "

Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns True on success.

", + "rst_description": "Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Array of Integer", + "required": true, + "description": "A JSON-serialized list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted", + "html_description": "A JSON-serialized list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted", + "rst_description": "A JSON-serialized list of 1-100 identifiers of messages to delete. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted\n", + "name": "message_ids" + } + ], + "category": "methods" + } + ], + "description": "The following methods allow you to change an existing message in the message history instead of sending a new one with a result of an action. This is most useful for messages with inline keyboards using callback queries, but can also help reduce clutter in conversations with regular chat bots.\nPlease note, that it is currently only possible to edit messages without reply_markup or with inline keyboards." + }, + { + "title": "Stickers", + "anchor": "stickers", + "children": [ + { + "anchor": "sticker", + "name": "Sticker", + "description": "This object represents a sticker.", + "html_description": "

This object represents a sticker.

", + "rst_description": "This object represents a sticker.", + "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": "String", + "description": "Type of the sticker, currently one of 'regular', 'mask', 'custom_emoji'. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video.", + "html_description": "Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video.", + "rst_description": "Type of the sticker, currently one of 'regular', 'mask', 'custom_emoji'. The type of the sticker is independent from its format, which is determined by the fields *is_animated* and *is_video*.\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Sticker width", + "html_description": "Sticker width", + "rst_description": "Sticker width\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Sticker height", + "html_description": "Sticker height", + "rst_description": "Sticker height\n", + "name": "height", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the sticker is animated", + "html_description": "True, if the sticker is animated", + "rst_description": ":code:`True`, if the sticker is `animated `_\n", + "name": "is_animated", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the sticker is a video sticker", + "html_description": "True, if the sticker is a video sticker", + "rst_description": ":code:`True`, if the sticker is a `video sticker `_\n", + "name": "is_video", + "required": true + }, + { + "type": "PhotoSize", + "description": "Sticker thumbnail in the .WEBP or .JPG format", + "html_description": "Optional. Sticker thumbnail in the .WEBP or .JPG format", + "rst_description": "*Optional*. Sticker thumbnail in the .WEBP or .JPG format\n", + "name": "thumbnail", + "required": false + }, + { + "type": "String", + "description": "Emoji associated with the sticker", + "html_description": "Optional. Emoji associated with the sticker", + "rst_description": "*Optional*. Emoji associated with the sticker\n", + "name": "emoji", + "required": false + }, + { + "type": "String", + "description": "Name of the sticker set to which the sticker belongs", + "html_description": "Optional. Name of the sticker set to which the sticker belongs", + "rst_description": "*Optional*. Name of the sticker set to which the sticker belongs\n", + "name": "set_name", + "required": false + }, + { + "type": "File", + "description": "For premium regular stickers, premium animation for the sticker", + "html_description": "Optional. For premium regular stickers, premium animation for the sticker", + "rst_description": "*Optional*. For premium regular stickers, premium animation for the sticker\n", + "name": "premium_animation", + "required": false + }, + { + "type": "MaskPosition", + "description": "For mask stickers, the position where the mask should be placed", + "html_description": "Optional. For mask stickers, the position where the mask should be placed", + "rst_description": "*Optional*. For mask stickers, the position where the mask should be placed\n", + "name": "mask_position", + "required": false + }, + { + "type": "String", + "description": "For custom emoji stickers, unique identifier of the custom emoji", + "html_description": "Optional. For custom emoji stickers, unique identifier of the custom emoji", + "rst_description": "*Optional*. For custom emoji stickers, unique identifier of the custom emoji\n", + "name": "custom_emoji_id", + "required": false + }, + { + "type": "True", + "description": "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", + "html_description": "Optional. 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", + "rst_description": "*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\n", + "name": "needs_repainting", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes", + "html_description": "Optional. File size in bytes", + "rst_description": "*Optional*. File size in bytes\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "stickerset", + "name": "StickerSet", + "description": "This object represents a sticker set.", + "html_description": "

This object represents a sticker set.

", + "rst_description": "This object represents a sticker set.", + "annotations": [ + { + "type": "String", + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name", + "required": true + }, + { + "type": "String", + "description": "Sticker set title", + "html_description": "Sticker set title", + "rst_description": "Sticker set title\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Type of stickers in the set, currently one of 'regular', 'mask', 'custom_emoji'", + "html_description": "Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji”", + "rst_description": "Type of stickers in the set, currently one of 'regular', 'mask', 'custom_emoji'\n", + "name": "sticker_type", + "required": true + }, + { + "type": "Array of Sticker", + "description": "List of all set stickers", + "html_description": "List of all set stickers", + "rst_description": "List of all set stickers\n", + "name": "stickers", + "required": true + }, + { + "type": "PhotoSize", + "description": "Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format", + "html_description": "Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format", + "rst_description": "*Optional*. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format\n", + "name": "thumbnail", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "maskposition", + "name": "MaskPosition", + "description": "This object describes the position on faces where a mask should be placed by default.", + "html_description": "

This object describes the position on faces where a mask should be placed by default.

", + "rst_description": "This object describes the position on faces where a mask should be placed by default.", + "annotations": [ + { + "type": "String", + "description": "The part of the face relative to which the mask should be placed. One of 'forehead', 'eyes', 'mouth', or 'chin'.", + "html_description": "The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”.", + "rst_description": "The part of the face relative to which the mask should be placed. One of 'forehead', 'eyes', 'mouth', or 'chin'.\n", + "name": "point", + "required": true + }, + { + "type": "Float", + "description": "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.", + "html_description": "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.", + "rst_description": "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.\n", + "name": "x_shift", + "required": true + }, + { + "type": "Float", + "description": "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.", + "html_description": "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.", + "rst_description": "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.\n", + "name": "y_shift", + "required": true + }, + { + "type": "Float", + "description": "Mask scaling coefficient. For example, 2.0 means double size.", + "html_description": "Mask scaling coefficient. For example, 2.0 means double size.", + "rst_description": "Mask scaling coefficient. For example, 2.0 means double size.\n", + "name": "scale", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "inputsticker", + "name": "InputSticker", + "description": "This object describes a sticker to be added to a sticker set.", + "html_description": "

This object describes a sticker to be added to a sticker set.

", + "rst_description": "This object describes a sticker to be added to a sticker set.", + "annotations": [ + { + "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", + "name": "format", + "required": true + }, + { + "type": "Array of String", + "description": "List of 1-20 emoji associated with the sticker", + "html_description": "List of 1-20 emoji associated with the sticker", + "rst_description": "List of 1-20 emoji associated with the sticker\n", + "name": "emoji_list", + "required": true + }, + { + "type": "MaskPosition", + "description": "Position where the mask should be placed on faces. For 'mask' stickers only.", + "html_description": "Optional. Position where the mask should be placed on faces. For “mask” stickers only.", + "rst_description": "*Optional*. Position where the mask should be placed on faces. For 'mask' stickers only.\n", + "name": "mask_position", + "required": false + }, + { + "type": "Array of String", + "description": "List of 0-20 search keywords for the sticker with total length of up to 64 characters. For 'regular' and 'custom_emoji' stickers only.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "keywords", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "sendsticker", + "name": "sendSticker", + "description": "Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.", + "html_description": "

Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.

", + "rst_description": "Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. 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", + "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": "InputFile or String", + "required": true, + "description": "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. More information on Sending Files. Video and animated stickers can't be sent via an HTTP URL.", + "html_description": "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. More information on Sending Files ». Video and animated stickers can't be sent via an HTTP URL.", + "rst_description": "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.\n", + "name": "sticker" + }, + { + "type": "String", + "required": false, + "description": "Emoji associated with the sticker; only for just uploaded stickers", + "html_description": "Emoji associated with the sticker; only for just uploaded stickers", + "rst_description": "Emoji associated with the sticker; only for just uploaded stickers\n", + "name": "emoji" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "getstickerset", + "name": "getStickerSet", + "description": "Use this method to get a sticker set. On success, a StickerSet object is returned.", + "html_description": "

Use this method to get a sticker set. On success, a StickerSet object is returned.

", + "rst_description": "Use this method to get a sticker set. On success, a :class:`aiogram.types.sticker_set.StickerSet` object is returned.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Name of the sticker set", + "html_description": "Name of the sticker set", + "rst_description": "Name of the sticker set\n", + "name": "name" + } + ], + "category": "methods" + }, + { + "anchor": "getcustomemojistickers", + "name": "getCustomEmojiStickers", + "description": "Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.", + "html_description": "

Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.

", + "rst_description": "Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects.", + "annotations": [ + { + "type": "Array of String", + "required": true, + "description": "A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.", + "html_description": "A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.", + "rst_description": "A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.\n", + "name": "custom_emoji_ids" + } + ], + "category": "methods" + }, + { + "anchor": "uploadstickerfile", + "name": "uploadStickerFile", + "description": "Use this method to upload a file with a sticker for later use in the createNewStickerSet, addStickerToSet, or replaceStickerInSet methods (the file can be used multiple times). Returns the uploaded File on success.", + "html_description": "

Use this method to upload a file with a sticker for later use in the createNewStickerSet, addStickerToSet, or replaceStickerInSet methods (the file can be used multiple times). Returns the uploaded File on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of sticker file owner", + "html_description": "User identifier of sticker file owner", + "rst_description": "User identifier of sticker file owner\n", + "name": "user_id" + }, + { + "type": "InputFile", + "required": true, + "description": "A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See https://core.telegram.org/stickers for technical requirements. More information on Sending Files", + "html_description": "A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See https://core.telegram.org/stickers for technical requirements. More information on Sending Files »", + "rst_description": "A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See `https://core.telegram.org/stickers `_`https://core.telegram.org/stickers `_ for technical requirements. :ref:`More information on Sending Files » `\n", + "name": "sticker" + }, + { + "type": "String", + "required": true, + "description": "Format of the sticker, must be one of 'static', 'animated', 'video'", + "html_description": "Format of the sticker, must be one of “static”, “animated”, “video”", + "rst_description": "Format of the sticker, must be one of 'static', 'animated', 'video'\n", + "name": "sticker_format" + } + ], + "category": "methods" + }, + { + "anchor": "createnewstickerset", + "name": "createNewStickerSet", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of created sticker set owner", + "html_description": "User identifier of created sticker set owner", + "rst_description": "User identifier of created sticker set owner\n", + "name": "user_id" + }, + { + "type": "String", + "required": true, + "description": "Short name of sticker set, to be used in 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 \"_by_\". is case insensitive. 1-64 characters.", + "html_description": "Short name of sticker set, to be used in 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 \"_by_<bot_username>\". <bot_username> is case insensitive. 1-64 characters.", + "rst_description": "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.\n", + "name": "name" + }, + { + "type": "String", + "required": true, + "description": "Sticker set title, 1-64 characters", + "html_description": "Sticker set title, 1-64 characters", + "rst_description": "Sticker set title, 1-64 characters\n", + "name": "title" + }, + { + "type": "Array of InputSticker", + "required": true, + "description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set", + "html_description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set", + "rst_description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set\n", + "name": "stickers" + }, + { + "type": "String", + "required": false, + "description": "Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.", + "html_description": "Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. By default, a regular sticker set is created.", + "rst_description": "Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.\n", + "name": "sticker_type" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "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\n", + "name": "needs_repainting" + } + ], + "category": "methods" + }, + { + "anchor": "addstickertoset", + "name": "addStickerToSet", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of sticker set owner", + "html_description": "User identifier of sticker set owner", + "rst_description": "User identifier of sticker set owner\n", + "name": "user_id" + }, + { + "type": "String", + "required": true, + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name" + }, + { + "type": "InputSticker", + "required": true, + "description": "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 isn't changed.", + "html_description": "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 isn't changed.", + "rst_description": "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 isn't changed.\n", + "name": "sticker" + } + ], + "category": "methods" + }, + { + "anchor": "setstickerpositioninset", + "name": "setStickerPositionInSet", + "description": "Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.", + "html_description": "

Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.

", + "rst_description": "Use this method to move a sticker in a set created by the bot to a specific position. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier of the sticker", + "html_description": "File identifier of the sticker", + "rst_description": "File identifier of the sticker\n", + "name": "sticker" + }, + { + "type": "Integer", + "required": true, + "description": "New sticker position in the set, zero-based", + "html_description": "New sticker position in the set, zero-based", + "rst_description": "New sticker position in the set, zero-based\n", + "name": "position" + } + ], + "category": "methods" + }, + { + "anchor": "deletestickerfromset", + "name": "deleteStickerFromSet", + "description": "Use this method to delete a sticker from a set created by the bot. Returns True on success.", + "html_description": "

Use this method to delete a sticker from a set created by the bot. Returns True on success.

", + "rst_description": "Use this method to delete a sticker from a set created by the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier of the sticker", + "html_description": "File identifier of the sticker", + "rst_description": "File identifier of the sticker\n", + "name": "sticker" + } + ], + "category": "methods" + }, + { + "anchor": "replacestickerinset", + "name": "replaceStickerInSet", + "description": "Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet. Returns True on success.", + "html_description": "

Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet. Returns True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of the sticker set owner", + "html_description": "User identifier of the sticker set owner", + "rst_description": "User identifier of the sticker set owner\n", + "name": "user_id" + }, + { + "type": "String", + "required": true, + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name" + }, + { + "type": "String", + "required": true, + "description": "File identifier of the replaced sticker", + "html_description": "File identifier of the replaced sticker", + "rst_description": "File identifier of the replaced sticker\n", + "name": "old_sticker" + }, + { + "type": "InputSticker", + "required": true, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "sticker" + } + ], + "category": "methods" + }, + { + "anchor": "setstickeremojilist", + "name": "setStickerEmojiList", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier of the sticker", + "html_description": "File identifier of the sticker", + "rst_description": "File identifier of the sticker\n", + "name": "sticker" + }, + { + "type": "Array of String", + "required": true, + "description": "A JSON-serialized list of 1-20 emoji associated with the sticker", + "html_description": "A JSON-serialized list of 1-20 emoji associated with the sticker", + "rst_description": "A JSON-serialized list of 1-20 emoji associated with the sticker\n", + "name": "emoji_list" + } + ], + "category": "methods" + }, + { + "anchor": "setstickerkeywords", + "name": "setStickerKeywords", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier of the sticker", + "html_description": "File identifier of the sticker", + "rst_description": "File identifier of the sticker\n", + "name": "sticker" + }, + { + "type": "Array of String", + "required": false, + "description": "A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters", + "html_description": "A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters", + "rst_description": "A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters\n", + "name": "keywords" + } + ], + "category": "methods" + }, + { + "anchor": "setstickermaskposition", + "name": "setStickerMaskPosition", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier of the sticker", + "html_description": "File identifier of the sticker", + "rst_description": "File identifier of the sticker\n", + "name": "sticker" + }, + { + "type": "MaskPosition", + "required": false, + "description": "A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.", + "html_description": "A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.", + "rst_description": "A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.\n", + "name": "mask_position" + } + ], + "category": "methods" + }, + { + "anchor": "setstickersettitle", + "name": "setStickerSetTitle", + "description": "Use this method to set the title of a created sticker set. Returns True on success.", + "html_description": "

Use this method to set the title of a created sticker set. Returns True on success.

", + "rst_description": "Use this method to set the title of a created sticker set. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name" + }, + { + "type": "String", + "required": true, + "description": "Sticker set title, 1-64 characters", + "html_description": "Sticker set title, 1-64 characters", + "rst_description": "Sticker set title, 1-64 characters\n", + "name": "title" + } + ], + "category": "methods" + }, + { + "anchor": "setstickersetthumbnail", + "name": "setStickerSetThumbnail", + "description": "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 True on success.", + "html_description": "

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 True on success.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name" + }, + { + "type": "Integer", + "required": true, + "description": "User identifier of the sticker set owner", + "html_description": "User identifier of the sticker set owner", + "rst_description": "User identifier of the sticker set owner\n", + "name": "user_id" + }, + { + "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#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", + "name": "format" + } + ], + "category": "methods" + }, + { + "anchor": "setcustomemojistickersetthumbnail", + "name": "setCustomEmojiStickerSetThumbnail", + "description": "Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.", + "html_description": "

Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.

", + "rst_description": "Use this method to set the thumbnail of a custom emoji sticker set. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name" + }, + { + "type": "String", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "custom_emoji_id" + } + ], + "category": "methods" + }, + { + "anchor": "deletestickerset", + "name": "deleteStickerSet", + "description": "Use this method to delete a sticker set that was created by the bot. Returns True on success.", + "html_description": "

Use this method to delete a sticker set that was created by the bot. Returns True on success.

", + "rst_description": "Use this method to delete a sticker set that was created by the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name" + } + ], + "category": "methods" + } + ], + "description": "The following methods and objects allow your bot to handle stickers and sticker sets." + }, + { + "title": "Inline mode", + "anchor": "inline-mode", + "children": [ + { + "anchor": "inlinequery", + "name": "InlineQuery", + "description": "This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.", + "html_description": "

This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.

", + "rst_description": "This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.", + "annotations": [ + { + "type": "String", + "description": "Unique identifier for this query", + "html_description": "Unique identifier for this query", + "rst_description": "Unique identifier for this query\n", + "name": "id", + "required": true + }, + { + "type": "User", + "description": "Sender", + "html_description": "Sender", + "rst_description": "Sender\n", + "name": "from", + "required": true + }, + { + "type": "String", + "description": "Text of the query (up to 256 characters)", + "html_description": "Text of the query (up to 256 characters)", + "rst_description": "Text of the query (up to 256 characters)\n", + "name": "query", + "required": true + }, + { + "type": "String", + "description": "Offset of the results to be returned, can be controlled by the bot", + "html_description": "Offset of the results to be returned, can be controlled by the bot", + "rst_description": "Offset of the results to be returned, can be controlled by the bot\n", + "name": "offset", + "required": true + }, + { + "type": "String", + "description": "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", + "html_description": "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", + "rst_description": "*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\n", + "name": "chat_type", + "required": false + }, + { + "type": "Location", + "description": "Sender location, only for bots that request user location", + "html_description": "Optional. Sender location, only for bots that request user location", + "rst_description": "*Optional*. Sender location, only for bots that request user location\n", + "name": "location", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "answerinlinequery", + "name": "answerInlineQuery", + "description": "Use this method to send answers to an inline query. On success, True is returned.\nNo more than 50 results per query are allowed.", + "html_description": "

Use this method to send answers to an inline query. On success, True is returned.
\nNo more than 50 results per query are allowed.

", + "rst_description": "Use this method to send answers to an inline query. On success, :code:`True` is returned.\n\nNo more than **50** results per query are allowed.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier for the answered query", + "html_description": "Unique identifier for the answered query", + "rst_description": "Unique identifier for the answered query\n", + "name": "inline_query_id" + }, + { + "type": "Array of InlineQueryResult", + "required": true, + "description": "A JSON-serialized array of results for the inline query", + "html_description": "A JSON-serialized array of results for the inline query", + "rst_description": "A JSON-serialized array of results for the inline query\n", + "name": "results" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.", + "html_description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.", + "rst_description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.\n", + "name": "cache_time" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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.", + "html_description": "Pass 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.", + "rst_description": "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.\n", + "name": "is_personal" + }, + { + "type": "String", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "next_offset" + }, + { + "type": "InlineQueryResultsButton", + "required": false, + "description": "A JSON-serialized object describing a button to be shown above inline query results", + "html_description": "A JSON-serialized object describing a button to be shown above inline query results", + "rst_description": "A JSON-serialized object describing a button to be shown above inline query results\n", + "name": "button" + } + ], + "category": "methods" + }, + { + "anchor": "inlinequeryresultsbutton", + "name": "InlineQueryResultsButton", + "description": "This object represents a button to be shown above inline query results. You must use exactly one of the optional fields.", + "html_description": "

This object represents a button to be shown above inline query results. You must use exactly one of the optional fields.

", + "rst_description": "This object represents a button to be shown above inline query results. You **must** use exactly one of the optional fields.", + "annotations": [ + { + "type": "String", + "description": "Label text on the button", + "html_description": "Label text on the button", + "rst_description": "Label text on the button\n", + "name": "text", + "required": true + }, + { + "type": "WebAppInfo", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "web_app", + "required": false + }, + { + "type": "String", + "description": "Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.\n\nExample: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.", + "html_description": "Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.
\n
\nExample: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.", + "rst_description": "*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.\n\n\n\n*Example:* An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a `https://core.telegram.org/bots/api#inlinekeyboardmarkup `_ *switch_inline* button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.\n", + "name": "start_parameter", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresult", + "name": "InlineQueryResult", + "description": "This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:\n - InlineQueryResultCachedAudio\n - InlineQueryResultCachedDocument\n - InlineQueryResultCachedGif\n - InlineQueryResultCachedMpeg4Gif\n - InlineQueryResultCachedPhoto\n - InlineQueryResultCachedSticker\n - InlineQueryResultCachedVideo\n - InlineQueryResultCachedVoice\n - InlineQueryResultArticle\n - InlineQueryResultAudio\n - InlineQueryResultContact\n - InlineQueryResultGame\n - InlineQueryResultDocument\n - InlineQueryResultGif\n - InlineQueryResultLocation\n - InlineQueryResultMpeg4Gif\n - InlineQueryResultPhoto\n - InlineQueryResultVenue\n - InlineQueryResultVideo\n - InlineQueryResultVoice\nNote: All URLs passed in inline query results will be available to end users and therefore must be assumed to be public.", + "html_description": "

This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:

Note: All URLs passed in inline query results will be available to end users and therefore must be assumed to be public.

", + "rst_description": "This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:\n\n - :class:`aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio`\n - :class:`aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument`\n - :class:`aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif`\n - :class:`aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif`\n - :class:`aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto`\n - :class:`aiogram.types.inline_query_result_cached_sticker.InlineQueryResultCachedSticker`\n - :class:`aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo`\n - :class:`aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice`\n - :class:`aiogram.types.inline_query_result_article.InlineQueryResultArticle`\n - :class:`aiogram.types.inline_query_result_audio.InlineQueryResultAudio`\n - :class:`aiogram.types.inline_query_result_contact.InlineQueryResultContact`\n - :class:`aiogram.types.inline_query_result_game.InlineQueryResultGame`\n - :class:`aiogram.types.inline_query_result_document.InlineQueryResultDocument`\n - :class:`aiogram.types.inline_query_result_gif.InlineQueryResultGif`\n - :class:`aiogram.types.inline_query_result_location.InlineQueryResultLocation`\n - :class:`aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif`\n - :class:`aiogram.types.inline_query_result_photo.InlineQueryResultPhoto`\n - :class:`aiogram.types.inline_query_result_venue.InlineQueryResultVenue`\n - :class:`aiogram.types.inline_query_result_video.InlineQueryResultVideo`\n - :class:`aiogram.types.inline_query_result_voice.InlineQueryResultVoice`\n\n**Note:** All URLs passed in inline query results will be available to end users and therefore must be assumed to be **public**.", + "annotations": [], + "category": "types" + }, + { + "anchor": "inlinequeryresultarticle", + "name": "InlineQueryResultArticle", + "description": "Represents a link to an article or web page.", + "html_description": "

Represents a link to an article or web page.

", + "rst_description": "Represents a link to an article or web page.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be article", + "html_description": "Type of the result, must be article", + "rst_description": "Type of the result, must be *article*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 Bytes", + "html_description": "Unique identifier for this result, 1-64 Bytes", + "rst_description": "Unique identifier for this result, 1-64 Bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Title of the result", + "html_description": "Title of the result", + "rst_description": "Title of the result\n", + "name": "title", + "required": true + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent", + "html_description": "Content of the message to be sent", + "rst_description": "Content of the message to be sent\n", + "name": "input_message_content", + "required": true + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "String", + "description": "URL of the result", + "html_description": "Optional. URL of the result", + "rst_description": "*Optional*. URL of the result\n", + "name": "url", + "required": false + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Url of the thumbnail for the result", + "html_description": "Optional. Url of the thumbnail for the result", + "rst_description": "*Optional*. Url of the thumbnail for the result\n", + "name": "thumbnail_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumbnail_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumbnail_height", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultphoto", + "name": "InlineQueryResultPhoto", + "description": "Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.", + "html_description": "

Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.

", + "rst_description": "Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the photo.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be photo", + "html_description": "Type of the result, must be photo", + "rst_description": "Type of the result, must be *photo*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB", + "html_description": "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB", + "rst_description": "A valid URL of the photo. Photo must be in **JPEG** format. Photo size must not exceed 5MB\n", + "name": "photo_url", + "required": true + }, + { + "type": "String", + "description": "URL of the thumbnail for the photo", + "html_description": "URL of the thumbnail for the photo", + "rst_description": "URL of the thumbnail for the photo\n", + "name": "thumbnail_url", + "required": true + }, + { + "type": "Integer", + "description": "Width of the photo", + "html_description": "Optional. Width of the photo", + "rst_description": "*Optional*. Width of the photo\n", + "name": "photo_width", + "required": false + }, + { + "type": "Integer", + "description": "Height of the photo", + "html_description": "Optional. Height of the photo", + "rst_description": "*Optional*. Height of the photo\n", + "name": "photo_height", + "required": false + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Caption of the photo to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the photo caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the photo caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the photo", + "html_description": "Optional. Content of the message to be sent instead of the photo", + "rst_description": "*Optional*. Content of the message to be sent instead of the photo\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultgif", + "name": "InlineQueryResultGif", + "description": "Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.", + "html_description": "

Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.

", + "rst_description": "Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the animation.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be gif", + "html_description": "Type of the result, must be gif", + "rst_description": "Type of the result, must be *gif*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "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 + }, + { + "type": "Integer", + "description": "Width of the GIF", + "html_description": "Optional. Width of the GIF", + "rst_description": "*Optional*. Width of the GIF\n", + "name": "gif_width", + "required": false + }, + { + "type": "Integer", + "description": "Height of the GIF", + "html_description": "Optional. Height of the GIF", + "rst_description": "*Optional*. Height of the GIF\n", + "name": "gif_height", + "required": false + }, + { + "type": "Integer", + "description": "Duration of the GIF in seconds", + "html_description": "Optional. Duration of the GIF in seconds", + "rst_description": "*Optional*. Duration of the GIF in seconds\n", + "name": "gif_duration", + "required": false + }, + { + "type": "String", + "description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result", + "html_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result", + "rst_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result\n", + "name": "thumbnail_url", + "required": true + }, + { + "type": "String", + "description": "MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'", + "html_description": "Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”", + "rst_description": "*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'\n", + "name": "thumbnail_mime_type", + "required": false + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Caption of the GIF file to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the GIF animation", + "html_description": "Optional. Content of the message to be sent instead of the GIF animation", + "rst_description": "*Optional*. Content of the message to be sent instead of the GIF animation\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultmpeg4gif", + "name": "InlineQueryResultMpeg4Gif", + "description": "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.", + "html_description": "

Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.

", + "rst_description": "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the animation.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be mpeg4_gif", + "html_description": "Type of the result, must be mpeg4_gif", + "rst_description": "Type of the result, must be *mpeg4_gif*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "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 + }, + { + "type": "Integer", + "description": "Video width", + "html_description": "Optional. Video width", + "rst_description": "*Optional*. Video width\n", + "name": "mpeg4_width", + "required": false + }, + { + "type": "Integer", + "description": "Video height", + "html_description": "Optional. Video height", + "rst_description": "*Optional*. Video height\n", + "name": "mpeg4_height", + "required": false + }, + { + "type": "Integer", + "description": "Video duration in seconds", + "html_description": "Optional. Video duration in seconds", + "rst_description": "*Optional*. Video duration in seconds\n", + "name": "mpeg4_duration", + "required": false + }, + { + "type": "String", + "description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result", + "html_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result", + "rst_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result\n", + "name": "thumbnail_url", + "required": true + }, + { + "type": "String", + "description": "MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'", + "html_description": "Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”", + "rst_description": "*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'\n", + "name": "thumbnail_mime_type", + "required": false + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the video animation", + "html_description": "Optional. Content of the message to be sent instead of the video animation", + "rst_description": "*Optional*. Content of the message to be sent instead of the video animation\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultvideo", + "name": "InlineQueryResultVideo", + "description": "Represents a link to a page containing an embedded video player or a video file. By default, this video 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 video.\nIf an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content.", + "html_description": "

Represents a link to a page containing an embedded video player or a video file. By default, this video 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 video.

\n

If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content.

\n
", + "rst_description": "Represents a link to a page containing an embedded video player or a video file. By default, this video 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 video.\n\n If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you **must** replace its content using *input_message_content*.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be video", + "html_description": "Type of the result, must be video", + "rst_description": "Type of the result, must be *video*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL for the embedded video player or video file", + "html_description": "A valid URL for the embedded video player or video file", + "rst_description": "A valid URL for the embedded video player or video file\n", + "name": "video_url", + "required": true + }, + { + "type": "String", + "description": "MIME type of the content of the video URL, 'text/html' or 'video/mp4'", + "html_description": "MIME type of the content of the video URL, “text/html” or “video/mp4”", + "rst_description": "MIME type of the content of the video URL, 'text/html' or 'video/mp4'\n", + "name": "mime_type", + "required": true + }, + { + "type": "String", + "description": "URL of the thumbnail (JPEG only) for the video", + "html_description": "URL of the thumbnail (JPEG only) for the video", + "rst_description": "URL of the thumbnail (JPEG only) for the video\n", + "name": "thumbnail_url", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Title for the result", + "rst_description": "Title for the result\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption of the video to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the video caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the video caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "type": "Integer", + "description": "Video width", + "html_description": "Optional. Video width", + "rst_description": "*Optional*. Video width\n", + "name": "video_width", + "required": false + }, + { + "type": "Integer", + "description": "Video height", + "html_description": "Optional. Video height", + "rst_description": "*Optional*. Video height\n", + "name": "video_height", + "required": false + }, + { + "type": "Integer", + "description": "Video duration in seconds", + "html_description": "Optional. Video duration in seconds", + "rst_description": "*Optional*. Video duration in seconds\n", + "name": "video_duration", + "required": false + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "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).", + "html_description": "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).", + "rst_description": "*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).\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultaudio", + "name": "InlineQueryResultAudio", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be audio", + "html_description": "Type of the result, must be audio", + "rst_description": "Type of the result, must be *audio*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL for the audio file", + "html_description": "A valid URL for the audio file", + "rst_description": "A valid URL for the audio file\n", + "name": "audio_url", + "required": true + }, + { + "type": "String", + "description": "Title", + "html_description": "Title", + "rst_description": "Title\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the audio caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the audio caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "String", + "description": "Performer", + "html_description": "Optional. Performer", + "rst_description": "*Optional*. Performer\n", + "name": "performer", + "required": false + }, + { + "type": "Integer", + "description": "Audio duration in seconds", + "html_description": "Optional. Audio duration in seconds", + "rst_description": "*Optional*. Audio duration in seconds\n", + "name": "audio_duration", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the audio", + "html_description": "Optional. Content of the message to be sent instead of the audio", + "rst_description": "*Optional*. Content of the message to be sent instead of the audio\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultvoice", + "name": "InlineQueryResultVoice", + "description": "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 the voice message.", + "html_description": "

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 the voice message.

", + "rst_description": "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 the voice message.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be voice", + "html_description": "Type of the result, must be voice", + "rst_description": "Type of the result, must be *voice*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL for the voice recording", + "html_description": "A valid URL for the voice recording", + "rst_description": "A valid URL for the voice recording\n", + "name": "voice_url", + "required": true + }, + { + "type": "String", + "description": "Recording title", + "html_description": "Recording title", + "rst_description": "Recording title\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the voice message caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the voice message caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Integer", + "description": "Recording duration in seconds", + "html_description": "Optional. Recording duration in seconds", + "rst_description": "*Optional*. Recording duration in seconds\n", + "name": "voice_duration", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the voice recording", + "html_description": "Optional. Content of the message to be sent instead of the voice recording", + "rst_description": "*Optional*. Content of the message to be sent instead of the voice recording\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultdocument", + "name": "InlineQueryResultDocument", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be document", + "html_description": "Type of the result, must be document", + "rst_description": "Type of the result, must be *document*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Title for the result", + "rst_description": "Title for the result\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption of the document to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the document caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the document caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "String", + "description": "A valid URL for the file", + "html_description": "A valid URL for the file", + "rst_description": "A valid URL for the file\n", + "name": "document_url", + "required": true + }, + { + "type": "String", + "description": "MIME type of the content of the file, either 'application/pdf' or 'application/zip'", + "html_description": "MIME type of the content of the file, either “application/pdf” or “application/zip”", + "rst_description": "MIME type of the content of the file, either 'application/pdf' or 'application/zip'\n", + "name": "mime_type", + "required": true + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the file", + "html_description": "Optional. Content of the message to be sent instead of the file", + "rst_description": "*Optional*. Content of the message to be sent instead of the file\n", + "name": "input_message_content", + "required": false + }, + { + "type": "String", + "description": "URL of the thumbnail (JPEG only) for the file", + "html_description": "Optional. URL of the thumbnail (JPEG only) for the file", + "rst_description": "*Optional*. URL of the thumbnail (JPEG only) for the file\n", + "name": "thumbnail_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumbnail_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumbnail_height", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultlocation", + "name": "InlineQueryResultLocation", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be location", + "html_description": "Type of the result, must be location", + "rst_description": "Type of the result, must be *location*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 Bytes", + "html_description": "Unique identifier for this result, 1-64 Bytes", + "rst_description": "Unique identifier for this result, 1-64 Bytes\n", + "name": "id", + "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": "String", + "description": "Location title", + "html_description": "Location title", + "rst_description": "Location title\n", + "name": "title", + "required": true + }, + { + "type": "Float", + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "Optional. The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy", + "required": false + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "live_period", + "required": false + }, + { + "type": "Integer", + "description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "html_description": "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "rst_description": "*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", + "name": "heading", + "required": false + }, + { + "type": "Integer", + "description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "proximity_alert_radius", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the location", + "html_description": "Optional. Content of the message to be sent instead of the location", + "rst_description": "*Optional*. Content of the message to be sent instead of the location\n", + "name": "input_message_content", + "required": false + }, + { + "type": "String", + "description": "Url of the thumbnail for the result", + "html_description": "Optional. Url of the thumbnail for the result", + "rst_description": "*Optional*. Url of the thumbnail for the result\n", + "name": "thumbnail_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumbnail_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumbnail_height", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultvenue", + "name": "InlineQueryResultVenue", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be venue", + "html_description": "Type of the result, must be venue", + "rst_description": "Type of the result, must be *venue*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 Bytes", + "html_description": "Unique identifier for this result, 1-64 Bytes", + "rst_description": "Unique identifier for this result, 1-64 Bytes\n", + "name": "id", + "required": true + }, + { + "type": "Float", + "description": "Latitude of the venue location in degrees", + "html_description": "Latitude of the venue location in degrees", + "rst_description": "Latitude of the venue location in degrees\n", + "name": "latitude", + "required": true + }, + { + "type": "Float", + "description": "Longitude of the venue location in degrees", + "html_description": "Longitude of the venue location in degrees", + "rst_description": "Longitude of the venue location in degrees\n", + "name": "longitude", + "required": true + }, + { + "type": "String", + "description": "Title of the venue", + "html_description": "Title of the venue", + "rst_description": "Title of the venue\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Address of the venue", + "html_description": "Address of the venue", + "rst_description": "Address of the venue\n", + "name": "address", + "required": true + }, + { + "type": "String", + "description": "Foursquare identifier of the venue if known", + "html_description": "Optional. Foursquare identifier of the venue if known", + "rst_description": "*Optional*. Foursquare identifier of the venue if known\n", + "name": "foursquare_id", + "required": false + }, + { + "type": "String", + "description": "Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)", + "html_description": "Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)", + "rst_description": "*Optional*. Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)\n", + "name": "foursquare_type", + "required": false + }, + { + "type": "String", + "description": "Google Places identifier of the venue", + "html_description": "Optional. Google Places identifier of the venue", + "rst_description": "*Optional*. Google Places identifier of the venue\n", + "name": "google_place_id", + "required": false + }, + { + "type": "String", + "description": "Google Places type of the venue. (See supported types.)", + "html_description": "Optional. Google Places type of the venue. (See supported types.)", + "rst_description": "*Optional*. Google Places type of the venue. (See `supported types `_.)\n", + "name": "google_place_type", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the venue", + "html_description": "Optional. Content of the message to be sent instead of the venue", + "rst_description": "*Optional*. Content of the message to be sent instead of the venue\n", + "name": "input_message_content", + "required": false + }, + { + "type": "String", + "description": "Url of the thumbnail for the result", + "html_description": "Optional. Url of the thumbnail for the result", + "rst_description": "*Optional*. Url of the thumbnail for the result\n", + "name": "thumbnail_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumbnail_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumbnail_height", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcontact", + "name": "InlineQueryResultContact", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be contact", + "html_description": "Type of the result, must be contact", + "rst_description": "Type of the result, must be *contact*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 Bytes", + "html_description": "Unique identifier for this result, 1-64 Bytes", + "rst_description": "Unique identifier for this result, 1-64 Bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Contact's phone number", + "html_description": "Contact's phone number", + "rst_description": "Contact's phone number\n", + "name": "phone_number", + "required": true + }, + { + "type": "String", + "description": "Contact's first name", + "html_description": "Contact's first name", + "rst_description": "Contact's first name\n", + "name": "first_name", + "required": true + }, + { + "type": "String", + "description": "Contact's last name", + "html_description": "Optional. Contact's last name", + "rst_description": "*Optional*. Contact's last name\n", + "name": "last_name", + "required": false + }, + { + "type": "String", + "description": "Additional data about the contact in the form of a vCard, 0-2048 bytes", + "html_description": "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes", + "rst_description": "*Optional*. Additional data about the contact in the form of a `vCard `_, 0-2048 bytes\n", + "name": "vcard", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the contact", + "html_description": "Optional. Content of the message to be sent instead of the contact", + "rst_description": "*Optional*. Content of the message to be sent instead of the contact\n", + "name": "input_message_content", + "required": false + }, + { + "type": "String", + "description": "Url of the thumbnail for the result", + "html_description": "Optional. Url of the thumbnail for the result", + "rst_description": "*Optional*. Url of the thumbnail for the result\n", + "name": "thumbnail_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumbnail_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumbnail_height", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultgame", + "name": "InlineQueryResultGame", + "description": "Represents a Game.", + "html_description": "

Represents a Game.

", + "rst_description": "Represents a `Game `_.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be game", + "html_description": "Type of the result, must be game", + "rst_description": "Type of the result, must be *game*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Short name of the game", + "html_description": "Short name of the game", + "rst_description": "Short name of the game\n", + "name": "game_short_name", + "required": true + }, + { + "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", + "name": "reply_markup", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcachedphoto", + "name": "InlineQueryResultCachedPhoto", + "description": "Represents a link to a photo stored on the Telegram servers. By default, this photo 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 photo.", + "html_description": "

Represents a link to a photo stored on the Telegram servers. By default, this photo 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 photo.

", + "rst_description": "Represents a link to a photo stored on the Telegram servers. By default, this photo 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 photo.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be photo", + "html_description": "Type of the result, must be photo", + "rst_description": "Type of the result, must be *photo*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier of the photo", + "html_description": "A valid file identifier of the photo", + "rst_description": "A valid file identifier of the photo\n", + "name": "photo_file_id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Caption of the photo to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the photo caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the photo caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the photo", + "html_description": "Optional. Content of the message to be sent instead of the photo", + "rst_description": "*Optional*. Content of the message to be sent instead of the photo\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcachedgif", + "name": "InlineQueryResultCachedGif", + "description": "Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.", + "html_description": "

Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.

", + "rst_description": "Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with specified content instead of the animation.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be gif", + "html_description": "Type of the result, must be gif", + "rst_description": "Type of the result, must be *gif*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the GIF file", + "html_description": "A valid file identifier for the GIF file", + "rst_description": "A valid file identifier for the GIF file\n", + "name": "gif_file_id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Caption of the GIF file to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the GIF animation", + "html_description": "Optional. Content of the message to be sent instead of the GIF animation", + "rst_description": "*Optional*. Content of the message to be sent instead of the GIF animation\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcachedmpeg4gif", + "name": "InlineQueryResultCachedMpeg4Gif", + "description": "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 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 animation.", + "html_description": "

Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 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 animation.

", + "rst_description": "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 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 animation.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be mpeg4_gif", + "html_description": "Type of the result, must be mpeg4_gif", + "rst_description": "Type of the result, must be *mpeg4_gif*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the MPEG4 file", + "html_description": "A valid file identifier for the MPEG4 file", + "rst_description": "A valid file identifier for the MPEG4 file\n", + "name": "mpeg4_file_id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the video animation", + "html_description": "Optional. Content of the message to be sent instead of the video animation", + "rst_description": "*Optional*. Content of the message to be sent instead of the video animation\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcachedsticker", + "name": "InlineQueryResultCachedSticker", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be sticker", + "html_description": "Type of the result, must be sticker", + "rst_description": "Type of the result, must be *sticker*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier of the sticker", + "html_description": "A valid file identifier of the sticker", + "rst_description": "A valid file identifier of the sticker\n", + "name": "sticker_file_id", + "required": true + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the sticker", + "html_description": "Optional. Content of the message to be sent instead of the sticker", + "rst_description": "*Optional*. Content of the message to be sent instead of the sticker\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcacheddocument", + "name": "InlineQueryResultCachedDocument", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be document", + "html_description": "Type of the result, must be document", + "rst_description": "Type of the result, must be *document*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Title for the result", + "rst_description": "Title for the result\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the file", + "html_description": "A valid file identifier for the file", + "rst_description": "A valid file identifier for the file\n", + "name": "document_file_id", + "required": true + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Caption of the document to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the document caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the document caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the file", + "html_description": "Optional. Content of the message to be sent instead of the file", + "rst_description": "*Optional*. Content of the message to be sent instead of the file\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcachedvideo", + "name": "InlineQueryResultCachedVideo", + "description": "Represents a link to a video file stored on the Telegram servers. By default, this video 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 video.", + "html_description": "

Represents a link to a video file stored on the Telegram servers. By default, this video 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 video.

", + "rst_description": "Represents a link to a video file stored on the Telegram servers. By default, this video 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 video.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be video", + "html_description": "Type of the result, must be video", + "rst_description": "Type of the result, must be *video*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the video file", + "html_description": "A valid file identifier for the video file", + "rst_description": "A valid file identifier for the video file\n", + "name": "video_file_id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Title for the result", + "rst_description": "Title for the result\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Caption of the video to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the video caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the video caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the video", + "html_description": "Optional. Content of the message to be sent instead of the video", + "rst_description": "*Optional*. Content of the message to be sent instead of the video\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcachedvoice", + "name": "InlineQueryResultCachedVoice", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be voice", + "html_description": "Type of the result, must be voice", + "rst_description": "Type of the result, must be *voice*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the voice message", + "html_description": "A valid file identifier for the voice message", + "rst_description": "A valid file identifier for the voice message\n", + "name": "voice_file_id", + "required": true + }, + { + "type": "String", + "description": "Voice message title", + "html_description": "Voice message title", + "rst_description": "Voice message title\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the voice message caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the voice message caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the voice message", + "html_description": "Optional. Content of the message to be sent instead of the voice message", + "rst_description": "*Optional*. Content of the message to be sent instead of the voice message\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcachedaudio", + "name": "InlineQueryResultCachedAudio", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be audio", + "html_description": "Type of the result, must be audio", + "rst_description": "Type of the result, must be *audio*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the audio file", + "html_description": "A valid file identifier for the audio file", + "rst_description": "A valid file identifier for the audio file\n", + "name": "audio_file_id", + "required": true + }, + { + "type": "String", + "description": "Caption, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the audio caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the audio caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the audio", + "html_description": "Optional. Content of the message to be sent instead of the audio", + "rst_description": "*Optional*. Content of the message to be sent instead of the audio\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputmessagecontent", + "name": "InputMessageContent", + "description": "This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:\n - InputTextMessageContent\n - InputLocationMessageContent\n - InputVenueMessageContent\n - InputContactMessageContent\n - InputInvoiceMessageContent", + "html_description": "

This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:

", + "rst_description": "This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:\n\n - :class:`aiogram.types.input_text_message_content.InputTextMessageContent`\n - :class:`aiogram.types.input_location_message_content.InputLocationMessageContent`\n - :class:`aiogram.types.input_venue_message_content.InputVenueMessageContent`\n - :class:`aiogram.types.input_contact_message_content.InputContactMessageContent`\n - :class:`aiogram.types.input_invoice_message_content.InputInvoiceMessageContent`", + "annotations": [], + "category": "types" + }, + { + "anchor": "inputtextmessagecontent", + "name": "InputTextMessageContent", + "description": "Represents the content of a text message to be sent as the result of an inline query.", + "html_description": "

Represents the content of a text message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of a text message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "String", + "description": "Text of the message to be sent, 1-4096 characters", + "html_description": "Text of the message to be sent, 1-4096 characters", + "rst_description": "Text of the message to be sent, 1-4096 characters\n", + "name": "message_text", + "required": true + }, + { + "type": "String", + "description": "Mode for parsing entities in the message text. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the message text. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the message 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 message text, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in message text, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in message text, which can be specified instead of *parse_mode*\n", + "name": "entities", + "required": false + }, + { + "type": "LinkPreviewOptions", + "description": "Link preview generation options for the message", + "html_description": "Optional. Link preview generation options for the message", + "rst_description": "*Optional*. Link preview generation options for the message\n", + "name": "link_preview_options", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputlocationmessagecontent", + "name": "InputLocationMessageContent", + "description": "Represents the content of a location message to be sent as the result of an inline query.", + "html_description": "

Represents the content of a location message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of a location message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "Float", + "description": "Latitude of the location in degrees", + "html_description": "Latitude of the location in degrees", + "rst_description": "Latitude of the location in degrees\n", + "name": "latitude", + "required": true + }, + { + "type": "Float", + "description": "Longitude of the location in degrees", + "html_description": "Longitude of the location in degrees", + "rst_description": "Longitude of the location in degrees\n", + "name": "longitude", + "required": true + }, + { + "type": "Float", + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "Optional. The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy", + "required": false + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "live_period", + "required": false + }, + { + "type": "Integer", + "description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "html_description": "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "rst_description": "*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", + "name": "heading", + "required": false + }, + { + "type": "Integer", + "description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "proximity_alert_radius", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputvenuemessagecontent", + "name": "InputVenueMessageContent", + "description": "Represents the content of a venue message to be sent as the result of an inline query.", + "html_description": "

Represents the content of a venue message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of a venue message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "Float", + "description": "Latitude of the venue in degrees", + "html_description": "Latitude of the venue in degrees", + "rst_description": "Latitude of the venue in degrees\n", + "name": "latitude", + "required": true + }, + { + "type": "Float", + "description": "Longitude of the venue in degrees", + "html_description": "Longitude of the venue in degrees", + "rst_description": "Longitude of the venue in degrees\n", + "name": "longitude", + "required": true + }, + { + "type": "String", + "description": "Name of the venue", + "html_description": "Name of the venue", + "rst_description": "Name of the venue\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Address of the venue", + "html_description": "Address of the venue", + "rst_description": "Address of the venue\n", + "name": "address", + "required": true + }, + { + "type": "String", + "description": "Foursquare identifier of the venue, if known", + "html_description": "Optional. Foursquare identifier of the venue, if known", + "rst_description": "*Optional*. Foursquare identifier of the venue, if known\n", + "name": "foursquare_id", + "required": false + }, + { + "type": "String", + "description": "Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)", + "html_description": "Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)", + "rst_description": "*Optional*. Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)\n", + "name": "foursquare_type", + "required": false + }, + { + "type": "String", + "description": "Google Places identifier of the venue", + "html_description": "Optional. Google Places identifier of the venue", + "rst_description": "*Optional*. Google Places identifier of the venue\n", + "name": "google_place_id", + "required": false + }, + { + "type": "String", + "description": "Google Places type of the venue. (See supported types.)", + "html_description": "Optional. Google Places type of the venue. (See supported types.)", + "rst_description": "*Optional*. Google Places type of the venue. (See `supported types `_.)\n", + "name": "google_place_type", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputcontactmessagecontent", + "name": "InputContactMessageContent", + "description": "Represents the content of a contact message to be sent as the result of an inline query.", + "html_description": "

Represents the content of a contact message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of a contact message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "String", + "description": "Contact's phone number", + "html_description": "Contact's phone number", + "rst_description": "Contact's phone number\n", + "name": "phone_number", + "required": true + }, + { + "type": "String", + "description": "Contact's first name", + "html_description": "Contact's first name", + "rst_description": "Contact's first name\n", + "name": "first_name", + "required": true + }, + { + "type": "String", + "description": "Contact's last name", + "html_description": "Optional. Contact's last name", + "rst_description": "*Optional*. Contact's last name\n", + "name": "last_name", + "required": false + }, + { + "type": "String", + "description": "Additional data about the contact in the form of a vCard, 0-2048 bytes", + "html_description": "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes", + "rst_description": "*Optional*. Additional data about the contact in the form of a `vCard `_, 0-2048 bytes\n", + "name": "vcard", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputinvoicemessagecontent", + "name": "InputInvoiceMessageContent", + "description": "Represents the content of an invoice message to be sent as the result of an inline query.", + "html_description": "

Represents the content of an invoice message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of an invoice message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "String", + "description": "Product name, 1-32 characters", + "html_description": "Product name, 1-32 characters", + "rst_description": "Product name, 1-32 characters\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Product description, 1-255 characters", + "html_description": "Product description, 1-255 characters", + "rst_description": "Product description, 1-255 characters\n", + "name": "description", + "required": true + }, + { + "type": "String", + "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 + }, + { + "type": "String", + "description": "Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.", + "html_description": "Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.", + "rst_description": "*Optional*. Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.\n", + "name": "provider_token", + "required": false + }, + { + "type": "String", + "description": "Three-letter ISO 4217 currency code, see more on currencies. Pass 'XTR' for payments in Telegram Stars.", + "html_description": "Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars.", + "rst_description": "Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.\n", + "name": "currency", + "required": true + }, + { + "type": "Array of LabeledPrice", + "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.", + "html_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.", + "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", + "required": true + }, + { + "type": "Integer", + "description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass 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.", + "html_description": "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 US$ 1.45 pass 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.", + "rst_description": "*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 `_.\n", + "name": "max_tip_amount", + "required": false + }, + { + "type": "Array of Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "*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*.\n", + "name": "suggested_tip_amounts", + "required": false + }, + { + "type": "String", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "provider_data", + "required": false + }, + { + "type": "String", + "description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.", + "html_description": "Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.", + "rst_description": "*Optional*. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.\n", + "name": "photo_url", + "required": false + }, + { + "type": "Integer", + "description": "Photo size in bytes", + "html_description": "Optional. Photo size in bytes", + "rst_description": "*Optional*. Photo size in bytes\n", + "name": "photo_size", + "required": false + }, + { + "type": "Integer", + "description": "Photo width", + "html_description": "Optional. Photo width", + "rst_description": "*Optional*. Photo width\n", + "name": "photo_width", + "required": false + }, + { + "type": "Integer", + "description": "Photo height", + "html_description": "Optional. Photo height", + "rst_description": "*Optional*. Photo height\n", + "name": "photo_height", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Optional. Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "*Optional*. Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_name", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "*Optional*. Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_phone_number", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "*Optional*. Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_email", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "*Optional*. Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_shipping_address", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.", + "html_description": "Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.", + "rst_description": "*Optional*. Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_.\n", + "name": "send_phone_number_to_provider", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.", + "html_description": "Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.", + "rst_description": "*Optional*. Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_.\n", + "name": "send_email_to_provider", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.", + "html_description": "Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.", + "rst_description": "*Optional*. Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_.\n", + "name": "is_flexible", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "choseninlineresult", + "name": "ChosenInlineResult", + "description": "Represents a result of an inline query that was chosen by the user and sent to their chat partner.\nNote: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates.", + "html_description": "

Represents a result of an inline query that was chosen by the user and sent to their chat partner.

Note: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates.

", + "rst_description": "Represents a `result `_ of an inline query that was chosen by the user and sent to their chat partner.\n**Note:** It is necessary to enable `inline feedback `_ via `@BotFather `_ in order to receive these objects in updates.", + "annotations": [ + { + "type": "String", + "description": "The unique identifier for the result that was chosen", + "html_description": "The unique identifier for the result that was chosen", + "rst_description": "The unique identifier for the result that was chosen\n", + "name": "result_id", + "required": true + }, + { + "type": "User", + "description": "The user that chose the result", + "html_description": "The user that chose the result", + "rst_description": "The user that chose the result\n", + "name": "from", + "required": true + }, + { + "type": "Location", + "description": "Sender location, only for bots that require user location", + "html_description": "Optional. Sender location, only for bots that require user location", + "rst_description": "*Optional*. Sender location, only for bots that require user location\n", + "name": "location", + "required": false + }, + { + "type": "String", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "inline_message_id", + "required": false + }, + { + "type": "String", + "description": "The query that was used to obtain the result", + "html_description": "The query that was used to obtain the result", + "rst_description": "The query that was used to obtain the result\n", + "name": "query", + "required": true + } + ], + "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." + }, + { + "title": "Payments", + "anchor": "payments", + "children": [ + { + "anchor": "sendinvoice", + "name": "sendInvoice", + "description": "Use this method to send invoices. On success, the sent Message is returned.", + "html_description": "

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

", + "rst_description": "Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": 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": "String", + "required": true, + "description": "Product name, 1-32 characters", + "html_description": "Product name, 1-32 characters", + "rst_description": "Product name, 1-32 characters\n", + "name": "title" + }, + { + "type": "String", + "required": true, + "description": "Product description, 1-255 characters", + "html_description": "Product description, 1-255 characters", + "rst_description": "Product description, 1-255 characters\n", + "name": "description" + }, + { + "type": "String", + "required": true, + "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" + }, + { + "type": "String", + "required": false, + "description": "Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.", + "html_description": "Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.", + "rst_description": "Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.\n", + "name": "provider_token" + }, + { + "type": "String", + "required": true, + "description": "Three-letter ISO 4217 currency code, see more on currencies. Pass 'XTR' for payments in Telegram Stars.", + "html_description": "Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars.", + "rst_description": "Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.\n", + "name": "currency" + }, + { + "type": "Array of LabeledPrice", + "required": true, + "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.", + "html_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.", + "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 maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass 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.", + "html_description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass 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.", + "rst_description": "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 `_.\n", + "name": "max_tip_amount" + }, + { + "type": "Array of Integer", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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*.\n", + "name": "suggested_tip_amounts" + }, + { + "type": "String", + "required": false, + "description": "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", + "html_description": "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", + "rst_description": "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\n", + "name": "start_parameter" + }, + { + "type": "String", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "provider_data" + }, + { + "type": "String", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "photo_url" + }, + { + "type": "Integer", + "required": false, + "description": "Photo size in bytes", + "html_description": "Photo size in bytes", + "rst_description": "Photo size in bytes\n", + "name": "photo_size" + }, + { + "type": "Integer", + "required": false, + "description": "Photo width", + "html_description": "Photo width", + "rst_description": "Photo width\n", + "name": "photo_width" + }, + { + "type": "Integer", + "required": false, + "description": "Photo height", + "html_description": "Photo height", + "rst_description": "Photo height\n", + "name": "photo_height" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_name" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_phone_number" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_email" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_shipping_address" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_.\n", + "name": "send_phone_number_to_provider" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_.\n", + "name": "send_email_to_provider" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_.\n", + "name": "is_flexible" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "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, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.", + "html_description": "A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.", + "rst_description": "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.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "createinvoicelink", + "name": "createInvoiceLink", + "description": "Use this method to create a link for an invoice. Returns the created invoice link as String on success.", + "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, + "description": "Product name, 1-32 characters", + "html_description": "Product name, 1-32 characters", + "rst_description": "Product name, 1-32 characters\n", + "name": "title" + }, + { + "type": "String", + "required": true, + "description": "Product description, 1-255 characters", + "html_description": "Product description, 1-255 characters", + "rst_description": "Product description, 1-255 characters\n", + "name": "description" + }, + { + "type": "String", + "required": true, + "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" + }, + { + "type": "String", + "required": false, + "description": "Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.", + "html_description": "Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.", + "rst_description": "Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.\n", + "name": "provider_token" + }, + { + "type": "String", + "required": true, + "description": "Three-letter ISO 4217 currency code, see more on currencies. Pass 'XTR' for payments in Telegram Stars.", + "html_description": "Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars.", + "rst_description": "Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.\n", + "name": "currency" + }, + { + "type": "Array of LabeledPrice", + "required": true, + "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.", + "html_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.", + "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, + "description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass 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.", + "html_description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass 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.", + "rst_description": "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 `_.\n", + "name": "max_tip_amount" + }, + { + "type": "Array of Integer", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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*.\n", + "name": "suggested_tip_amounts" + }, + { + "type": "String", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "provider_data" + }, + { + "type": "String", + "required": false, + "description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.", + "html_description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.", + "rst_description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.\n", + "name": "photo_url" + }, + { + "type": "Integer", + "required": false, + "description": "Photo size in bytes", + "html_description": "Photo size in bytes", + "rst_description": "Photo size in bytes\n", + "name": "photo_size" + }, + { + "type": "Integer", + "required": false, + "description": "Photo width", + "html_description": "Photo width", + "rst_description": "Photo width\n", + "name": "photo_width" + }, + { + "type": "Integer", + "required": false, + "description": "Photo height", + "html_description": "Photo height", + "rst_description": "Photo height\n", + "name": "photo_height" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_name" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_phone_number" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_email" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_shipping_address" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_.\n", + "name": "send_phone_number_to_provider" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_.\n", + "name": "send_email_to_provider" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.", + "html_description": "Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.", + "rst_description": "Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_.\n", + "name": "is_flexible" + } + ], + "category": "methods" + }, + { + "anchor": "answershippingquery", + "name": "answerShippingQuery", + "description": "If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.", + "html_description": "

If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.

", + "rst_description": "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.", + "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": "shipping_query_id" + }, + { + "type": "Boolean", + "required": true, + "description": "Pass True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)", + "html_description": "Pass True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)", + "rst_description": "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)\n", + "name": "ok" + }, + { + "type": "Array of ShippingOption", + "required": false, + "description": "Required if ok is True. A JSON-serialized array of available shipping options.", + "html_description": "Required if ok is True. A JSON-serialized array of available shipping options.", + "rst_description": "Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options.\n", + "name": "shipping_options" + }, + { + "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", + "name": "error_message" + } + ], + "category": "methods" + }, + { + "anchor": "answerprecheckoutquery", + "name": "answerPreCheckoutQuery", + "description": "Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.", + "html_description": "

Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.

", + "rst_description": "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.", + "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": "pre_checkout_query_id" + }, + { + "type": "Boolean", + "required": true, + "description": "Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.", + "html_description": "Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.", + "rst_description": "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.\n", + "name": "ok" + }, + { + "type": "String", + "required": false, + "description": "Required if ok is 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.", + "html_description": "Required if ok is 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.", + "rst_description": "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.\n", + "name": "error_message" + } + ], + "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", + "description": "Returns the bot's Telegram Star transactions in chronological order. On success, returns a StarTransactions object.", + "html_description": "

Returns the bot's Telegram Star transactions in chronological order. On success, returns a StarTransactions object.

", + "rst_description": "Returns the bot's Telegram Star transactions in chronological order. On success, returns a :class:`aiogram.types.star_transactions.StarTransactions` object.", + "annotations": [ + { + "type": "Integer", + "required": false, + "description": "Number of transactions to skip in the response", + "html_description": "Number of transactions to skip in the response", + "rst_description": "Number of transactions to skip in the response\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "html_description": "The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "rst_description": "The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.\n", + "name": "limit" + } + ], + "category": "methods" + }, + { + "anchor": "refundstarpayment", + "name": "refundStarPayment", + "description": "Refunds a successful payment in Telegram Stars. Returns True on success.", + "html_description": "

Refunds a successful payment in Telegram Stars. Returns True on success.

", + "rst_description": "Refunds a successful payment in `Telegram Stars `_. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Identifier of the user whose payment will be refunded", + "html_description": "Identifier of the user whose payment will be refunded", + "rst_description": "Identifier of the user whose payment will be refunded\n", + "name": "user_id" + }, + { + "type": "String", + "required": true, + "description": "Telegram payment identifier", + "html_description": "Telegram payment identifier", + "rst_description": "Telegram payment identifier\n", + "name": "telegram_payment_charge_id" + } + ], + "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", + "description": "This object represents a portion of the price for goods or services.", + "html_description": "

This object represents a portion of the price for goods or services.

", + "rst_description": "This object represents a portion of the price for goods or services.", + "annotations": [ + { + "type": "String", + "description": "Portion label", + "html_description": "Portion label", + "rst_description": "Portion label\n", + "name": "label", + "required": true + }, + { + "type": "Integer", + "description": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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": "Price of the product 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).\n", + "name": "amount", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "invoice", + "name": "Invoice", + "description": "This object contains basic information about an invoice.", + "html_description": "

This object contains basic information about an invoice.

", + "rst_description": "This object contains basic information about an invoice.", + "annotations": [ + { + "type": "String", + "description": "Product name", + "html_description": "Product name", + "rst_description": "Product name\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Product description", + "html_description": "Product description", + "rst_description": "Product description\n", + "name": "description", + "required": true + }, + { + "type": "String", + "description": "Unique bot deep-linking parameter that can be used to generate this invoice", + "html_description": "Unique bot deep-linking parameter that can be used to generate this invoice", + "rst_description": "Unique bot deep-linking parameter that can be used to generate this invoice\n", + "name": "start_parameter", + "required": true + }, + { + "type": "String", + "description": "Three-letter ISO 4217 currency code, or 'XTR' for payments in Telegram Stars", + "html_description": "Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars", + "rst_description": "Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars `_\n", + "name": "currency", + "required": true + }, + { + "type": "Integer", + "description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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 price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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 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).\n", + "name": "total_amount", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "shippingaddress", + "name": "ShippingAddress", + "description": "This object represents a shipping address.", + "html_description": "

This object represents a shipping address.

", + "rst_description": "This object represents a shipping address.", + "annotations": [ + { + "type": "String", + "description": "Two-letter ISO 3166-1 alpha-2 country code", + "html_description": "Two-letter ISO 3166-1 alpha-2 country code", + "rst_description": "Two-letter `ISO 3166-1 alpha-2 `_ country code\n", + "name": "country_code", + "required": true + }, + { + "type": "String", + "description": "State, if applicable", + "html_description": "State, if applicable", + "rst_description": "State, if applicable\n", + "name": "state", + "required": true + }, + { + "type": "String", + "description": "City", + "html_description": "City", + "rst_description": "City\n", + "name": "city", + "required": true + }, + { + "type": "String", + "description": "First line for the address", + "html_description": "First line for the address", + "rst_description": "First line for the address\n", + "name": "street_line1", + "required": true + }, + { + "type": "String", + "description": "Second line for the address", + "html_description": "Second line for the address", + "rst_description": "Second line for the address\n", + "name": "street_line2", + "required": true + }, + { + "type": "String", + "description": "Address post code", + "html_description": "Address post code", + "rst_description": "Address post code\n", + "name": "post_code", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "orderinfo", + "name": "OrderInfo", + "description": "This object represents information about an order.", + "html_description": "

This object represents information about an order.

", + "rst_description": "This object represents information about an order.", + "annotations": [ + { + "type": "String", + "description": "User name", + "html_description": "Optional. User name", + "rst_description": "*Optional*. User name\n", + "name": "name", + "required": false + }, + { + "type": "String", + "description": "User's phone number", + "html_description": "Optional. User's phone number", + "rst_description": "*Optional*. User's phone number\n", + "name": "phone_number", + "required": false + }, + { + "type": "String", + "description": "User email", + "html_description": "Optional. User email", + "rst_description": "*Optional*. User email\n", + "name": "email", + "required": false + }, + { + "type": "ShippingAddress", + "description": "User shipping address", + "html_description": "Optional. User shipping address", + "rst_description": "*Optional*. User shipping address\n", + "name": "shipping_address", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "shippingoption", + "name": "ShippingOption", + "description": "This object represents one shipping option.", + "html_description": "

This object represents one shipping option.

", + "rst_description": "This object represents one shipping option.", + "annotations": [ + { + "type": "String", + "description": "Shipping option identifier", + "html_description": "Shipping option identifier", + "rst_description": "Shipping option identifier\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Option title", + "html_description": "Option title", + "rst_description": "Option title\n", + "name": "title", + "required": true + }, + { + "type": "Array of LabeledPrice", + "description": "List of price portions", + "html_description": "List of price portions", + "rst_description": "List of price portions\n", + "name": "prices", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "successfulpayment", + "name": "SuccessfulPayment", + "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", + "description": "Three-letter ISO 4217 currency code, or 'XTR' for payments in Telegram Stars", + "html_description": "Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars", + "rst_description": "Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars `_\n", + "name": "currency", + "required": true + }, + { + "type": "Integer", + "description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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 price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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 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).\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": "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", + "html_description": "Optional. Identifier of the shipping option chosen by the user", + "rst_description": "*Optional*. Identifier of the shipping option chosen by the user\n", + "name": "shipping_option_id", + "required": false + }, + { + "type": "OrderInfo", + "description": "Order information provided by the user", + "html_description": "Optional. Order information provided by the user", + "rst_description": "*Optional*. Order information provided by the user\n", + "name": "order_info", + "required": false + }, + { + "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": "Provider payment identifier", + "rst_description": "Provider payment identifier\n", + "name": "provider_payment_charge_id", + "required": true + } + ], + "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", + "description": "This object contains information about an incoming shipping query.", + "html_description": "

This object contains information about an incoming shipping query.

", + "rst_description": "This object contains information about an incoming shipping query.", + "annotations": [ + { + "type": "String", + "description": "Unique query identifier", + "html_description": "Unique query identifier", + "rst_description": "Unique query identifier\n", + "name": "id", + "required": true + }, + { + "type": "User", + "description": "User who sent the query", + "html_description": "User who sent the query", + "rst_description": "User who sent the query\n", + "name": "from", + "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": "ShippingAddress", + "description": "User specified shipping address", + "html_description": "User specified shipping address", + "rst_description": "User specified shipping address\n", + "name": "shipping_address", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "precheckoutquery", + "name": "PreCheckoutQuery", + "description": "This object contains information about an incoming pre-checkout query.", + "html_description": "

This object contains information about an incoming pre-checkout query.

", + "rst_description": "This object contains information about an incoming pre-checkout query.", + "annotations": [ + { + "type": "String", + "description": "Unique query identifier", + "html_description": "Unique query identifier", + "rst_description": "Unique query identifier\n", + "name": "id", + "required": true + }, + { + "type": "User", + "description": "User who sent the query", + "html_description": "User who sent the query", + "rst_description": "User who sent the query\n", + "name": "from", + "required": true + }, + { + "type": "String", + "description": "Three-letter ISO 4217 currency code, or 'XTR' for payments in Telegram Stars", + "html_description": "Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars", + "rst_description": "Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars `_\n", + "name": "currency", + "required": true + }, + { + "type": "Integer", + "description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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 price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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 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).\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": "Identifier of the shipping option chosen by the user", + "html_description": "Optional. Identifier of the shipping option chosen by the user", + "rst_description": "*Optional*. Identifier of the shipping option chosen by the user\n", + "name": "shipping_option_id", + "required": false + }, + { + "type": "OrderInfo", + "description": "Order information provided by the user", + "html_description": "Optional. Order information provided by the user", + "rst_description": "*Optional*. Order information provided by the user\n", + "name": "order_info", + "required": false + } + ], + "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", + "description": "This object describes the state of a revenue withdrawal operation. Currently, it can be one of\n - RevenueWithdrawalStatePending\n - RevenueWithdrawalStateSucceeded\n - RevenueWithdrawalStateFailed", + "html_description": "

This object describes the state of a revenue withdrawal operation. Currently, it can be one of

", + "rst_description": "This object describes the state of a revenue withdrawal operation. Currently, it can be one of\n\n - :class:`aiogram.types.revenue_withdrawal_state_pending.RevenueWithdrawalStatePending`\n - :class:`aiogram.types.revenue_withdrawal_state_succeeded.RevenueWithdrawalStateSucceeded`\n - :class:`aiogram.types.revenue_withdrawal_state_failed.RevenueWithdrawalStateFailed`", + "annotations": [], + "category": "types" + }, + { + "anchor": "revenuewithdrawalstatepending", + "name": "RevenueWithdrawalStatePending", + "description": "The withdrawal is in progress.", + "html_description": "

The withdrawal is in progress.

", + "rst_description": "The withdrawal is in progress.", + "annotations": [ + { + "type": "String", + "description": "Type of the state, always 'pending'", + "html_description": "Type of the state, always “pending”", + "rst_description": "Type of the state, always 'pending'\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "revenuewithdrawalstatesucceeded", + "name": "RevenueWithdrawalStateSucceeded", + "description": "The withdrawal succeeded.", + "html_description": "

The withdrawal succeeded.

", + "rst_description": "The withdrawal succeeded.", + "annotations": [ + { + "type": "String", + "description": "Type of the state, always 'succeeded'", + "html_description": "Type of the state, always “succeeded”", + "rst_description": "Type of the state, always 'succeeded'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Date the withdrawal was completed in Unix time", + "html_description": "Date the withdrawal was completed in Unix time", + "rst_description": "Date the withdrawal was completed in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "String", + "description": "An HTTPS URL that can be used to see transaction details", + "html_description": "An HTTPS URL that can be used to see transaction details", + "rst_description": "An HTTPS URL that can be used to see transaction details\n", + "name": "url", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "revenuewithdrawalstatefailed", + "name": "RevenueWithdrawalStateFailed", + "description": "The withdrawal failed and the transaction was refunded.", + "html_description": "

The withdrawal failed and the transaction was refunded.

", + "rst_description": "The withdrawal failed and the transaction was refunded.", + "annotations": [ + { + "type": "String", + "description": "Type of the state, always 'failed'", + "html_description": "Type of the state, always “failed”", + "rst_description": "Type of the state, always 'failed'\n", + "name": "type", + "required": true + } + ], + "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 - 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" + }, + { + "anchor": "transactionpartneruser", + "name": "TransactionPartnerUser", + "description": "Describes a transaction with a user.", + "html_description": "

Describes a transaction with a user.

", + "rst_description": "Describes a transaction with a user.", + "annotations": [ + { + "type": "String", + "description": "Type of the transaction partner, always 'user'", + "html_description": "Type of the transaction partner, always “user”", + "rst_description": "Type of the transaction partner, always 'user'\n", + "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", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "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. 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" + }, + { + "anchor": "transactionpartnerfragment", + "name": "TransactionPartnerFragment", + "description": "Describes a withdrawal transaction with Fragment.", + "html_description": "

Describes a withdrawal transaction with Fragment.

", + "rst_description": "Describes a withdrawal transaction with Fragment.", + "annotations": [ + { + "type": "String", + "description": "Type of the transaction partner, always 'fragment'", + "html_description": "Type of the transaction partner, always “fragment”", + "rst_description": "Type of the transaction partner, always 'fragment'\n", + "name": "type", + "required": true + }, + { + "type": "RevenueWithdrawalState", + "description": "State of the transaction if the transaction is outgoing", + "html_description": "Optional. State of the transaction if the transaction is outgoing", + "rst_description": "*Optional*. State of the transaction if the transaction is outgoing\n", + "name": "withdrawal_state", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "transactionpartnertelegramads", + "name": "TransactionPartnerTelegramAds", + "description": "Describes a withdrawal transaction to the Telegram Ads platform.", + "html_description": "

Describes a withdrawal transaction to the Telegram Ads platform.

", + "rst_description": "Describes a withdrawal transaction to the Telegram Ads platform.", + "annotations": [ + { + "type": "String", + "description": "Type of the transaction partner, always 'telegram_ads'", + "html_description": "Type of the transaction partner, always “telegram_ads”", + "rst_description": "Type of the transaction partner, always 'telegram_ads'\n", + "name": "type", + "required": true + } + ], + "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", + "description": "Describes a transaction with an unknown source or recipient.", + "html_description": "

Describes a transaction with an unknown source or recipient.

", + "rst_description": "Describes a transaction with an unknown source or recipient.", + "annotations": [ + { + "type": "String", + "description": "Type of the transaction partner, always 'other'", + "html_description": "Type of the transaction partner, always “other”", + "rst_description": "Type of the transaction partner, always 'other'\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "startransaction", + "name": "StarTransaction", + "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 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": "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", + "html_description": "Date the transaction was created in Unix time", + "rst_description": "Date the transaction was created in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "TransactionPartner", + "description": "Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions", + "html_description": "Optional. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions", + "rst_description": "*Optional*. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions\n", + "name": "source", + "required": false + }, + { + "type": "TransactionPartner", + "description": "Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions", + "html_description": "Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions", + "rst_description": "*Optional*. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions\n", + "name": "receiver", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "startransactions", + "name": "StarTransactions", + "description": "Contains a list of Telegram Star transactions.", + "html_description": "

Contains a list of Telegram Star transactions.

", + "rst_description": "Contains a list of Telegram Star transactions.", + "annotations": [ + { + "type": "Array of StarTransaction", + "description": "The list of transactions", + "html_description": "The list of transactions", + "rst_description": "The list of transactions\n", + "name": "transactions", + "required": true + } + ], + "category": "types" + } + ], + "description": "Your bot can accept payments from Telegram users. Please see the introduction to payments for more details on the process and how to set up payments for your bot." + }, + { + "title": "Telegram Passport", + "anchor": "telegram-passport", + "children": [ + { + "anchor": "passportdata", + "name": "PassportData", + "description": "Describes Telegram Passport data shared with the bot by the user.", + "html_description": "

Describes Telegram Passport data shared with the bot by the user.

", + "rst_description": "Describes Telegram Passport data shared with the bot by the user.", + "annotations": [ + { + "type": "Array of EncryptedPassportElement", + "description": "Array with information about documents and other Telegram Passport elements that was shared with the bot", + "html_description": "Array with information about documents and other Telegram Passport elements that was shared with the bot", + "rst_description": "Array with information about documents and other Telegram Passport elements that was shared with the bot\n", + "name": "data", + "required": true + }, + { + "type": "EncryptedCredentials", + "description": "Encrypted credentials required to decrypt the data", + "html_description": "Encrypted credentials required to decrypt the data", + "rst_description": "Encrypted credentials required to decrypt the data\n", + "name": "credentials", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportfile", + "name": "PassportFile", + "description": "This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.", + "html_description": "

This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.

", + "rst_description": "This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.", + "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": "File size in bytes", + "html_description": "File size in bytes", + "rst_description": "File size in bytes\n", + "name": "file_size", + "required": true + }, + { + "type": "Integer", + "description": "Unix time when the file was uploaded", + "html_description": "Unix time when the file was uploaded", + "rst_description": "Unix time when the file was uploaded\n", + "name": "file_date", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "encryptedpassportelement", + "name": "EncryptedPassportElement", + "description": "Describes documents or other Telegram Passport elements shared with the bot by the user.", + "html_description": "

Describes documents or other Telegram Passport elements shared with the bot by the user.

", + "rst_description": "Describes documents or other Telegram Passport elements shared with the bot by the user.", + "annotations": [ + { + "type": "String", + "description": "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'.", + "html_description": "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”.", + "rst_description": "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'.\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "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 EncryptedCredentials.", + "html_description": "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 EncryptedCredentials.", + "rst_description": "*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`.\n", + "name": "data", + "required": false + }, + { + "type": "String", + "description": "User's verified phone number; available only for 'phone_number' type", + "html_description": "Optional. User's verified phone number; available only for “phone_number” type", + "rst_description": "*Optional*. User's verified phone number; available only for 'phone_number' type\n", + "name": "phone_number", + "required": false + }, + { + "type": "String", + "description": "User's verified email address; available only for 'email' type", + "html_description": "Optional. User's verified email address; available only for “email” type", + "rst_description": "*Optional*. User's verified email address; available only for 'email' type\n", + "name": "email", + "required": false + }, + { + "type": "Array of PassportFile", + "description": "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 EncryptedCredentials.", + "html_description": "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 EncryptedCredentials.", + "rst_description": "*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`.\n", + "name": "files", + "required": false + }, + { + "type": "PassportFile", + "description": "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 EncryptedCredentials.", + "html_description": "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 EncryptedCredentials.", + "rst_description": "*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`.\n", + "name": "front_side", + "required": false + }, + { + "type": "PassportFile", + "description": "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 EncryptedCredentials.", + "html_description": "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 EncryptedCredentials.", + "rst_description": "*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`.\n", + "name": "reverse_side", + "required": false + }, + { + "type": "PassportFile", + "description": "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 EncryptedCredentials.", + "html_description": "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 EncryptedCredentials.", + "rst_description": "*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`.\n", + "name": "selfie", + "required": false + }, + { + "type": "Array of PassportFile", + "description": "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 EncryptedCredentials.", + "html_description": "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 EncryptedCredentials.", + "rst_description": "*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`.\n", + "name": "translation", + "required": false + }, + { + "type": "String", + "description": "Base64-encoded element hash for using in PassportElementErrorUnspecified", + "html_description": "Base64-encoded element hash for using in PassportElementErrorUnspecified", + "rst_description": "Base64-encoded element hash for using in :class:`aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified`\n", + "name": "hash", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "encryptedcredentials", + "name": "EncryptedCredentials", + "description": "Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.", + "html_description": "

Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.

", + "rst_description": "Describes data required for decrypting and authenticating :class:`aiogram.types.encrypted_passport_element.EncryptedPassportElement`. See the `Telegram Passport Documentation `_ for a complete description of the data decryption and authentication processes.", + "annotations": [ + { + "type": "String", + "description": "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication", + "html_description": "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication", + "rst_description": "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for :class:`aiogram.types.encrypted_passport_element.EncryptedPassportElement` decryption and authentication\n", + "name": "data", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded data hash for data authentication", + "html_description": "Base64-encoded data hash for data authentication", + "rst_description": "Base64-encoded data hash for data authentication\n", + "name": "hash", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption", + "html_description": "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption", + "rst_description": "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption\n", + "name": "secret", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "setpassportdataerrors", + "name": "setPassportDataErrors", + "description": "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 True on success.\nUse this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.", + "html_description": "

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 True on success.

Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.

", + "rst_description": "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.\nUse this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier", + "html_description": "User identifier", + "rst_description": "User identifier\n", + "name": "user_id" + }, + { + "type": "Array of PassportElementError", + "required": true, + "description": "A JSON-serialized array describing the errors", + "html_description": "A JSON-serialized array describing the errors", + "rst_description": "A JSON-serialized array describing the errors\n", + "name": "errors" + } + ], + "category": "methods" + }, + { + "anchor": "passportelementerror", + "name": "PassportElementError", + "description": "This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:\n - PassportElementErrorDataField\n - PassportElementErrorFrontSide\n - PassportElementErrorReverseSide\n - PassportElementErrorSelfie\n - PassportElementErrorFile\n - PassportElementErrorFiles\n - PassportElementErrorTranslationFile\n - PassportElementErrorTranslationFiles\n - PassportElementErrorUnspecified", + "html_description": "

This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:

", + "rst_description": "This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:\n\n - :class:`aiogram.types.passport_element_error_data_field.PassportElementErrorDataField`\n - :class:`aiogram.types.passport_element_error_front_side.PassportElementErrorFrontSide`\n - :class:`aiogram.types.passport_element_error_reverse_side.PassportElementErrorReverseSide`\n - :class:`aiogram.types.passport_element_error_selfie.PassportElementErrorSelfie`\n - :class:`aiogram.types.passport_element_error_file.PassportElementErrorFile`\n - :class:`aiogram.types.passport_element_error_files.PassportElementErrorFiles`\n - :class:`aiogram.types.passport_element_error_translation_file.PassportElementErrorTranslationFile`\n - :class:`aiogram.types.passport_element_error_translation_files.PassportElementErrorTranslationFiles`\n - :class:`aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified`", + "annotations": [], + "category": "types" + }, + { + "anchor": "passportelementerrordatafield", + "name": "PassportElementErrorDataField", + "description": "Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.", + "html_description": "

Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.

", + "rst_description": "Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be data", + "html_description": "Error source, must be data", + "rst_description": "Error source, must be *data*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the error, one of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address'", + "html_description": "The section of the user's Telegram Passport which has the error, one of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”", + "rst_description": "The section of the user's Telegram Passport which has the error, one of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Name of the data field which has the error", + "html_description": "Name of the data field which has the error", + "rst_description": "Name of the data field which has the error\n", + "name": "field_name", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded data hash", + "html_description": "Base64-encoded data hash", + "rst_description": "Base64-encoded data hash\n", + "name": "data_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportelementerrorfrontside", + "name": "PassportElementErrorFrontSide", + "description": "Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.", + "html_description": "

Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.

", + "rst_description": "Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be front_side", + "html_description": "Error source, must be front_side", + "rst_description": "Error source, must be *front_side*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded hash of the file with the front side of the document", + "html_description": "Base64-encoded hash of the file with the front side of the document", + "rst_description": "Base64-encoded hash of the file with the front side of the document\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportelementerrorreverseside", + "name": "PassportElementErrorReverseSide", + "description": "Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.", + "html_description": "

Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.

", + "rst_description": "Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be reverse_side", + "html_description": "Error source, must be reverse_side", + "rst_description": "Error source, must be *reverse_side*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'driver_license', 'identity_card'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “driver_license”, “identity_card”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'driver_license', 'identity_card'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded hash of the file with the reverse side of the document", + "html_description": "Base64-encoded hash of the file with the reverse side of the document", + "rst_description": "Base64-encoded hash of the file with the reverse side of the document\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportelementerrorselfie", + "name": "PassportElementErrorSelfie", + "description": "Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.", + "html_description": "

Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.

", + "rst_description": "Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be selfie", + "html_description": "Error source, must be selfie", + "rst_description": "Error source, must be *selfie*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded hash of the file with the selfie", + "html_description": "Base64-encoded hash of the file with the selfie", + "rst_description": "Base64-encoded hash of the file with the selfie\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportelementerrorfile", + "name": "PassportElementErrorFile", + "description": "Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.", + "html_description": "

Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.

", + "rst_description": "Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be file", + "html_description": "Error source, must be file", + "rst_description": "Error source, must be *file*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded file hash", + "html_description": "Base64-encoded file hash", + "rst_description": "Base64-encoded file hash\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportelementerrorfiles", + "name": "PassportElementErrorFiles", + "description": "Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.", + "html_description": "

Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.

", + "rst_description": "Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be files", + "html_description": "Error source, must be files", + "rst_description": "Error source, must be *files*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'\n", + "name": "type", + "required": true + }, + { + "type": "Array of String", + "description": "List of base64-encoded file hashes", + "html_description": "List of base64-encoded file hashes", + "rst_description": "List of base64-encoded file hashes\n", + "name": "file_hashes", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportelementerrortranslationfile", + "name": "PassportElementErrorTranslationFile", + "description": "Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.", + "html_description": "

Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.

", + "rst_description": "Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be translation_file", + "html_description": "Error source, must be translation_file", + "rst_description": "Error source, must be *translation_file*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "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'", + "html_description": "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”", + "rst_description": "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'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded file hash", + "html_description": "Base64-encoded file hash", + "rst_description": "Base64-encoded file hash\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportelementerrortranslationfiles", + "name": "PassportElementErrorTranslationFiles", + "description": "Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.", + "html_description": "

Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.

", + "rst_description": "Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be translation_files", + "html_description": "Error source, must be translation_files", + "rst_description": "Error source, must be *translation_files*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "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'", + "html_description": "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”", + "rst_description": "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'\n", + "name": "type", + "required": true + }, + { + "type": "Array of String", + "description": "List of base64-encoded file hashes", + "html_description": "List of base64-encoded file hashes", + "rst_description": "List of base64-encoded file hashes\n", + "name": "file_hashes", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportelementerrorunspecified", + "name": "PassportElementErrorUnspecified", + "description": "Represents an issue in an unspecified place. The error is considered resolved when new data is added.", + "html_description": "

Represents an issue in an unspecified place. The error is considered resolved when new data is added.

", + "rst_description": "Represents an issue in an unspecified place. The error is considered resolved when new data is added.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be unspecified", + "html_description": "Error source, must be unspecified", + "rst_description": "Error source, must be *unspecified*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "Type of element of the user's Telegram Passport which has the issue", + "html_description": "Type of element of the user's Telegram Passport which has the issue", + "rst_description": "Type of element of the user's Telegram Passport which has the issue\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded element hash", + "html_description": "Base64-encoded element hash", + "rst_description": "Base64-encoded element hash\n", + "name": "element_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } + ], + "description": "Telegram Passport is a unified authorization method for services that require personal identification. Users can upload their documents once, then instantly share their data with services that require real-world ID (finance, ICOs, etc.). Please see the manual for details." + }, + { + "title": "Games", + "anchor": "games", + "children": [ + { + "anchor": "sendgame", + "name": "sendGame", + "description": "Use this method to send a game. On success, the sent Message is returned.", + "html_description": "

Use this method to send a game. On success, the sent Message is returned.

", + "rst_description": "Use this method to send a game. 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", + "required": true, + "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 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": "String", + "required": true, + "description": "Short name of the game, serves as the unique identifier for the game. Set up your games via @BotFather.", + "html_description": "Short name of the game, serves as the unique identifier for the game. Set up your games via @BotFather.", + "rst_description": "Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_.\n", + "name": "game_short_name" + }, + { + "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": "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; for private chats only", + "html_description": "Unique identifier of the message effect to be added to the message; for private chats only", + "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", + "name": "message_effect_id" + }, + { + "type": "ReplyParameters", + "required": false, + "description": "Description of the message to reply to", + "html_description": "Description of the message to reply to", + "rst_description": "Description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "game", + "name": "Game", + "description": "This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.", + "html_description": "

This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.

", + "rst_description": "This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.", + "annotations": [ + { + "type": "String", + "description": "Title of the game", + "html_description": "Title of the game", + "rst_description": "Title of the game\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Description of the game", + "html_description": "Description of the game", + "rst_description": "Description of the game\n", + "name": "description", + "required": true + }, + { + "type": "Array of PhotoSize", + "description": "Photo that will be displayed in the game message in chats.", + "html_description": "Photo that will be displayed in the game message in chats.", + "rst_description": "Photo that will be displayed in the game message in chats.\n", + "name": "photo", + "required": true + }, + { + "type": "String", + "description": "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 setGameScore, or manually edited using editMessageText. 0-4096 characters.", + "html_description": "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 setGameScore, or manually edited using editMessageText. 0-4096 characters.", + "rst_description": "*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.\n", + "name": "text", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in text, such as usernames, URLs, bot commands, etc.", + "html_description": "Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.", + "rst_description": "*Optional*. Special entities that appear in *text*, such as usernames, URLs, bot commands, etc.\n", + "name": "text_entities", + "required": false + }, + { + "type": "Animation", + "description": "Animation that will be displayed in the game message in chats. Upload via BotFather", + "html_description": "Optional. Animation that will be displayed in the game message in chats. Upload via BotFather", + "rst_description": "*Optional*. Animation that will be displayed in the game message in chats. Upload via `BotFather `_\n", + "name": "animation", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "callbackgame", + "name": "CallbackGame", + "description": "A placeholder, currently holds no information. Use BotFather to set up your game.", + "html_description": "

A placeholder, currently holds no information. Use BotFather to set up your game.

", + "rst_description": "A placeholder, currently holds no information. Use `BotFather `_ to set up your game.", + "annotations": [], + "category": "types" + }, + { + "anchor": "setgamescore", + "name": "setGameScore", + "description": "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 Message is returned, otherwise 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 False.", + "html_description": "

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 Message is returned, otherwise 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 False.

", + "rst_description": "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`.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier", + "html_description": "User identifier", + "rst_description": "User identifier\n", + "name": "user_id" + }, + { + "type": "Integer", + "required": true, + "description": "New score, must be non-negative", + "html_description": "New score, must be non-negative", + "rst_description": "New score, must be non-negative\n", + "name": "score" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters", + "html_description": "Pass True if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters", + "rst_description": "Pass :code:`True` if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters\n", + "name": "force" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the game message should not be automatically edited to include the current scoreboard", + "html_description": "Pass True if the game message should not be automatically edited to include the current scoreboard", + "rst_description": "Pass :code:`True` if the game message should not be automatically edited to include the current scoreboard\n", + "name": "disable_edit_message" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the sent message", + "html_description": "Required if inline_message_id is not specified. Identifier of the sent message", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the sent message\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + } + ], + "category": "methods" + }, + { + "anchor": "getgamehighscores", + "name": "getGameHighScores", + "description": "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 GameHighScore objects.\nThis method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change.", + "html_description": "

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 GameHighScore objects.

\n

This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change.

\n
", + "rst_description": "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.\n\n This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Target user id", + "html_description": "Target user id", + "rst_description": "Target user id\n", + "name": "user_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the sent message", + "html_description": "Required if inline_message_id is not specified. Identifier of the sent message", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the sent message\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + } + ], + "category": "methods" + }, + { + "anchor": "gamehighscore", + "name": "GameHighScore", + "description": "This object represents one row of the high scores table for a game.\nAnd that's about all we've got for now.\nIf you've got any questions, please check out our Bot FAQ", + "html_description": "

This object represents one row of the high scores table for a game.

And that's about all we've got for now.
\nIf you've got any questions, please check out our Bot FAQ »

", + "rst_description": "This object represents one row of the high scores table for a game.\nAnd that's about all we've got for now.\n\nIf you've got any questions, please check out our `https://core.telegram.org/bots/faq `_ **Bot FAQ »**", + "annotations": [ + { + "type": "Integer", + "description": "Position in high score table for the game", + "html_description": "Position in high score table for the game", + "rst_description": "Position in high score table for the game\n", + "name": "position", + "required": true + }, + { + "type": "User", + "description": "User", + "html_description": "User", + "rst_description": "User\n", + "name": "user", + "required": true + }, + { + "type": "Integer", + "description": "Score", + "html_description": "Score", + "rst_description": "Score\n", + "name": "score", + "required": true + } + ], + "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 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/templates/enums/entity.rst.jinja2 b/.butcher/templates/enums/entity.rst.jinja2 new file mode 100644 index 00000000..da25faa0 --- /dev/null +++ b/.butcher/templates/enums/entity.rst.jinja2 @@ -0,0 +1,13 @@ +{{ object.name|header('#') }} +{{ object.name }} +{{ object.name|header('#') }} + + +.. automodule:: aiogram.enums.{{ object.name|pythonize_name }} + :members: + :member-order: bysource + :undoc-members: True + +{% if docs %} +{{ docs }} +{% endif %} diff --git a/.butcher/templates/enums/index.rst.jinja2 b/.butcher/templates/enums/index.rst.jinja2 new file mode 100644 index 00000000..23af1de3 --- /dev/null +++ b/.butcher/templates/enums/index.rst.jinja2 @@ -0,0 +1,15 @@ +.. _enums: + +##### +Enums +##### + +Here is list of all available enums: + +{% for title, group in groups.items() %} +.. toctree:: + :maxdepth: 1 +{% for name in group %} + {{ name|pythonize_name }} +{%- endfor %} +{% endfor %} diff --git a/.butcher/templates/methods/entity.rst.jinja2 b/.butcher/templates/methods/entity.rst.jinja2 new file mode 100755 index 00000000..59fa61e2 --- /dev/null +++ b/.butcher/templates/methods/entity.rst.jinja2 @@ -0,0 +1,55 @@ +{{ object.name|header('#') }} +{{ object.name }} +{{ object.name|header('#') }} + +Returns: :obj:`{{ object.returning.parsed_type|type }}` + +.. automodule:: aiogram.methods.{{ object.name|pythonize_name }} + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: {{ object.returning.parsed_type|type }} = await bot.{{ object.name|pythonize_name }}(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.{{ object.name|pythonize_name }} import {{ object.name|pythonize_class_name }}` +- alias: :code:`from aiogram.methods import {{ object.name|pythonize_class_name }}` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: {{ object.returning.parsed_type|type }} = await bot({{ object.name|pythonize_class_name }}(...)) + +{% if can_be_used_in_webhook -%} +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return {{ object.name|pythonize_class_name }}(...) +{%- endif %} + +{% if aliased %} +As shortcut from received object +-------------------------------- +{% for alias in aliased %} +- :meth:`aiogram.types.{{ alias.type|pythonize_name }}.{{ alias.type|pythonize_class_name }}.{{ alias.name }}` +{%- endfor %} +{% endif %} diff --git a/.butcher/templates/methods/index.rst.jinja2 b/.butcher/templates/methods/index.rst.jinja2 new file mode 100644 index 00000000..a8e04c97 --- /dev/null +++ b/.butcher/templates/methods/index.rst.jinja2 @@ -0,0 +1,16 @@ +####### +Methods +####### + +Here is list of all available API methods: + +{% for title, group in groups.items() %} +{{ title }} +{{ title|header('=') }} + +.. toctree:: + :maxdepth: 1 +{% for name in group %} + {{ name|pythonize_name }} +{%- endfor %} +{% endfor %} diff --git a/.butcher/templates/types/entity.rst.jinja2 b/.butcher/templates/types/entity.rst.jinja2 new file mode 100644 index 00000000..2fd2b06e --- /dev/null +++ b/.butcher/templates/types/entity.rst.jinja2 @@ -0,0 +1,10 @@ +{{ object.name|header('#') }} +{{ object.name }} +{{ object.name|header('#') }} + + +.. automodule:: aiogram.types.{{ object.name|pythonize_name }} + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/.butcher/templates/types/index.rst.jinja2 b/.butcher/templates/types/index.rst.jinja2 new file mode 100644 index 00000000..c812ce24 --- /dev/null +++ b/.butcher/templates/types/index.rst.jinja2 @@ -0,0 +1,16 @@ +##### +Types +##### + +Here is list of all available API types: + +{% for title, group in groups.items() %} +{{ title }} +{{ title|header('=') }} + +.. toctree:: + :maxdepth: 1 +{% for name in group %} + {{ name|pythonize_name }} +{%- endfor %} +{% endfor %} 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/Animation/entity.json b/.butcher/types/Animation/entity.json new file mode 100644 index 00000000..5df8ae24 --- /dev/null +++ b/.butcher/types/Animation/entity.json @@ -0,0 +1,89 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "animation", + "name": "Animation", + "description": "This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).", + "html_description": "

This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).

", + "rst_description": "This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).", + "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 as defined by the sender", + "html_description": "Video width as defined by the sender", + "rst_description": "Video width as defined by the sender\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Video height as defined by the sender", + "html_description": "Video height as defined by the sender", + "rst_description": "Video height as defined by the sender\n", + "name": "height", + "required": true + }, + { + "type": "Integer", + "description": "Duration of the video in seconds as defined by the sender", + "html_description": "Duration of the video in seconds as defined by the sender", + "rst_description": "Duration of the video in seconds as defined by the sender\n", + "name": "duration", + "required": true + }, + { + "type": "PhotoSize", + "description": "Animation thumbnail as defined by the sender", + "html_description": "Optional. Animation thumbnail as defined by the sender", + "rst_description": "*Optional*. Animation thumbnail as defined by the sender\n", + "name": "thumbnail", + "required": false + }, + { + "type": "String", + "description": "Original animation filename as defined by the sender", + "html_description": "Optional. Original animation filename as defined by the sender", + "rst_description": "*Optional*. Original animation filename as defined by the sender\n", + "name": "file_name", + "required": false + }, + { + "type": "String", + "description": "MIME type of the file as defined by the sender", + "html_description": "Optional. MIME type of the file as defined by the sender", + "rst_description": "*Optional*. MIME type of the file as defined by the sender\n", + "name": "mime_type", + "required": false + }, + { + "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/Audio/entity.json b/.butcher/types/Audio/entity.json new file mode 100644 index 00000000..dc014e0d --- /dev/null +++ b/.butcher/types/Audio/entity.json @@ -0,0 +1,89 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "audio", + "name": "Audio", + "description": "This object represents an audio file to be treated as music by the Telegram clients.", + "html_description": "

This object represents an audio file to be treated as music by the Telegram clients.

", + "rst_description": "This object represents an audio file to be treated as music by the Telegram clients.", + "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": "Duration of the audio in seconds as defined by the sender", + "html_description": "Duration of the audio in seconds as defined by the sender", + "rst_description": "Duration of the audio in seconds as defined by the sender\n", + "name": "duration", + "required": true + }, + { + "type": "String", + "description": "Performer of the audio as defined by the sender or by audio tags", + "html_description": "Optional. Performer of the audio as defined by the sender or by audio tags", + "rst_description": "*Optional*. Performer of the audio as defined by the sender or by audio tags\n", + "name": "performer", + "required": false + }, + { + "type": "String", + "description": "Title of the audio as defined by the sender or by audio tags", + "html_description": "Optional. Title of the audio as defined by the sender or by audio tags", + "rst_description": "*Optional*. Title of the audio as defined by the sender or by audio tags\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Original filename as defined by the sender", + "html_description": "Optional. Original filename as defined by the sender", + "rst_description": "*Optional*. Original filename as defined by the sender\n", + "name": "file_name", + "required": false + }, + { + "type": "String", + "description": "MIME type of the file as defined by the sender", + "html_description": "Optional. MIME type of the file as defined by the sender", + "rst_description": "*Optional*. MIME type of the file as defined by the sender\n", + "name": "mime_type", + "required": false + }, + { + "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 + }, + { + "type": "PhotoSize", + "description": "Thumbnail of the album cover to which the music file belongs", + "html_description": "Optional. Thumbnail of the album cover to which the music file belongs", + "rst_description": "*Optional*. Thumbnail of the album cover to which the music file belongs\n", + "name": "thumbnail", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BackgroundFill/entity.json b/.butcher/types/BackgroundFill/entity.json new file mode 100644 index 00000000..90ca7d49 --- /dev/null +++ b/.butcher/types/BackgroundFill/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "backgroundfill", + "name": "BackgroundFill", + "description": "This object describes the way a background is filled based on the selected colors. Currently, it can be one of\n - BackgroundFillSolid\n - BackgroundFillGradient\n - BackgroundFillFreeformGradient", + "html_description": "

This object describes the way a background is filled based on the selected colors. Currently, it can be one of

", + "rst_description": "This object describes the way a background is filled based on the selected colors. Currently, it can be one of\n\n - :class:`aiogram.types.background_fill_solid.BackgroundFillSolid`\n - :class:`aiogram.types.background_fill_gradient.BackgroundFillGradient`\n - :class:`aiogram.types.background_fill_freeform_gradient.BackgroundFillFreeformGradient`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/BackgroundFill/subtypes.yml b/.butcher/types/BackgroundFill/subtypes.yml new file mode 100644 index 00000000..6756ad51 --- /dev/null +++ b/.butcher/types/BackgroundFill/subtypes.yml @@ -0,0 +1 @@ +discriminator: "type" diff --git a/.butcher/types/BackgroundFillFreeformGradient/entity.json b/.butcher/types/BackgroundFillFreeformGradient/entity.json new file mode 100644 index 00000000..fda187cc --- /dev/null +++ b/.butcher/types/BackgroundFillFreeformGradient/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "backgroundfillfreeformgradient", + "name": "BackgroundFillFreeformGradient", + "description": "The background is a freeform gradient that rotates after every message in the chat.", + "html_description": "

The background is a freeform gradient that rotates after every message in the chat.

", + "rst_description": "The background is a freeform gradient that rotates after every message in the chat.", + "annotations": [ + { + "type": "String", + "description": "Type of the background fill, always 'freeform_gradient'", + "html_description": "Type of the background fill, always “freeform_gradient”", + "rst_description": "Type of the background fill, always 'freeform_gradient'\n", + "name": "type", + "required": true + }, + { + "type": "Array of Integer", + "description": "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format", + "html_description": "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format", + "rst_description": "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format\n", + "name": "colors", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BackgroundFillGradient/entity.json b/.butcher/types/BackgroundFillGradient/entity.json new file mode 100644 index 00000000..1c2ba94d --- /dev/null +++ b/.butcher/types/BackgroundFillGradient/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "backgroundfillgradient", + "name": "BackgroundFillGradient", + "description": "The background is a gradient fill.", + "html_description": "

The background is a gradient fill.

", + "rst_description": "The background is a gradient fill.", + "annotations": [ + { + "type": "String", + "description": "Type of the background fill, always 'gradient'", + "html_description": "Type of the background fill, always “gradient”", + "rst_description": "Type of the background fill, always 'gradient'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Top color of the gradient in the RGB24 format", + "html_description": "Top color of the gradient in the RGB24 format", + "rst_description": "Top color of the gradient in the RGB24 format\n", + "name": "top_color", + "required": true + }, + { + "type": "Integer", + "description": "Bottom color of the gradient in the RGB24 format", + "html_description": "Bottom color of the gradient in the RGB24 format", + "rst_description": "Bottom color of the gradient in the RGB24 format\n", + "name": "bottom_color", + "required": true + }, + { + "type": "Integer", + "description": "Clockwise rotation angle of the background fill in degrees; 0-359", + "html_description": "Clockwise rotation angle of the background fill in degrees; 0-359", + "rst_description": "Clockwise rotation angle of the background fill in degrees; 0-359\n", + "name": "rotation_angle", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BackgroundFillSolid/entity.json b/.butcher/types/BackgroundFillSolid/entity.json new file mode 100644 index 00000000..9cea62b2 --- /dev/null +++ b/.butcher/types/BackgroundFillSolid/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "backgroundfillsolid", + "name": "BackgroundFillSolid", + "description": "The background is filled using the selected color.", + "html_description": "

The background is filled using the selected color.

", + "rst_description": "The background is filled using the selected color.", + "annotations": [ + { + "type": "String", + "description": "Type of the background fill, always 'solid'", + "html_description": "Type of the background fill, always “solid”", + "rst_description": "Type of the background fill, always 'solid'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "The color of the background fill in the RGB24 format", + "html_description": "The color of the background fill in the RGB24 format", + "rst_description": "The color of the background fill in the RGB24 format\n", + "name": "color", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BackgroundType/entity.json b/.butcher/types/BackgroundType/entity.json new file mode 100644 index 00000000..897450be --- /dev/null +++ b/.butcher/types/BackgroundType/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "backgroundtype", + "name": "BackgroundType", + "description": "This object describes the type of a background. Currently, it can be one of\n - BackgroundTypeFill\n - BackgroundTypeWallpaper\n - BackgroundTypePattern\n - BackgroundTypeChatTheme", + "html_description": "

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

", + "rst_description": "This object describes the type of a background. Currently, it can be one of\n\n - :class:`aiogram.types.background_type_fill.BackgroundTypeFill`\n - :class:`aiogram.types.background_type_wallpaper.BackgroundTypeWallpaper`\n - :class:`aiogram.types.background_type_pattern.BackgroundTypePattern`\n - :class:`aiogram.types.background_type_chat_theme.BackgroundTypeChatTheme`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/BackgroundType/subtypes.yml b/.butcher/types/BackgroundType/subtypes.yml new file mode 100644 index 00000000..6756ad51 --- /dev/null +++ b/.butcher/types/BackgroundType/subtypes.yml @@ -0,0 +1 @@ +discriminator: "type" diff --git a/.butcher/types/BackgroundTypeChatTheme/entity.json b/.butcher/types/BackgroundTypeChatTheme/entity.json new file mode 100644 index 00000000..1c29be7c --- /dev/null +++ b/.butcher/types/BackgroundTypeChatTheme/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "backgroundtypechattheme", + "name": "BackgroundTypeChatTheme", + "description": "The background is taken directly from a built-in chat theme.", + "html_description": "

The background is taken directly from a built-in chat theme.

", + "rst_description": "The background is taken directly from a built-in chat theme.", + "annotations": [ + { + "type": "String", + "description": "Type of the background, always 'chat_theme'", + "html_description": "Type of the background, always “chat_theme”", + "rst_description": "Type of the background, always 'chat_theme'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Name of the chat theme, which is usually an emoji", + "html_description": "Name of the chat theme, which is usually an emoji", + "rst_description": "Name of the chat theme, which is usually an emoji\n", + "name": "theme_name", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BackgroundTypeFill/entity.json b/.butcher/types/BackgroundTypeFill/entity.json new file mode 100644 index 00000000..c506702d --- /dev/null +++ b/.butcher/types/BackgroundTypeFill/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "backgroundtypefill", + "name": "BackgroundTypeFill", + "description": "The background is automatically filled based on the selected colors.", + "html_description": "

The background is automatically filled based on the selected colors.

", + "rst_description": "The background is automatically filled based on the selected colors.", + "annotations": [ + { + "type": "String", + "description": "Type of the background, always 'fill'", + "html_description": "Type of the background, always “fill”", + "rst_description": "Type of the background, always 'fill'\n", + "name": "type", + "required": true + }, + { + "type": "BackgroundFill", + "description": "The background fill", + "html_description": "The background fill", + "rst_description": "The background fill\n", + "name": "fill", + "required": true + }, + { + "type": "Integer", + "description": "Dimming of the background in dark themes, as a percentage; 0-100", + "html_description": "Dimming of the background in dark themes, as a percentage; 0-100", + "rst_description": "Dimming of the background in dark themes, as a percentage; 0-100\n", + "name": "dark_theme_dimming", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BackgroundTypePattern/entity.json b/.butcher/types/BackgroundTypePattern/entity.json new file mode 100644 index 00000000..336bed87 --- /dev/null +++ b/.butcher/types/BackgroundTypePattern/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the background, always 'pattern'", + "html_description": "Type of the background, always “pattern”", + "rst_description": "Type of the background, always 'pattern'\n", + "name": "type", + "required": true + }, + { + "type": "Document", + "description": "Document with the pattern", + "html_description": "Document with the pattern", + "rst_description": "Document with the pattern\n", + "name": "document", + "required": true + }, + { + "type": "BackgroundFill", + "description": "The background fill that is combined with the pattern", + "html_description": "The background fill that is combined with the pattern", + "rst_description": "The background fill that is combined with the pattern\n", + "name": "fill", + "required": true + }, + { + "type": "Integer", + "description": "Intensity of the pattern when it is shown above the filled background; 0-100", + "html_description": "Intensity of the pattern when it is shown above the filled background; 0-100", + "rst_description": "Intensity of the pattern when it is shown above the filled background; 0-100\n", + "name": "intensity", + "required": true + }, + { + "type": "True", + "description": "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", + "html_description": "Optional. 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", + "rst_description": "*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\n", + "name": "is_inverted", + "required": false + }, + { + "type": "True", + "description": "True, if the background moves slightly when the device is tilted", + "html_description": "Optional. True, if the background moves slightly when the device is tilted", + "rst_description": "*Optional*. :code:`True`, if the background moves slightly when the device is tilted\n", + "name": "is_moving", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BackgroundTypeWallpaper/entity.json b/.butcher/types/BackgroundTypeWallpaper/entity.json new file mode 100644 index 00000000..85b89982 --- /dev/null +++ b/.butcher/types/BackgroundTypeWallpaper/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "backgroundtypewallpaper", + "name": "BackgroundTypeWallpaper", + "description": "The background is a wallpaper in the JPEG format.", + "html_description": "

The background is a wallpaper in the JPEG format.

", + "rst_description": "The background is a wallpaper in the JPEG format.", + "annotations": [ + { + "type": "String", + "description": "Type of the background, always 'wallpaper'", + "html_description": "Type of the background, always “wallpaper”", + "rst_description": "Type of the background, always 'wallpaper'\n", + "name": "type", + "required": true + }, + { + "type": "Document", + "description": "Document with the wallpaper", + "html_description": "Document with the wallpaper", + "rst_description": "Document with the wallpaper\n", + "name": "document", + "required": true + }, + { + "type": "Integer", + "description": "Dimming of the background in dark themes, as a percentage; 0-100", + "html_description": "Dimming of the background in dark themes, as a percentage; 0-100", + "rst_description": "Dimming of the background in dark themes, as a percentage; 0-100\n", + "name": "dark_theme_dimming", + "required": true + }, + { + "type": "True", + "description": "True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12", + "html_description": "Optional. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12", + "rst_description": "*Optional*. :code:`True`, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12\n", + "name": "is_blurred", + "required": false + }, + { + "type": "True", + "description": "True, if the background moves slightly when the device is tilted", + "html_description": "Optional. True, if the background moves slightly when the device is tilted", + "rst_description": "*Optional*. :code:`True`, if the background moves slightly when the device is tilted\n", + "name": "is_moving", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Birthdate/entity.json b/.butcher/types/Birthdate/entity.json new file mode 100644 index 00000000..0be28d72 --- /dev/null +++ b/.butcher/types/Birthdate/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "birthdate", + "name": "Birthdate", + "description": "Describes the birthdate of a user.", + "html_description": "

Describes the birthdate of a user.

", + "rst_description": "Describes the birthdate of a user.", + "annotations": [ + { + "type": "Integer", + "description": "Day of the user's birth; 1-31", + "html_description": "Day of the user's birth; 1-31", + "rst_description": "Day of the user's birth; 1-31\n", + "name": "day", + "required": true + }, + { + "type": "Integer", + "description": "Month of the user's birth; 1-12", + "html_description": "Month of the user's birth; 1-12", + "rst_description": "Month of the user's birth; 1-12\n", + "name": "month", + "required": true + }, + { + "type": "Integer", + "description": "Year of the user's birth", + "html_description": "Optional. Year of the user's birth", + "rst_description": "*Optional*. Year of the user's birth\n", + "name": "year", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommand/entity.json b/.butcher/types/BotCommand/entity.json new file mode 100644 index 00000000..88cf7aea --- /dev/null +++ b/.butcher/types/BotCommand/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommand", + "name": "BotCommand", + "description": "This object represents a bot command.", + "html_description": "

This object represents a bot command.

", + "rst_description": "This object represents a bot command.", + "annotations": [ + { + "type": "String", + "description": "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.", + "html_description": "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.", + "rst_description": "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.\n", + "name": "command", + "required": true + }, + { + "type": "String", + "description": "Description of the command; 1-256 characters.", + "html_description": "Description of the command; 1-256 characters.", + "rst_description": "Description of the command; 1-256 characters.\n", + "name": "description", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommand/replace.yml b/.butcher/types/BotCommand/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/BotCommand/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/BotCommandScope/entity.json b/.butcher/types/BotCommandScope/entity.json new file mode 100644 index 00000000..808c1b16 --- /dev/null +++ b/.butcher/types/BotCommandScope/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommandscope", + "name": "BotCommandScope", + "description": "This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:\n - BotCommandScopeDefault\n - BotCommandScopeAllPrivateChats\n - BotCommandScopeAllGroupChats\n - BotCommandScopeAllChatAdministrators\n - BotCommandScopeChat\n - BotCommandScopeChatAdministrators\n - BotCommandScopeChatMember", + "html_description": "

This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:

", + "rst_description": "This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:\n\n - :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`\n - :class:`aiogram.types.bot_command_scope_all_private_chats.BotCommandScopeAllPrivateChats`\n - :class:`aiogram.types.bot_command_scope_all_group_chats.BotCommandScopeAllGroupChats`\n - :class:`aiogram.types.bot_command_scope_all_chat_administrators.BotCommandScopeAllChatAdministrators`\n - :class:`aiogram.types.bot_command_scope_chat.BotCommandScopeChat`\n - :class:`aiogram.types.bot_command_scope_chat_administrators.BotCommandScopeChatAdministrators`\n - :class:`aiogram.types.bot_command_scope_chat_member.BotCommandScopeChatMember`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/BotCommandScope/subtypes.yml b/.butcher/types/BotCommandScope/subtypes.yml new file mode 100644 index 00000000..6756ad51 --- /dev/null +++ b/.butcher/types/BotCommandScope/subtypes.yml @@ -0,0 +1 @@ +discriminator: "type" diff --git a/.butcher/types/BotCommandScopeAllChatAdministrators/entity.json b/.butcher/types/BotCommandScopeAllChatAdministrators/entity.json new file mode 100644 index 00000000..a215fb1a --- /dev/null +++ b/.butcher/types/BotCommandScopeAllChatAdministrators/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommandscopeallchatadministrators", + "name": "BotCommandScopeAllChatAdministrators", + "description": "Represents the scope of bot commands, covering all group and supergroup chat administrators.", + "html_description": "

Represents the scope of bot commands, covering all group and supergroup chat administrators.

", + "rst_description": "Represents the `scope `_ of bot commands, covering all group and supergroup chat administrators.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be all_chat_administrators", + "html_description": "Scope type, must be all_chat_administrators", + "rst_description": "Scope type, must be *all_chat_administrators*\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommandScopeAllGroupChats/entity.json b/.butcher/types/BotCommandScopeAllGroupChats/entity.json new file mode 100644 index 00000000..cab68eca --- /dev/null +++ b/.butcher/types/BotCommandScopeAllGroupChats/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommandscopeallgroupchats", + "name": "BotCommandScopeAllGroupChats", + "description": "Represents the scope of bot commands, covering all group and supergroup chats.", + "html_description": "

Represents the scope of bot commands, covering all group and supergroup chats.

", + "rst_description": "Represents the `scope `_ of bot commands, covering all group and supergroup chats.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be all_group_chats", + "html_description": "Scope type, must be all_group_chats", + "rst_description": "Scope type, must be *all_group_chats*\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommandScopeAllPrivateChats/entity.json b/.butcher/types/BotCommandScopeAllPrivateChats/entity.json new file mode 100644 index 00000000..0c8a1eac --- /dev/null +++ b/.butcher/types/BotCommandScopeAllPrivateChats/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommandscopeallprivatechats", + "name": "BotCommandScopeAllPrivateChats", + "description": "Represents the scope of bot commands, covering all private chats.", + "html_description": "

Represents the scope of bot commands, covering all private chats.

", + "rst_description": "Represents the `scope `_ of bot commands, covering all private chats.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be all_private_chats", + "html_description": "Scope type, must be all_private_chats", + "rst_description": "Scope type, must be *all_private_chats*\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommandScopeChat/entity.json b/.butcher/types/BotCommandScopeChat/entity.json new file mode 100644 index 00000000..bf5abb13 --- /dev/null +++ b/.butcher/types/BotCommandScopeChat/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommandscopechat", + "name": "BotCommandScopeChat", + "description": "Represents the scope of bot commands, covering a specific chat.", + "html_description": "

Represents the scope of bot commands, covering a specific chat.

", + "rst_description": "Represents the `scope `_ of bot commands, covering a specific chat.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be chat", + "html_description": "Scope type, must be chat", + "rst_description": "Scope type, must be *chat*\n", + "name": "type", + "required": true + }, + { + "type": "Integer or String", + "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 + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommandScopeChatAdministrators/entity.json b/.butcher/types/BotCommandScopeChatAdministrators/entity.json new file mode 100644 index 00000000..5e68cc7f --- /dev/null +++ b/.butcher/types/BotCommandScopeChatAdministrators/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommandscopechatadministrators", + "name": "BotCommandScopeChatAdministrators", + "description": "Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.", + "html_description": "

Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.

", + "rst_description": "Represents the `scope `_ of bot commands, covering all administrators of a specific group or supergroup chat.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be chat_administrators", + "html_description": "Scope type, must be chat_administrators", + "rst_description": "Scope type, must be *chat_administrators*\n", + "name": "type", + "required": true + }, + { + "type": "Integer or String", + "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 + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommandScopeChatMember/entity.json b/.butcher/types/BotCommandScopeChatMember/entity.json new file mode 100644 index 00000000..12e4471e --- /dev/null +++ b/.butcher/types/BotCommandScopeChatMember/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommandscopechatmember", + "name": "BotCommandScopeChatMember", + "description": "Represents the scope of bot commands, covering a specific member of a group or supergroup chat.", + "html_description": "

Represents the scope of bot commands, covering a specific member of a group or supergroup chat.

", + "rst_description": "Represents the `scope `_ of bot commands, covering a specific member of a group or supergroup chat.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be chat_member", + "html_description": "Scope type, must be chat_member", + "rst_description": "Scope type, must be *chat_member*\n", + "name": "type", + "required": true + }, + { + "type": "Integer or String", + "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 + }, + { + "type": "Integer", + "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", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommandScopeDefault/entity.json b/.butcher/types/BotCommandScopeDefault/entity.json new file mode 100644 index 00000000..edc6ca7b --- /dev/null +++ b/.butcher/types/BotCommandScopeDefault/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommandscopedefault", + "name": "BotCommandScopeDefault", + "description": "Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.", + "html_description": "

Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.

", + "rst_description": "Represents the default `scope `_ of bot commands. Default commands are used if no commands with a `narrower scope `_ are specified for the user.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be default", + "html_description": "Scope type, must be default", + "rst_description": "Scope type, must be *default*\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotDescription/entity.json b/.butcher/types/BotDescription/entity.json new file mode 100644 index 00000000..5784507a --- /dev/null +++ b/.butcher/types/BotDescription/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botdescription", + "name": "BotDescription", + "description": "This object represents the bot's description.", + "html_description": "

This object represents the bot's description.

", + "rst_description": "This object represents the bot's description.", + "annotations": [ + { + "type": "String", + "description": "The bot's description", + "html_description": "The bot's description", + "rst_description": "The bot's description\n", + "name": "description", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotName/entity.json b/.butcher/types/BotName/entity.json new file mode 100644 index 00000000..d18b4902 --- /dev/null +++ b/.butcher/types/BotName/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botname", + "name": "BotName", + "description": "This object represents the bot's name.", + "html_description": "

This object represents the bot's name.

", + "rst_description": "This object represents the bot's name.", + "annotations": [ + { + "type": "String", + "description": "The bot's name", + "html_description": "The bot's name", + "rst_description": "The bot's name\n", + "name": "name", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotShortDescription/entity.json b/.butcher/types/BotShortDescription/entity.json new file mode 100644 index 00000000..da55449f --- /dev/null +++ b/.butcher/types/BotShortDescription/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botshortdescription", + "name": "BotShortDescription", + "description": "This object represents the bot's short description.", + "html_description": "

This object represents the bot's short description.

", + "rst_description": "This object represents the bot's short description.", + "annotations": [ + { + "type": "String", + "description": "The bot's short description", + "html_description": "The bot's short description", + "rst_description": "The bot's short description\n", + "name": "short_description", + "required": true + } + ], + "category": "types" + } +} 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 new file mode 100644 index 00000000..1eeec3df --- /dev/null +++ b/.butcher/types/BusinessConnection/entity.json @@ -0,0 +1,77 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "businessconnection", + "name": "BusinessConnection", + "description": "Describes the connection of the bot with a business account.", + "html_description": "

Describes the connection of the bot with a business account.

", + "rst_description": "Describes the connection of the bot with a business account.", + "annotations": [ + { + "type": "String", + "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": "id", + "required": true + }, + { + "type": "User", + "description": "Business account user that created the business connection", + "html_description": "Business account user that created the business connection", + "rst_description": "Business account user that created the business connection\n", + "name": "user", + "required": true + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "user_chat_id", + "required": true + }, + { + "type": "Integer", + "description": "Date the connection was established in Unix time", + "html_description": "Date the connection was established in Unix time", + "rst_description": "Date the connection was established in Unix time\n", + "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": false, + "deprecated": { + "version": "9.0", + "release_date": "2025-04-11" + } + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BusinessConnection/replace.yml b/.butcher/types/BusinessConnection/replace.yml new file mode 100644 index 00000000..80c48d76 --- /dev/null +++ b/.butcher/types/BusinessConnection/replace.yml @@ -0,0 +1,5 @@ +annotations: + date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/BusinessIntro/entity.json b/.butcher/types/BusinessIntro/entity.json new file mode 100644 index 00000000..8aa85394 --- /dev/null +++ b/.butcher/types/BusinessIntro/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "businessintro", + "name": "BusinessIntro", + "description": "Contains information about the start page settings of a Telegram Business account.", + "html_description": "

Contains information about the start page settings of a Telegram Business account.

", + "rst_description": "Contains information about the start page settings of a Telegram Business account.", + "annotations": [ + { + "type": "String", + "description": "Title text of the business intro", + "html_description": "Optional. Title text of the business intro", + "rst_description": "*Optional*. Title text of the business intro\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Message text of the business intro", + "html_description": "Optional. Message text of the business intro", + "rst_description": "*Optional*. Message text of the business intro\n", + "name": "message", + "required": false + }, + { + "type": "Sticker", + "description": "Sticker of the business intro", + "html_description": "Optional. Sticker of the business intro", + "rst_description": "*Optional*. Sticker of the business intro\n", + "name": "sticker", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BusinessLocation/entity.json b/.butcher/types/BusinessLocation/entity.json new file mode 100644 index 00000000..d38d713b --- /dev/null +++ b/.butcher/types/BusinessLocation/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "businesslocation", + "name": "BusinessLocation", + "description": "Contains information about the location of a Telegram Business account.", + "html_description": "

Contains information about the location of a Telegram Business account.

", + "rst_description": "Contains information about the location of a Telegram Business account.", + "annotations": [ + { + "type": "String", + "description": "Address of the business", + "html_description": "Address of the business", + "rst_description": "Address of the business\n", + "name": "address", + "required": true + }, + { + "type": "Location", + "description": "Location of the business", + "html_description": "Optional. Location of the business", + "rst_description": "*Optional*. Location of the business\n", + "name": "location", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BusinessMessagesDeleted/entity.json b/.butcher/types/BusinessMessagesDeleted/entity.json new file mode 100644 index 00000000..4a990c13 --- /dev/null +++ b/.butcher/types/BusinessMessagesDeleted/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "businessmessagesdeleted", + "name": "BusinessMessagesDeleted", + "description": "This object is received when messages are deleted from a connected business account.", + "html_description": "

This object is received when messages are deleted from a connected business account.

", + "rst_description": "This object is received when messages are deleted from a connected business account.", + "annotations": [ + { + "type": "String", + "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", + "required": true + }, + { + "type": "Chat", + "description": "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user.", + "html_description": "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user.", + "rst_description": "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user.\n", + "name": "chat", + "required": true + }, + { + "type": "Array of Integer", + "description": "The list of identifiers of deleted messages in the chat of the business account", + "html_description": "The list of identifiers of deleted messages in the chat of the business account", + "rst_description": "The list of identifiers of deleted messages in the chat of the business account\n", + "name": "message_ids", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BusinessOpeningHours/entity.json b/.butcher/types/BusinessOpeningHours/entity.json new file mode 100644 index 00000000..448b2572 --- /dev/null +++ b/.butcher/types/BusinessOpeningHours/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "businessopeninghours", + "name": "BusinessOpeningHours", + "description": "Describes the opening hours of a business.", + "html_description": "

Describes the opening hours of a business.

", + "rst_description": "Describes the opening hours of a business.", + "annotations": [ + { + "type": "String", + "description": "Unique name of the time zone for which the opening hours are defined", + "html_description": "Unique name of the time zone for which the opening hours are defined", + "rst_description": "Unique name of the time zone for which the opening hours are defined\n", + "name": "time_zone_name", + "required": true + }, + { + "type": "Array of BusinessOpeningHoursInterval", + "description": "List of time intervals describing business opening hours", + "html_description": "List of time intervals describing business opening hours", + "rst_description": "List of time intervals describing business opening hours\n", + "name": "opening_hours", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BusinessOpeningHoursInterval/entity.json b/.butcher/types/BusinessOpeningHoursInterval/entity.json new file mode 100644 index 00000000..ea60e2ec --- /dev/null +++ b/.butcher/types/BusinessOpeningHoursInterval/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "businessopeninghoursinterval", + "name": "BusinessOpeningHoursInterval", + "description": "Describes an interval of time during which a business is open.", + "html_description": "

Describes an interval of time during which a business is open.

", + "rst_description": "Describes an interval of time during which a business is open.", + "annotations": [ + { + "type": "Integer", + "description": "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", + "html_description": "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", + "rst_description": "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\n", + "name": "opening_minute", + "required": true + }, + { + "type": "Integer", + "description": "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", + "html_description": "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", + "rst_description": "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\n", + "name": "closing_minute", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/CallbackGame/entity.json b/.butcher/types/CallbackGame/entity.json new file mode 100644 index 00000000..246618f0 --- /dev/null +++ b/.butcher/types/CallbackGame/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Games", + "anchor": "games" + }, + "object": { + "anchor": "callbackgame", + "name": "CallbackGame", + "description": "A placeholder, currently holds no information. Use BotFather to set up your game.", + "html_description": "

A placeholder, currently holds no information. Use BotFather to set up your game.

", + "rst_description": "A placeholder, currently holds no information. Use `BotFather `_ to set up your game.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/CallbackQuery/aliases.yml b/.butcher/types/CallbackQuery/aliases.yml new file mode 100644 index 00000000..d0eadfce --- /dev/null +++ b/.butcher/types/CallbackQuery/aliases.yml @@ -0,0 +1,4 @@ +answer: + method: answerCallbackQuery + fill: + callback_query_id: self.id diff --git a/.butcher/types/CallbackQuery/entity.json b/.butcher/types/CallbackQuery/entity.json new file mode 100644 index 00000000..24ff2072 --- /dev/null +++ b/.butcher/types/CallbackQuery/entity.json @@ -0,0 +1,73 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "callbackquery", + "name": "CallbackQuery", + "description": "This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.\nNOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed (e.g., without specifying any of the optional parameters).", + "html_description": "

This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.

\n

NOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed (e.g., without specifying any of the optional parameters).

\n
", + "rst_description": "This object represents an incoming callback query from a callback button in an `inline keyboard `_. If the button that originated the query was attached to a message sent by the bot, the field *message* will be present. If the button was attached to a message sent via the bot (in `inline mode `_), the field *inline_message_id* will be present. Exactly one of the fields *data* or *game_short_name* will be present.\n\n **NOTE:** After the user presses a callback button, Telegram clients will display a progress bar until you call :class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery`. It is, therefore, necessary to react by calling :class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery` even if no notification to the user is needed (e.g., without specifying any of the optional parameters).", + "annotations": [ + { + "type": "String", + "description": "Unique identifier for this query", + "html_description": "Unique identifier for this query", + "rst_description": "Unique identifier for this query\n", + "name": "id", + "required": true + }, + { + "type": "User", + "description": "Sender", + "html_description": "Sender", + "rst_description": "Sender\n", + "name": "from", + "required": true + }, + { + "type": "MaybeInaccessibleMessage", + "description": "Message sent by the bot with the callback button that originated the query", + "html_description": "Optional. Message sent by the bot with the callback button that originated the query", + "rst_description": "*Optional*. Message sent by the bot with the callback button that originated the query\n", + "name": "message", + "required": false + }, + { + "type": "String", + "description": "Identifier of the message sent via the bot in inline mode, that originated the query.", + "html_description": "Optional. Identifier of the message sent via the bot in inline mode, that originated the query.", + "rst_description": "*Optional*. Identifier of the message sent via the bot in inline mode, that originated the query.\n", + "name": "inline_message_id", + "required": false + }, + { + "type": "String", + "description": "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.", + "html_description": "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.", + "rst_description": "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`.\n", + "name": "chat_instance", + "required": true + }, + { + "type": "String", + "description": "Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.", + "html_description": "Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.", + "rst_description": "*Optional*. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.\n", + "name": "data", + "required": false + }, + { + "type": "String", + "description": "Short name of a Game to be returned, serves as the unique identifier for the game", + "html_description": "Optional. Short name of a Game to be returned, serves as the unique identifier for the game", + "rst_description": "*Optional*. Short name of a `Game `_ to be returned, serves as the unique identifier for the game\n", + "name": "game_short_name", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Chat/aliases.yml b/.butcher/types/Chat/aliases.yml new file mode 100644 index 00000000..7a03c4a9 --- /dev/null +++ b/.butcher/types/Chat/aliases.yml @@ -0,0 +1,116 @@ +ban_sender_chat: + method: banChatSenderChat + fill: &self + chat_id: self.id + +unban_sender_chat: + method: unbanChatSenderChat + fill: *self + +get_administrators: + method: getChatAdministrators + fill: *self + +delete_message: + method: deleteMessage + fill: *self + +revoke_invite_link: + method: revokeChatInviteLink + fill: *self + +edit_invite_link: + method: editChatInviteLink + fill: *self + +create_invite_link: + method: createChatInviteLink + fill: *self + +export_invite_link: + method: exportChatInviteLink + fill: *self + +do: + method: sendChatAction + fill: *self + +delete_sticker_set: + method: deleteChatStickerSet + fill: *self + +set_sticker_set: + method: setChatStickerSet + fill: *self + +get_member: + method: getChatMember + fill: *self + +get_member_count: + method: getChatMemberCount + fill: *self + +leave: + method: leaveChat + fill: *self + +unpin_all_messages: + method: unpinAllChatMessages + fill: *self + +unpin_message: + method: unpinChatMessage + fill: *self + +pin_message: + method: pinChatMessage + fill: *self + +set_administrator_custom_title: + method: setChatAdministratorCustomTitle + fill: *self + +set_member_tag: + method: setChatMemberTag + fill: *self + +set_permissions: + method: setChatPermissions + fill: *self + +promote: + method: promoteChatMember + fill: *self + +restrict: + method: restrictChatMember + fill: *self + +unban: + method: unbanChatMember + fill: *self + +ban: + method: banChatMember + fill: *self + +set_description: + method: setChatDescription + fill: *self + +set_title: + method: setChatTitle + fill: *self + +delete_photo: + method: deleteChatPhoto + fill: *self + +set_photo: + method: setChatPhoto + fill: *self + +unpin_all_general_forum_topic_messages: + method: unpinAllGeneralForumTopicMessages + fill: *self diff --git a/.butcher/types/Chat/entity.json b/.butcher/types/Chat/entity.json new file mode 100644 index 00000000..e06b2291 --- /dev/null +++ b/.butcher/types/Chat/entity.json @@ -0,0 +1,501 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chat", + "name": "Chat", + "description": "This object represents a chat.", + "html_description": "

This object represents a chat.

", + "rst_description": "This object represents a chat.", + "annotations": [ + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Type of the chat, can be either 'private', 'group', 'supergroup' or 'channel'", + "html_description": "Type of the chat, can be either “private”, “group”, “supergroup” or “channel”", + "rst_description": "Type of the chat, can be either 'private', 'group', 'supergroup' or 'channel'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Title, for supergroups, channels and group chats", + "html_description": "Optional. Title, for supergroups, channels and group chats", + "rst_description": "*Optional*. Title, for supergroups, channels and group chats\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Username, for private chats, supergroups and channels if available", + "html_description": "Optional. Username, for private chats, supergroups and channels if available", + "rst_description": "*Optional*. Username, for private chats, supergroups and channels if available\n", + "name": "username", + "required": false + }, + { + "type": "String", + "description": "First name of the other party in a private chat", + "html_description": "Optional. First name of the other party in a private chat", + "rst_description": "*Optional*. First name of the other party in a private chat\n", + "name": "first_name", + "required": false + }, + { + "type": "String", + "description": "Last name of the other party in a private chat", + "html_description": "Optional. Last name of the other party in a private chat", + "rst_description": "*Optional*. Last name of the other party in a private chat\n", + "name": "last_name", + "required": false + }, + { + "type": "True", + "description": "True, if the supergroup chat is a forum (has topics enabled)", + "html_description": "Optional. True, if the supergroup chat is a forum (has topics enabled)", + "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 + }, + { + "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.", + "html_description": "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 getChat. Always returned in getChat.", + "rst_description": "*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`.\n", + "name": "accent_color_id", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "Array of String", + "description": "If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.", + "html_description": "Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.", + "rst_description": "*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`.\n", + "name": "active_usernames", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "Array of ReactionType", + "description": "List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. Returned only in getChat.", + "html_description": "Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. Returned only in getChat.", + "rst_description": "*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`.\n", + "name": "available_reactions", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "String", + "description": "Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in getChat.", + "html_description": "Optional. Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in getChat.", + "rst_description": "*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`.\n", + "name": "background_custom_emoji_id", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "String", + "description": "Bio of the other party in a private chat. Returned only in getChat.", + "html_description": "Optional. Bio of the other party in a private chat. Returned only in getChat.", + "rst_description": "*Optional*. Bio of the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "bio", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "Birthdate", + "description": "For private chats, the date of birth of the user. Returned only in getChat.", + "html_description": "Optional. For private chats, the date of birth of the user. Returned only in getChat.", + "rst_description": "*Optional*. For private chats, the date of birth of the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "birthdate", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "BusinessIntro", + "description": "For private chats with business accounts, the intro of the business. Returned only in getChat.", + "html_description": "Optional. For private chats with business accounts, the intro of the business. Returned only in getChat.", + "rst_description": "*Optional*. For private chats with business accounts, the intro of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "business_intro", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "BusinessLocation", + "description": "For private chats with business accounts, the location of the business. Returned only in getChat.", + "html_description": "Optional. For private chats with business accounts, the location of the business. Returned only in getChat.", + "rst_description": "*Optional*. For private chats with business accounts, the location of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "business_location", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "BusinessOpeningHours", + "description": "For private chats with business accounts, the opening hours of the business. Returned only in getChat.", + "html_description": "Optional. For private chats with business accounts, the opening hours of the business. Returned only in getChat.", + "rst_description": "*Optional*. For private chats with business accounts, the opening hours of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "business_opening_hours", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "True", + "description": "True, if the bot can change the group sticker set. Returned only in getChat.", + "html_description": "Optional. True, if the bot can change the group sticker set. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if the bot can change the group sticker set. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "can_set_sticker_set", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "String", + "description": "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 getChat.", + "html_description": "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 getChat.", + "rst_description": "*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`.\n", + "name": "custom_emoji_sticker_set_name", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "String", + "description": "Description, for groups, supergroups and channel chats. Returned only in getChat.", + "html_description": "Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.", + "rst_description": "*Optional*. Description, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "description", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "String", + "description": "Custom emoji identifier of the emoji status of the chat or the other party in a private chat. Returned only in getChat.", + "html_description": "Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat. Returned only in getChat.", + "rst_description": "*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`.\n", + "name": "emoji_status_custom_emoji_id", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "Integer", + "description": "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 getChat.", + "html_description": "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 getChat.", + "rst_description": "*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`.\n", + "name": "emoji_status_expiration_date", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "True", + "description": "True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.", + "html_description": "Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.", + "rst_description": "*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`.\n", + "name": "has_aggressive_anti_spam_enabled", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "True", + "description": "True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.", + "html_description": "Optional. True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.", + "rst_description": "*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`.\n", + "name": "has_hidden_members", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "True", + "description": "True, if privacy settings of the other party in the private chat allows to use tg://user?id= links only in chats with the user. Returned only in getChat.", + "html_description": "Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in getChat.", + "rst_description": "*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`.\n", + "name": "has_private_forwards", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "True", + "description": "True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.", + "html_description": "Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if messages from the chat can't be forwarded to other chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "has_protected_content", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "True", + "description": "True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.", + "html_description": "Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.", + "rst_description": "*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`.\n", + "name": "has_restricted_voice_and_video_messages", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "True", + "description": "True, if new chat members will have access to old messages; available only to chat administrators. Returned only in getChat.", + "html_description": "Optional. True, if new chat members will have access to old messages; available only to chat administrators. Returned only in getChat.", + "rst_description": "*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`.\n", + "name": "has_visible_history", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "String", + "description": "Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.", + "html_description": "Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.", + "rst_description": "*Optional*. Primary invite link, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "invite_link", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "True", + "description": "True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.", + "html_description": "Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.", + "rst_description": "*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`.\n", + "name": "join_by_request", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "True", + "description": "True, if users need to join the supergroup before they can send messages. Returned only in getChat.", + "html_description": "Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if users need to join the supergroup before they can send messages. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "join_to_send_messages", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "Integer", + "description": "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 getChat.", + "html_description": "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 getChat.", + "rst_description": "*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`.\n", + "name": "linked_chat_id", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "ChatLocation", + "description": "For supergroups, the location to which the supergroup is connected. Returned only in getChat.", + "html_description": "Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.", + "rst_description": "*Optional*. For supergroups, the location to which the supergroup is connected. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "location", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "Integer", + "description": "The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.", + "html_description": "Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.", + "rst_description": "*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`.\n", + "name": "message_auto_delete_time", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "ChatPermissions", + "description": "Default chat member permissions, for groups and supergroups. Returned only in getChat.", + "html_description": "Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.", + "rst_description": "*Optional*. Default chat member permissions, for groups and supergroups. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "permissions", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "Chat", + "description": "For private chats, the personal channel of the user. Returned only in getChat.", + "html_description": "Optional. For private chats, the personal channel of the user. Returned only in getChat.", + "rst_description": "*Optional*. For private chats, the personal channel of the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "personal_chat", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "ChatPhoto", + "description": "Chat photo. Returned only in getChat.", + "html_description": "Optional. Chat photo. Returned only in getChat.", + "rst_description": "*Optional*. Chat photo. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "photo", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "Message", + "description": "The most recent pinned message (by sending date). Returned only in getChat.", + "html_description": "Optional. The most recent pinned message (by sending date). Returned only in getChat.", + "rst_description": "*Optional*. The most recent pinned message (by sending date). Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "pinned_message", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "Integer", + "description": "Identifier of the accent color for the chat's profile background. See profile accent colors for more details. Returned only in getChat.", + "html_description": "Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more details. Returned only in getChat.", + "rst_description": "*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`.\n", + "name": "profile_accent_color_id", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "String", + "description": "Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in getChat.", + "html_description": "Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in getChat.", + "rst_description": "*Optional*. Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "profile_background_custom_emoji_id", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "Integer", + "description": "For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds. Returned only in getChat.", + "html_description": "Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds. Returned only in getChat.", + "rst_description": "*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`.\n", + "name": "slow_mode_delay", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "String", + "description": "For supergroups, name of group sticker set. Returned only in getChat.", + "html_description": "Optional. For supergroups, name of group sticker set. Returned only in getChat.", + "rst_description": "*Optional*. For supergroups, name of group sticker set. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "sticker_set_name", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + }, + { + "type": "Integer", + "description": "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 getChat.", + "html_description": "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 getChat.", + "rst_description": "*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`.\n", + "name": "unrestrict_boost_count", + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Chat/replace.yml b/.butcher/types/Chat/replace.yml new file mode 100644 index 00000000..60fe7d44 --- /dev/null +++ b/.butcher/types/Chat/replace.yml @@ -0,0 +1,5 @@ +annotations: + emoji_status_expiration_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/ChatAdministratorRights/entity.json b/.butcher/types/ChatAdministratorRights/entity.json new file mode 100644 index 00000000..f271d1fd --- /dev/null +++ b/.butcher/types/ChatAdministratorRights/entity.json @@ -0,0 +1,153 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatadministratorrights", + "name": "ChatAdministratorRights", + "description": "Represents the rights of an administrator in a chat.", + "html_description": "

Represents the rights of an administrator in a chat.

", + "rst_description": "Represents the rights of an administrator in a chat.", + "annotations": [ + { + "type": "Boolean", + "description": "True, if the user's presence in the chat is hidden", + "html_description": "True, if the user's presence in the chat is hidden", + "rst_description": ":code:`True`, if the user's presence in the chat is hidden\n", + "name": "is_anonymous", + "required": true + }, + { + "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, 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 + }, + { + "type": "Boolean", + "description": "True, if the administrator can delete messages of other users", + "html_description": "True, if the administrator can delete messages of other users", + "rst_description": ":code:`True`, if the administrator can delete messages of other users\n", + "name": "can_delete_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can manage video chats", + "html_description": "True, if the administrator can manage video chats", + "rst_description": ":code:`True`, if the administrator can manage video chats\n", + "name": "can_manage_video_chats", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics", + "html_description": "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics", + "rst_description": ":code:`True`, if the administrator can restrict, ban or unban chat members, or access supergroup statistics\n", + "name": "can_restrict_members", + "required": true + }, + { + "type": "Boolean", + "description": "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 the user)", + "html_description": "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 the user)", + "rst_description": ":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 the user)\n", + "name": "can_promote_members", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to change the chat title, photo and other settings", + "html_description": "True, if the user is allowed to change the chat title, photo and other settings", + "rst_description": ":code:`True`, if the user is allowed to change the chat title, photo and other settings\n", + "name": "can_change_info", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to invite new users to the chat", + "html_description": "True, if the user is allowed to invite new users to the chat", + "rst_description": ":code:`True`, if the user is allowed to invite new users to the chat\n", + "name": "can_invite_users", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can post stories to the chat", + "html_description": "True, if the administrator can post stories to the chat", + "rst_description": ":code:`True`, if the administrator can post stories to the chat\n", + "name": "can_post_stories", + "required": true + }, + { + "type": "Boolean", + "description": "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", + "html_description": "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", + "rst_description": ":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\n", + "name": "can_edit_stories", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can delete stories posted by other users", + "html_description": "True, if the administrator can delete stories posted by other users", + "rst_description": ":code:`True`, if the administrator can delete stories posted by other users\n", + "name": "can_delete_stories", + "required": true + }, + { + "type": "Boolean", + "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 + }, + { + "type": "Boolean", + "description": "True, if the administrator can edit messages of other users and can pin messages; for channels only", + "html_description": "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only\n", + "name": "can_edit_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to pin messages; for groups and supergroups only", + "html_description": "Optional. True, if the user is allowed to pin messages; for groups and supergroups only", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only\n", + "name": "can_pin_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only", + "html_description": "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only", + "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/ChatBackground/entity.json b/.butcher/types/ChatBackground/entity.json new file mode 100644 index 00000000..a0eaddf9 --- /dev/null +++ b/.butcher/types/ChatBackground/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatbackground", + "name": "ChatBackground", + "description": "This object represents a chat background.", + "html_description": "

This object represents a chat background.

", + "rst_description": "This object represents a chat background.", + "annotations": [ + { + "type": "BackgroundType", + "description": "Type of the background", + "html_description": "Type of the background", + "rst_description": "Type of the background\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatBoost/entity.json b/.butcher/types/ChatBoost/entity.json new file mode 100644 index 00000000..e0663217 --- /dev/null +++ b/.butcher/types/ChatBoost/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatboost", + "name": "ChatBoost", + "description": "This object contains information about a chat boost.", + "html_description": "

This object contains information about a chat boost.

", + "rst_description": "This object contains information about a chat boost.", + "annotations": [ + { + "type": "String", + "description": "Unique identifier of the boost", + "html_description": "Unique identifier of the boost", + "rst_description": "Unique identifier of the boost\n", + "name": "boost_id", + "required": true + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the chat was boosted", + "html_description": "Point in time (Unix timestamp) when the chat was boosted", + "rst_description": "Point in time (Unix timestamp) when the chat was boosted\n", + "name": "add_date", + "required": true + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged", + "html_description": "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged", + "rst_description": "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged\n", + "name": "expiration_date", + "required": true + }, + { + "type": "ChatBoostSource", + "description": "Source of the added boost", + "html_description": "Source of the added boost", + "rst_description": "Source of the added boost\n", + "name": "source", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatBoost/replace.yml b/.butcher/types/ChatBoost/replace.yml new file mode 100644 index 00000000..5ab36451 --- /dev/null +++ b/.butcher/types/ChatBoost/replace.yml @@ -0,0 +1,9 @@ +annotations: + add_date: + parsed_type: + type: std + name: DateTime + expiration_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/ChatBoostAdded/entity.json b/.butcher/types/ChatBoostAdded/entity.json new file mode 100644 index 00000000..cb53596a --- /dev/null +++ b/.butcher/types/ChatBoostAdded/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatboostadded", + "name": "ChatBoostAdded", + "description": "This object represents a service message about a user boosting a chat.", + "html_description": "

This object represents a service message about a user boosting a chat.

", + "rst_description": "This object represents a service message about a user boosting a chat.", + "annotations": [ + { + "type": "Integer", + "description": "Number of boosts added by the user", + "html_description": "Number of boosts added by the user", + "rst_description": "Number of boosts added by the user\n", + "name": "boost_count", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatBoostRemoved/entity.json b/.butcher/types/ChatBoostRemoved/entity.json new file mode 100644 index 00000000..72bac88d --- /dev/null +++ b/.butcher/types/ChatBoostRemoved/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatboostremoved", + "name": "ChatBoostRemoved", + "description": "This object represents a boost removed from a chat.", + "html_description": "

This object represents a boost removed from a chat.

", + "rst_description": "This object represents a boost removed from a chat.", + "annotations": [ + { + "type": "Chat", + "description": "Chat which was boosted", + "html_description": "Chat which was boosted", + "rst_description": "Chat which was boosted\n", + "name": "chat", + "required": true + }, + { + "type": "String", + "description": "Unique identifier of the boost", + "html_description": "Unique identifier of the boost", + "rst_description": "Unique identifier of the boost\n", + "name": "boost_id", + "required": true + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the boost was removed", + "html_description": "Point in time (Unix timestamp) when the boost was removed", + "rst_description": "Point in time (Unix timestamp) when the boost was removed\n", + "name": "remove_date", + "required": true + }, + { + "type": "ChatBoostSource", + "description": "Source of the removed boost", + "html_description": "Source of the removed boost", + "rst_description": "Source of the removed boost\n", + "name": "source", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatBoostRemoved/replace.yml b/.butcher/types/ChatBoostRemoved/replace.yml new file mode 100644 index 00000000..cfba455f --- /dev/null +++ b/.butcher/types/ChatBoostRemoved/replace.yml @@ -0,0 +1,5 @@ +annotations: + remove_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/ChatBoostSource/entity.json b/.butcher/types/ChatBoostSource/entity.json new file mode 100644 index 00000000..3a73894f --- /dev/null +++ b/.butcher/types/ChatBoostSource/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatboostsource", + "name": "ChatBoostSource", + "description": "This object describes the source of a chat boost. It can be one of\n - ChatBoostSourcePremium\n - ChatBoostSourceGiftCode\n - ChatBoostSourceGiveaway", + "html_description": "

This object describes the source of a chat boost. It can be one of

", + "rst_description": "This object describes the source of a chat boost. It can be one of\n\n - :class:`aiogram.types.chat_boost_source_premium.ChatBoostSourcePremium`\n - :class:`aiogram.types.chat_boost_source_gift_code.ChatBoostSourceGiftCode`\n - :class:`aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/ChatBoostSource/subtypes.yml b/.butcher/types/ChatBoostSource/subtypes.yml new file mode 100644 index 00000000..fd3f58ea --- /dev/null +++ b/.butcher/types/ChatBoostSource/subtypes.yml @@ -0,0 +1 @@ +discriminator: "source" diff --git a/.butcher/types/ChatBoostSourceGiftCode/entity.json b/.butcher/types/ChatBoostSourceGiftCode/entity.json new file mode 100644 index 00000000..3e6c0166 --- /dev/null +++ b/.butcher/types/ChatBoostSourceGiftCode/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatboostsourcegiftcode", + "name": "ChatBoostSourceGiftCode", + "description": "The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.", + "html_description": "

The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.

", + "rst_description": "The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.", + "annotations": [ + { + "type": "String", + "description": "Source of the boost, always 'gift_code'", + "html_description": "Source of the boost, always “gift_code”", + "rst_description": "Source of the boost, always 'gift_code'\n", + "name": "source", + "required": true + }, + { + "type": "User", + "description": "User for which the gift code was created", + "html_description": "User for which the gift code was created", + "rst_description": "User for which the gift code was created\n", + "name": "user", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatBoostSourceGiveaway/entity.json b/.butcher/types/ChatBoostSourceGiveaway/entity.json new file mode 100644 index 00000000..f6850a07 --- /dev/null +++ b/.butcher/types/ChatBoostSourceGiveaway/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatboostsourcegiveaway", + "name": "ChatBoostSourceGiveaway", + "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", + "description": "Source of the boost, always 'giveaway'", + "html_description": "Source of the boost, always “giveaway”", + "rst_description": "Source of the boost, always 'giveaway'\n", + "name": "source", + "required": true + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "giveaway_message_id", + "required": true + }, + { + "type": "User", + "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*. :code:`True`, if the giveaway was completed, but there was no user to win the prize\n", + "name": "is_unclaimed", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatBoostSourcePremium/entity.json b/.butcher/types/ChatBoostSourcePremium/entity.json new file mode 100644 index 00000000..d78c8ed2 --- /dev/null +++ b/.butcher/types/ChatBoostSourcePremium/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatboostsourcepremium", + "name": "ChatBoostSourcePremium", + "description": "The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.", + "html_description": "

The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.

", + "rst_description": "The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.", + "annotations": [ + { + "type": "String", + "description": "Source of the boost, always 'premium'", + "html_description": "Source of the boost, always “premium”", + "rst_description": "Source of the boost, always 'premium'\n", + "name": "source", + "required": true + }, + { + "type": "User", + "description": "User that boosted the chat", + "html_description": "User that boosted the chat", + "rst_description": "User that boosted the chat\n", + "name": "user", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatBoostUpdated/entity.json b/.butcher/types/ChatBoostUpdated/entity.json new file mode 100644 index 00000000..15d1fae3 --- /dev/null +++ b/.butcher/types/ChatBoostUpdated/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatboostupdated", + "name": "ChatBoostUpdated", + "description": "This object represents a boost added to a chat or changed.", + "html_description": "

This object represents a boost added to a chat or changed.

", + "rst_description": "This object represents a boost added to a chat or changed.", + "annotations": [ + { + "type": "Chat", + "description": "Chat which was boosted", + "html_description": "Chat which was boosted", + "rst_description": "Chat which was boosted\n", + "name": "chat", + "required": true + }, + { + "type": "ChatBoost", + "description": "Information about the chat boost", + "html_description": "Information about the chat boost", + "rst_description": "Information about the chat boost\n", + "name": "boost", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatFullInfo/entity.json b/.butcher/types/ChatFullInfo/entity.json new file mode 100644 index 00000000..3627d65d --- /dev/null +++ b/.butcher/types/ChatFullInfo/entity.json @@ -0,0 +1,437 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatfullinfo", + "name": "ChatFullInfo", + "description": "This object contains full information about a chat.", + "html_description": "

This object contains full information about a chat.

", + "rst_description": "This object contains full information about a chat.", + "annotations": [ + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Type of the chat, can be either 'private', 'group', 'supergroup' or 'channel'", + "html_description": "Type of the chat, can be either “private”, “group”, “supergroup” or “channel”", + "rst_description": "Type of the chat, can be either 'private', 'group', 'supergroup' or 'channel'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Title, for supergroups, channels and group chats", + "html_description": "Optional. Title, for supergroups, channels and group chats", + "rst_description": "*Optional*. Title, for supergroups, channels and group chats\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Username, for private chats, supergroups and channels if available", + "html_description": "Optional. Username, for private chats, supergroups and channels if available", + "rst_description": "*Optional*. Username, for private chats, supergroups and channels if available\n", + "name": "username", + "required": false + }, + { + "type": "String", + "description": "First name of the other party in a private chat", + "html_description": "Optional. First name of the other party in a private chat", + "rst_description": "*Optional*. First name of the other party in a private chat\n", + "name": "first_name", + "required": false + }, + { + "type": "String", + "description": "Last name of the other party in a private chat", + "html_description": "Optional. Last name of the other party in a private chat", + "rst_description": "*Optional*. Last name of the other party in a private chat\n", + "name": "last_name", + "required": false + }, + { + "type": "True", + "description": "True, if the supergroup chat is a forum (has topics enabled)", + "html_description": "Optional. True, if the supergroup chat is a forum (has topics enabled)", + "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 + }, + { + "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.", + "html_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.", + "rst_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.\n", + "name": "accent_color_id", + "required": true + }, + { + "type": "Integer", + "description": "The maximum number of reactions that can be set on a message in the chat", + "html_description": "The maximum number of reactions that can be set on a message in the chat", + "rst_description": "The maximum number of reactions that can be set on a message in the chat\n", + "name": "max_reaction_count", + "required": true + }, + { + "type": "ChatPhoto", + "description": "Chat photo", + "html_description": "Optional. Chat photo", + "rst_description": "*Optional*. Chat photo\n", + "name": "photo", + "required": false + }, + { + "type": "Array of String", + "description": "If non-empty, the list of all active chat usernames; for private chats, supergroups and channels", + "html_description": "Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels", + "rst_description": "*Optional*. If non-empty, the list of all `active chat usernames `_; for private chats, supergroups and channels\n", + "name": "active_usernames", + "required": false + }, + { + "type": "Birthdate", + "description": "For private chats, the date of birth of the user", + "html_description": "Optional. For private chats, the date of birth of the user", + "rst_description": "*Optional*. For private chats, the date of birth of the user\n", + "name": "birthdate", + "required": false + }, + { + "type": "BusinessIntro", + "description": "For private chats with business accounts, the intro of the business", + "html_description": "Optional. For private chats with business accounts, the intro of the business", + "rst_description": "*Optional*. For private chats with business accounts, the intro of the business\n", + "name": "business_intro", + "required": false + }, + { + "type": "BusinessLocation", + "description": "For private chats with business accounts, the location of the business", + "html_description": "Optional. For private chats with business accounts, the location of the business", + "rst_description": "*Optional*. For private chats with business accounts, the location of the business\n", + "name": "business_location", + "required": false + }, + { + "type": "BusinessOpeningHours", + "description": "For private chats with business accounts, the opening hours of the business", + "html_description": "Optional. For private chats with business accounts, the opening hours of the business", + "rst_description": "*Optional*. For private chats with business accounts, the opening hours of the business\n", + "name": "business_opening_hours", + "required": false + }, + { + "type": "Chat", + "description": "For private chats, the personal channel of the user", + "html_description": "Optional. For private chats, the personal channel of the user", + "rst_description": "*Optional*. For private chats, the personal channel of the user\n", + "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.", + "html_description": "Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed.", + "rst_description": "*Optional*. List of available reactions allowed in the chat. If omitted, then all `emoji reactions `_ are allowed.\n", + "name": "available_reactions", + "required": false + }, + { + "type": "String", + "description": "Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background", + "html_description": "Optional. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background", + "rst_description": "*Optional*. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background\n", + "name": "background_custom_emoji_id", + "required": false + }, + { + "type": "Integer", + "description": "Identifier of the accent color for the chat's profile background. See profile accent colors for more details.", + "html_description": "Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more details.", + "rst_description": "*Optional*. Identifier of the accent color for the chat's profile background. See `profile accent colors `_ for more details.\n", + "name": "profile_accent_color_id", + "required": false + }, + { + "type": "String", + "description": "Custom emoji identifier of the emoji chosen by the chat for its profile background", + "html_description": "Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background", + "rst_description": "*Optional*. Custom emoji identifier of the emoji chosen by the chat for its profile background\n", + "name": "profile_background_custom_emoji_id", + "required": false + }, + { + "type": "String", + "description": "Custom emoji identifier of the emoji status of the chat or the other party in a private chat", + "html_description": "Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat", + "rst_description": "*Optional*. Custom emoji identifier of the emoji status of the chat or the other party in a private chat\n", + "name": "emoji_status_custom_emoji_id", + "required": false + }, + { + "type": "Integer", + "description": "Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any", + "html_description": "Optional. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any", + "rst_description": "*Optional*. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any\n", + "name": "emoji_status_expiration_date", + "required": false + }, + { + "type": "String", + "description": "Bio of the other party in a private chat", + "html_description": "Optional. Bio of the other party in a private chat", + "rst_description": "*Optional*. Bio of the other party in a private chat\n", + "name": "bio", + "required": false + }, + { + "type": "True", + "description": "True, if privacy settings of the other party in the private chat allows to use tg://user?id= links only in chats with the user", + "html_description": "Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user", + "rst_description": "*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\n", + "name": "has_private_forwards", + "required": false + }, + { + "type": "True", + "description": "True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat", + "html_description": "Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat", + "rst_description": "*Optional*. :code:`True`, if the privacy settings of the other party restrict sending voice and video note messages in the private chat\n", + "name": "has_restricted_voice_and_video_messages", + "required": false + }, + { + "type": "True", + "description": "True, if users need to join the supergroup before they can send messages", + "html_description": "Optional. True, if users need to join the supergroup before they can send messages", + "rst_description": "*Optional*. :code:`True`, if users need to join the supergroup before they can send messages\n", + "name": "join_to_send_messages", + "required": false + }, + { + "type": "True", + "description": "True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators", + "html_description": "Optional. True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators", + "rst_description": "*Optional*. :code:`True`, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators\n", + "name": "join_by_request", + "required": false + }, + { + "type": "String", + "description": "Description, for groups, supergroups and channel chats", + "html_description": "Optional. Description, for groups, supergroups and channel chats", + "rst_description": "*Optional*. Description, for groups, supergroups and channel chats\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Primary invite link, for groups, supergroups and channel chats", + "html_description": "Optional. Primary invite link, for groups, supergroups and channel chats", + "rst_description": "*Optional*. Primary invite link, for groups, supergroups and channel chats\n", + "name": "invite_link", + "required": false + }, + { + "type": "Message", + "description": "The most recent pinned message (by sending date)", + "html_description": "Optional. The most recent pinned message (by sending date)", + "rst_description": "*Optional*. The most recent pinned message (by sending date)\n", + "name": "pinned_message", + "required": false + }, + { + "type": "ChatPermissions", + "description": "Default chat member permissions, for groups and supergroups", + "html_description": "Optional. Default chat member permissions, for groups and supergroups", + "rst_description": "*Optional*. Default chat member permissions, for groups and supergroups\n", + "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.", + "html_description": "Optional. True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.", + "rst_description": "*Optional*. :code:`True`, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.\n", + "name": "can_send_paid_media", + "required": false + }, + { + "type": "Integer", + "description": "For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds", + "html_description": "Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds", + "rst_description": "*Optional*. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds\n", + "name": "slow_mode_delay", + "required": false + }, + { + "type": "Integer", + "description": "For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions", + "html_description": "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", + "rst_description": "*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\n", + "name": "unrestrict_boost_count", + "required": false + }, + { + "type": "Integer", + "description": "The time after which all messages sent to the chat will be automatically deleted; in seconds", + "html_description": "Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds", + "rst_description": "*Optional*. The time after which all messages sent to the chat will be automatically deleted; in seconds\n", + "name": "message_auto_delete_time", + "required": false + }, + { + "type": "True", + "description": "True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.", + "html_description": "Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.", + "rst_description": "*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.\n", + "name": "has_aggressive_anti_spam_enabled", + "required": false + }, + { + "type": "True", + "description": "True, if non-administrators can only get the list of bots and administrators in the chat", + "html_description": "Optional. True, if non-administrators can only get the list of bots and administrators in the chat", + "rst_description": "*Optional*. :code:`True`, if non-administrators can only get the list of bots and administrators in the chat\n", + "name": "has_hidden_members", + "required": false + }, + { + "type": "True", + "description": "True, if messages from the chat can't be forwarded to other chats", + "html_description": "Optional. True, if messages from the chat can't be forwarded to other chats", + "rst_description": "*Optional*. :code:`True`, if messages from the chat can't be forwarded to other chats\n", + "name": "has_protected_content", + "required": false + }, + { + "type": "True", + "description": "True, if new chat members will have access to old messages; available only to chat administrators", + "html_description": "Optional. True, if new chat members will have access to old messages; available only to chat administrators", + "rst_description": "*Optional*. :code:`True`, if new chat members will have access to old messages; available only to chat administrators\n", + "name": "has_visible_history", + "required": false + }, + { + "type": "String", + "description": "For supergroups, name of the group sticker set", + "html_description": "Optional. For supergroups, name of the group sticker set", + "rst_description": "*Optional*. For supergroups, name of the group sticker set\n", + "name": "sticker_set_name", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can change the group sticker set", + "html_description": "Optional. True, if the bot can change the group sticker set", + "rst_description": "*Optional*. :code:`True`, if the bot can change the group sticker set\n", + "name": "can_set_sticker_set", + "required": false + }, + { + "type": "String", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "custom_emoji_sticker_set_name", + "required": false + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "linked_chat_id", + "required": false + }, + { + "type": "ChatLocation", + "description": "For supergroups, the location to which the supergroup is connected", + "html_description": "Optional. For supergroups, the location to which the supergroup is connected", + "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/ChatFullInfo/replace.yml b/.butcher/types/ChatFullInfo/replace.yml new file mode 100644 index 00000000..2070e8a0 --- /dev/null +++ b/.butcher/types/ChatFullInfo/replace.yml @@ -0,0 +1,7 @@ +bases: + - Chat +annotations: + emoji_status_expiration_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/ChatInviteLink/entity.json b/.butcher/types/ChatInviteLink/entity.json new file mode 100644 index 00000000..c656d1a7 --- /dev/null +++ b/.butcher/types/ChatInviteLink/entity.json @@ -0,0 +1,105 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatinvitelink", + "name": "ChatInviteLink", + "description": "Represents an invite link for a chat.", + "html_description": "

Represents an invite link for a chat.

", + "rst_description": "Represents an invite link for a chat.", + "annotations": [ + { + "type": "String", + "description": "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with '…'.", + "html_description": "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”.", + "rst_description": "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with '…'.\n", + "name": "invite_link", + "required": true + }, + { + "type": "User", + "description": "Creator of the link", + "html_description": "Creator of the link", + "rst_description": "Creator of the link\n", + "name": "creator", + "required": true + }, + { + "type": "Boolean", + "description": "True, if users joining the chat via the link need to be approved by chat administrators", + "html_description": "True, if users joining the chat via the link need to be approved by chat administrators", + "rst_description": ":code:`True`, if users joining the chat via the link need to be approved by chat administrators\n", + "name": "creates_join_request", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the link is primary", + "html_description": "True, if the link is primary", + "rst_description": ":code:`True`, if the link is primary\n", + "name": "is_primary", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the link is revoked", + "html_description": "True, if the link is revoked", + "rst_description": ":code:`True`, if the link is revoked\n", + "name": "is_revoked", + "required": true + }, + { + "type": "String", + "description": "Invite link name", + "html_description": "Optional. Invite link name", + "rst_description": "*Optional*. Invite link name\n", + "name": "name", + "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the link will expire or has been expired", + "html_description": "Optional. Point in time (Unix timestamp) when the link will expire or has been expired", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the link will expire or has been expired\n", + "name": "expire_date", + "required": false + }, + { + "type": "Integer", + "description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "html_description": "Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "rst_description": "*Optional*. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999\n", + "name": "member_limit", + "required": false + }, + { + "type": "Integer", + "description": "Number of pending join requests created using this link", + "html_description": "Optional. Number of pending join requests created using this link", + "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/ChatInviteLink/replace.yml b/.butcher/types/ChatInviteLink/replace.yml new file mode 100644 index 00000000..21d6557f --- /dev/null +++ b/.butcher/types/ChatInviteLink/replace.yml @@ -0,0 +1,5 @@ +annotations: + expire_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/ChatJoinRequest/aliases.yml b/.butcher/types/ChatJoinRequest/aliases.yml new file mode 100644 index 00000000..630c65ef --- /dev/null +++ b/.butcher/types/ChatJoinRequest/aliases.yml @@ -0,0 +1,147 @@ +approve: + method: approveChatJoinRequest + fill: &request-target + chat_id: self.chat.id + user_id: self.from_user.id + +decline: + method: declineChatJoinRequest + fill: *request-target + +answer: + method: sendMessage + fill: &fill-answer-chat + chat_id: self.chat.id + +answer_pm: + method: sendMessage + fill: &fill-answer-user + chat_id: self.user_chat_id + +answer_animation: + method: sendAnimation + fill: *fill-answer-chat + +answer_animation_pm: + method: sendAnimation + fill: *fill-answer-user + +answer_audio: + method: sendAudio + fill: *fill-answer-chat + +answer_audio_pm: + method: sendAudio + fill: *fill-answer-user + +answer_contact: + method: sendContact + fill: *fill-answer-chat + +answer_contact_pm: + method: sendContact + fill: *fill-answer-user + +answer_document: + method: sendDocument + fill: *fill-answer-chat + +answer_document_pm: + method: sendDocument + fill: *fill-answer-user + +answer_game: + method: sendGame + fill: *fill-answer-chat + +answer_game_pm: + method: sendGame + fill: *fill-answer-user + +answer_invoice: + method: sendInvoice + fill: *fill-answer-chat + +answer_invoice_pm: + method: sendInvoice + fill: *fill-answer-user + +answer_location: + method: sendLocation + fill: *fill-answer-chat + +answer_location_pm: + method: sendLocation + fill: *fill-answer-user + +answer_media_group: + method: sendMediaGroup + fill: *fill-answer-chat + +answer_media_group_pm: + method: sendMediaGroup + fill: *fill-answer-user + +answer_photo: + method: sendPhoto + fill: *fill-answer-chat + +answer_photo_pm: + method: sendPhoto + fill: *fill-answer-user + +answer_poll: + method: sendPoll + fill: *fill-answer-chat + +answer_poll_pm: + method: sendPoll + fill: *fill-answer-user + +answer_dice: + method: sendDice + fill: *fill-answer-chat + +answer_dice_pm: + method: sendDice + fill: *fill-answer-user + +answer_sticker: + method: sendSticker + fill: *fill-answer-chat + +answer_sticker_pm: + method: sendSticker + fill: *fill-answer-user + +answer_venue: + method: sendVenue + fill: *fill-answer-chat + +answer_venue_pm: + method: sendVenue + fill: *fill-answer-user + +answer_video: + method: sendVideo + fill: *fill-answer-chat + +answer_video_pm: + method: sendVideo + fill: *fill-answer-user + +answer_video_note: + method: sendVideoNote + fill: *fill-answer-chat + +answer_video_note_pm: + method: sendVideoNote + fill: *fill-answer-user + +answer_voice: + method: sendVoice + fill: *fill-answer-chat + +answer_voice_pm: + method: sendVoice + fill: *fill-answer-user diff --git a/.butcher/types/ChatJoinRequest/entity.json b/.butcher/types/ChatJoinRequest/entity.json new file mode 100644 index 00000000..25cfe9e3 --- /dev/null +++ b/.butcher/types/ChatJoinRequest/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatjoinrequest", + "name": "ChatJoinRequest", + "description": "Represents a join request sent to a chat.", + "html_description": "

Represents a join request sent to a chat.

", + "rst_description": "Represents a join request sent to a chat.", + "annotations": [ + { + "type": "Chat", + "description": "Chat to which the request was sent", + "html_description": "Chat to which the request was sent", + "rst_description": "Chat to which the request was sent\n", + "name": "chat", + "required": true + }, + { + "type": "User", + "description": "User that sent the join request", + "html_description": "User that sent the join request", + "rst_description": "User that sent the join request\n", + "name": "from", + "required": true + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "user_chat_id", + "required": true + }, + { + "type": "Integer", + "description": "Date the request was sent in Unix time", + "html_description": "Date the request was sent in Unix time", + "rst_description": "Date the request was sent in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "String", + "description": "Bio of the user.", + "html_description": "Optional. Bio of the user.", + "rst_description": "*Optional*. Bio of the user.\n", + "name": "bio", + "required": false + }, + { + "type": "ChatInviteLink", + "description": "Chat invite link that was used by the user to send the join request", + "html_description": "Optional. Chat invite link that was used by the user to send the join request", + "rst_description": "*Optional*. Chat invite link that was used by the user to send the join request\n", + "name": "invite_link", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatJoinRequest/replace.yml b/.butcher/types/ChatJoinRequest/replace.yml new file mode 100644 index 00000000..80c48d76 --- /dev/null +++ b/.butcher/types/ChatJoinRequest/replace.yml @@ -0,0 +1,5 @@ +annotations: + date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/ChatLocation/entity.json b/.butcher/types/ChatLocation/entity.json new file mode 100644 index 00000000..8b9f1e7d --- /dev/null +++ b/.butcher/types/ChatLocation/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatlocation", + "name": "ChatLocation", + "description": "Represents a location to which a chat is connected.", + "html_description": "

Represents a location to which a chat is connected.

", + "rst_description": "Represents a location to which a chat is connected.", + "annotations": [ + { + "type": "Location", + "description": "The location to which the supergroup is connected. Can't be a live location.", + "html_description": "The location to which the supergroup is connected. Can't be a live location.", + "rst_description": "The location to which the supergroup is connected. Can't be a live location.\n", + "name": "location", + "required": true + }, + { + "type": "String", + "description": "Location address; 1-64 characters, as defined by the chat owner", + "html_description": "Location address; 1-64 characters, as defined by the chat owner", + "rst_description": "Location address; 1-64 characters, as defined by the chat owner\n", + "name": "address", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatMember/entity.json b/.butcher/types/ChatMember/entity.json new file mode 100644 index 00000000..642479cc --- /dev/null +++ b/.butcher/types/ChatMember/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatmember", + "name": "ChatMember", + "description": "This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:\n - ChatMemberOwner\n - ChatMemberAdministrator\n - ChatMemberMember\n - ChatMemberRestricted\n - ChatMemberLeft\n - ChatMemberBanned", + "html_description": "

This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:

", + "rst_description": "This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:\n\n - :class:`aiogram.types.chat_member_owner.ChatMemberOwner`\n - :class:`aiogram.types.chat_member_administrator.ChatMemberAdministrator`\n - :class:`aiogram.types.chat_member_member.ChatMemberMember`\n - :class:`aiogram.types.chat_member_restricted.ChatMemberRestricted`\n - :class:`aiogram.types.chat_member_left.ChatMemberLeft`\n - :class:`aiogram.types.chat_member_banned.ChatMemberBanned`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/ChatMember/replace.yml b/.butcher/types/ChatMember/replace.yml new file mode 100644 index 00000000..e264e991 --- /dev/null +++ b/.butcher/types/ChatMember/replace.yml @@ -0,0 +1,5 @@ +annotations: + until_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/ChatMember/subtypes.yml b/.butcher/types/ChatMember/subtypes.yml new file mode 100644 index 00000000..95832398 --- /dev/null +++ b/.butcher/types/ChatMember/subtypes.yml @@ -0,0 +1 @@ +discriminator: "status" diff --git a/.butcher/types/ChatMemberAdministrator/entity.json b/.butcher/types/ChatMemberAdministrator/entity.json new file mode 100644 index 00000000..7b55cc7a --- /dev/null +++ b/.butcher/types/ChatMemberAdministrator/entity.json @@ -0,0 +1,185 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatmemberadministrator", + "name": "ChatMemberAdministrator", + "description": "Represents a chat member that has some additional privileges.", + "html_description": "

Represents a chat member that has some additional privileges.

", + "rst_description": "Represents a `chat member `_ that has some additional privileges.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'administrator'", + "html_description": "The member's status in the chat, always “administrator”", + "rst_description": "The member's status in the chat, always 'administrator'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the bot is allowed to edit administrator privileges of that user", + "html_description": "True, if the bot is allowed to edit administrator privileges of that user", + "rst_description": ":code:`True`, if the bot is allowed to edit administrator privileges of that user\n", + "name": "can_be_edited", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user's presence in the chat is hidden", + "html_description": "True, if the user's presence in the chat is hidden", + "rst_description": ":code:`True`, if the user's presence in the chat is hidden\n", + "name": "is_anonymous", + "required": true + }, + { + "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, 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 + }, + { + "type": "Boolean", + "description": "True, if the administrator can delete messages of other users", + "html_description": "True, if the administrator can delete messages of other users", + "rst_description": ":code:`True`, if the administrator can delete messages of other users\n", + "name": "can_delete_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can manage video chats", + "html_description": "True, if the administrator can manage video chats", + "rst_description": ":code:`True`, if the administrator can manage video chats\n", + "name": "can_manage_video_chats", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics", + "html_description": "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics", + "rst_description": ":code:`True`, if the administrator can restrict, ban or unban chat members, or access supergroup statistics\n", + "name": "can_restrict_members", + "required": true + }, + { + "type": "Boolean", + "description": "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 the user)", + "html_description": "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 the user)", + "rst_description": ":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 the user)\n", + "name": "can_promote_members", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to change the chat title, photo and other settings", + "html_description": "True, if the user is allowed to change the chat title, photo and other settings", + "rst_description": ":code:`True`, if the user is allowed to change the chat title, photo and other settings\n", + "name": "can_change_info", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to invite new users to the chat", + "html_description": "True, if the user is allowed to invite new users to the chat", + "rst_description": ":code:`True`, if the user is allowed to invite new users to the chat\n", + "name": "can_invite_users", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can post stories to the chat", + "html_description": "True, if the administrator can post stories to the chat", + "rst_description": ":code:`True`, if the administrator can post stories to the chat\n", + "name": "can_post_stories", + "required": true + }, + { + "type": "Boolean", + "description": "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", + "html_description": "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", + "rst_description": ":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\n", + "name": "can_edit_stories", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can delete stories posted by other users", + "html_description": "True, if the administrator can delete stories posted by other users", + "rst_description": ":code:`True`, if the administrator can delete stories posted by other users\n", + "name": "can_delete_stories", + "required": true + }, + { + "type": "Boolean", + "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 + }, + { + "type": "Boolean", + "description": "True, if the administrator can edit messages of other users and can pin messages; for channels only", + "html_description": "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only\n", + "name": "can_edit_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to pin messages; for groups and supergroups only", + "html_description": "Optional. True, if the user is allowed to pin messages; for groups and supergroups only", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only\n", + "name": "can_pin_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only", + "html_description": "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only", + "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 + }, + { + "type": "String", + "description": "Custom title for this user", + "html_description": "Optional. Custom title for this user", + "rst_description": "*Optional*. Custom title for this user\n", + "name": "custom_title", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatMemberBanned/entity.json b/.butcher/types/ChatMemberBanned/entity.json new file mode 100644 index 00000000..4da411ec --- /dev/null +++ b/.butcher/types/ChatMemberBanned/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatmemberbanned", + "name": "ChatMemberBanned", + "description": "Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.", + "html_description": "

Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.

", + "rst_description": "Represents a `chat member `_ that was banned in the chat and can't return to the chat or view chat messages.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'kicked'", + "html_description": "The member's status in the chat, always “kicked”", + "rst_description": "The member's status in the chat, always 'kicked'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + }, + { + "type": "Integer", + "description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever", + "html_description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever", + "rst_description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever\n", + "name": "until_date", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatMemberBanned/replace.yml b/.butcher/types/ChatMemberBanned/replace.yml new file mode 100644 index 00000000..e264e991 --- /dev/null +++ b/.butcher/types/ChatMemberBanned/replace.yml @@ -0,0 +1,5 @@ +annotations: + until_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/ChatMemberLeft/entity.json b/.butcher/types/ChatMemberLeft/entity.json new file mode 100644 index 00000000..6e67d7cc --- /dev/null +++ b/.butcher/types/ChatMemberLeft/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatmemberleft", + "name": "ChatMemberLeft", + "description": "Represents a chat member that isn't currently a member of the chat, but may join it themselves.", + "html_description": "

Represents a chat member that isn't currently a member of the chat, but may join it themselves.

", + "rst_description": "Represents a `chat member `_ that isn't currently a member of the chat, but may join it themselves.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'left'", + "html_description": "The member's status in the chat, always “left”", + "rst_description": "The member's status in the chat, always 'left'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatMemberMember/entity.json b/.butcher/types/ChatMemberMember/entity.json new file mode 100644 index 00000000..ed1a8304 --- /dev/null +++ b/.butcher/types/ChatMemberMember/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatmembermember", + "name": "ChatMemberMember", + "description": "Represents a chat member that has no additional privileges or restrictions.", + "html_description": "

Represents a chat member that has no additional privileges or restrictions.

", + "rst_description": "Represents a `chat member `_ that has no additional privileges or restrictions.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'member'", + "html_description": "The member's status in the chat, always “member”", + "rst_description": "The member's status in the chat, always 'member'\n", + "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", + "html_description": "Information about the user", + "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/ChatMemberOwner/entity.json b/.butcher/types/ChatMemberOwner/entity.json new file mode 100644 index 00000000..2fafed33 --- /dev/null +++ b/.butcher/types/ChatMemberOwner/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatmemberowner", + "name": "ChatMemberOwner", + "description": "Represents a chat member that owns the chat and has all administrator privileges.", + "html_description": "

Represents a chat member that owns the chat and has all administrator privileges.

", + "rst_description": "Represents a `chat member `_ that owns the chat and has all administrator privileges.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'creator'", + "html_description": "The member's status in the chat, always “creator”", + "rst_description": "The member's status in the chat, always 'creator'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user's presence in the chat is hidden", + "html_description": "True, if the user's presence in the chat is hidden", + "rst_description": ":code:`True`, if the user's presence in the chat is hidden\n", + "name": "is_anonymous", + "required": true + }, + { + "type": "String", + "description": "Custom title for this user", + "html_description": "Optional. Custom title for this user", + "rst_description": "*Optional*. Custom title for this user\n", + "name": "custom_title", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatMemberRestricted/entity.json b/.butcher/types/ChatMemberRestricted/entity.json new file mode 100644 index 00000000..f0572284 --- /dev/null +++ b/.butcher/types/ChatMemberRestricted/entity.json @@ -0,0 +1,177 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatmemberrestricted", + "name": "ChatMemberRestricted", + "description": "Represents a chat member that is under certain restrictions in the chat. Supergroups only.", + "html_description": "

Represents a chat member that is under certain restrictions in the chat. Supergroups only.

", + "rst_description": "Represents a `chat member `_ that is under certain restrictions in the chat. Supergroups only.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'restricted'", + "html_description": "The member's status in the chat, always “restricted”", + "rst_description": "The member's status in the chat, always 'restricted'\n", + "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", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is a member of the chat at the moment of the request", + "html_description": "True, if the user is a member of the chat at the moment of the request", + "rst_description": ":code:`True`, if the user is a member of the chat at the moment of the request\n", + "name": "is_member", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues", + "html_description": "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues", + "rst_description": ":code:`True`, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues\n", + "name": "can_send_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send audios", + "html_description": "True, if the user is allowed to send audios", + "rst_description": ":code:`True`, if the user is allowed to send audios\n", + "name": "can_send_audios", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send documents", + "html_description": "True, if the user is allowed to send documents", + "rst_description": ":code:`True`, if the user is allowed to send documents\n", + "name": "can_send_documents", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send photos", + "html_description": "True, if the user is allowed to send photos", + "rst_description": ":code:`True`, if the user is allowed to send photos\n", + "name": "can_send_photos", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send videos", + "html_description": "True, if the user is allowed to send videos", + "rst_description": ":code:`True`, if the user is allowed to send videos\n", + "name": "can_send_videos", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send video notes", + "html_description": "True, if the user is allowed to send video notes", + "rst_description": ":code:`True`, if the user is allowed to send video notes\n", + "name": "can_send_video_notes", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send voice notes", + "html_description": "True, if the user is allowed to send voice notes", + "rst_description": ":code:`True`, if the user is allowed to send voice notes\n", + "name": "can_send_voice_notes", + "required": true + }, + { + "type": "Boolean", + "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 + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send animations, games, stickers and use inline bots", + "html_description": "True, if the user is allowed to send animations, games, stickers and use inline bots", + "rst_description": ":code:`True`, if the user is allowed to send animations, games, stickers and use inline bots\n", + "name": "can_send_other_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to add web page previews to their messages", + "html_description": "True, if the user is allowed to add web page previews to their messages", + "rst_description": ":code:`True`, if the user is allowed to add web page previews to their messages\n", + "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", + "html_description": "True, if the user is allowed to change the chat title, photo and other settings", + "rst_description": ":code:`True`, if the user is allowed to change the chat title, photo and other settings\n", + "name": "can_change_info", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to invite new users to the chat", + "html_description": "True, if the user is allowed to invite new users to the chat", + "rst_description": ":code:`True`, if the user is allowed to invite new users to the chat\n", + "name": "can_invite_users", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to pin messages", + "html_description": "True, if the user is allowed to pin messages", + "rst_description": ":code:`True`, if the user is allowed to pin messages\n", + "name": "can_pin_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to create forum topics", + "html_description": "True, if the user is allowed to create forum topics", + "rst_description": ":code:`True`, if the user is allowed to create forum topics\n", + "name": "can_manage_topics", + "required": true + }, + { + "type": "Integer", + "description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever", + "html_description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever", + "rst_description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever\n", + "name": "until_date", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatMemberRestricted/replace.yml b/.butcher/types/ChatMemberRestricted/replace.yml new file mode 100644 index 00000000..e264e991 --- /dev/null +++ b/.butcher/types/ChatMemberRestricted/replace.yml @@ -0,0 +1,5 @@ +annotations: + until_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/ChatMemberUpdated/aliases.yml b/.butcher/types/ChatMemberUpdated/aliases.yml new file mode 100644 index 00000000..ee220974 --- /dev/null +++ b/.butcher/types/ChatMemberUpdated/aliases.yml @@ -0,0 +1,68 @@ +answer: + method: sendMessage + fill: &fill-answer + chat_id: self.chat.id + +answer_animation: + method: sendAnimation + fill: *fill-answer + +answer_audio: + method: sendAudio + fill: *fill-answer + +answer_contact: + method: sendContact + fill: *fill-answer + +answer_document: + method: sendDocument + fill: *fill-answer + +answer_game: + method: sendGame + fill: *fill-answer + +answer_invoice: + method: sendInvoice + fill: *fill-answer + +answer_location: + method: sendLocation + fill: *fill-answer + +answer_media_group: + method: sendMediaGroup + fill: *fill-answer + +answer_photo: + method: sendPhoto + fill: *fill-answer + +answer_poll: + method: sendPoll + fill: *fill-answer + +answer_dice: + method: sendDice + fill: *fill-answer + +answer_sticker: + method: sendSticker + fill: *fill-answer + +answer_venue: + method: sendVenue + fill: *fill-answer + +answer_video: + method: sendVideo + fill: *fill-answer + +answer_video_note: + method: sendVideoNote + fill: *fill-answer + +answer_voice: + method: sendVoice + fill: *fill-answer diff --git a/.butcher/types/ChatMemberUpdated/entity.json b/.butcher/types/ChatMemberUpdated/entity.json new file mode 100644 index 00000000..e20b3ee6 --- /dev/null +++ b/.butcher/types/ChatMemberUpdated/entity.json @@ -0,0 +1,81 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatmemberupdated", + "name": "ChatMemberUpdated", + "description": "This object represents changes in the status of a chat member.", + "html_description": "

This object represents changes in the status of a chat member.

", + "rst_description": "This object represents changes in the status of a chat member.", + "annotations": [ + { + "type": "Chat", + "description": "Chat the user belongs to", + "html_description": "Chat the user belongs to", + "rst_description": "Chat the user belongs to\n", + "name": "chat", + "required": true + }, + { + "type": "User", + "description": "Performer of the action, which resulted in the change", + "html_description": "Performer of the action, which resulted in the change", + "rst_description": "Performer of the action, which resulted in the change\n", + "name": "from", + "required": true + }, + { + "type": "Integer", + "description": "Date the change was done in Unix time", + "html_description": "Date the change was done in Unix time", + "rst_description": "Date the change was done in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "ChatMember", + "description": "Previous information about the chat member", + "html_description": "Previous information about the chat member", + "rst_description": "Previous information about the chat member\n", + "name": "old_chat_member", + "required": true + }, + { + "type": "ChatMember", + "description": "New information about the chat member", + "html_description": "New information about the chat member", + "rst_description": "New information about the chat member\n", + "name": "new_chat_member", + "required": true + }, + { + "type": "ChatInviteLink", + "description": "Chat invite link, which was used by the user to join the chat; for joining by invite link events only.", + "html_description": "Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.", + "rst_description": "*Optional*. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.\n", + "name": "invite_link", + "required": false + }, + { + "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*. :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*. :code:`True`, if the user joined the chat via a chat folder invite link\n", + "name": "via_chat_folder_invite_link", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatMemberUpdated/replace.yml b/.butcher/types/ChatMemberUpdated/replace.yml new file mode 100644 index 00000000..80c48d76 --- /dev/null +++ b/.butcher/types/ChatMemberUpdated/replace.yml @@ -0,0 +1,5 @@ +annotations: + date: + parsed_type: + type: std + name: DateTime 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 new file mode 100644 index 00000000..d6ad3cc9 --- /dev/null +++ b/.butcher/types/ChatPermissions/entity.json @@ -0,0 +1,137 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatpermissions", + "name": "ChatPermissions", + "description": "Describes actions that a non-administrator user is allowed to take in a chat.", + "html_description": "

Describes actions that a non-administrator user is allowed to take in a chat.

", + "rst_description": "Describes actions that a non-administrator user is allowed to take in a chat.", + "annotations": [ + { + "type": "Boolean", + "description": "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues", + "html_description": "Optional. True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues\n", + "name": "can_send_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send audios", + "html_description": "Optional. True, if the user is allowed to send audios", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send audios\n", + "name": "can_send_audios", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send documents", + "html_description": "Optional. True, if the user is allowed to send documents", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send documents\n", + "name": "can_send_documents", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send photos", + "html_description": "Optional. True, if the user is allowed to send photos", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send photos\n", + "name": "can_send_photos", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send videos", + "html_description": "Optional. True, if the user is allowed to send videos", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send videos\n", + "name": "can_send_videos", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send video notes", + "html_description": "Optional. True, if the user is allowed to send video notes", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send video notes\n", + "name": "can_send_video_notes", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send voice notes", + "html_description": "Optional. True, if the user is allowed to send voice notes", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send voice notes\n", + "name": "can_send_voice_notes", + "required": false + }, + { + "type": "Boolean", + "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 + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send animations, games, stickers and use inline bots", + "html_description": "Optional. True, if the user is allowed to send animations, games, stickers and use inline bots", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots\n", + "name": "can_send_other_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to add web page previews to their messages", + "html_description": "Optional. True, if the user is allowed to add web page previews to their messages", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages\n", + "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", + "html_description": "Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups\n", + "name": "can_change_info", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to invite new users to the chat", + "html_description": "Optional. True, if the user is allowed to invite new users to the chat", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to invite new users to the chat\n", + "name": "can_invite_users", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to pin messages. Ignored in public supergroups", + "html_description": "Optional. True, if the user is allowed to pin messages. Ignored in public supergroups", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to pin messages. Ignored in public supergroups\n", + "name": "can_pin_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages", + "html_description": "Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages\n", + "name": "can_manage_topics", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatPermissions/replace.yml b/.butcher/types/ChatPermissions/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/ChatPermissions/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/ChatPhoto/entity.json b/.butcher/types/ChatPhoto/entity.json new file mode 100644 index 00000000..50ce7532 --- /dev/null +++ b/.butcher/types/ChatPhoto/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatphoto", + "name": "ChatPhoto", + "description": "This object represents a chat photo.", + "html_description": "

This object represents a chat photo.

", + "rst_description": "This object represents a chat photo.", + "annotations": [ + { + "type": "String", + "description": "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.", + "html_description": "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.", + "rst_description": "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.\n", + "name": "small_file_id", + "required": true + }, + { + "type": "String", + "description": "Unique file identifier of small (160x160) chat photo, 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 file identifier of small (160x160) chat photo, 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 file identifier of small (160x160) chat photo, 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": "small_file_unique_id", + "required": true + }, + { + "type": "String", + "description": "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.", + "html_description": "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.", + "rst_description": "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.\n", + "name": "big_file_id", + "required": true + }, + { + "type": "String", + "description": "Unique file identifier of big (640x640) chat photo, 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 file identifier of big (640x640) chat photo, 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 file identifier of big (640x640) chat photo, 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": "big_file_unique_id", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatShared/entity.json b/.butcher/types/ChatShared/entity.json new file mode 100644 index 00000000..eb8b6c17 --- /dev/null +++ b/.butcher/types/ChatShared/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatshared", + "name": "ChatShared", + "description": "This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.", + "html_description": "

This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.

", + "rst_description": "This object contains information about a chat that was shared with the bot using a :class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat` button.", + "annotations": [ + { + "type": "Integer", + "description": "Identifier of the request", + "html_description": "Identifier of the request", + "rst_description": "Identifier of the request\n", + "name": "request_id", + "required": true + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "chat_id", + "required": true + }, + { + "type": "String", + "description": "Title of the chat, if the title was requested by the bot.", + "html_description": "Optional. Title of the chat, if the title was requested by the bot.", + "rst_description": "*Optional*. Title of the chat, if the title was requested by the bot.\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Username of the chat, if the username was requested by the bot and available.", + "html_description": "Optional. Username of the chat, if the username was requested by the bot and available.", + "rst_description": "*Optional*. Username of the chat, if the username was requested by the bot and available.\n", + "name": "username", + "required": false + }, + { + "type": "Array of PhotoSize", + "description": "Available sizes of the chat photo, if the photo was requested by the bot", + "html_description": "Optional. Available sizes of the chat photo, if the photo was requested by the bot", + "rst_description": "*Optional*. Available sizes of the chat photo, if the photo was requested by the bot\n", + "name": "photo", + "required": false + } + ], + "category": "types" + } +} 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/ChosenInlineResult/entity.json b/.butcher/types/ChosenInlineResult/entity.json new file mode 100644 index 00000000..66d5eb25 --- /dev/null +++ b/.butcher/types/ChosenInlineResult/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "choseninlineresult", + "name": "ChosenInlineResult", + "description": "Represents a result of an inline query that was chosen by the user and sent to their chat partner.\nNote: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates.", + "html_description": "

Represents a result of an inline query that was chosen by the user and sent to their chat partner.

Note: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates.

", + "rst_description": "Represents a `result `_ of an inline query that was chosen by the user and sent to their chat partner.\n**Note:** It is necessary to enable `inline feedback `_ via `@BotFather `_ in order to receive these objects in updates.", + "annotations": [ + { + "type": "String", + "description": "The unique identifier for the result that was chosen", + "html_description": "The unique identifier for the result that was chosen", + "rst_description": "The unique identifier for the result that was chosen\n", + "name": "result_id", + "required": true + }, + { + "type": "User", + "description": "The user that chose the result", + "html_description": "The user that chose the result", + "rst_description": "The user that chose the result\n", + "name": "from", + "required": true + }, + { + "type": "Location", + "description": "Sender location, only for bots that require user location", + "html_description": "Optional. Sender location, only for bots that require user location", + "rst_description": "*Optional*. Sender location, only for bots that require user location\n", + "name": "location", + "required": false + }, + { + "type": "String", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "inline_message_id", + "required": false + }, + { + "type": "String", + "description": "The query that was used to obtain the result", + "html_description": "The query that was used to obtain the result", + "rst_description": "The query that was used to obtain the result\n", + "name": "query", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Contact/entity.json b/.butcher/types/Contact/entity.json new file mode 100644 index 00000000..fbbf72ef --- /dev/null +++ b/.butcher/types/Contact/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "contact", + "name": "Contact", + "description": "This object represents a phone contact.", + "html_description": "

This object represents a phone contact.

", + "rst_description": "This object represents a phone contact.", + "annotations": [ + { + "type": "String", + "description": "Contact's phone number", + "html_description": "Contact's phone number", + "rst_description": "Contact's phone number\n", + "name": "phone_number", + "required": true + }, + { + "type": "String", + "description": "Contact's first name", + "html_description": "Contact's first name", + "rst_description": "Contact's first name\n", + "name": "first_name", + "required": true + }, + { + "type": "String", + "description": "Contact's last name", + "html_description": "Optional. Contact's last name", + "rst_description": "*Optional*. Contact's last name\n", + "name": "last_name", + "required": false + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "user_id", + "required": false + }, + { + "type": "String", + "description": "Additional data about the contact in the form of a vCard", + "html_description": "Optional. Additional data about the contact in the form of a vCard", + "rst_description": "*Optional*. Additional data about the contact in the form of a `vCard `_\n", + "name": "vcard", + "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/Dice/entity.json b/.butcher/types/Dice/entity.json new file mode 100644 index 00000000..ac9ad417 --- /dev/null +++ b/.butcher/types/Dice/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "dice", + "name": "Dice", + "description": "This object represents an animated emoji that displays a random value.", + "html_description": "

This object represents an animated emoji that displays a random value.

", + "rst_description": "This object represents an animated emoji that displays a random value.", + "annotations": [ + { + "type": "String", + "description": "Emoji on which the dice throw animation is based", + "html_description": "Emoji on which the dice throw animation is based", + "rst_description": "Emoji on which the dice throw animation is based\n", + "name": "emoji", + "required": true + }, + { + "type": "Integer", + "description": "Value of the dice, 1-6 for '', '' and '' base emoji, 1-5 for '' and '' base emoji, 1-64 for '' base emoji", + "html_description": "Value of the dice, 1-6 for “\"🎲\"/”, “\"🎯\"/” and “\"🎳\"/” base emoji, 1-5 for “\"🏀\"/” and “\"⚽\"/” base emoji, 1-64 for “\"🎰\"/” base emoji", + "rst_description": "Value of the dice, 1-6 for '🎲', '🎯' and '🎳' base emoji, 1-5 for '🏀' and '⚽' base emoji, 1-64 for '🎰' base emoji\n", + "name": "value", + "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/Document/entity.json b/.butcher/types/Document/entity.json new file mode 100644 index 00000000..c032fe5a --- /dev/null +++ b/.butcher/types/Document/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "document", + "name": "Document", + "description": "This object represents a general file (as opposed to photos, voice messages and audio files).", + "html_description": "

This object represents a general file (as opposed to photos, voice messages and audio files).

", + "rst_description": "This object represents a general file (as opposed to `photos `_, `voice messages `_ and `audio files `_).", + "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": "PhotoSize", + "description": "Document thumbnail as defined by the sender", + "html_description": "Optional. Document thumbnail as defined by the sender", + "rst_description": "*Optional*. Document thumbnail as defined by the sender\n", + "name": "thumbnail", + "required": false + }, + { + "type": "String", + "description": "Original filename as defined by the sender", + "html_description": "Optional. Original filename as defined by the sender", + "rst_description": "*Optional*. Original filename as defined by the sender\n", + "name": "file_name", + "required": false + }, + { + "type": "String", + "description": "MIME type of the file as defined by the sender", + "html_description": "Optional. MIME type of the file as defined by the sender", + "rst_description": "*Optional*. MIME type of the file as defined by the sender\n", + "name": "mime_type", + "required": false + }, + { + "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/EncryptedCredentials/entity.json b/.butcher/types/EncryptedCredentials/entity.json new file mode 100644 index 00000000..0841cc1d --- /dev/null +++ b/.butcher/types/EncryptedCredentials/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "encryptedcredentials", + "name": "EncryptedCredentials", + "description": "Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.", + "html_description": "

Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.

", + "rst_description": "Describes data required for decrypting and authenticating :class:`aiogram.types.encrypted_passport_element.EncryptedPassportElement`. See the `Telegram Passport Documentation `_ for a complete description of the data decryption and authentication processes.", + "annotations": [ + { + "type": "String", + "description": "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication", + "html_description": "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication", + "rst_description": "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for :class:`aiogram.types.encrypted_passport_element.EncryptedPassportElement` decryption and authentication\n", + "name": "data", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded data hash for data authentication", + "html_description": "Base64-encoded data hash for data authentication", + "rst_description": "Base64-encoded data hash for data authentication\n", + "name": "hash", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption", + "html_description": "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption", + "rst_description": "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption\n", + "name": "secret", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/EncryptedPassportElement/entity.json b/.butcher/types/EncryptedPassportElement/entity.json new file mode 100644 index 00000000..2d969e3e --- /dev/null +++ b/.butcher/types/EncryptedPassportElement/entity.json @@ -0,0 +1,97 @@ +{ + "meta": {}, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "encryptedpassportelement", + "name": "EncryptedPassportElement", + "description": "Describes documents or other Telegram Passport elements shared with the bot by the user.", + "html_description": "

Describes documents or other Telegram Passport elements shared with the bot by the user.

", + "rst_description": "Describes documents or other Telegram Passport elements shared with the bot by the user.", + "annotations": [ + { + "type": "String", + "description": "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'.", + "html_description": "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”.", + "rst_description": "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'.\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "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 EncryptedCredentials.", + "html_description": "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 EncryptedCredentials.", + "rst_description": "*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`.\n", + "name": "data", + "required": false + }, + { + "type": "String", + "description": "User's verified phone number; available only for 'phone_number' type", + "html_description": "Optional. User's verified phone number; available only for “phone_number” type", + "rst_description": "*Optional*. User's verified phone number; available only for 'phone_number' type\n", + "name": "phone_number", + "required": false + }, + { + "type": "String", + "description": "User's verified email address; available only for 'email' type", + "html_description": "Optional. User's verified email address; available only for “email” type", + "rst_description": "*Optional*. User's verified email address; available only for 'email' type\n", + "name": "email", + "required": false + }, + { + "type": "Array of PassportFile", + "description": "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 EncryptedCredentials.", + "html_description": "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 EncryptedCredentials.", + "rst_description": "*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`.\n", + "name": "files", + "required": false + }, + { + "type": "PassportFile", + "description": "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 EncryptedCredentials.", + "html_description": "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 EncryptedCredentials.", + "rst_description": "*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`.\n", + "name": "front_side", + "required": false + }, + { + "type": "PassportFile", + "description": "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 EncryptedCredentials.", + "html_description": "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 EncryptedCredentials.", + "rst_description": "*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`.\n", + "name": "reverse_side", + "required": false + }, + { + "type": "PassportFile", + "description": "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 EncryptedCredentials.", + "html_description": "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 EncryptedCredentials.", + "rst_description": "*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`.\n", + "name": "selfie", + "required": false + }, + { + "type": "Array of PassportFile", + "description": "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 EncryptedCredentials.", + "html_description": "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 EncryptedCredentials.", + "rst_description": "*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`.\n", + "name": "translation", + "required": false + }, + { + "type": "String", + "description": "Base64-encoded element hash for using in PassportElementErrorUnspecified", + "html_description": "Base64-encoded element hash for using in PassportElementErrorUnspecified", + "rst_description": "Base64-encoded element hash for using in :class:`aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified`\n", + "name": "hash", + "required": true + } + ], + "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 new file mode 100644 index 00000000..2eb4ed5c --- /dev/null +++ b/.butcher/types/ExternalReplyInfo/entity.json @@ -0,0 +1,217 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "externalreplyinfo", + "name": "ExternalReplyInfo", + "description": "This object contains information about a message that is being replied to, which may come from another chat or forum topic.", + "html_description": "

This object contains information about a message that is being replied to, which may come from another chat or forum topic.

", + "rst_description": "This object contains information about a message that is being replied to, which may come from another chat or forum topic.", + "annotations": [ + { + "type": "MessageOrigin", + "description": "Origin of the message replied to by the given message", + "html_description": "Origin of the message replied to by the given message", + "rst_description": "Origin of the message replied to by the given message\n", + "name": "origin", + "required": true + }, + { + "type": "Chat", + "description": "Chat the original message belongs to. Available only if the chat is a supergroup or a channel.", + "html_description": "Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel.", + "rst_description": "*Optional*. Chat the original message belongs to. Available only if the chat is a supergroup or a channel.\n", + "name": "chat", + "required": false + }, + { + "type": "Integer", + "description": "Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.", + "html_description": "Optional. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.", + "rst_description": "*Optional*. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.\n", + "name": "message_id", + "required": false + }, + { + "type": "LinkPreviewOptions", + "description": "Options used for link preview generation for the original message, if it is a text message", + "html_description": "Optional. Options used for link preview generation for the original message, if it is a text message", + "rst_description": "*Optional*. Options used for link preview generation for the original message, if it is a text message\n", + "name": "link_preview_options", + "required": false + }, + { + "type": "Animation", + "description": "Message is an animation, information about the animation", + "html_description": "Optional. Message is an animation, information about the animation", + "rst_description": "*Optional*. Message is an animation, information about the animation\n", + "name": "animation", + "required": false + }, + { + "type": "Audio", + "description": "Message is an audio file, information about the file", + "html_description": "Optional. Message is an audio file, information about the file", + "rst_description": "*Optional*. Message is an audio file, information about the file\n", + "name": "audio", + "required": false + }, + { + "type": "Document", + "description": "Message is a general file, information about the file", + "html_description": "Optional. Message is a general file, information about the file", + "rst_description": "*Optional*. Message is a general file, information about the file\n", + "name": "document", + "required": false + }, + { + "type": "PaidMediaInfo", + "description": "Message contains paid media; information about the paid media", + "html_description": "Optional. Message contains paid media; information about the paid media", + "rst_description": "*Optional*. Message contains paid media; information about the paid media\n", + "name": "paid_media", + "required": false + }, + { + "type": "Array of PhotoSize", + "description": "Message is a photo, available sizes of the photo", + "html_description": "Optional. Message is a photo, available sizes of the photo", + "rst_description": "*Optional*. Message is a photo, available sizes of the photo\n", + "name": "photo", + "required": false + }, + { + "type": "Sticker", + "description": "Message is a sticker, information about the sticker", + "html_description": "Optional. Message is a sticker, information about the sticker", + "rst_description": "*Optional*. Message is a sticker, information about the sticker\n", + "name": "sticker", + "required": false + }, + { + "type": "Story", + "description": "Message is a forwarded story", + "html_description": "Optional. Message is a forwarded story", + "rst_description": "*Optional*. Message is a forwarded story\n", + "name": "story", + "required": false + }, + { + "type": "Video", + "description": "Message is a video, information about the video", + "html_description": "Optional. Message is a video, information about the video", + "rst_description": "*Optional*. Message is a video, information about the video\n", + "name": "video", + "required": false + }, + { + "type": "VideoNote", + "description": "Message is a video note, information about the video message", + "html_description": "Optional. Message is a video note, information about the video message", + "rst_description": "*Optional*. Message is a `video note `_, information about the video message\n", + "name": "video_note", + "required": false + }, + { + "type": "Voice", + "description": "Message is a voice message, information about the file", + "html_description": "Optional. Message is a voice message, information about the file", + "rst_description": "*Optional*. Message is a voice message, information about the file\n", + "name": "voice", + "required": false + }, + { + "type": "True", + "description": "True, if the message media is covered by a spoiler animation", + "html_description": "Optional. True, if the message media is covered by a spoiler animation", + "rst_description": "*Optional*. :code:`True`, if the message media is covered by a spoiler animation\n", + "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", + "html_description": "Optional. Message is a shared contact, information about the contact", + "rst_description": "*Optional*. Message is a shared contact, information about the contact\n", + "name": "contact", + "required": false + }, + { + "type": "Dice", + "description": "Message is a dice with random value", + "html_description": "Optional. Message is a dice with random value", + "rst_description": "*Optional*. Message is a dice with random value\n", + "name": "dice", + "required": false + }, + { + "type": "Game", + "description": "Message is a game, information about the game.", + "html_description": "Optional. Message is a game, information about the game. More about games »", + "rst_description": "*Optional*. Message is a game, information about the game. `More about games » `_\n", + "name": "game", + "required": false + }, + { + "type": "Giveaway", + "description": "Message is a scheduled giveaway, information about the giveaway", + "html_description": "Optional. Message is a scheduled giveaway, information about the giveaway", + "rst_description": "*Optional*. Message is a scheduled giveaway, information about the giveaway\n", + "name": "giveaway", + "required": false + }, + { + "type": "GiveawayWinners", + "description": "A giveaway with public winners was completed", + "html_description": "Optional. A giveaway with public winners was completed", + "rst_description": "*Optional*. A giveaway with public winners was completed\n", + "name": "giveaway_winners", + "required": false + }, + { + "type": "Invoice", + "description": "Message is an invoice for a payment, information about the invoice.", + "html_description": "Optional. Message is an invoice for a payment, information about the invoice. More about payments »", + "rst_description": "*Optional*. Message is an invoice for a `payment `_, information about the invoice. `More about payments » `_\n", + "name": "invoice", + "required": false + }, + { + "type": "Location", + "description": "Message is a shared location, information about the location", + "html_description": "Optional. Message is a shared location, information about the location", + "rst_description": "*Optional*. Message is a shared location, information about the location\n", + "name": "location", + "required": false + }, + { + "type": "Poll", + "description": "Message is a native poll, information about the poll", + "html_description": "Optional. Message is a native poll, information about the poll", + "rst_description": "*Optional*. Message is a native poll, information about the poll\n", + "name": "poll", + "required": false + }, + { + "type": "Venue", + "description": "Message is a venue, information about the venue", + "html_description": "Optional. Message is a venue, information about the venue", + "rst_description": "*Optional*. Message is a venue, information about the venue\n", + "name": "venue", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/File/entity.json b/.butcher/types/File/entity.json new file mode 100644 index 00000000..dcf7a39c --- /dev/null +++ b/.butcher/types/File/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "file", + "name": "File", + "description": "This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot/. 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 getFile.\nThe maximum file size to download is 20 MB", + "html_description": "

This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. 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 getFile.

\n

The maximum file size to download is 20 MB

\n
", + "rst_description": "This object represents a file ready to be downloaded. The file can be downloaded via the link :code:`https://api.telegram.org/file/bot/`. 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`.\n\n The maximum file size to download is 20 MB", + "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": "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 + }, + { + "type": "String", + "description": "File path. Use https://api.telegram.org/file/bot/ to get the file.", + "html_description": "Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.", + "rst_description": "*Optional*. File path. Use :code:`https://api.telegram.org/file/bot/` to get the file.\n", + "name": "file_path", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ForceReply/entity.json b/.butcher/types/ForceReply/entity.json new file mode 100644 index 00000000..30b2418e --- /dev/null +++ b/.butcher/types/ForceReply/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "forcereply", + "name": "ForceReply", + "description": "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. Not supported in channels and for messages sent on behalf of a Telegram Business account.\nExample: A poll bot for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:\n\nExplain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish.\nGuide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'.\nThe last option is definitely more attractive. And if you use ForceReply in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user.", + "html_description": "

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. Not supported in channels and for messages sent on behalf of a Telegram Business account.

\n

Example: A poll bot for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:

\n
    \n
  • Explain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish.
  • \n
  • Guide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'.
  • \n
\n

The last option is definitely more attractive. And if you use ForceReply in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user.

\n
", + "rst_description": "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 `_. Not supported in channels and for messages sent on behalf of a Telegram Business account.\n\n **Example:** A `poll bot `_ for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:\n \n - Explain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish.\n - Guide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'.\n \n The last option is definitely more attractive. And if you use :class:`aiogram.types.force_reply.ForceReply` in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user.", + "annotations": [ + { + "type": "True", + "description": "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'", + "html_description": "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'", + "rst_description": "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'\n", + "name": "force_reply", + "required": true + }, + { + "type": "String", + "description": "The placeholder to be shown in the input field when the reply is active; 1-64 characters", + "html_description": "Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters", + "rst_description": "*Optional*. The placeholder to be shown in the input field when the reply is active; 1-64 characters\n", + "name": "input_field_placeholder", + "required": false + }, + { + "type": "Boolean", + "description": "Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the 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.", + "html_description": "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 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.", + "rst_description": "*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.\n", + "name": "selective", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ForceReply/replace.yml b/.butcher/types/ForceReply/replace.yml new file mode 100644 index 00000000..f84465de --- /dev/null +++ b/.butcher/types/ForceReply/replace.yml @@ -0,0 +1,5 @@ +bases: + - MutableTelegramObject +annotations: + force_reply: + const: "True" diff --git a/.butcher/types/ForumTopic/entity.json b/.butcher/types/ForumTopic/entity.json new file mode 100644 index 00000000..d774fb7e --- /dev/null +++ b/.butcher/types/ForumTopic/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "forumtopic", + "name": "ForumTopic", + "description": "This object represents a forum topic.", + "html_description": "

This object represents a forum topic.

", + "rst_description": "This object represents a forum topic.", + "annotations": [ + { + "type": "Integer", + "description": "Unique identifier of the forum topic", + "html_description": "Unique identifier of the forum topic", + "rst_description": "Unique identifier of the forum topic\n", + "name": "message_thread_id", + "required": true + }, + { + "type": "String", + "description": "Name of the topic", + "html_description": "Name of the topic", + "rst_description": "Name of the topic\n", + "name": "name", + "required": true + }, + { + "type": "Integer", + "description": "Color of the topic icon in RGB format", + "html_description": "Color of the topic icon in RGB format", + "rst_description": "Color of the topic icon in RGB format\n", + "name": "icon_color", + "required": true + }, + { + "type": "String", + "description": "Unique identifier of the custom emoji shown as the topic icon", + "html_description": "Optional. Unique identifier of the custom emoji shown as the topic icon", + "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/ForumTopicClosed/entity.json b/.butcher/types/ForumTopicClosed/entity.json new file mode 100644 index 00000000..c06f4f6f --- /dev/null +++ b/.butcher/types/ForumTopicClosed/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "forumtopicclosed", + "name": "ForumTopicClosed", + "description": "This object represents a service message about a forum topic closed in the chat. Currently holds no information.", + "html_description": "

This object represents a service message about a forum topic closed in the chat. Currently holds no information.

", + "rst_description": "This object represents a service message about a forum topic closed in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/ForumTopicCreated/entity.json b/.butcher/types/ForumTopicCreated/entity.json new file mode 100644 index 00000000..a2b39b66 --- /dev/null +++ b/.butcher/types/ForumTopicCreated/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "forumtopiccreated", + "name": "ForumTopicCreated", + "description": "This object represents a service message about a new forum topic created in the chat.", + "html_description": "

This object represents a service message about a new forum topic created in the chat.

", + "rst_description": "This object represents a service message about a new forum topic created in the chat.", + "annotations": [ + { + "type": "String", + "description": "Name of the topic", + "html_description": "Name of the topic", + "rst_description": "Name of the topic\n", + "name": "name", + "required": true + }, + { + "type": "Integer", + "description": "Color of the topic icon in RGB format", + "html_description": "Color of the topic icon in RGB format", + "rst_description": "Color of the topic icon in RGB format\n", + "name": "icon_color", + "required": true + }, + { + "type": "String", + "description": "Unique identifier of the custom emoji shown as the topic icon", + "html_description": "Optional. Unique identifier of the custom emoji shown as the topic icon", + "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/ForumTopicEdited/entity.json b/.butcher/types/ForumTopicEdited/entity.json new file mode 100644 index 00000000..c8f3dd1c --- /dev/null +++ b/.butcher/types/ForumTopicEdited/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "forumtopicedited", + "name": "ForumTopicEdited", + "description": "This object represents a service message about an edited forum topic.", + "html_description": "

This object represents a service message about an edited forum topic.

", + "rst_description": "This object represents a service message about an edited forum topic.", + "annotations": [ + { + "type": "String", + "description": "New name of the topic, if it was edited", + "html_description": "Optional. New name of the topic, if it was edited", + "rst_description": "*Optional*. New name of the topic, if it was edited\n", + "name": "name", + "required": false + }, + { + "type": "String", + "description": "New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed", + "html_description": "Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed", + "rst_description": "*Optional*. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed\n", + "name": "icon_custom_emoji_id", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ForumTopicReopened/entity.json b/.butcher/types/ForumTopicReopened/entity.json new file mode 100644 index 00000000..f9527ce0 --- /dev/null +++ b/.butcher/types/ForumTopicReopened/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "forumtopicreopened", + "name": "ForumTopicReopened", + "description": "This object represents a service message about a forum topic reopened in the chat. Currently holds no information.", + "html_description": "

This object represents a service message about a forum topic reopened in the chat. Currently holds no information.

", + "rst_description": "This object represents a service message about a forum topic reopened in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/Game/entity.json b/.butcher/types/Game/entity.json new file mode 100644 index 00000000..45ce4f08 --- /dev/null +++ b/.butcher/types/Game/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Games", + "anchor": "games" + }, + "object": { + "anchor": "game", + "name": "Game", + "description": "This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.", + "html_description": "

This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.

", + "rst_description": "This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.", + "annotations": [ + { + "type": "String", + "description": "Title of the game", + "html_description": "Title of the game", + "rst_description": "Title of the game\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Description of the game", + "html_description": "Description of the game", + "rst_description": "Description of the game\n", + "name": "description", + "required": true + }, + { + "type": "Array of PhotoSize", + "description": "Photo that will be displayed in the game message in chats.", + "html_description": "Photo that will be displayed in the game message in chats.", + "rst_description": "Photo that will be displayed in the game message in chats.\n", + "name": "photo", + "required": true + }, + { + "type": "String", + "description": "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 setGameScore, or manually edited using editMessageText. 0-4096 characters.", + "html_description": "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 setGameScore, or manually edited using editMessageText. 0-4096 characters.", + "rst_description": "*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.\n", + "name": "text", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in text, such as usernames, URLs, bot commands, etc.", + "html_description": "Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.", + "rst_description": "*Optional*. Special entities that appear in *text*, such as usernames, URLs, bot commands, etc.\n", + "name": "text_entities", + "required": false + }, + { + "type": "Animation", + "description": "Animation that will be displayed in the game message in chats. Upload via BotFather", + "html_description": "Optional. Animation that will be displayed in the game message in chats. Upload via BotFather", + "rst_description": "*Optional*. Animation that will be displayed in the game message in chats. Upload via `BotFather `_\n", + "name": "animation", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/GameHighScore/entity.json b/.butcher/types/GameHighScore/entity.json new file mode 100644 index 00000000..ce3f52d2 --- /dev/null +++ b/.butcher/types/GameHighScore/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Games", + "anchor": "games" + }, + "object": { + "anchor": "gamehighscore", + "name": "GameHighScore", + "description": "This object represents one row of the high scores table for a game.\nAnd that's about all we've got for now.\nIf you've got any questions, please check out our Bot FAQ", + "html_description": "

This object represents one row of the high scores table for a game.

And that's about all we've got for now.
\nIf you've got any questions, please check out our Bot FAQ »

", + "rst_description": "This object represents one row of the high scores table for a game.\nAnd that's about all we've got for now.\n\nIf you've got any questions, please check out our `https://core.telegram.org/bots/faq `_ **Bot FAQ »**", + "annotations": [ + { + "type": "Integer", + "description": "Position in high score table for the game", + "html_description": "Position in high score table for the game", + "rst_description": "Position in high score table for the game\n", + "name": "position", + "required": true + }, + { + "type": "User", + "description": "User", + "html_description": "User", + "rst_description": "User\n", + "name": "user", + "required": true + }, + { + "type": "Integer", + "description": "Score", + "html_description": "Score", + "rst_description": "Score\n", + "name": "score", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/GeneralForumTopicHidden/entity.json b/.butcher/types/GeneralForumTopicHidden/entity.json new file mode 100644 index 00000000..ec288ac1 --- /dev/null +++ b/.butcher/types/GeneralForumTopicHidden/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "generalforumtopichidden", + "name": "GeneralForumTopicHidden", + "description": "This object represents a service message about General forum topic hidden in the chat. Currently holds no information.", + "html_description": "

This object represents a service message about General forum topic hidden in the chat. Currently holds no information.

", + "rst_description": "This object represents a service message about General forum topic hidden in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/GeneralForumTopicUnhidden/entity.json b/.butcher/types/GeneralForumTopicUnhidden/entity.json new file mode 100644 index 00000000..415d75a5 --- /dev/null +++ b/.butcher/types/GeneralForumTopicUnhidden/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "generalforumtopicunhidden", + "name": "GeneralForumTopicUnhidden", + "description": "This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.", + "html_description": "

This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.

", + "rst_description": "This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.", + "annotations": [], + "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 new file mode 100644 index 00000000..ad326982 --- /dev/null +++ b/.butcher/types/Giveaway/entity.json @@ -0,0 +1,89 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "giveaway", + "name": "Giveaway", + "description": "This object represents a message about a scheduled giveaway.", + "html_description": "

This object represents a message about a scheduled giveaway.

", + "rst_description": "This object represents a message about a scheduled giveaway.", + "annotations": [ + { + "type": "Array of Chat", + "description": "The list of chats which the user must join to participate in the giveaway", + "html_description": "The list of chats which the user must join to participate in the giveaway", + "rst_description": "The list of chats which the user must join to participate in the giveaway\n", + "name": "chats", + "required": true + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when winners of the giveaway will be selected", + "html_description": "Point in time (Unix timestamp) when winners of the giveaway will be selected", + "rst_description": "Point in time (Unix timestamp) when winners of the giveaway will be selected\n", + "name": "winners_selection_date", + "required": true + }, + { + "type": "Integer", + "description": "The number of users which are supposed to be selected as winners of the giveaway", + "html_description": "The number of users which are supposed to be selected as winners of the giveaway", + "rst_description": "The number of users which are supposed to be selected as winners of the giveaway\n", + "name": "winner_count", + "required": true + }, + { + "type": "True", + "description": "True, if only users who join the chats after the giveaway started should be eligible to win", + "html_description": "Optional. True, if only users who join the chats after the giveaway started should be eligible to win", + "rst_description": "*Optional*. :code:`True`, if only users who join the chats after the giveaway started should be eligible to win\n", + "name": "only_new_members", + "required": false + }, + { + "type": "True", + "description": "True, if the list of giveaway winners will be visible to everyone", + "html_description": "Optional. True, if the list of giveaway winners will be visible to everyone", + "rst_description": "*Optional*. :code:`True`, if the list of giveaway winners will be visible to everyone\n", + "name": "has_public_winners", + "required": false + }, + { + "type": "String", + "description": "Description of additional giveaway prize", + "html_description": "Optional. Description of additional giveaway prize", + "rst_description": "*Optional*. Description of additional giveaway prize\n", + "name": "prize_description", + "required": false + }, + { + "type": "Array of String", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "country_codes", + "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": "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 + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Giveaway/replace.yml b/.butcher/types/Giveaway/replace.yml new file mode 100644 index 00000000..fb29ba77 --- /dev/null +++ b/.butcher/types/Giveaway/replace.yml @@ -0,0 +1,5 @@ +annotations: + winners_selection_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/GiveawayCompleted/entity.json b/.butcher/types/GiveawayCompleted/entity.json new file mode 100644 index 00000000..e1ecec54 --- /dev/null +++ b/.butcher/types/GiveawayCompleted/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "giveawaycompleted", + "name": "GiveawayCompleted", + "description": "This object represents a service message about the completion of a giveaway without public winners.", + "html_description": "

This object represents a service message about the completion of a giveaway without public winners.

", + "rst_description": "This object represents a service message about the completion of a giveaway without public winners.", + "annotations": [ + { + "type": "Integer", + "description": "Number of winners in the giveaway", + "html_description": "Number of winners in the giveaway", + "rst_description": "Number of winners in the giveaway\n", + "name": "winner_count", + "required": true + }, + { + "type": "Integer", + "description": "Number of undistributed prizes", + "html_description": "Optional. Number of undistributed prizes", + "rst_description": "*Optional*. Number of undistributed prizes\n", + "name": "unclaimed_prize_count", + "required": false + }, + { + "type": "Message", + "description": "Message with the giveaway that was completed, if it wasn't deleted", + "html_description": "Optional. Message with the giveaway that was completed, if it wasn't deleted", + "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 new file mode 100644 index 00000000..1cf7ca10 --- /dev/null +++ b/.butcher/types/GiveawayCreated/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "giveawaycreated", + "name": "GiveawayCreated", + "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 new file mode 100644 index 00000000..6843f7a7 --- /dev/null +++ b/.butcher/types/GiveawayWinners/entity.json @@ -0,0 +1,113 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "giveawaywinners", + "name": "GiveawayWinners", + "description": "This object represents a message about the completion of a giveaway with public winners.", + "html_description": "

This object represents a message about the completion of a giveaway with public winners.

", + "rst_description": "This object represents a message about the completion of a giveaway with public winners.", + "annotations": [ + { + "type": "Chat", + "description": "The chat that created the giveaway", + "html_description": "The chat that created the giveaway", + "rst_description": "The chat that created the giveaway\n", + "name": "chat", + "required": true + }, + { + "type": "Integer", + "description": "Identifier of the message with the giveaway in the chat", + "html_description": "Identifier of the message with the giveaway in the chat", + "rst_description": "Identifier of the message with the giveaway in the chat\n", + "name": "giveaway_message_id", + "required": true + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when winners of the giveaway were selected", + "html_description": "Point in time (Unix timestamp) when winners of the giveaway were selected", + "rst_description": "Point in time (Unix timestamp) when winners of the giveaway were selected\n", + "name": "winners_selection_date", + "required": true + }, + { + "type": "Integer", + "description": "Total number of winners in the giveaway", + "html_description": "Total number of winners in the giveaway", + "rst_description": "Total number of winners in the giveaway\n", + "name": "winner_count", + "required": true + }, + { + "type": "Array of User", + "description": "List of up to 100 winners of the giveaway", + "html_description": "List of up to 100 winners of the giveaway", + "rst_description": "List of up to 100 winners of the giveaway\n", + "name": "winners", + "required": true + }, + { + "type": "Integer", + "description": "The number of other chats the user had to join in order to be eligible for the giveaway", + "html_description": "Optional. The number of other chats the user had to join in order to be eligible for the giveaway", + "rst_description": "*Optional*. The number of other chats the user had to join in order to be eligible for the giveaway\n", + "name": "additional_chat_count", + "required": false + }, + { + "type": "Integer", + "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 + }, + { + "type": "Integer", + "description": "Number of undistributed prizes", + "html_description": "Optional. Number of undistributed prizes", + "rst_description": "*Optional*. Number of undistributed prizes\n", + "name": "unclaimed_prize_count", + "required": false + }, + { + "type": "True", + "description": "True, if only users who had joined the chats after the giveaway started were eligible to win", + "html_description": "Optional. True, if only users who had joined the chats after the giveaway started were eligible to win", + "rst_description": "*Optional*. :code:`True`, if only users who had joined the chats after the giveaway started were eligible to win\n", + "name": "only_new_members", + "required": false + }, + { + "type": "True", + "description": "True, if the giveaway was canceled because the payment for it was refunded", + "html_description": "Optional. True, if the giveaway was canceled because the payment for it was refunded", + "rst_description": "*Optional*. :code:`True`, if the giveaway was canceled because the payment for it was refunded\n", + "name": "was_refunded", + "required": false + }, + { + "type": "String", + "description": "Description of additional giveaway prize", + "html_description": "Optional. Description of additional giveaway prize", + "rst_description": "*Optional*. Description of additional giveaway prize\n", + "name": "prize_description", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/GiveawayWinners/replace.yml b/.butcher/types/GiveawayWinners/replace.yml new file mode 100644 index 00000000..fb29ba77 --- /dev/null +++ b/.butcher/types/GiveawayWinners/replace.yml @@ -0,0 +1,5 @@ +annotations: + winners_selection_date: + parsed_type: + type: std + name: DateTime 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/InaccessibleMessage/entity.json b/.butcher/types/InaccessibleMessage/entity.json new file mode 100644 index 00000000..f78ab11f --- /dev/null +++ b/.butcher/types/InaccessibleMessage/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inaccessiblemessage", + "name": "InaccessibleMessage", + "description": "This object describes a message that was deleted or is otherwise inaccessible to the bot.", + "html_description": "

This object describes a message that was deleted or is otherwise inaccessible to the bot.

", + "rst_description": "This object describes a message that was deleted or is otherwise inaccessible to the bot.", + "annotations": [ + { + "type": "Chat", + "description": "Chat the message belonged to", + "html_description": "Chat the message belonged to", + "rst_description": "Chat the message belonged to\n", + "name": "chat", + "required": true + }, + { + "type": "Integer", + "description": "Unique message identifier inside the chat", + "html_description": "Unique message identifier inside the chat", + "rst_description": "Unique message identifier inside the chat\n", + "name": "message_id", + "required": true + }, + { + "type": "Integer", + "description": "Always 0. The field can be used to differentiate regular and inaccessible messages.", + "html_description": "Always 0. The field can be used to differentiate regular and inaccessible messages.", + "rst_description": "Always 0. The field can be used to differentiate regular and inaccessible messages.\n", + "name": "date", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InaccessibleMessage/replace.yml b/.butcher/types/InaccessibleMessage/replace.yml new file mode 100644 index 00000000..4155caee --- /dev/null +++ b/.butcher/types/InaccessibleMessage/replace.yml @@ -0,0 +1,7 @@ +annotations: + date: +# date: +# type: std +# name: DateTime + const: "0" +# final: true diff --git a/.butcher/types/InlineKeyboardButton/entity.json b/.butcher/types/InlineKeyboardButton/entity.json new file mode 100644 index 00000000..15e52808 --- /dev/null +++ b/.butcher/types/InlineKeyboardButton/entity.json @@ -0,0 +1,121 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inlinekeyboardbutton", + "name": "InlineKeyboardButton", + "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", + "description": "Label text on the button", + "html_description": "Label text on the button", + "rst_description": "Label text on the button\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": "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.", + "html_description": "Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings.", + "rst_description": "*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.\n", + "name": "url", + "required": false + }, + { + "type": "String", + "description": "Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes", + "html_description": "Optional. Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes", + "rst_description": "*Optional*. Data to be sent in a `callback query `_ to the bot when the button is pressed, 1-64 bytes\n", + "name": "callback_data", + "required": false + }, + { + "type": "WebAppInfo", + "description": "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 answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account.", + "html_description": "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 answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account.", + "rst_description": "*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.\n", + "name": "web_app", + "required": false + }, + { + "type": "LoginUrl", + "description": "An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.", + "html_description": "Optional. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.", + "rst_description": "*Optional*. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the `Telegram Login Widget `_.\n", + "name": "login_url", + "required": false + }, + { + "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 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 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 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.", + "html_description": "Optional. 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.", + "rst_description": "*Optional*. Description of the game that will be launched when the user presses the button.\n\n\n\n**NOTE:** This type of button **must** always be the first button in the first row.\n", + "name": "callback_game", + "required": false + }, + { + "type": "Boolean", + "description": "Specify True, to send a Pay button. Substrings '' and 'XTR' in the buttons's text will be replaced with a Telegram Star icon.\n\nNOTE: This type of button must always be the first button in the first row and can only be used in invoice messages.", + "html_description": "Optional. Specify True, to send a Pay button. Substrings “\"⭐\"/” and “XTR” in the buttons's text will be replaced with a Telegram Star icon.
\n
\nNOTE: This type of button must always be the first button in the first row and can only be used in invoice messages.", + "rst_description": "*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.\n\n\n\n**NOTE:** This type of button **must** always be the first button in the first row and can only be used in invoice messages.\n", + "name": "pay", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineKeyboardButton/replace.yml b/.butcher/types/InlineKeyboardButton/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/InlineKeyboardButton/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/InlineKeyboardMarkup/entity.json b/.butcher/types/InlineKeyboardMarkup/entity.json new file mode 100644 index 00000000..7f68c036 --- /dev/null +++ b/.butcher/types/InlineKeyboardMarkup/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inlinekeyboardmarkup", + "name": "InlineKeyboardMarkup", + "description": "This object represents an inline keyboard that appears right next to the message it belongs to.", + "html_description": "

This object represents an inline keyboard that appears right next to the message it belongs to.

", + "rst_description": "This object represents an `inline keyboard `_ that appears right next to the message it belongs to.", + "annotations": [ + { + "type": "Array of Array of InlineKeyboardButton", + "description": "Array of button rows, each represented by an Array of InlineKeyboardButton objects", + "html_description": "Array of button rows, each represented by an Array of InlineKeyboardButton objects", + "rst_description": "Array of button rows, each represented by an Array of :class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton` objects\n", + "name": "inline_keyboard", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineKeyboardMarkup/replace.yml b/.butcher/types/InlineKeyboardMarkup/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/InlineKeyboardMarkup/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/InlineQuery/aliases.yml b/.butcher/types/InlineQuery/aliases.yml new file mode 100644 index 00000000..5fd86013 --- /dev/null +++ b/.butcher/types/InlineQuery/aliases.yml @@ -0,0 +1,4 @@ +answer: + method: answerInlineQuery + fill: + inline_query_id: self.id diff --git a/.butcher/types/InlineQuery/entity.json b/.butcher/types/InlineQuery/entity.json new file mode 100644 index 00000000..e34ce5bc --- /dev/null +++ b/.butcher/types/InlineQuery/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequery", + "name": "InlineQuery", + "description": "This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.", + "html_description": "

This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.

", + "rst_description": "This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.", + "annotations": [ + { + "type": "String", + "description": "Unique identifier for this query", + "html_description": "Unique identifier for this query", + "rst_description": "Unique identifier for this query\n", + "name": "id", + "required": true + }, + { + "type": "User", + "description": "Sender", + "html_description": "Sender", + "rst_description": "Sender\n", + "name": "from", + "required": true + }, + { + "type": "String", + "description": "Text of the query (up to 256 characters)", + "html_description": "Text of the query (up to 256 characters)", + "rst_description": "Text of the query (up to 256 characters)\n", + "name": "query", + "required": true + }, + { + "type": "String", + "description": "Offset of the results to be returned, can be controlled by the bot", + "html_description": "Offset of the results to be returned, can be controlled by the bot", + "rst_description": "Offset of the results to be returned, can be controlled by the bot\n", + "name": "offset", + "required": true + }, + { + "type": "String", + "description": "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", + "html_description": "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", + "rst_description": "*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\n", + "name": "chat_type", + "required": false + }, + { + "type": "Location", + "description": "Sender location, only for bots that request user location", + "html_description": "Optional. Sender location, only for bots that request user location", + "rst_description": "*Optional*. Sender location, only for bots that request user location\n", + "name": "location", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResult/entity.json b/.butcher/types/InlineQueryResult/entity.json new file mode 100644 index 00000000..f75078ee --- /dev/null +++ b/.butcher/types/InlineQueryResult/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresult", + "name": "InlineQueryResult", + "description": "This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:\n - InlineQueryResultCachedAudio\n - InlineQueryResultCachedDocument\n - InlineQueryResultCachedGif\n - InlineQueryResultCachedMpeg4Gif\n - InlineQueryResultCachedPhoto\n - InlineQueryResultCachedSticker\n - InlineQueryResultCachedVideo\n - InlineQueryResultCachedVoice\n - InlineQueryResultArticle\n - InlineQueryResultAudio\n - InlineQueryResultContact\n - InlineQueryResultGame\n - InlineQueryResultDocument\n - InlineQueryResultGif\n - InlineQueryResultLocation\n - InlineQueryResultMpeg4Gif\n - InlineQueryResultPhoto\n - InlineQueryResultVenue\n - InlineQueryResultVideo\n - InlineQueryResultVoice\nNote: All URLs passed in inline query results will be available to end users and therefore must be assumed to be public.", + "html_description": "

This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:

Note: All URLs passed in inline query results will be available to end users and therefore must be assumed to be public.

", + "rst_description": "This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:\n\n - :class:`aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio`\n - :class:`aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument`\n - :class:`aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif`\n - :class:`aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif`\n - :class:`aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto`\n - :class:`aiogram.types.inline_query_result_cached_sticker.InlineQueryResultCachedSticker`\n - :class:`aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo`\n - :class:`aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice`\n - :class:`aiogram.types.inline_query_result_article.InlineQueryResultArticle`\n - :class:`aiogram.types.inline_query_result_audio.InlineQueryResultAudio`\n - :class:`aiogram.types.inline_query_result_contact.InlineQueryResultContact`\n - :class:`aiogram.types.inline_query_result_game.InlineQueryResultGame`\n - :class:`aiogram.types.inline_query_result_document.InlineQueryResultDocument`\n - :class:`aiogram.types.inline_query_result_gif.InlineQueryResultGif`\n - :class:`aiogram.types.inline_query_result_location.InlineQueryResultLocation`\n - :class:`aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif`\n - :class:`aiogram.types.inline_query_result_photo.InlineQueryResultPhoto`\n - :class:`aiogram.types.inline_query_result_venue.InlineQueryResultVenue`\n - :class:`aiogram.types.inline_query_result_video.InlineQueryResultVideo`\n - :class:`aiogram.types.inline_query_result_voice.InlineQueryResultVoice`\n\n**Note:** All URLs passed in inline query results will be available to end users and therefore must be assumed to be **public**.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResult/replace.yml b/.butcher/types/InlineQueryResult/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/InlineQueryResult/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/InlineQueryResult/subtypes.yml b/.butcher/types/InlineQueryResult/subtypes.yml new file mode 100644 index 00000000..6756ad51 --- /dev/null +++ b/.butcher/types/InlineQueryResult/subtypes.yml @@ -0,0 +1 @@ +discriminator: "type" diff --git a/.butcher/types/InlineQueryResultArticle/entity.json b/.butcher/types/InlineQueryResultArticle/entity.json new file mode 100644 index 00000000..c9622b2a --- /dev/null +++ b/.butcher/types/InlineQueryResultArticle/entity.json @@ -0,0 +1,109 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultarticle", + "name": "InlineQueryResultArticle", + "description": "Represents a link to an article or web page.", + "html_description": "

Represents a link to an article or web page.

", + "rst_description": "Represents a link to an article or web page.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be article", + "html_description": "Type of the result, must be article", + "rst_description": "Type of the result, must be *article*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 Bytes", + "html_description": "Unique identifier for this result, 1-64 Bytes", + "rst_description": "Unique identifier for this result, 1-64 Bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Title of the result", + "html_description": "Title of the result", + "rst_description": "Title of the result\n", + "name": "title", + "required": true + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent", + "html_description": "Content of the message to be sent", + "rst_description": "Content of the message to be sent\n", + "name": "input_message_content", + "required": true + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "String", + "description": "URL of the result", + "html_description": "Optional. URL of the result", + "rst_description": "*Optional*. URL of the result\n", + "name": "url", + "required": false + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Url of the thumbnail for the result", + "html_description": "Optional. Url of the thumbnail for the result", + "rst_description": "*Optional*. Url of the thumbnail for the result\n", + "name": "thumbnail_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumbnail_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "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/InlineQueryResultAudio/default.yml b/.butcher/types/InlineQueryResultAudio/default.yml new file mode 100644 index 00000000..d56d5759 --- /dev/null +++ b/.butcher/types/InlineQueryResultAudio/default.yml @@ -0,0 +1 @@ +parse_mode: parse_mode diff --git a/.butcher/types/InlineQueryResultAudio/entity.json b/.butcher/types/InlineQueryResultAudio/entity.json new file mode 100644 index 00000000..bc902df7 --- /dev/null +++ b/.butcher/types/InlineQueryResultAudio/entity.json @@ -0,0 +1,105 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultaudio", + "name": "InlineQueryResultAudio", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be audio", + "html_description": "Type of the result, must be audio", + "rst_description": "Type of the result, must be *audio*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL for the audio file", + "html_description": "A valid URL for the audio file", + "rst_description": "A valid URL for the audio file\n", + "name": "audio_url", + "required": true + }, + { + "type": "String", + "description": "Title", + "html_description": "Title", + "rst_description": "Title\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the audio caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the audio caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "String", + "description": "Performer", + "html_description": "Optional. Performer", + "rst_description": "*Optional*. Performer\n", + "name": "performer", + "required": false + }, + { + "type": "Integer", + "description": "Audio duration in seconds", + "html_description": "Optional. Audio duration in seconds", + "rst_description": "*Optional*. Audio duration in seconds\n", + "name": "audio_duration", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the audio", + "html_description": "Optional. Content of the message to be sent instead of the audio", + "rst_description": "*Optional*. Content of the message to be sent instead of the audio\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultCachedAudio/default.yml b/.butcher/types/InlineQueryResultCachedAudio/default.yml new file mode 100644 index 00000000..d56d5759 --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedAudio/default.yml @@ -0,0 +1 @@ +parse_mode: parse_mode diff --git a/.butcher/types/InlineQueryResultCachedAudio/entity.json b/.butcher/types/InlineQueryResultCachedAudio/entity.json new file mode 100644 index 00000000..d92b2f3e --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedAudio/entity.json @@ -0,0 +1,81 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcachedaudio", + "name": "InlineQueryResultCachedAudio", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be audio", + "html_description": "Type of the result, must be audio", + "rst_description": "Type of the result, must be *audio*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the audio file", + "html_description": "A valid file identifier for the audio file", + "rst_description": "A valid file identifier for the audio file\n", + "name": "audio_file_id", + "required": true + }, + { + "type": "String", + "description": "Caption, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the audio caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the audio caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the audio", + "html_description": "Optional. Content of the message to be sent instead of the audio", + "rst_description": "*Optional*. Content of the message to be sent instead of the audio\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultCachedDocument/default.yml b/.butcher/types/InlineQueryResultCachedDocument/default.yml new file mode 100644 index 00000000..d56d5759 --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedDocument/default.yml @@ -0,0 +1 @@ +parse_mode: parse_mode diff --git a/.butcher/types/InlineQueryResultCachedDocument/entity.json b/.butcher/types/InlineQueryResultCachedDocument/entity.json new file mode 100644 index 00000000..f304919f --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedDocument/entity.json @@ -0,0 +1,97 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcacheddocument", + "name": "InlineQueryResultCachedDocument", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be document", + "html_description": "Type of the result, must be document", + "rst_description": "Type of the result, must be *document*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Title for the result", + "rst_description": "Title for the result\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the file", + "html_description": "A valid file identifier for the file", + "rst_description": "A valid file identifier for the file\n", + "name": "document_file_id", + "required": true + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Caption of the document to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the document caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the document caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the file", + "html_description": "Optional. Content of the message to be sent instead of the file", + "rst_description": "*Optional*. Content of the message to be sent instead of the file\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultCachedGif/default.yml b/.butcher/types/InlineQueryResultCachedGif/default.yml new file mode 100644 index 00000000..a6b90bc0 --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedGif/default.yml @@ -0,0 +1,2 @@ +parse_mode: parse_mode +show_caption_above_media: show_caption_above_media diff --git a/.butcher/types/InlineQueryResultCachedGif/entity.json b/.butcher/types/InlineQueryResultCachedGif/entity.json new file mode 100644 index 00000000..2c342fa8 --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedGif/entity.json @@ -0,0 +1,97 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcachedgif", + "name": "InlineQueryResultCachedGif", + "description": "Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.", + "html_description": "

Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.

", + "rst_description": "Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with specified content instead of the animation.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be gif", + "html_description": "Type of the result, must be gif", + "rst_description": "Type of the result, must be *gif*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the GIF file", + "html_description": "A valid file identifier for the GIF file", + "rst_description": "A valid file identifier for the GIF file\n", + "name": "gif_file_id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Caption of the GIF file to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the GIF animation", + "html_description": "Optional. Content of the message to be sent instead of the GIF animation", + "rst_description": "*Optional*. Content of the message to be sent instead of the GIF animation\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultCachedMpeg4Gif/default.yml b/.butcher/types/InlineQueryResultCachedMpeg4Gif/default.yml new file mode 100644 index 00000000..a6b90bc0 --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedMpeg4Gif/default.yml @@ -0,0 +1,2 @@ +parse_mode: parse_mode +show_caption_above_media: show_caption_above_media diff --git a/.butcher/types/InlineQueryResultCachedMpeg4Gif/entity.json b/.butcher/types/InlineQueryResultCachedMpeg4Gif/entity.json new file mode 100644 index 00000000..70c6c36c --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedMpeg4Gif/entity.json @@ -0,0 +1,97 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcachedmpeg4gif", + "name": "InlineQueryResultCachedMpeg4Gif", + "description": "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 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 animation.", + "html_description": "

Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 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 animation.

", + "rst_description": "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 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 animation.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be mpeg4_gif", + "html_description": "Type of the result, must be mpeg4_gif", + "rst_description": "Type of the result, must be *mpeg4_gif*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the MPEG4 file", + "html_description": "A valid file identifier for the MPEG4 file", + "rst_description": "A valid file identifier for the MPEG4 file\n", + "name": "mpeg4_file_id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the video animation", + "html_description": "Optional. Content of the message to be sent instead of the video animation", + "rst_description": "*Optional*. Content of the message to be sent instead of the video animation\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultCachedPhoto/default.yml b/.butcher/types/InlineQueryResultCachedPhoto/default.yml new file mode 100644 index 00000000..a6b90bc0 --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedPhoto/default.yml @@ -0,0 +1,2 @@ +parse_mode: parse_mode +show_caption_above_media: show_caption_above_media diff --git a/.butcher/types/InlineQueryResultCachedPhoto/entity.json b/.butcher/types/InlineQueryResultCachedPhoto/entity.json new file mode 100644 index 00000000..8060ce8a --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedPhoto/entity.json @@ -0,0 +1,105 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcachedphoto", + "name": "InlineQueryResultCachedPhoto", + "description": "Represents a link to a photo stored on the Telegram servers. By default, this photo 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 photo.", + "html_description": "

Represents a link to a photo stored on the Telegram servers. By default, this photo 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 photo.

", + "rst_description": "Represents a link to a photo stored on the Telegram servers. By default, this photo 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 photo.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be photo", + "html_description": "Type of the result, must be photo", + "rst_description": "Type of the result, must be *photo*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier of the photo", + "html_description": "A valid file identifier of the photo", + "rst_description": "A valid file identifier of the photo\n", + "name": "photo_file_id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Caption of the photo to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the photo caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the photo caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the photo", + "html_description": "Optional. Content of the message to be sent instead of the photo", + "rst_description": "*Optional*. Content of the message to be sent instead of the photo\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultCachedSticker/entity.json b/.butcher/types/InlineQueryResultCachedSticker/entity.json new file mode 100644 index 00000000..2a04cf72 --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedSticker/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcachedsticker", + "name": "InlineQueryResultCachedSticker", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be sticker", + "html_description": "Type of the result, must be sticker", + "rst_description": "Type of the result, must be *sticker*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier of the sticker", + "html_description": "A valid file identifier of the sticker", + "rst_description": "A valid file identifier of the sticker\n", + "name": "sticker_file_id", + "required": true + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the sticker", + "html_description": "Optional. Content of the message to be sent instead of the sticker", + "rst_description": "*Optional*. Content of the message to be sent instead of the sticker\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultCachedVideo/default.yml b/.butcher/types/InlineQueryResultCachedVideo/default.yml new file mode 100644 index 00000000..a6b90bc0 --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedVideo/default.yml @@ -0,0 +1,2 @@ +parse_mode: parse_mode +show_caption_above_media: show_caption_above_media diff --git a/.butcher/types/InlineQueryResultCachedVideo/entity.json b/.butcher/types/InlineQueryResultCachedVideo/entity.json new file mode 100644 index 00000000..2fe47f84 --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedVideo/entity.json @@ -0,0 +1,105 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcachedvideo", + "name": "InlineQueryResultCachedVideo", + "description": "Represents a link to a video file stored on the Telegram servers. By default, this video 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 video.", + "html_description": "

Represents a link to a video file stored on the Telegram servers. By default, this video 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 video.

", + "rst_description": "Represents a link to a video file stored on the Telegram servers. By default, this video 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 video.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be video", + "html_description": "Type of the result, must be video", + "rst_description": "Type of the result, must be *video*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the video file", + "html_description": "A valid file identifier for the video file", + "rst_description": "A valid file identifier for the video file\n", + "name": "video_file_id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Title for the result", + "rst_description": "Title for the result\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Caption of the video to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the video caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the video caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the video", + "html_description": "Optional. Content of the message to be sent instead of the video", + "rst_description": "*Optional*. Content of the message to be sent instead of the video\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultCachedVoice/default.yml b/.butcher/types/InlineQueryResultCachedVoice/default.yml new file mode 100644 index 00000000..d56d5759 --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedVoice/default.yml @@ -0,0 +1 @@ +parse_mode: parse_mode diff --git a/.butcher/types/InlineQueryResultCachedVoice/entity.json b/.butcher/types/InlineQueryResultCachedVoice/entity.json new file mode 100644 index 00000000..893e6c93 --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedVoice/entity.json @@ -0,0 +1,89 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcachedvoice", + "name": "InlineQueryResultCachedVoice", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be voice", + "html_description": "Type of the result, must be voice", + "rst_description": "Type of the result, must be *voice*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the voice message", + "html_description": "A valid file identifier for the voice message", + "rst_description": "A valid file identifier for the voice message\n", + "name": "voice_file_id", + "required": true + }, + { + "type": "String", + "description": "Voice message title", + "html_description": "Voice message title", + "rst_description": "Voice message title\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the voice message caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the voice message caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the voice message", + "html_description": "Optional. Content of the message to be sent instead of the voice message", + "rst_description": "*Optional*. Content of the message to be sent instead of the voice message\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultContact/entity.json b/.butcher/types/InlineQueryResultContact/entity.json new file mode 100644 index 00000000..8a01cdd0 --- /dev/null +++ b/.butcher/types/InlineQueryResultContact/entity.json @@ -0,0 +1,105 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcontact", + "name": "InlineQueryResultContact", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be contact", + "html_description": "Type of the result, must be contact", + "rst_description": "Type of the result, must be *contact*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 Bytes", + "html_description": "Unique identifier for this result, 1-64 Bytes", + "rst_description": "Unique identifier for this result, 1-64 Bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Contact's phone number", + "html_description": "Contact's phone number", + "rst_description": "Contact's phone number\n", + "name": "phone_number", + "required": true + }, + { + "type": "String", + "description": "Contact's first name", + "html_description": "Contact's first name", + "rst_description": "Contact's first name\n", + "name": "first_name", + "required": true + }, + { + "type": "String", + "description": "Contact's last name", + "html_description": "Optional. Contact's last name", + "rst_description": "*Optional*. Contact's last name\n", + "name": "last_name", + "required": false + }, + { + "type": "String", + "description": "Additional data about the contact in the form of a vCard, 0-2048 bytes", + "html_description": "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes", + "rst_description": "*Optional*. Additional data about the contact in the form of a `vCard `_, 0-2048 bytes\n", + "name": "vcard", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the contact", + "html_description": "Optional. Content of the message to be sent instead of the contact", + "rst_description": "*Optional*. Content of the message to be sent instead of the contact\n", + "name": "input_message_content", + "required": false + }, + { + "type": "String", + "description": "Url of the thumbnail for the result", + "html_description": "Optional. Url of the thumbnail for the result", + "rst_description": "*Optional*. Url of the thumbnail for the result\n", + "name": "thumbnail_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumbnail_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumbnail_height", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultDocument/default.yml b/.butcher/types/InlineQueryResultDocument/default.yml new file mode 100644 index 00000000..d56d5759 --- /dev/null +++ b/.butcher/types/InlineQueryResultDocument/default.yml @@ -0,0 +1 @@ +parse_mode: parse_mode diff --git a/.butcher/types/InlineQueryResultDocument/entity.json b/.butcher/types/InlineQueryResultDocument/entity.json new file mode 100644 index 00000000..97bb05a6 --- /dev/null +++ b/.butcher/types/InlineQueryResultDocument/entity.json @@ -0,0 +1,129 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultdocument", + "name": "InlineQueryResultDocument", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be document", + "html_description": "Type of the result, must be document", + "rst_description": "Type of the result, must be *document*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Title for the result", + "rst_description": "Title for the result\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption of the document to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the document caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the document caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "String", + "description": "A valid URL for the file", + "html_description": "A valid URL for the file", + "rst_description": "A valid URL for the file\n", + "name": "document_url", + "required": true + }, + { + "type": "String", + "description": "MIME type of the content of the file, either 'application/pdf' or 'application/zip'", + "html_description": "MIME type of the content of the file, either “application/pdf” or “application/zip”", + "rst_description": "MIME type of the content of the file, either 'application/pdf' or 'application/zip'\n", + "name": "mime_type", + "required": true + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the file", + "html_description": "Optional. Content of the message to be sent instead of the file", + "rst_description": "*Optional*. Content of the message to be sent instead of the file\n", + "name": "input_message_content", + "required": false + }, + { + "type": "String", + "description": "URL of the thumbnail (JPEG only) for the file", + "html_description": "Optional. URL of the thumbnail (JPEG only) for the file", + "rst_description": "*Optional*. URL of the thumbnail (JPEG only) for the file\n", + "name": "thumbnail_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumbnail_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumbnail_height", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultGame/entity.json b/.butcher/types/InlineQueryResultGame/entity.json new file mode 100644 index 00000000..11593007 --- /dev/null +++ b/.butcher/types/InlineQueryResultGame/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultgame", + "name": "InlineQueryResultGame", + "description": "Represents a Game.", + "html_description": "

Represents a Game.

", + "rst_description": "Represents a `Game `_.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be game", + "html_description": "Type of the result, must be game", + "rst_description": "Type of the result, must be *game*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Short name of the game", + "html_description": "Short name of the game", + "rst_description": "Short name of the game\n", + "name": "game_short_name", + "required": true + }, + { + "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", + "name": "reply_markup", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultGif/default.yml b/.butcher/types/InlineQueryResultGif/default.yml new file mode 100644 index 00000000..a6b90bc0 --- /dev/null +++ b/.butcher/types/InlineQueryResultGif/default.yml @@ -0,0 +1,2 @@ +parse_mode: parse_mode +show_caption_above_media: show_caption_above_media diff --git a/.butcher/types/InlineQueryResultGif/entity.json b/.butcher/types/InlineQueryResultGif/entity.json new file mode 100644 index 00000000..ee825305 --- /dev/null +++ b/.butcher/types/InlineQueryResultGif/entity.json @@ -0,0 +1,137 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultgif", + "name": "InlineQueryResultGif", + "description": "Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.", + "html_description": "

Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.

", + "rst_description": "Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the animation.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be gif", + "html_description": "Type of the result, must be gif", + "rst_description": "Type of the result, must be *gif*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "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 + }, + { + "type": "Integer", + "description": "Width of the GIF", + "html_description": "Optional. Width of the GIF", + "rst_description": "*Optional*. Width of the GIF\n", + "name": "gif_width", + "required": false + }, + { + "type": "Integer", + "description": "Height of the GIF", + "html_description": "Optional. Height of the GIF", + "rst_description": "*Optional*. Height of the GIF\n", + "name": "gif_height", + "required": false + }, + { + "type": "Integer", + "description": "Duration of the GIF in seconds", + "html_description": "Optional. Duration of the GIF in seconds", + "rst_description": "*Optional*. Duration of the GIF in seconds\n", + "name": "gif_duration", + "required": false + }, + { + "type": "String", + "description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result", + "html_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result", + "rst_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result\n", + "name": "thumbnail_url", + "required": true + }, + { + "type": "String", + "description": "MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'", + "html_description": "Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”", + "rst_description": "*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'\n", + "name": "thumbnail_mime_type", + "required": false + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Caption of the GIF file to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the GIF animation", + "html_description": "Optional. Content of the message to be sent instead of the GIF animation", + "rst_description": "*Optional*. Content of the message to be sent instead of the GIF animation\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultLocation/entity.json b/.butcher/types/InlineQueryResultLocation/entity.json new file mode 100644 index 00000000..4bce223c --- /dev/null +++ b/.butcher/types/InlineQueryResultLocation/entity.json @@ -0,0 +1,129 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultlocation", + "name": "InlineQueryResultLocation", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be location", + "html_description": "Type of the result, must be location", + "rst_description": "Type of the result, must be *location*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 Bytes", + "html_description": "Unique identifier for this result, 1-64 Bytes", + "rst_description": "Unique identifier for this result, 1-64 Bytes\n", + "name": "id", + "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": "String", + "description": "Location title", + "html_description": "Location title", + "rst_description": "Location title\n", + "name": "title", + "required": true + }, + { + "type": "Float", + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "Optional. The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy", + "required": false + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "live_period", + "required": false + }, + { + "type": "Integer", + "description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "html_description": "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "rst_description": "*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", + "name": "heading", + "required": false + }, + { + "type": "Integer", + "description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "proximity_alert_radius", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the location", + "html_description": "Optional. Content of the message to be sent instead of the location", + "rst_description": "*Optional*. Content of the message to be sent instead of the location\n", + "name": "input_message_content", + "required": false + }, + { + "type": "String", + "description": "Url of the thumbnail for the result", + "html_description": "Optional. Url of the thumbnail for the result", + "rst_description": "*Optional*. Url of the thumbnail for the result\n", + "name": "thumbnail_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumbnail_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumbnail_height", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultMpeg4Gif/default.yml b/.butcher/types/InlineQueryResultMpeg4Gif/default.yml new file mode 100644 index 00000000..a6b90bc0 --- /dev/null +++ b/.butcher/types/InlineQueryResultMpeg4Gif/default.yml @@ -0,0 +1,2 @@ +parse_mode: parse_mode +show_caption_above_media: show_caption_above_media diff --git a/.butcher/types/InlineQueryResultMpeg4Gif/entity.json b/.butcher/types/InlineQueryResultMpeg4Gif/entity.json new file mode 100644 index 00000000..fc309461 --- /dev/null +++ b/.butcher/types/InlineQueryResultMpeg4Gif/entity.json @@ -0,0 +1,137 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultmpeg4gif", + "name": "InlineQueryResultMpeg4Gif", + "description": "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.", + "html_description": "

Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.

", + "rst_description": "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the animation.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be mpeg4_gif", + "html_description": "Type of the result, must be mpeg4_gif", + "rst_description": "Type of the result, must be *mpeg4_gif*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "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 + }, + { + "type": "Integer", + "description": "Video width", + "html_description": "Optional. Video width", + "rst_description": "*Optional*. Video width\n", + "name": "mpeg4_width", + "required": false + }, + { + "type": "Integer", + "description": "Video height", + "html_description": "Optional. Video height", + "rst_description": "*Optional*. Video height\n", + "name": "mpeg4_height", + "required": false + }, + { + "type": "Integer", + "description": "Video duration in seconds", + "html_description": "Optional. Video duration in seconds", + "rst_description": "*Optional*. Video duration in seconds\n", + "name": "mpeg4_duration", + "required": false + }, + { + "type": "String", + "description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result", + "html_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result", + "rst_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result\n", + "name": "thumbnail_url", + "required": true + }, + { + "type": "String", + "description": "MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'", + "html_description": "Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”", + "rst_description": "*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'\n", + "name": "thumbnail_mime_type", + "required": false + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the video animation", + "html_description": "Optional. Content of the message to be sent instead of the video animation", + "rst_description": "*Optional*. Content of the message to be sent instead of the video animation\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultPhoto/default.yml b/.butcher/types/InlineQueryResultPhoto/default.yml new file mode 100644 index 00000000..a6b90bc0 --- /dev/null +++ b/.butcher/types/InlineQueryResultPhoto/default.yml @@ -0,0 +1,2 @@ +parse_mode: parse_mode +show_caption_above_media: show_caption_above_media diff --git a/.butcher/types/InlineQueryResultPhoto/entity.json b/.butcher/types/InlineQueryResultPhoto/entity.json new file mode 100644 index 00000000..94f9867a --- /dev/null +++ b/.butcher/types/InlineQueryResultPhoto/entity.json @@ -0,0 +1,129 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultphoto", + "name": "InlineQueryResultPhoto", + "description": "Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.", + "html_description": "

Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.

", + "rst_description": "Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the photo.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be photo", + "html_description": "Type of the result, must be photo", + "rst_description": "Type of the result, must be *photo*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB", + "html_description": "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB", + "rst_description": "A valid URL of the photo. Photo must be in **JPEG** format. Photo size must not exceed 5MB\n", + "name": "photo_url", + "required": true + }, + { + "type": "String", + "description": "URL of the thumbnail for the photo", + "html_description": "URL of the thumbnail for the photo", + "rst_description": "URL of the thumbnail for the photo\n", + "name": "thumbnail_url", + "required": true + }, + { + "type": "Integer", + "description": "Width of the photo", + "html_description": "Optional. Width of the photo", + "rst_description": "*Optional*. Width of the photo\n", + "name": "photo_width", + "required": false + }, + { + "type": "Integer", + "description": "Height of the photo", + "html_description": "Optional. Height of the photo", + "rst_description": "*Optional*. Height of the photo\n", + "name": "photo_height", + "required": false + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Caption of the photo to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the photo caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the photo caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the photo", + "html_description": "Optional. Content of the message to be sent instead of the photo", + "rst_description": "*Optional*. Content of the message to be sent instead of the photo\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultVenue/entity.json b/.butcher/types/InlineQueryResultVenue/entity.json new file mode 100644 index 00000000..56ef4016 --- /dev/null +++ b/.butcher/types/InlineQueryResultVenue/entity.json @@ -0,0 +1,137 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultvenue", + "name": "InlineQueryResultVenue", + "description": "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.", + "html_description": "

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.

", + "rst_description": "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.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be venue", + "html_description": "Type of the result, must be venue", + "rst_description": "Type of the result, must be *venue*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 Bytes", + "html_description": "Unique identifier for this result, 1-64 Bytes", + "rst_description": "Unique identifier for this result, 1-64 Bytes\n", + "name": "id", + "required": true + }, + { + "type": "Float", + "description": "Latitude of the venue location in degrees", + "html_description": "Latitude of the venue location in degrees", + "rst_description": "Latitude of the venue location in degrees\n", + "name": "latitude", + "required": true + }, + { + "type": "Float", + "description": "Longitude of the venue location in degrees", + "html_description": "Longitude of the venue location in degrees", + "rst_description": "Longitude of the venue location in degrees\n", + "name": "longitude", + "required": true + }, + { + "type": "String", + "description": "Title of the venue", + "html_description": "Title of the venue", + "rst_description": "Title of the venue\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Address of the venue", + "html_description": "Address of the venue", + "rst_description": "Address of the venue\n", + "name": "address", + "required": true + }, + { + "type": "String", + "description": "Foursquare identifier of the venue if known", + "html_description": "Optional. Foursquare identifier of the venue if known", + "rst_description": "*Optional*. Foursquare identifier of the venue if known\n", + "name": "foursquare_id", + "required": false + }, + { + "type": "String", + "description": "Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)", + "html_description": "Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)", + "rst_description": "*Optional*. Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)\n", + "name": "foursquare_type", + "required": false + }, + { + "type": "String", + "description": "Google Places identifier of the venue", + "html_description": "Optional. Google Places identifier of the venue", + "rst_description": "*Optional*. Google Places identifier of the venue\n", + "name": "google_place_id", + "required": false + }, + { + "type": "String", + "description": "Google Places type of the venue. (See supported types.)", + "html_description": "Optional. Google Places type of the venue. (See supported types.)", + "rst_description": "*Optional*. Google Places type of the venue. (See `supported types `_.)\n", + "name": "google_place_type", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the venue", + "html_description": "Optional. Content of the message to be sent instead of the venue", + "rst_description": "*Optional*. Content of the message to be sent instead of the venue\n", + "name": "input_message_content", + "required": false + }, + { + "type": "String", + "description": "Url of the thumbnail for the result", + "html_description": "Optional. Url of the thumbnail for the result", + "rst_description": "*Optional*. Url of the thumbnail for the result\n", + "name": "thumbnail_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumbnail_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumbnail_height", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultVideo/default.yml b/.butcher/types/InlineQueryResultVideo/default.yml new file mode 100644 index 00000000..a6b90bc0 --- /dev/null +++ b/.butcher/types/InlineQueryResultVideo/default.yml @@ -0,0 +1,2 @@ +parse_mode: parse_mode +show_caption_above_media: show_caption_above_media diff --git a/.butcher/types/InlineQueryResultVideo/entity.json b/.butcher/types/InlineQueryResultVideo/entity.json new file mode 100644 index 00000000..77910b7c --- /dev/null +++ b/.butcher/types/InlineQueryResultVideo/entity.json @@ -0,0 +1,145 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultvideo", + "name": "InlineQueryResultVideo", + "description": "Represents a link to a page containing an embedded video player or a video file. By default, this video 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 video.\nIf an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content.", + "html_description": "

Represents a link to a page containing an embedded video player or a video file. By default, this video 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 video.

\n

If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content.

\n
", + "rst_description": "Represents a link to a page containing an embedded video player or a video file. By default, this video 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 video.\n\n If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you **must** replace its content using *input_message_content*.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be video", + "html_description": "Type of the result, must be video", + "rst_description": "Type of the result, must be *video*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL for the embedded video player or video file", + "html_description": "A valid URL for the embedded video player or video file", + "rst_description": "A valid URL for the embedded video player or video file\n", + "name": "video_url", + "required": true + }, + { + "type": "String", + "description": "MIME type of the content of the video URL, 'text/html' or 'video/mp4'", + "html_description": "MIME type of the content of the video URL, “text/html” or “video/mp4”", + "rst_description": "MIME type of the content of the video URL, 'text/html' or 'video/mp4'\n", + "name": "mime_type", + "required": true + }, + { + "type": "String", + "description": "URL of the thumbnail (JPEG only) for the video", + "html_description": "URL of the thumbnail (JPEG only) for the video", + "rst_description": "URL of the thumbnail (JPEG only) for the video\n", + "name": "thumbnail_url", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Title for the result", + "rst_description": "Title for the result\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption of the video to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the video caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the video caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "type": "Integer", + "description": "Video width", + "html_description": "Optional. Video width", + "rst_description": "*Optional*. Video width\n", + "name": "video_width", + "required": false + }, + { + "type": "Integer", + "description": "Video height", + "html_description": "Optional. Video height", + "rst_description": "*Optional*. Video height\n", + "name": "video_height", + "required": false + }, + { + "type": "Integer", + "description": "Video duration in seconds", + "html_description": "Optional. Video duration in seconds", + "rst_description": "*Optional*. Video duration in seconds\n", + "name": "video_duration", + "required": false + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "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).", + "html_description": "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).", + "rst_description": "*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).\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultVoice/default.yml b/.butcher/types/InlineQueryResultVoice/default.yml new file mode 100644 index 00000000..d56d5759 --- /dev/null +++ b/.butcher/types/InlineQueryResultVoice/default.yml @@ -0,0 +1 @@ +parse_mode: parse_mode diff --git a/.butcher/types/InlineQueryResultVoice/entity.json b/.butcher/types/InlineQueryResultVoice/entity.json new file mode 100644 index 00000000..44b46f6a --- /dev/null +++ b/.butcher/types/InlineQueryResultVoice/entity.json @@ -0,0 +1,97 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultvoice", + "name": "InlineQueryResultVoice", + "description": "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 the voice message.", + "html_description": "

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 the voice message.

", + "rst_description": "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 the voice message.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be voice", + "html_description": "Type of the result, must be voice", + "rst_description": "Type of the result, must be *voice*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL for the voice recording", + "html_description": "A valid URL for the voice recording", + "rst_description": "A valid URL for the voice recording\n", + "name": "voice_url", + "required": true + }, + { + "type": "String", + "description": "Recording title", + "html_description": "Recording title", + "rst_description": "Recording title\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the voice message caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the voice message caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Integer", + "description": "Recording duration in seconds", + "html_description": "Optional. Recording duration in seconds", + "rst_description": "*Optional*. Recording duration in seconds\n", + "name": "voice_duration", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the voice recording", + "html_description": "Optional. Content of the message to be sent instead of the voice recording", + "rst_description": "*Optional*. Content of the message to be sent instead of the voice recording\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultsButton/entity.json b/.butcher/types/InlineQueryResultsButton/entity.json new file mode 100644 index 00000000..a66c2f3b --- /dev/null +++ b/.butcher/types/InlineQueryResultsButton/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultsbutton", + "name": "InlineQueryResultsButton", + "description": "This object represents a button to be shown above inline query results. You must use exactly one of the optional fields.", + "html_description": "

This object represents a button to be shown above inline query results. You must use exactly one of the optional fields.

", + "rst_description": "This object represents a button to be shown above inline query results. You **must** use exactly one of the optional fields.", + "annotations": [ + { + "type": "String", + "description": "Label text on the button", + "html_description": "Label text on the button", + "rst_description": "Label text on the button\n", + "name": "text", + "required": true + }, + { + "type": "WebAppInfo", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "web_app", + "required": false + }, + { + "type": "String", + "description": "Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.\n\nExample: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.", + "html_description": "Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.
\n
\nExample: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.", + "rst_description": "*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.\n\n\n\n*Example:* An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a `https://core.telegram.org/bots/api#inlinekeyboardmarkup `_ *switch_inline* button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.\n", + "name": "start_parameter", + "required": false + } + ], + "category": "types" + } +} 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/InputContactMessageContent/entity.json b/.butcher/types/InputContactMessageContent/entity.json new file mode 100644 index 00000000..0acb3c07 --- /dev/null +++ b/.butcher/types/InputContactMessageContent/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inputcontactmessagecontent", + "name": "InputContactMessageContent", + "description": "Represents the content of a contact message to be sent as the result of an inline query.", + "html_description": "

Represents the content of a contact message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of a contact message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "String", + "description": "Contact's phone number", + "html_description": "Contact's phone number", + "rst_description": "Contact's phone number\n", + "name": "phone_number", + "required": true + }, + { + "type": "String", + "description": "Contact's first name", + "html_description": "Contact's first name", + "rst_description": "Contact's first name\n", + "name": "first_name", + "required": true + }, + { + "type": "String", + "description": "Contact's last name", + "html_description": "Optional. Contact's last name", + "rst_description": "*Optional*. Contact's last name\n", + "name": "last_name", + "required": false + }, + { + "type": "String", + "description": "Additional data about the contact in the form of a vCard, 0-2048 bytes", + "html_description": "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes", + "rst_description": "*Optional*. Additional data about the contact in the form of a `vCard `_, 0-2048 bytes\n", + "name": "vcard", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputFile/entity.json b/.butcher/types/InputFile/entity.json new file mode 100644 index 00000000..fb12abf0 --- /dev/null +++ b/.butcher/types/InputFile/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputfile", + "name": "InputFile", + "description": "This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.", + "html_description": "

This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.

", + "rst_description": "This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/InputFile/replace.yml b/.butcher/types/InputFile/replace.yml new file mode 100644 index 00000000..b040efad --- /dev/null +++ b/.butcher/types/InputFile/replace.yml @@ -0,0 +1,2 @@ +bases: + - ABC diff --git a/.butcher/types/InputInvoiceMessageContent/entity.json b/.butcher/types/InputInvoiceMessageContent/entity.json new file mode 100644 index 00000000..76d2f39b --- /dev/null +++ b/.butcher/types/InputInvoiceMessageContent/entity.json @@ -0,0 +1,177 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inputinvoicemessagecontent", + "name": "InputInvoiceMessageContent", + "description": "Represents the content of an invoice message to be sent as the result of an inline query.", + "html_description": "

Represents the content of an invoice message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of an invoice message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "String", + "description": "Product name, 1-32 characters", + "html_description": "Product name, 1-32 characters", + "rst_description": "Product name, 1-32 characters\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Product description, 1-255 characters", + "html_description": "Product description, 1-255 characters", + "rst_description": "Product description, 1-255 characters\n", + "name": "description", + "required": true + }, + { + "type": "String", + "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 + }, + { + "type": "String", + "description": "Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.", + "html_description": "Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.", + "rst_description": "*Optional*. Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.\n", + "name": "provider_token", + "required": false + }, + { + "type": "String", + "description": "Three-letter ISO 4217 currency code, see more on currencies. Pass 'XTR' for payments in Telegram Stars.", + "html_description": "Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars.", + "rst_description": "Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.\n", + "name": "currency", + "required": true + }, + { + "type": "Array of LabeledPrice", + "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.", + "html_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.", + "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", + "required": true + }, + { + "type": "Integer", + "description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass 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.", + "html_description": "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 US$ 1.45 pass 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.", + "rst_description": "*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 `_.\n", + "name": "max_tip_amount", + "required": false + }, + { + "type": "Array of Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "*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*.\n", + "name": "suggested_tip_amounts", + "required": false + }, + { + "type": "String", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "provider_data", + "required": false + }, + { + "type": "String", + "description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.", + "html_description": "Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.", + "rst_description": "*Optional*. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.\n", + "name": "photo_url", + "required": false + }, + { + "type": "Integer", + "description": "Photo size in bytes", + "html_description": "Optional. Photo size in bytes", + "rst_description": "*Optional*. Photo size in bytes\n", + "name": "photo_size", + "required": false + }, + { + "type": "Integer", + "description": "Photo width", + "html_description": "Optional. Photo width", + "rst_description": "*Optional*. Photo width\n", + "name": "photo_width", + "required": false + }, + { + "type": "Integer", + "description": "Photo height", + "html_description": "Optional. Photo height", + "rst_description": "*Optional*. Photo height\n", + "name": "photo_height", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Optional. Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "*Optional*. Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_name", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "*Optional*. Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_phone_number", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "*Optional*. Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_email", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.", + "html_description": "Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.", + "rst_description": "*Optional*. Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_.\n", + "name": "need_shipping_address", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.", + "html_description": "Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.", + "rst_description": "*Optional*. Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_.\n", + "name": "send_phone_number_to_provider", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.", + "html_description": "Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.", + "rst_description": "*Optional*. Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_.\n", + "name": "send_email_to_provider", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.", + "html_description": "Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.", + "rst_description": "*Optional*. Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_.\n", + "name": "is_flexible", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputLocationMessageContent/entity.json b/.butcher/types/InputLocationMessageContent/entity.json new file mode 100644 index 00000000..cc0546b4 --- /dev/null +++ b/.butcher/types/InputLocationMessageContent/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inputlocationmessagecontent", + "name": "InputLocationMessageContent", + "description": "Represents the content of a location message to be sent as the result of an inline query.", + "html_description": "

Represents the content of a location message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of a location message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "Float", + "description": "Latitude of the location in degrees", + "html_description": "Latitude of the location in degrees", + "rst_description": "Latitude of the location in degrees\n", + "name": "latitude", + "required": true + }, + { + "type": "Float", + "description": "Longitude of the location in degrees", + "html_description": "Longitude of the location in degrees", + "rst_description": "Longitude of the location in degrees\n", + "name": "longitude", + "required": true + }, + { + "type": "Float", + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "Optional. The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy", + "required": false + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "live_period", + "required": false + }, + { + "type": "Integer", + "description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "html_description": "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "rst_description": "*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", + "name": "heading", + "required": false + }, + { + "type": "Integer", + "description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "proximity_alert_radius", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputMedia/entity.json b/.butcher/types/InputMedia/entity.json new file mode 100644 index 00000000..193520cf --- /dev/null +++ b/.butcher/types/InputMedia/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputmedia", + "name": "InputMedia", + "description": "This object represents the content of a media message to be sent. It should be one of\n - InputMediaAnimation\n - InputMediaDocument\n - InputMediaAudio\n - InputMediaPhoto\n - InputMediaVideo", + "html_description": "

This object represents the content of a media message to be sent. It should be one of

", + "rst_description": "This object represents the content of a media message to be sent. It should be one of\n\n - :class:`aiogram.types.input_media_animation.InputMediaAnimation`\n - :class:`aiogram.types.input_media_document.InputMediaDocument`\n - :class:`aiogram.types.input_media_audio.InputMediaAudio`\n - :class:`aiogram.types.input_media_photo.InputMediaPhoto`\n - :class:`aiogram.types.input_media_video.InputMediaVideo`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/InputMedia/replace.yml b/.butcher/types/InputMedia/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/InputMedia/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/InputMedia/subtypes.yml b/.butcher/types/InputMedia/subtypes.yml new file mode 100644 index 00000000..6756ad51 --- /dev/null +++ b/.butcher/types/InputMedia/subtypes.yml @@ -0,0 +1 @@ +discriminator: "type" diff --git a/.butcher/types/InputMediaAnimation/default.yml b/.butcher/types/InputMediaAnimation/default.yml new file mode 100644 index 00000000..a6b90bc0 --- /dev/null +++ b/.butcher/types/InputMediaAnimation/default.yml @@ -0,0 +1,2 @@ +parse_mode: parse_mode +show_caption_above_media: show_caption_above_media diff --git a/.butcher/types/InputMediaAnimation/entity.json b/.butcher/types/InputMediaAnimation/entity.json new file mode 100644 index 00000000..f64c7e1e --- /dev/null +++ b/.butcher/types/InputMediaAnimation/entity.json @@ -0,0 +1,105 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputmediaanimation", + "name": "InputMediaAnimation", + "description": "Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.", + "html_description": "

Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.

", + "rst_description": "Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be animation", + "html_description": "Type of the result, must be animation", + "rst_description": "Type of the result, must be *animation*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "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. More information on Sending Files", + "html_description": "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://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "media", + "required": true + }, + { + "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": "Caption of the animation to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the animation to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the animation caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the animation caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the animation caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "type": "Integer", + "description": "Animation width", + "html_description": "Optional. Animation width", + "rst_description": "*Optional*. Animation width\n", + "name": "width", + "required": false + }, + { + "type": "Integer", + "description": "Animation height", + "html_description": "Optional. Animation height", + "rst_description": "*Optional*. Animation height\n", + "name": "height", + "required": false + }, + { + "type": "Integer", + "description": "Animation duration in seconds", + "html_description": "Optional. Animation duration in seconds", + "rst_description": "*Optional*. Animation duration in seconds\n", + "name": "duration", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the animation needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the animation needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the animation needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputMediaAnimation/replace.yml b/.butcher/types/InputMediaAnimation/replace.yml new file mode 100644 index 00000000..efa1d506 --- /dev/null +++ b/.butcher/types/InputMediaAnimation/replace.yml @@ -0,0 +1,17 @@ +annotations: + media: + 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 diff --git a/.butcher/types/InputMediaAudio/default.yml b/.butcher/types/InputMediaAudio/default.yml new file mode 100644 index 00000000..d56d5759 --- /dev/null +++ b/.butcher/types/InputMediaAudio/default.yml @@ -0,0 +1 @@ +parse_mode: parse_mode diff --git a/.butcher/types/InputMediaAudio/entity.json b/.butcher/types/InputMediaAudio/entity.json new file mode 100644 index 00000000..95af3e81 --- /dev/null +++ b/.butcher/types/InputMediaAudio/entity.json @@ -0,0 +1,89 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputmediaaudio", + "name": "InputMediaAudio", + "description": "Represents an audio file to be treated as music to be sent.", + "html_description": "

Represents an audio file to be treated as music to be sent.

", + "rst_description": "Represents an audio file to be treated as music to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be audio", + "html_description": "Type of the result, must be audio", + "rst_description": "Type of the result, must be *audio*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "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. More information on Sending Files", + "html_description": "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://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "media", + "required": true + }, + { + "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": "Caption of the audio to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the audio to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the audio caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the audio caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Integer", + "description": "Duration of the audio in seconds", + "html_description": "Optional. Duration of the audio in seconds", + "rst_description": "*Optional*. Duration of the audio in seconds\n", + "name": "duration", + "required": false + }, + { + "type": "String", + "description": "Performer of the audio", + "html_description": "Optional. Performer of the audio", + "rst_description": "*Optional*. Performer of the audio\n", + "name": "performer", + "required": false + }, + { + "type": "String", + "description": "Title of the audio", + "html_description": "Optional. Title of the audio", + "rst_description": "*Optional*. Title of the audio\n", + "name": "title", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputMediaAudio/replace.yml b/.butcher/types/InputMediaAudio/replace.yml new file mode 100644 index 00000000..efa1d506 --- /dev/null +++ b/.butcher/types/InputMediaAudio/replace.yml @@ -0,0 +1,17 @@ +annotations: + media: + 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 diff --git a/.butcher/types/InputMediaDocument/default.yml b/.butcher/types/InputMediaDocument/default.yml new file mode 100644 index 00000000..d56d5759 --- /dev/null +++ b/.butcher/types/InputMediaDocument/default.yml @@ -0,0 +1 @@ +parse_mode: parse_mode diff --git a/.butcher/types/InputMediaDocument/entity.json b/.butcher/types/InputMediaDocument/entity.json new file mode 100644 index 00000000..71be2aaa --- /dev/null +++ b/.butcher/types/InputMediaDocument/entity.json @@ -0,0 +1,73 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputmediadocument", + "name": "InputMediaDocument", + "description": "Represents a general file to be sent.", + "html_description": "

Represents a general file to be sent.

", + "rst_description": "Represents a general file to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be document", + "html_description": "Type of the result, must be document", + "rst_description": "Type of the result, must be *document*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "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. More information on Sending Files", + "html_description": "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://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "media", + "required": true + }, + { + "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": "Caption of the document to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the document caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the document caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album.", + "html_description": "Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album.", + "rst_description": "*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.\n", + "name": "disable_content_type_detection", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputMediaDocument/replace.yml b/.butcher/types/InputMediaDocument/replace.yml new file mode 100644 index 00000000..efa1d506 --- /dev/null +++ b/.butcher/types/InputMediaDocument/replace.yml @@ -0,0 +1,17 @@ +annotations: + media: + 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 diff --git a/.butcher/types/InputMediaPhoto/default.yml b/.butcher/types/InputMediaPhoto/default.yml new file mode 100644 index 00000000..a6b90bc0 --- /dev/null +++ b/.butcher/types/InputMediaPhoto/default.yml @@ -0,0 +1,2 @@ +parse_mode: parse_mode +show_caption_above_media: show_caption_above_media diff --git a/.butcher/types/InputMediaPhoto/entity.json b/.butcher/types/InputMediaPhoto/entity.json new file mode 100644 index 00000000..4fe1e134 --- /dev/null +++ b/.butcher/types/InputMediaPhoto/entity.json @@ -0,0 +1,73 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputmediaphoto", + "name": "InputMediaPhoto", + "description": "Represents a photo to be sent.", + "html_description": "

Represents a photo to be sent.

", + "rst_description": "Represents a photo to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be photo", + "html_description": "Type of the result, must be photo", + "rst_description": "Type of the result, must be *photo*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "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. More information on Sending Files", + "html_description": "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://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "media", + "required": true + }, + { + "type": "String", + "description": "Caption of the photo to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the photo caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the photo caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the photo needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the photo needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the photo needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputMediaPhoto/replace.yml b/.butcher/types/InputMediaPhoto/replace.yml new file mode 100644 index 00000000..17ac606b --- /dev/null +++ b/.butcher/types/InputMediaPhoto/replace.yml @@ -0,0 +1,11 @@ +annotations: + media: + parsed_type: + type: union + items: + - type: std + name: str + - type: entity + references: + category: types + name: InputFile diff --git a/.butcher/types/InputMediaVideo/default.yml b/.butcher/types/InputMediaVideo/default.yml new file mode 100644 index 00000000..a6b90bc0 --- /dev/null +++ b/.butcher/types/InputMediaVideo/default.yml @@ -0,0 +1,2 @@ +parse_mode: parse_mode +show_caption_above_media: show_caption_above_media diff --git a/.butcher/types/InputMediaVideo/entity.json b/.butcher/types/InputMediaVideo/entity.json new file mode 100644 index 00000000..0dbf3767 --- /dev/null +++ b/.butcher/types/InputMediaVideo/entity.json @@ -0,0 +1,129 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputmediavideo", + "name": "InputMediaVideo", + "description": "Represents a video to be sent.", + "html_description": "

Represents a video to be sent.

", + "rst_description": "Represents a video to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be video", + "html_description": "Type of the result, must be video", + "rst_description": "Type of the result, must be *video*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "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. More information on Sending Files", + "html_description": "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://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "media", + "required": true + }, + { + "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", + "html_description": "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the video caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the video caption. 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 caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True, if the caption must be shown above the message media", + "html_description": "Optional. Pass True, if the caption must be shown above the message media", + "rst_description": "*Optional*. Pass :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "type": "Integer", + "description": "Video width", + "html_description": "Optional. Video width", + "rst_description": "*Optional*. Video width\n", + "name": "width", + "required": false + }, + { + "type": "Integer", + "description": "Video height", + "html_description": "Optional. Video height", + "rst_description": "*Optional*. Video height\n", + "name": "height", + "required": false + }, + { + "type": "Integer", + "description": "Video duration in seconds", + "html_description": "Optional. Video duration in seconds", + "rst_description": "*Optional*. Video duration in seconds\n", + "name": "duration", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the uploaded video is suitable for streaming", + "html_description": "Optional. Pass True if the uploaded video is suitable for streaming", + "rst_description": "*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming\n", + "name": "supports_streaming", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the video needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the video needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the video needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputMediaVideo/replace.yml b/.butcher/types/InputMediaVideo/replace.yml new file mode 100644 index 00000000..c7ee44f0 --- /dev/null +++ b/.butcher/types/InputMediaVideo/replace.yml @@ -0,0 +1,37 @@ +annotations: + media: + parsed_type: + type: union + items: + - type: std + name: str + - type: entity + 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/InputMessageContent/entity.json b/.butcher/types/InputMessageContent/entity.json new file mode 100644 index 00000000..cc9e857e --- /dev/null +++ b/.butcher/types/InputMessageContent/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inputmessagecontent", + "name": "InputMessageContent", + "description": "This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:\n - InputTextMessageContent\n - InputLocationMessageContent\n - InputVenueMessageContent\n - InputContactMessageContent\n - InputInvoiceMessageContent", + "html_description": "

This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:

", + "rst_description": "This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:\n\n - :class:`aiogram.types.input_text_message_content.InputTextMessageContent`\n - :class:`aiogram.types.input_location_message_content.InputLocationMessageContent`\n - :class:`aiogram.types.input_venue_message_content.InputVenueMessageContent`\n - :class:`aiogram.types.input_contact_message_content.InputContactMessageContent`\n - :class:`aiogram.types.input_invoice_message_content.InputInvoiceMessageContent`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/InputMessageContent/replace.yml b/.butcher/types/InputMessageContent/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/InputMessageContent/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/InputMessageContent/subtypes.yml b/.butcher/types/InputMessageContent/subtypes.yml new file mode 100644 index 00000000..ffcd4415 --- /dev/null +++ b/.butcher/types/InputMessageContent/subtypes.yml @@ -0,0 +1 @@ +{ } diff --git a/.butcher/types/InputPaidMedia/entity.json b/.butcher/types/InputPaidMedia/entity.json new file mode 100644 index 00000000..5fe4d0a4 --- /dev/null +++ b/.butcher/types/InputPaidMedia/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputpaidmedia", + "name": "InputPaidMedia", + "description": "This object describes the paid media to be sent. Currently, it can be one of\n - InputPaidMediaPhoto\n - InputPaidMediaVideo", + "html_description": "

This object describes the paid media to be sent. Currently, it can be one of

", + "rst_description": "This object describes the paid media to be sent. Currently, it can be one of\n\n - :class:`aiogram.types.input_paid_media_photo.InputPaidMediaPhoto`\n - :class:`aiogram.types.input_paid_media_video.InputPaidMediaVideo`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/InputPaidMedia/subtypes.yml b/.butcher/types/InputPaidMedia/subtypes.yml new file mode 100644 index 00000000..6756ad51 --- /dev/null +++ b/.butcher/types/InputPaidMedia/subtypes.yml @@ -0,0 +1 @@ +discriminator: "type" diff --git a/.butcher/types/InputPaidMediaPhoto/entity.json b/.butcher/types/InputPaidMediaPhoto/entity.json new file mode 100644 index 00000000..adb049da --- /dev/null +++ b/.butcher/types/InputPaidMediaPhoto/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputpaidmediaphoto", + "name": "InputPaidMediaPhoto", + "description": "The paid media to send is a photo.", + "html_description": "

The paid media to send is a photo.

", + "rst_description": "The paid media to send is a photo.", + "annotations": [ + { + "type": "String", + "description": "Type of the media, must be photo", + "html_description": "Type of the media, must be photo", + "rst_description": "Type of the media, must be *photo*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "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. More information on Sending Files", + "html_description": "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://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "media", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputPaidMediaPhoto/replace.yml b/.butcher/types/InputPaidMediaPhoto/replace.yml new file mode 100644 index 00000000..17ac606b --- /dev/null +++ b/.butcher/types/InputPaidMediaPhoto/replace.yml @@ -0,0 +1,11 @@ +annotations: + media: + parsed_type: + type: union + items: + - type: std + name: str + - type: entity + references: + category: types + name: InputFile diff --git a/.butcher/types/InputPaidMediaVideo/entity.json b/.butcher/types/InputPaidMediaVideo/entity.json new file mode 100644 index 00000000..9ba408e5 --- /dev/null +++ b/.butcher/types/InputPaidMediaVideo/entity.json @@ -0,0 +1,89 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputpaidmediavideo", + "name": "InputPaidMediaVideo", + "description": "The paid media to send is a video.", + "html_description": "

The paid media to send is a video.

", + "rst_description": "The paid media to send is a video.", + "annotations": [ + { + "type": "String", + "description": "Type of the media, must be video", + "html_description": "Type of the media, must be video", + "rst_description": "Type of the media, must be *video*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "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. More information on Sending Files", + "html_description": "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://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "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 » `\n", + "name": "media", + "required": true + }, + { + "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", + "html_description": "Optional. Video width", + "rst_description": "*Optional*. Video width\n", + "name": "width", + "required": false + }, + { + "type": "Integer", + "description": "Video height", + "html_description": "Optional. Video height", + "rst_description": "*Optional*. Video height\n", + "name": "height", + "required": false + }, + { + "type": "Integer", + "description": "Video duration in seconds", + "html_description": "Optional. Video duration in seconds", + "rst_description": "*Optional*. Video duration in seconds\n", + "name": "duration", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the uploaded video is suitable for streaming", + "html_description": "Optional. Pass True if the uploaded video is suitable for streaming", + "rst_description": "*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming\n", + "name": "supports_streaming", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputPaidMediaVideo/replace.yml b/.butcher/types/InputPaidMediaVideo/replace.yml new file mode 100644 index 00000000..c7ee44f0 --- /dev/null +++ b/.butcher/types/InputPaidMediaVideo/replace.yml @@ -0,0 +1,37 @@ +annotations: + media: + parsed_type: + type: union + items: + - type: std + name: str + - type: entity + 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/InputPollOption/default.yml b/.butcher/types/InputPollOption/default.yml new file mode 100644 index 00000000..48a2b31a --- /dev/null +++ b/.butcher/types/InputPollOption/default.yml @@ -0,0 +1 @@ +text_parse_mode: parse_mode diff --git a/.butcher/types/InputPollOption/entity.json b/.butcher/types/InputPollOption/entity.json new file mode 100644 index 00000000..f1720718 --- /dev/null +++ b/.butcher/types/InputPollOption/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputpolloption", + "name": "InputPollOption", + "description": "This object contains information about one answer option in a poll to be sent.", + "html_description": "

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

", + "rst_description": "This object contains information about one answer option in a poll to be sent.", + "annotations": [ + { + "type": "String", + "description": "Option text, 1-100 characters", + "html_description": "Option text, 1-100 characters", + "rst_description": "Option text, 1-100 characters\n", + "name": "text", + "required": true + }, + { + "type": "String", + "description": "Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed", + "html_description": "Optional. Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed", + "rst_description": "*Optional*. Mode for parsing entities in the text. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed\n", + "name": "text_parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode", + "html_description": "Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode", + "rst_description": "*Optional*. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of *text_parse_mode*\n", + "name": "text_entities", + "required": false + } + ], + "category": "types" + } +} 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 new file mode 100644 index 00000000..e3d58c12 --- /dev/null +++ b/.butcher/types/InputSticker/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "inputsticker", + "name": "InputSticker", + "description": "This object describes a sticker to be added to a sticker set.", + "html_description": "

This object describes a sticker to be added to a sticker set.

", + "rst_description": "This object describes a sticker to be added to a sticker set.", + "annotations": [ + { + "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", + "name": "format", + "required": true + }, + { + "type": "Array of String", + "description": "List of 1-20 emoji associated with the sticker", + "html_description": "List of 1-20 emoji associated with the sticker", + "rst_description": "List of 1-20 emoji associated with the sticker\n", + "name": "emoji_list", + "required": true + }, + { + "type": "MaskPosition", + "description": "Position where the mask should be placed on faces. For 'mask' stickers only.", + "html_description": "Optional. Position where the mask should be placed on faces. For “mask” stickers only.", + "rst_description": "*Optional*. Position where the mask should be placed on faces. For 'mask' stickers only.\n", + "name": "mask_position", + "required": false + }, + { + "type": "Array of String", + "description": "List of 0-20 search keywords for the sticker with total length of up to 64 characters. For 'regular' and 'custom_emoji' stickers only.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "keywords", + "required": false + } + ], + "category": "types" + } +} 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 new file mode 100644 index 00000000..5ca2d0cb --- /dev/null +++ b/.butcher/types/InputTextMessageContent/default.yml @@ -0,0 +1,2 @@ +link_preview_options: link_preview +parse_mode: parse_mode diff --git a/.butcher/types/InputTextMessageContent/entity.json b/.butcher/types/InputTextMessageContent/entity.json new file mode 100644 index 00000000..4e96def9 --- /dev/null +++ b/.butcher/types/InputTextMessageContent/entity.json @@ -0,0 +1,61 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inputtextmessagecontent", + "name": "InputTextMessageContent", + "description": "Represents the content of a text message to be sent as the result of an inline query.", + "html_description": "

Represents the content of a text message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of a text message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "String", + "description": "Text of the message to be sent, 1-4096 characters", + "html_description": "Text of the message to be sent, 1-4096 characters", + "rst_description": "Text of the message to be sent, 1-4096 characters\n", + "name": "message_text", + "required": true + }, + { + "type": "String", + "description": "Mode for parsing entities in the message text. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the message text. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the message 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 message text, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in message text, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in message text, which can be specified instead of *parse_mode*\n", + "name": "entities", + "required": false + }, + { + "type": "LinkPreviewOptions", + "description": "Link preview generation options for the message", + "html_description": "Optional. Link preview generation options for the message", + "rst_description": "*Optional*. Link preview generation options for the message\n", + "name": "link_preview_options", + "required": false + }, + { + "type": "Boolean", + "description": "Disables link previews for links in the sent message", + "html_description": "Optional. Disables link previews for links in the sent message", + "rst_description": "*Optional*. Disables link previews for links in the sent message\n", + "name": "disable_web_page_preview", + "required": false, + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputVenueMessageContent/entity.json b/.butcher/types/InputVenueMessageContent/entity.json new file mode 100644 index 00000000..7c9b81a6 --- /dev/null +++ b/.butcher/types/InputVenueMessageContent/entity.json @@ -0,0 +1,81 @@ +{ + "meta": {}, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inputvenuemessagecontent", + "name": "InputVenueMessageContent", + "description": "Represents the content of a venue message to be sent as the result of an inline query.", + "html_description": "

Represents the content of a venue message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of a venue message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "Float", + "description": "Latitude of the venue in degrees", + "html_description": "Latitude of the venue in degrees", + "rst_description": "Latitude of the venue in degrees\n", + "name": "latitude", + "required": true + }, + { + "type": "Float", + "description": "Longitude of the venue in degrees", + "html_description": "Longitude of the venue in degrees", + "rst_description": "Longitude of the venue in degrees\n", + "name": "longitude", + "required": true + }, + { + "type": "String", + "description": "Name of the venue", + "html_description": "Name of the venue", + "rst_description": "Name of the venue\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Address of the venue", + "html_description": "Address of the venue", + "rst_description": "Address of the venue\n", + "name": "address", + "required": true + }, + { + "type": "String", + "description": "Foursquare identifier of the venue, if known", + "html_description": "Optional. Foursquare identifier of the venue, if known", + "rst_description": "*Optional*. Foursquare identifier of the venue, if known\n", + "name": "foursquare_id", + "required": false + }, + { + "type": "String", + "description": "Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)", + "html_description": "Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)", + "rst_description": "*Optional*. Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)\n", + "name": "foursquare_type", + "required": false + }, + { + "type": "String", + "description": "Google Places identifier of the venue", + "html_description": "Optional. Google Places identifier of the venue", + "rst_description": "*Optional*. Google Places identifier of the venue\n", + "name": "google_place_id", + "required": false + }, + { + "type": "String", + "description": "Google Places type of the venue. (See supported types.)", + "html_description": "Optional. Google Places type of the venue. (See supported types.)", + "rst_description": "*Optional*. Google Places type of the venue. (See `supported types `_.)\n", + "name": "google_place_type", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Invoice/entity.json b/.butcher/types/Invoice/entity.json new file mode 100644 index 00000000..d53aa161 --- /dev/null +++ b/.butcher/types/Invoice/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "invoice", + "name": "Invoice", + "description": "This object contains basic information about an invoice.", + "html_description": "

This object contains basic information about an invoice.

", + "rst_description": "This object contains basic information about an invoice.", + "annotations": [ + { + "type": "String", + "description": "Product name", + "html_description": "Product name", + "rst_description": "Product name\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Product description", + "html_description": "Product description", + "rst_description": "Product description\n", + "name": "description", + "required": true + }, + { + "type": "String", + "description": "Unique bot deep-linking parameter that can be used to generate this invoice", + "html_description": "Unique bot deep-linking parameter that can be used to generate this invoice", + "rst_description": "Unique bot deep-linking parameter that can be used to generate this invoice\n", + "name": "start_parameter", + "required": true + }, + { + "type": "String", + "description": "Three-letter ISO 4217 currency code, or 'XTR' for payments in Telegram Stars", + "html_description": "Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars", + "rst_description": "Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars `_\n", + "name": "currency", + "required": true + }, + { + "type": "Integer", + "description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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 price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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 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).\n", + "name": "total_amount", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/KeyboardButton/entity.json b/.butcher/types/KeyboardButton/entity.json new file mode 100644 index 00000000..fae93931 --- /dev/null +++ b/.butcher/types/KeyboardButton/entity.json @@ -0,0 +1,109 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "keyboardbutton", + "name": "KeyboardButton", + "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 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", + "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", + "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.", + "html_description": "Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.", + "rst_description": "*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.\n", + "name": "request_contact", + "required": false + }, + { + "type": "Boolean", + "description": "If True, the user's current location will be sent when the button is pressed. Available in private chats only.", + "html_description": "Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only.", + "rst_description": "*Optional*. If :code:`True`, the user's current location will be sent when the button is pressed. Available in private chats only.\n", + "name": "request_location", + "required": false + }, + { + "type": "KeyboardButtonPollType", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "request_poll", + "required": false + }, + { + "type": "WebAppInfo", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "web_app", + "required": false + }, + { + "type": "KeyboardButtonRequestUser", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "request_user", + "required": false, + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "types" + } +} diff --git a/.butcher/types/KeyboardButton/replace.yml b/.butcher/types/KeyboardButton/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/KeyboardButton/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/KeyboardButtonPollType/entity.json b/.butcher/types/KeyboardButtonPollType/entity.json new file mode 100644 index 00000000..2681d80b --- /dev/null +++ b/.butcher/types/KeyboardButtonPollType/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "keyboardbuttonpolltype", + "name": "KeyboardButtonPollType", + "description": "This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.", + "html_description": "

This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.

", + "rst_description": "This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.", + "annotations": [ + { + "type": "String", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "type", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/KeyboardButtonPollType/replace.yml b/.butcher/types/KeyboardButtonPollType/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/KeyboardButtonPollType/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/KeyboardButtonRequestChat/entity.json b/.butcher/types/KeyboardButtonRequestChat/entity.json new file mode 100644 index 00000000..d7cb0d21 --- /dev/null +++ b/.butcher/types/KeyboardButtonRequestChat/entity.json @@ -0,0 +1,105 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "keyboardbuttonrequestchat", + "name": "KeyboardButtonRequestChat", + "description": "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..", + "html_description": "

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 ».

", + "rst_description": "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 » `_.", + "annotations": [ + { + "type": "Integer", + "description": "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message", + "html_description": "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message", + "rst_description": "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\n", + "name": "request_id", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True to request a channel chat, pass False to request a group or a supergroup chat.", + "html_description": "Pass True to request a channel chat, pass False to request a group or a supergroup chat.", + "rst_description": "Pass :code:`True` to request a channel chat, pass :code:`False` to request a group or a supergroup chat.\n", + "name": "chat_is_channel", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.", + "rst_description": "*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.\n", + "name": "chat_is_forum", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.", + "rst_description": "*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.\n", + "name": "chat_has_username", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a chat owned by the user. Otherwise, no additional restrictions are applied.\n", + "name": "chat_is_created", + "required": false + }, + { + "type": "ChatAdministratorRights", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "user_administrator_rights", + "required": false + }, + { + "type": "ChatAdministratorRights", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "bot_administrator_rights", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.\n", + "name": "bot_is_member", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request the chat's title", + "html_description": "Optional. Pass True to request the chat's title", + "rst_description": "*Optional*. Pass :code:`True` to request the chat's title\n", + "name": "request_title", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request the chat's username", + "html_description": "Optional. Pass True to request the chat's username", + "rst_description": "*Optional*. Pass :code:`True` to request the chat's username\n", + "name": "request_username", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request the chat's photo", + "html_description": "Optional. Pass True to request the chat's photo", + "rst_description": "*Optional*. Pass :code:`True` to request the chat's photo\n", + "name": "request_photo", + "required": false + } + ], + "category": "types" + } +} 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/KeyboardButtonRequestUser/entity.json b/.butcher/types/KeyboardButtonRequestUser/entity.json new file mode 100644 index 00000000..b9cd01e6 --- /dev/null +++ b/.butcher/types/KeyboardButtonRequestUser/entity.json @@ -0,0 +1,46 @@ +{ + "meta": { + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "keyboardbuttonrequestuser", + "name": "KeyboardButtonRequestUser", + "description": "This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.", + "html_description": "

This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed. More about requesting users »

", + "rst_description": "This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed. `More about requesting users » `_", + "annotations": [ + { + "type": "Integer", + "description": "Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message", + "html_description": "Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message", + "rst_description": "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\n", + "name": "request_id", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a bot, pass :code:`False` to request a regular user. If not specified, no additional restrictions are applied.\n", + "name": "user_is_bot", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.", + "rst_description": "*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.\n", + "name": "user_is_premium", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/KeyboardButtonRequestUsers/entity.json b/.butcher/types/KeyboardButtonRequestUsers/entity.json new file mode 100644 index 00000000..59355b26 --- /dev/null +++ b/.butcher/types/KeyboardButtonRequestUsers/entity.json @@ -0,0 +1,73 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "keyboardbuttonrequestusers", + "name": "KeyboardButtonRequestUsers", + "description": "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.", + "html_description": "

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 »

", + "rst_description": "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 » `_", + "annotations": [ + { + "type": "Integer", + "description": "Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message", + "html_description": "Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message", + "rst_description": "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\n", + "name": "request_id", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request bots, pass :code:`False` to request regular users. If not specified, no additional restrictions are applied.\n", + "name": "user_is_bot", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request premium users, pass :code:`False` to request non-premium users. If not specified, no additional restrictions are applied.\n", + "name": "user_is_premium", + "required": false + }, + { + "type": "Integer", + "description": "The maximum number of users to be selected; 1-10. Defaults to 1.", + "html_description": "Optional. The maximum number of users to be selected; 1-10. Defaults to 1.", + "rst_description": "*Optional*. The maximum number of users to be selected; 1-10. Defaults to 1.\n", + "name": "max_quantity", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request the users' first and last names", + "html_description": "Optional. Pass True to request the users' first and last names", + "rst_description": "*Optional*. Pass :code:`True` to request the users' first and last names\n", + "name": "request_name", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request the users' usernames", + "html_description": "Optional. Pass True to request the users' usernames", + "rst_description": "*Optional*. Pass :code:`True` to request the users' usernames\n", + "name": "request_username", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request the users' photos", + "html_description": "Optional. Pass True to request the users' photos", + "rst_description": "*Optional*. Pass :code:`True` to request the users' photos\n", + "name": "request_photo", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/LabeledPrice/entity.json b/.butcher/types/LabeledPrice/entity.json new file mode 100644 index 00000000..97dad650 --- /dev/null +++ b/.butcher/types/LabeledPrice/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "labeledprice", + "name": "LabeledPrice", + "description": "This object represents a portion of the price for goods or services.", + "html_description": "

This object represents a portion of the price for goods or services.

", + "rst_description": "This object represents a portion of the price for goods or services.", + "annotations": [ + { + "type": "String", + "description": "Portion label", + "html_description": "Portion label", + "rst_description": "Portion label\n", + "name": "label", + "required": true + }, + { + "type": "Integer", + "description": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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": "Price of the product 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).\n", + "name": "amount", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/LabeledPrice/replace.yml b/.butcher/types/LabeledPrice/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/LabeledPrice/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/LinkPreviewOptions/default.yml b/.butcher/types/LinkPreviewOptions/default.yml new file mode 100644 index 00000000..587f6176 --- /dev/null +++ b/.butcher/types/LinkPreviewOptions/default.yml @@ -0,0 +1,4 @@ +is_disabled: link_preview_is_disabled +prefer_small_media: link_preview_prefer_small_media +prefer_large_media: link_preview_prefer_large_media +show_above_text: link_preview_show_above_text diff --git a/.butcher/types/LinkPreviewOptions/entity.json b/.butcher/types/LinkPreviewOptions/entity.json new file mode 100644 index 00000000..89a70c10 --- /dev/null +++ b/.butcher/types/LinkPreviewOptions/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "linkpreviewoptions", + "name": "LinkPreviewOptions", + "description": "Describes the options used for link preview generation.", + "html_description": "

Describes the options used for link preview generation.

", + "rst_description": "Describes the options used for link preview generation.", + "annotations": [ + { + "type": "Boolean", + "description": "True, if the link preview is disabled", + "html_description": "Optional. True, if the link preview is disabled", + "rst_description": "*Optional*. :code:`True`, if the link preview is disabled\n", + "name": "is_disabled", + "required": false + }, + { + "type": "String", + "description": "URL to use for the link preview. If empty, then the first URL found in the message text will be used", + "html_description": "Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used", + "rst_description": "*Optional*. URL to use for the link preview. If empty, then the first URL found in the message text will be used\n", + "name": "url", + "required": false + }, + { + "type": "Boolean", + "description": "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", + "html_description": "Optional. 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", + "rst_description": "*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\n", + "name": "prefer_small_media", + "required": false + }, + { + "type": "Boolean", + "description": "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", + "html_description": "Optional. 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", + "rst_description": "*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\n", + "name": "prefer_large_media", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text", + "html_description": "Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text", + "rst_description": "*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\n", + "name": "show_above_text", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Location/entity.json b/.butcher/types/Location/entity.json new file mode 100644 index 00000000..32aa2bc2 --- /dev/null +++ b/.butcher/types/Location/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "location", + "name": "Location", + "description": "This object represents a point on the map.", + "html_description": "

This object represents a point on the map.

", + "rst_description": "This object represents a point on the map.", + "annotations": [ + { + "type": "Float", + "description": "Latitude as defined by the sender", + "html_description": "Latitude as defined by the sender", + "rst_description": "Latitude as defined by the sender\n", + "name": "latitude", + "required": true + }, + { + "type": "Float", + "description": "Longitude as defined by the sender", + "html_description": "Longitude as defined by the sender", + "rst_description": "Longitude as defined by the sender\n", + "name": "longitude", + "required": true + }, + { + "type": "Float", + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "Optional. The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy", + "required": false + }, + { + "type": "Integer", + "description": "Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.", + "html_description": "Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.", + "rst_description": "*Optional*. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.\n", + "name": "live_period", + "required": false + }, + { + "type": "Integer", + "description": "The direction in which user is moving, in degrees; 1-360. For active live locations only.", + "html_description": "Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only.", + "rst_description": "*Optional*. The direction in which user is moving, in degrees; 1-360. For active live locations only.\n", + "name": "heading", + "required": false + }, + { + "type": "Integer", + "description": "The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.", + "html_description": "Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.", + "rst_description": "*Optional*. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.\n", + "name": "proximity_alert_radius", + "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/LoginUrl/entity.json b/.butcher/types/LoginUrl/entity.json new file mode 100644 index 00000000..7748fe56 --- /dev/null +++ b/.butcher/types/LoginUrl/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "loginurl", + "name": "LoginUrl", + "description": "This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:\nTelegram apps support these buttons as of version 5.7.\nSample bot: @discussbot", + "html_description": "

This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:

Telegram apps support these buttons as of version 5.7.

\n

Sample bot: @discussbot

\n
", + "rst_description": "This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the `Telegram Login Widget `_ when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:\nTelegram apps support these buttons as of `version 5.7 `_.\n\n Sample bot: `@discussbot `_", + "annotations": [ + { + "type": "String", + "description": "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.\n\nNOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.", + "html_description": "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.
\n
\nNOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.", + "rst_description": "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 `_.\n\n\n\n**NOTE:** You **must** always check the hash of the received data to verify the authentication and the integrity of the data as described in `Checking authorization `_.\n", + "name": "url", + "required": true + }, + { + "type": "String", + "description": "New text of the button in forwarded messages.", + "html_description": "Optional. New text of the button in forwarded messages.", + "rst_description": "*Optional*. New text of the button in forwarded messages.\n", + "name": "forward_text", + "required": false + }, + { + "type": "String", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "bot_username", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request the permission for your bot to send messages to the user.", + "html_description": "Optional. Pass True to request the permission for your bot to send messages to the user.", + "rst_description": "*Optional*. Pass :code:`True` to request the permission for your bot to send messages to the user.\n", + "name": "request_write_access", + "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/MaskPosition/entity.json b/.butcher/types/MaskPosition/entity.json new file mode 100644 index 00000000..af60fbfb --- /dev/null +++ b/.butcher/types/MaskPosition/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "maskposition", + "name": "MaskPosition", + "description": "This object describes the position on faces where a mask should be placed by default.", + "html_description": "

This object describes the position on faces where a mask should be placed by default.

", + "rst_description": "This object describes the position on faces where a mask should be placed by default.", + "annotations": [ + { + "type": "String", + "description": "The part of the face relative to which the mask should be placed. One of 'forehead', 'eyes', 'mouth', or 'chin'.", + "html_description": "The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”.", + "rst_description": "The part of the face relative to which the mask should be placed. One of 'forehead', 'eyes', 'mouth', or 'chin'.\n", + "name": "point", + "required": true + }, + { + "type": "Float", + "description": "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.", + "html_description": "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.", + "rst_description": "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.\n", + "name": "x_shift", + "required": true + }, + { + "type": "Float", + "description": "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.", + "html_description": "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.", + "rst_description": "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.\n", + "name": "y_shift", + "required": true + }, + { + "type": "Float", + "description": "Mask scaling coefficient. For example, 2.0 means double size.", + "html_description": "Mask scaling coefficient. For example, 2.0 means double size.", + "rst_description": "Mask scaling coefficient. For example, 2.0 means double size.\n", + "name": "scale", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MaybeInaccessibleMessage/entity.json b/.butcher/types/MaybeInaccessibleMessage/entity.json new file mode 100644 index 00000000..98696110 --- /dev/null +++ b/.butcher/types/MaybeInaccessibleMessage/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "maybeinaccessiblemessage", + "name": "MaybeInaccessibleMessage", + "description": "This object describes a message that can be inaccessible to the bot. It can be one of\n - Message\n - InaccessibleMessage", + "html_description": "

This object describes a message that can be inaccessible to the bot. It can be one of

", + "rst_description": "This object describes a message that can be inaccessible to the bot. It can be one of\n\n - :class:`aiogram.types.message.Message`\n - :class:`aiogram.types.inaccessible_message.InaccessibleMessage`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/MaybeInaccessibleMessage/subtypes.yml b/.butcher/types/MaybeInaccessibleMessage/subtypes.yml new file mode 100644 index 00000000..1f4769f8 --- /dev/null +++ b/.butcher/types/MaybeInaccessibleMessage/subtypes.yml @@ -0,0 +1 @@ +tagged: true diff --git a/.butcher/types/MenuButton/entity.json b/.butcher/types/MenuButton/entity.json new file mode 100644 index 00000000..224a5dac --- /dev/null +++ b/.butcher/types/MenuButton/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "menubutton", + "name": "MenuButton", + "description": "This object describes the bot's menu button in a private chat. It should be one of\n - MenuButtonCommands\n - MenuButtonWebApp\n - MenuButtonDefault\nIf a menu button other than MenuButtonDefault is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.", + "html_description": "

This object describes the bot's menu button in a private chat. It should be one of

If a menu button other than MenuButtonDefault is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.

", + "rst_description": "This object describes the bot's menu button in a private chat. It should be one of\n\n - :class:`aiogram.types.menu_button_commands.MenuButtonCommands`\n - :class:`aiogram.types.menu_button_web_app.MenuButtonWebApp`\n - :class:`aiogram.types.menu_button_default.MenuButtonDefault`\n\nIf a menu button other than :class:`aiogram.types.menu_button_default.MenuButtonDefault` is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/MenuButton/extend.yml b/.butcher/types/MenuButton/extend.yml new file mode 100644 index 00000000..1d841ebc --- /dev/null +++ b/.butcher/types/MenuButton/extend.yml @@ -0,0 +1,18 @@ +define: + - type: "String" + description: "Type of the button" + html_description: "Type of the button" + rst_description: "Type of the button" + name: "type" + required: true + +clone: + - MenuButtonCommands: + exclude: + - type + - MenuButtonDefault: + exclude: + - type + - MenuButtonWebApp: + exclude: + - type diff --git a/.butcher/types/MenuButton/replace.yml b/.butcher/types/MenuButton/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/MenuButton/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/MenuButton/subtypes.yml b/.butcher/types/MenuButton/subtypes.yml new file mode 100644 index 00000000..6756ad51 --- /dev/null +++ b/.butcher/types/MenuButton/subtypes.yml @@ -0,0 +1 @@ +discriminator: "type" diff --git a/.butcher/types/MenuButtonCommands/entity.json b/.butcher/types/MenuButtonCommands/entity.json new file mode 100644 index 00000000..25f67474 --- /dev/null +++ b/.butcher/types/MenuButtonCommands/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "menubuttoncommands", + "name": "MenuButtonCommands", + "description": "Represents a menu button, which opens the bot's list of commands.", + "html_description": "

Represents a menu button, which opens the bot's list of commands.

", + "rst_description": "Represents a menu button, which opens the bot's list of commands.", + "annotations": [ + { + "type": "String", + "description": "Type of the button, must be commands", + "html_description": "Type of the button, must be commands", + "rst_description": "Type of the button, must be *commands*\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MenuButtonDefault/entity.json b/.butcher/types/MenuButtonDefault/entity.json new file mode 100644 index 00000000..ce7f22af --- /dev/null +++ b/.butcher/types/MenuButtonDefault/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "menubuttondefault", + "name": "MenuButtonDefault", + "description": "Describes that no specific value for the menu button was set.", + "html_description": "

Describes that no specific value for the menu button was set.

", + "rst_description": "Describes that no specific value for the menu button was set.", + "annotations": [ + { + "type": "String", + "description": "Type of the button, must be default", + "html_description": "Type of the button, must be default", + "rst_description": "Type of the button, must be *default*\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MenuButtonWebApp/entity.json b/.butcher/types/MenuButtonWebApp/entity.json new file mode 100644 index 00000000..ff0a26ff --- /dev/null +++ b/.butcher/types/MenuButtonWebApp/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "menubuttonwebapp", + "name": "MenuButtonWebApp", + "description": "Represents a menu button, which launches a Web App.", + "html_description": "

Represents a menu button, which launches a Web App.

", + "rst_description": "Represents a menu button, which launches a `Web App `_.", + "annotations": [ + { + "type": "String", + "description": "Type of the button, must be web_app", + "html_description": "Type of the button, must be web_app", + "rst_description": "Type of the button, must be *web_app*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Text on the button", + "html_description": "Text on the button", + "rst_description": "Text on the button\n", + "name": "text", + "required": true + }, + { + "type": "WebAppInfo", + "description": "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 answerWebAppQuery. Alternatively, a 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.", + "html_description": "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 answerWebAppQuery. Alternatively, a 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.", + "rst_description": "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.\n", + "name": "web_app", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Message/aliases.yml b/.butcher/types/Message/aliases.yml new file mode 100644 index 00000000..b49f4ee0 --- /dev/null +++ b/.butcher/types/Message/aliases.yml @@ -0,0 +1,278 @@ +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 + message_thread_id: self.message_thread_id if self.is_topic_message else None + business_connection_id: self.business_connection_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 + +copy_to: + method: copyMessage + code: *assert-chat + fill: + from_chat_id: self.chat.id + message_id: self.message_id + +forward: + method: forwardMessage + code: *assert-chat + fill: + from_chat_id: self.chat.id + message_id: self.message_id + +edit_text: + method: editMessageText + code: *assert-chat + fill: &message-target + chat_id: self.chat.id + message_id: self.message_id + business_connection_id: self.business_connection_id + +edit_media: + method: editMessageMedia + fill: *message-target + code: *assert-chat + +edit_reply_markup: + method: editMessageReplyMarkup + code: *assert-chat + fill: *message-target + +delete_reply_markup: + method: editMessageReplyMarkup + code: *assert-chat + fill: + <<: *message-target + reply_markup: None + +edit_live_location: + method: editMessageLiveLocation + code: *assert-chat + fill: *message-target + +stop_live_location: + method: stopMessageLiveLocation + code: *assert-chat + fill: *message-target + +edit_caption: + method: editMessageCaption + code: *assert-chat + fill: *message-target + +delete: + method: deleteMessage + code: *assert-chat + fill: *message-target + +pin: + method: pinChatMessage + code: *assert-chat + fill: *message-target + +unpin: + method: unpinChatMessage + code: *assert-chat + fill: *message-target + +react: + method: setMessageReaction + code: *assert-chat + fill: *message-target diff --git a/.butcher/types/Message/entity.json b/.butcher/types/Message/entity.json new file mode 100644 index 00000000..1cf9a3e2 --- /dev/null +++ b/.butcher/types/Message/entity.json @@ -0,0 +1,981 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "message", + "name": "Message", + "description": "This object represents a message.", + "html_description": "

This object represents a message.

", + "rst_description": "This object represents a message.", + "annotations": [ + { + "type": "Integer", + "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 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; 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 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 + }, + { + "type": "Integer", + "description": "If the sender of the message boosted the chat, the number of boosts added by the user", + "html_description": "Optional. If the sender of the message boosted the chat, the number of boosts added by the user", + "rst_description": "*Optional*. If the sender of the message boosted the chat, the number of boosts added by the user\n", + "name": "sender_boost_count", + "required": false + }, + { + "type": "User", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "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.", + "html_description": "Date the message was sent in Unix time. It is always a positive number, representing a valid date.", + "rst_description": "Date the message was sent in Unix time. It is always a positive number, representing a valid date.\n", + "name": "date", + "required": true + }, + { + "type": "String", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "business_connection_id", + "required": false + }, + { + "type": "Chat", + "description": "Chat the message belongs to", + "html_description": "Chat the message belongs to", + "rst_description": "Chat the message belongs to\n", + "name": "chat", + "required": true + }, + { + "type": "MessageOrigin", + "description": "Information about the original message for forwarded messages", + "html_description": "Optional. Information about the original message for forwarded messages", + "rst_description": "*Optional*. Information about the original message for forwarded messages\n", + "name": "forward_origin", + "required": false + }, + { + "type": "True", + "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 + }, + { + "type": "True", + "description": "True, if the message is a channel post that was automatically forwarded to the connected discussion group", + "html_description": "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group", + "rst_description": "*Optional*. :code:`True`, if the message is a channel post that was automatically forwarded to the connected discussion group\n", + "name": "is_automatic_forward", + "required": false + }, + { + "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 :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 + }, + { + "type": "ExternalReplyInfo", + "description": "Information about the message that is being replied to, which may come from another chat or forum topic", + "html_description": "Optional. Information about the message that is being replied to, which may come from another chat or forum topic", + "rst_description": "*Optional*. Information about the message that is being replied to, which may come from another chat or forum topic\n", + "name": "external_reply", + "required": false + }, + { + "type": "TextQuote", + "description": "For replies that quote part of the original message, the quoted part of the message", + "html_description": "Optional. For replies that quote part of the original message, the quoted part of the message", + "rst_description": "*Optional*. For replies that quote part of the original message, the quoted part of the message\n", + "name": "quote", + "required": false + }, + { + "type": "Story", + "description": "For replies to a story, the original story", + "html_description": "Optional. For replies to a story, the original story", + "rst_description": "*Optional*. For replies to a story, the original story\n", + "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", + "html_description": "Optional. Bot through which the message was sent", + "rst_description": "*Optional*. Bot through which the message was sent\n", + "name": "via_bot", + "required": false + }, + { + "type": "Integer", + "description": "Date the message was last edited in Unix time", + "html_description": "Optional. Date the message was last edited in Unix time", + "rst_description": "*Optional*. Date the message was last edited in Unix time\n", + "name": "edit_date", + "required": false + }, + { + "type": "True", + "description": "True, if the message can't be forwarded", + "html_description": "Optional. True, if the message can't be forwarded", + "rst_description": "*Optional*. :code:`True`, if the message can't be forwarded\n", + "name": "has_protected_content", + "required": false + }, + { + "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*. :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 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 + }, + { + "type": "String", + "description": "Signature of the post author for messages in channels, or the custom title of an anonymous group administrator", + "html_description": "Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator", + "rst_description": "*Optional*. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator\n", + "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", + "html_description": "Optional. For text messages, the actual UTF-8 text of the message", + "rst_description": "*Optional*. For text messages, the actual UTF-8 text of the message\n", + "name": "text", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text", + "html_description": "Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text", + "rst_description": "*Optional*. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text\n", + "name": "entities", + "required": false + }, + { + "type": "LinkPreviewOptions", + "description": "Options used for link preview generation for the message, if it is a text message and link preview options were changed", + "html_description": "Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed", + "rst_description": "*Optional*. Options used for link preview generation for the message, if it is a text message and link preview options were changed\n", + "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", + "html_description": "Optional. Unique identifier of the message effect added to the message", + "rst_description": "*Optional*. Unique identifier of the message effect added to the message\n", + "name": "effect_id", + "required": false + }, + { + "type": "Animation", + "description": "Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set", + "html_description": "Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set", + "rst_description": "*Optional*. Message is an animation, information about the animation. For backward compatibility, when this field is set, the *document* field will also be set\n", + "name": "animation", + "required": false + }, + { + "type": "Audio", + "description": "Message is an audio file, information about the file", + "html_description": "Optional. Message is an audio file, information about the file", + "rst_description": "*Optional*. Message is an audio file, information about the file\n", + "name": "audio", + "required": false + }, + { + "type": "Document", + "description": "Message is a general file, information about the file", + "html_description": "Optional. Message is a general file, information about the file", + "rst_description": "*Optional*. Message is a general file, information about the file\n", + "name": "document", + "required": false + }, + { + "type": "PaidMediaInfo", + "description": "Message contains paid media; information about the paid media", + "html_description": "Optional. Message contains paid media; information about the paid media", + "rst_description": "*Optional*. Message contains paid media; information about the paid media\n", + "name": "paid_media", + "required": false + }, + { + "type": "Array of PhotoSize", + "description": "Message is a photo, available sizes of the photo", + "html_description": "Optional. Message is a photo, available sizes of the photo", + "rst_description": "*Optional*. Message is a photo, available sizes of the photo\n", + "name": "photo", + "required": false + }, + { + "type": "Sticker", + "description": "Message is a sticker, information about the sticker", + "html_description": "Optional. Message is a sticker, information about the sticker", + "rst_description": "*Optional*. Message is a sticker, information about the sticker\n", + "name": "sticker", + "required": false + }, + { + "type": "Story", + "description": "Message is a forwarded story", + "html_description": "Optional. Message is a forwarded story", + "rst_description": "*Optional*. Message is a forwarded story\n", + "name": "story", + "required": false + }, + { + "type": "Video", + "description": "Message is a video, information about the video", + "html_description": "Optional. Message is a video, information about the video", + "rst_description": "*Optional*. Message is a video, information about the video\n", + "name": "video", + "required": false + }, + { + "type": "VideoNote", + "description": "Message is a video note, information about the video message", + "html_description": "Optional. Message is a video note, information about the video message", + "rst_description": "*Optional*. Message is a `video note `_, information about the video message\n", + "name": "video_note", + "required": false + }, + { + "type": "Voice", + "description": "Message is a voice message, information about the file", + "html_description": "Optional. Message is a voice message, information about the file", + "rst_description": "*Optional*. Message is a voice message, information about the file\n", + "name": "voice", + "required": false + }, + { + "type": "String", + "description": "Caption for the animation, audio, document, paid media, photo, video or voice", + "html_description": "Optional. Caption for the animation, audio, document, paid media, photo, video or voice", + "rst_description": "*Optional*. Caption for the animation, audio, document, paid media, photo, video or voice\n", + "name": "caption", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption", + "html_description": "Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption", + "rst_description": "*Optional*. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption\n", + "name": "caption_entities", + "required": false + }, + { + "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*. :code:`True`, if the caption must be shown above the message media\n", + "name": "show_caption_above_media", + "required": false + }, + { + "type": "True", + "description": "True, if the message media is covered by a spoiler animation", + "html_description": "Optional. True, if the message media is covered by a spoiler animation", + "rst_description": "*Optional*. :code:`True`, if the message media is covered by a spoiler animation\n", + "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", + "html_description": "Optional. Message is a shared contact, information about the contact", + "rst_description": "*Optional*. Message is a shared contact, information about the contact\n", + "name": "contact", + "required": false + }, + { + "type": "Dice", + "description": "Message is a dice with random value", + "html_description": "Optional. Message is a dice with random value", + "rst_description": "*Optional*. Message is a dice with random value\n", + "name": "dice", + "required": false + }, + { + "type": "Game", + "description": "Message is a game, information about the game.", + "html_description": "Optional. Message is a game, information about the game. More about games »", + "rst_description": "*Optional*. Message is a game, information about the game. `More about games » `_\n", + "name": "game", + "required": false + }, + { + "type": "Poll", + "description": "Message is a native poll, information about the poll", + "html_description": "Optional. Message is a native poll, information about the poll", + "rst_description": "*Optional*. Message is a native poll, information about the poll\n", + "name": "poll", + "required": false + }, + { + "type": "Venue", + "description": "Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set", + "html_description": "Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set", + "rst_description": "*Optional*. Message is a venue, information about the venue. For backward compatibility, when this field is set, the *location* field will also be set\n", + "name": "venue", + "required": false + }, + { + "type": "Location", + "description": "Message is a shared location, information about the location", + "html_description": "Optional. Message is a shared location, information about the location", + "rst_description": "*Optional*. Message is a shared location, information about the location\n", + "name": "location", + "required": false + }, + { + "type": "Array of User", + "description": "New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)", + "html_description": "Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)", + "rst_description": "*Optional*. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)\n", + "name": "new_chat_members", + "required": false + }, + { + "type": "User", + "description": "A member was removed from the group, information about them (this member may be the bot itself)", + "html_description": "Optional. A member was removed from the group, information about them (this member may be the bot itself)", + "rst_description": "*Optional*. A member was removed from the group, information about them (this member may be the bot itself)\n", + "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", + "html_description": "Optional. A chat title was changed to this value", + "rst_description": "*Optional*. A chat title was changed to this value\n", + "name": "new_chat_title", + "required": false + }, + { + "type": "Array of PhotoSize", + "description": "A chat photo was change to this value", + "html_description": "Optional. A chat photo was change to this value", + "rst_description": "*Optional*. A chat photo was change to this value\n", + "name": "new_chat_photo", + "required": false + }, + { + "type": "True", + "description": "Service message: the chat photo was deleted", + "html_description": "Optional. Service message: the chat photo was deleted", + "rst_description": "*Optional*. Service message: the chat photo was deleted\n", + "name": "delete_chat_photo", + "required": false + }, + { + "type": "True", + "description": "Service message: the group has been created", + "html_description": "Optional. Service message: the group has been created", + "rst_description": "*Optional*. Service message: the group has been created\n", + "name": "group_chat_created", + "required": false + }, + { + "type": "True", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "supergroup_chat_created", + "required": false + }, + { + "type": "True", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "channel_chat_created", + "required": false + }, + { + "type": "MessageAutoDeleteTimerChanged", + "description": "Service message: auto-delete timer settings changed in the chat", + "html_description": "Optional. Service message: auto-delete timer settings changed in the chat", + "rst_description": "*Optional*. Service message: auto-delete timer settings changed in the chat\n", + "name": "message_auto_delete_timer_changed", + "required": false + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "migrate_to_chat_id", + "required": false + }, + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "migrate_from_chat_id", + "required": false + }, + { + "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 :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 + }, + { + "type": "Invoice", + "description": "Message is an invoice for a payment, information about the invoice.", + "html_description": "Optional. Message is an invoice for a payment, information about the invoice. More about payments »", + "rst_description": "*Optional*. Message is an invoice for a `payment `_, information about the invoice. `More about payments » `_\n", + "name": "invoice", + "required": false + }, + { + "type": "SuccessfulPayment", + "description": "Message is a service message about a successful payment, information about the payment.", + "html_description": "Optional. Message is a service message about a successful payment, information about the payment. More about payments »", + "rst_description": "*Optional*. Message is a service message about a successful payment, information about the payment. `More about payments » `_\n", + "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", + "html_description": "Optional. Service message: users were shared with the bot", + "rst_description": "*Optional*. Service message: users were shared with the bot\n", + "name": "users_shared", + "required": false + }, + { + "type": "ChatShared", + "description": "Service message: a chat was shared with the bot", + "html_description": "Optional. Service message: a chat was shared with the bot", + "rst_description": "*Optional*. Service message: a chat was shared with the bot\n", + "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.", + "html_description": "Optional. The domain name of the website on which the user has logged in. More about Telegram Login »", + "rst_description": "*Optional*. The domain name of the website on which the user has logged in. `More about Telegram Login » `_\n", + "name": "connected_website", + "required": false + }, + { + "type": "WriteAccessAllowed", + "description": "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", + "html_description": "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", + "rst_description": "*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 `_\n", + "name": "write_access_allowed", + "required": false + }, + { + "type": "PassportData", + "description": "Telegram Passport data", + "html_description": "Optional. Telegram Passport data", + "rst_description": "*Optional*. Telegram Passport data\n", + "name": "passport_data", + "required": false + }, + { + "type": "ProximityAlertTriggered", + "description": "Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.", + "html_description": "Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.", + "rst_description": "*Optional*. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.\n", + "name": "proximity_alert_triggered", + "required": false + }, + { + "type": "ChatBoostAdded", + "description": "Service message: user boosted the chat", + "html_description": "Optional. Service message: user boosted the chat", + "rst_description": "*Optional*. Service message: user boosted the chat\n", + "name": "boost_added", + "required": false + }, + { + "type": "ChatBackground", + "description": "Service message: chat background set", + "html_description": "Optional. Service message: chat background set", + "rst_description": "*Optional*. Service message: chat background set\n", + "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", + "html_description": "Optional. Service message: forum topic created", + "rst_description": "*Optional*. Service message: forum topic created\n", + "name": "forum_topic_created", + "required": false + }, + { + "type": "ForumTopicEdited", + "description": "Service message: forum topic edited", + "html_description": "Optional. Service message: forum topic edited", + "rst_description": "*Optional*. Service message: forum topic edited\n", + "name": "forum_topic_edited", + "required": false + }, + { + "type": "ForumTopicClosed", + "description": "Service message: forum topic closed", + "html_description": "Optional. Service message: forum topic closed", + "rst_description": "*Optional*. Service message: forum topic closed\n", + "name": "forum_topic_closed", + "required": false + }, + { + "type": "ForumTopicReopened", + "description": "Service message: forum topic reopened", + "html_description": "Optional. Service message: forum topic reopened", + "rst_description": "*Optional*. Service message: forum topic reopened\n", + "name": "forum_topic_reopened", + "required": false + }, + { + "type": "GeneralForumTopicHidden", + "description": "Service message: the 'General' forum topic hidden", + "html_description": "Optional. Service message: the 'General' forum topic hidden", + "rst_description": "*Optional*. Service message: the 'General' forum topic hidden\n", + "name": "general_forum_topic_hidden", + "required": false + }, + { + "type": "GeneralForumTopicUnhidden", + "description": "Service message: the 'General' forum topic unhidden", + "html_description": "Optional. Service message: the 'General' forum topic unhidden", + "rst_description": "*Optional*. Service message: the 'General' forum topic unhidden\n", + "name": "general_forum_topic_unhidden", + "required": false + }, + { + "type": "GiveawayCreated", + "description": "Service message: a scheduled giveaway was created", + "html_description": "Optional. Service message: a scheduled giveaway was created", + "rst_description": "*Optional*. Service message: a scheduled giveaway was created\n", + "name": "giveaway_created", + "required": false + }, + { + "type": "Giveaway", + "description": "The message is a scheduled giveaway message", + "html_description": "Optional. The message is a scheduled giveaway message", + "rst_description": "*Optional*. The message is a scheduled giveaway message\n", + "name": "giveaway", + "required": false + }, + { + "type": "GiveawayWinners", + "description": "A giveaway with public winners was completed", + "html_description": "Optional. A giveaway with public winners was completed", + "rst_description": "*Optional*. A giveaway with public winners was completed\n", + "name": "giveaway_winners", + "required": false + }, + { + "type": "GiveawayCompleted", + "description": "Service message: a giveaway without public winners was completed", + "html_description": "Optional. Service message: a giveaway without public winners was completed", + "rst_description": "*Optional*. Service message: a giveaway without public winners was completed\n", + "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", + "html_description": "Optional. Service message: video chat scheduled", + "rst_description": "*Optional*. Service message: video chat scheduled\n", + "name": "video_chat_scheduled", + "required": false + }, + { + "type": "VideoChatStarted", + "description": "Service message: video chat started", + "html_description": "Optional. Service message: video chat started", + "rst_description": "*Optional*. Service message: video chat started\n", + "name": "video_chat_started", + "required": false + }, + { + "type": "VideoChatEnded", + "description": "Service message: video chat ended", + "html_description": "Optional. Service message: video chat ended", + "rst_description": "*Optional*. Service message: video chat ended\n", + "name": "video_chat_ended", + "required": false + }, + { + "type": "VideoChatParticipantsInvited", + "description": "Service message: new participants invited to a video chat", + "html_description": "Optional. Service message: new participants invited to a video chat", + "rst_description": "*Optional*. Service message: new participants invited to a video chat\n", + "name": "video_chat_participants_invited", + "required": false + }, + { + "type": "WebAppData", + "description": "Service message: data sent by a Web App", + "html_description": "Optional. Service message: data sent by a Web App", + "rst_description": "*Optional*. Service message: data sent by a Web App\n", + "name": "web_app_data", + "required": false + }, + { + "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", + "name": "reply_markup", + "required": false + }, + { + "type": "Integer", + "description": "For forwarded messages, date the original message was sent in Unix time", + "html_description": "Optional. For forwarded messages, date the original message was sent in Unix time", + "rst_description": "*Optional*. For forwarded messages, date the original message was sent in Unix time\n", + "name": "forward_date", + "required": false, + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "User", + "description": "For forwarded messages, sender of the original message", + "html_description": "Optional. For forwarded messages, sender of the original message", + "rst_description": "*Optional*. For forwarded messages, sender of the original message\n", + "name": "forward_from", + "required": false, + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Chat", + "description": "For messages forwarded from channels or from anonymous administrators, information about the original sender chat", + "html_description": "Optional. For messages forwarded from channels or from anonymous administrators, information about the original sender chat", + "rst_description": "*Optional*. For messages forwarded from channels or from anonymous administrators, information about the original sender chat\n", + "name": "forward_from_chat", + "required": false, + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "Integer", + "description": "For messages forwarded from channels, identifier of the original message in the channel", + "html_description": "Optional. For messages forwarded from channels, identifier of the original message in the channel", + "rst_description": "*Optional*. For messages forwarded from channels, identifier of the original message in the channel\n", + "name": "forward_from_message_id", + "required": false, + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "String", + "description": "Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages", + "html_description": "Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages", + "rst_description": "*Optional*. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages\n", + "name": "forward_sender_name", + "required": false, + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "String", + "description": "For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present", + "html_description": "Optional. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present", + "rst_description": "*Optional*. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present\n", + "name": "forward_signature", + "required": false, + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + { + "type": "UserShared", + "description": "Service message: a user was shared with the bot", + "html_description": "Optional. Service message: a user was shared with the bot", + "rst_description": "*Optional*. Service message: a user was shared with the bot\n", + "name": "user_shared", + "required": false, + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Message/replace.yml b/.butcher/types/Message/replace.yml new file mode 100644 index 00000000..5fa030bf --- /dev/null +++ b/.butcher/types/Message/replace.yml @@ -0,0 +1,9 @@ +annotations: + date: + parsed_type: + type: std + name: DateTime + forward_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/MessageAutoDeleteTimerChanged/entity.json b/.butcher/types/MessageAutoDeleteTimerChanged/entity.json new file mode 100644 index 00000000..3c6bc533 --- /dev/null +++ b/.butcher/types/MessageAutoDeleteTimerChanged/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "messageautodeletetimerchanged", + "name": "MessageAutoDeleteTimerChanged", + "description": "This object represents a service message about a change in auto-delete timer settings.", + "html_description": "

This object represents a service message about a change in auto-delete timer settings.

", + "rst_description": "This object represents a service message about a change in auto-delete timer settings.", + "annotations": [ + { + "type": "Integer", + "description": "New auto-delete time for messages in the chat; in seconds", + "html_description": "New auto-delete time for messages in the chat; in seconds", + "rst_description": "New auto-delete time for messages in the chat; in seconds\n", + "name": "message_auto_delete_time", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MessageEntity/entity.json b/.butcher/types/MessageEntity/entity.json new file mode 100644 index 00000000..37dc6cf4 --- /dev/null +++ b/.butcher/types/MessageEntity/entity.json @@ -0,0 +1,89 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "messageentity", + "name": "MessageEntity", + "description": "This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.", + "html_description": "

This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.

", + "rst_description": "This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.", + "annotations": [ + { + "type": "String", + "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 + }, + { + "type": "Integer", + "description": "Offset in UTF-16 code units to the start of the entity", + "html_description": "Offset in UTF-16 code units to the start of the entity", + "rst_description": "Offset in `UTF-16 code units `_ to the start of the entity\n", + "name": "offset", + "required": true + }, + { + "type": "Integer", + "description": "Length of the entity in UTF-16 code units", + "html_description": "Length of the entity in UTF-16 code units", + "rst_description": "Length of the entity in `UTF-16 code units `_\n", + "name": "length", + "required": true + }, + { + "type": "String", + "description": "For 'text_link' only, URL that will be opened after user taps on the text", + "html_description": "Optional. For “text_link” only, URL that will be opened after user taps on the text", + "rst_description": "*Optional*. For 'text_link' only, URL that will be opened after user taps on the text\n", + "name": "url", + "required": false + }, + { + "type": "User", + "description": "For 'text_mention' only, the mentioned user", + "html_description": "Optional. For “text_mention” only, the mentioned user", + "rst_description": "*Optional*. For 'text_mention' only, the mentioned user\n", + "name": "user", + "required": false + }, + { + "type": "String", + "description": "For 'pre' only, the programming language of the entity text", + "html_description": "Optional. For “pre” only, the programming language of the entity text", + "rst_description": "*Optional*. For 'pre' only, the programming language of the entity text\n", + "name": "language", + "required": false + }, + { + "type": "String", + "description": "For 'custom_emoji' only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker", + "html_description": "Optional. For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker", + "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/MessageEntity/replace.yml b/.butcher/types/MessageEntity/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/MessageEntity/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/MessageId/entity.json b/.butcher/types/MessageId/entity.json new file mode 100644 index 00000000..a886bf17 --- /dev/null +++ b/.butcher/types/MessageId/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "messageid", + "name": "MessageId", + "description": "This object represents a unique message identifier.", + "html_description": "

This object represents a unique message identifier.

", + "rst_description": "This object represents a unique message identifier.", + "annotations": [ + { + "type": "Integer", + "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 + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MessageOrigin/entity.json b/.butcher/types/MessageOrigin/entity.json new file mode 100644 index 00000000..dae2c8bb --- /dev/null +++ b/.butcher/types/MessageOrigin/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "messageorigin", + "name": "MessageOrigin", + "description": "This object describes the origin of a message. It can be one of\n - MessageOriginUser\n - MessageOriginHiddenUser\n - MessageOriginChat\n - MessageOriginChannel", + "html_description": "

This object describes the origin of a message. It can be one of

", + "rst_description": "This object describes the origin of a message. It can be one of\n\n - :class:`aiogram.types.message_origin_user.MessageOriginUser`\n - :class:`aiogram.types.message_origin_hidden_user.MessageOriginHiddenUser`\n - :class:`aiogram.types.message_origin_chat.MessageOriginChat`\n - :class:`aiogram.types.message_origin_channel.MessageOriginChannel`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/MessageOrigin/subtypes.yml b/.butcher/types/MessageOrigin/subtypes.yml new file mode 100644 index 00000000..6756ad51 --- /dev/null +++ b/.butcher/types/MessageOrigin/subtypes.yml @@ -0,0 +1 @@ +discriminator: "type" diff --git a/.butcher/types/MessageOriginChannel/entity.json b/.butcher/types/MessageOriginChannel/entity.json new file mode 100644 index 00000000..84a072c2 --- /dev/null +++ b/.butcher/types/MessageOriginChannel/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "messageoriginchannel", + "name": "MessageOriginChannel", + "description": "The message was originally sent to a channel chat.", + "html_description": "

The message was originally sent to a channel chat.

", + "rst_description": "The message was originally sent to a channel chat.", + "annotations": [ + { + "type": "String", + "description": "Type of the message origin, always 'channel'", + "html_description": "Type of the message origin, always “channel”", + "rst_description": "Type of the message origin, always 'channel'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Date the message was sent originally in Unix time", + "html_description": "Date the message was sent originally in Unix time", + "rst_description": "Date the message was sent originally in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "Chat", + "description": "Channel chat to which the message was originally sent", + "html_description": "Channel chat to which the message was originally sent", + "rst_description": "Channel chat to which the message was originally sent\n", + "name": "chat", + "required": true + }, + { + "type": "Integer", + "description": "Unique message identifier inside the chat", + "html_description": "Unique message identifier inside the chat", + "rst_description": "Unique message identifier inside the chat\n", + "name": "message_id", + "required": true + }, + { + "type": "String", + "description": "Signature of the original post author", + "html_description": "Optional. Signature of the original post author", + "rst_description": "*Optional*. Signature of the original post author\n", + "name": "author_signature", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MessageOriginChannel/replace.yml b/.butcher/types/MessageOriginChannel/replace.yml new file mode 100644 index 00000000..80c48d76 --- /dev/null +++ b/.butcher/types/MessageOriginChannel/replace.yml @@ -0,0 +1,5 @@ +annotations: + date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/MessageOriginChat/entity.json b/.butcher/types/MessageOriginChat/entity.json new file mode 100644 index 00000000..d8e58fad --- /dev/null +++ b/.butcher/types/MessageOriginChat/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "messageoriginchat", + "name": "MessageOriginChat", + "description": "The message was originally sent on behalf of a chat to a group chat.", + "html_description": "

The message was originally sent on behalf of a chat to a group chat.

", + "rst_description": "The message was originally sent on behalf of a chat to a group chat.", + "annotations": [ + { + "type": "String", + "description": "Type of the message origin, always 'chat'", + "html_description": "Type of the message origin, always “chat”", + "rst_description": "Type of the message origin, always 'chat'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Date the message was sent originally in Unix time", + "html_description": "Date the message was sent originally in Unix time", + "rst_description": "Date the message was sent originally in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "Chat", + "description": "Chat that sent the message originally", + "html_description": "Chat that sent the message originally", + "rst_description": "Chat that sent the message originally\n", + "name": "sender_chat", + "required": true + }, + { + "type": "String", + "description": "For messages originally sent by an anonymous chat administrator, original message author signature", + "html_description": "Optional. For messages originally sent by an anonymous chat administrator, original message author signature", + "rst_description": "*Optional*. For messages originally sent by an anonymous chat administrator, original message author signature\n", + "name": "author_signature", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MessageOriginChat/replace.yml b/.butcher/types/MessageOriginChat/replace.yml new file mode 100644 index 00000000..80c48d76 --- /dev/null +++ b/.butcher/types/MessageOriginChat/replace.yml @@ -0,0 +1,5 @@ +annotations: + date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/MessageOriginHiddenUser/entity.json b/.butcher/types/MessageOriginHiddenUser/entity.json new file mode 100644 index 00000000..540768a1 --- /dev/null +++ b/.butcher/types/MessageOriginHiddenUser/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "messageoriginhiddenuser", + "name": "MessageOriginHiddenUser", + "description": "The message was originally sent by an unknown user.", + "html_description": "

The message was originally sent by an unknown user.

", + "rst_description": "The message was originally sent by an unknown user.", + "annotations": [ + { + "type": "String", + "description": "Type of the message origin, always 'hidden_user'", + "html_description": "Type of the message origin, always “hidden_user”", + "rst_description": "Type of the message origin, always 'hidden_user'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Date the message was sent originally in Unix time", + "html_description": "Date the message was sent originally in Unix time", + "rst_description": "Date the message was sent originally in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "String", + "description": "Name of the user that sent the message originally", + "html_description": "Name of the user that sent the message originally", + "rst_description": "Name of the user that sent the message originally\n", + "name": "sender_user_name", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MessageOriginHiddenUser/replace.yml b/.butcher/types/MessageOriginHiddenUser/replace.yml new file mode 100644 index 00000000..80c48d76 --- /dev/null +++ b/.butcher/types/MessageOriginHiddenUser/replace.yml @@ -0,0 +1,5 @@ +annotations: + date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/MessageOriginUser/entity.json b/.butcher/types/MessageOriginUser/entity.json new file mode 100644 index 00000000..426e6b8a --- /dev/null +++ b/.butcher/types/MessageOriginUser/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "messageoriginuser", + "name": "MessageOriginUser", + "description": "The message was originally sent by a known user.", + "html_description": "

The message was originally sent by a known user.

", + "rst_description": "The message was originally sent by a known user.", + "annotations": [ + { + "type": "String", + "description": "Type of the message origin, always 'user'", + "html_description": "Type of the message origin, always “user”", + "rst_description": "Type of the message origin, always 'user'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Date the message was sent originally in Unix time", + "html_description": "Date the message was sent originally in Unix time", + "rst_description": "Date the message was sent originally in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "User", + "description": "User that sent the message originally", + "html_description": "User that sent the message originally", + "rst_description": "User that sent the message originally\n", + "name": "sender_user", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MessageOriginUser/replace.yml b/.butcher/types/MessageOriginUser/replace.yml new file mode 100644 index 00000000..80c48d76 --- /dev/null +++ b/.butcher/types/MessageOriginUser/replace.yml @@ -0,0 +1,5 @@ +annotations: + date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/MessageReactionCountUpdated/entity.json b/.butcher/types/MessageReactionCountUpdated/entity.json new file mode 100644 index 00000000..1a794ecb --- /dev/null +++ b/.butcher/types/MessageReactionCountUpdated/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "messagereactioncountupdated", + "name": "MessageReactionCountUpdated", + "description": "This object represents reaction changes on a message with anonymous reactions.", + "html_description": "

This object represents reaction changes on a message with anonymous reactions.

", + "rst_description": "This object represents reaction changes on a message with anonymous reactions.", + "annotations": [ + { + "type": "Chat", + "description": "The chat containing the message", + "html_description": "The chat containing the message", + "rst_description": "The chat containing the message\n", + "name": "chat", + "required": true + }, + { + "type": "Integer", + "description": "Unique message identifier inside the chat", + "html_description": "Unique message identifier inside the chat", + "rst_description": "Unique message identifier inside the chat\n", + "name": "message_id", + "required": true + }, + { + "type": "Integer", + "description": "Date of the change in Unix time", + "html_description": "Date of the change in Unix time", + "rst_description": "Date of the change in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "Array of ReactionCount", + "description": "List of reactions that are present on the message", + "html_description": "List of reactions that are present on the message", + "rst_description": "List of reactions that are present on the message\n", + "name": "reactions", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MessageReactionCountUpdated/replace.yml b/.butcher/types/MessageReactionCountUpdated/replace.yml new file mode 100644 index 00000000..80c48d76 --- /dev/null +++ b/.butcher/types/MessageReactionCountUpdated/replace.yml @@ -0,0 +1,5 @@ +annotations: + date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/MessageReactionUpdated/entity.json b/.butcher/types/MessageReactionUpdated/entity.json new file mode 100644 index 00000000..70cf9b5b --- /dev/null +++ b/.butcher/types/MessageReactionUpdated/entity.json @@ -0,0 +1,73 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "messagereactionupdated", + "name": "MessageReactionUpdated", + "description": "This object represents a change of a reaction on a message performed by a user.", + "html_description": "

This object represents a change of a reaction on a message performed by a user.

", + "rst_description": "This object represents a change of a reaction on a message performed by a user.", + "annotations": [ + { + "type": "Chat", + "description": "The chat containing the message the user reacted to", + "html_description": "The chat containing the message the user reacted to", + "rst_description": "The chat containing the message the user reacted to\n", + "name": "chat", + "required": true + }, + { + "type": "Integer", + "description": "Unique identifier of the message inside the chat", + "html_description": "Unique identifier of the message inside the chat", + "rst_description": "Unique identifier of the message inside the chat\n", + "name": "message_id", + "required": true + }, + { + "type": "User", + "description": "The user that changed the reaction, if the user isn't anonymous", + "html_description": "Optional. The user that changed the reaction, if the user isn't anonymous", + "rst_description": "*Optional*. The user that changed the reaction, if the user isn't anonymous\n", + "name": "user", + "required": false + }, + { + "type": "Chat", + "description": "The chat on behalf of which the reaction was changed, if the user is anonymous", + "html_description": "Optional. The chat on behalf of which the reaction was changed, if the user is anonymous", + "rst_description": "*Optional*. The chat on behalf of which the reaction was changed, if the user is anonymous\n", + "name": "actor_chat", + "required": false + }, + { + "type": "Integer", + "description": "Date of the change in Unix time", + "html_description": "Date of the change in Unix time", + "rst_description": "Date of the change in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "Array of ReactionType", + "description": "Previous list of reaction types that were set by the user", + "html_description": "Previous list of reaction types that were set by the user", + "rst_description": "Previous list of reaction types that were set by the user\n", + "name": "old_reaction", + "required": true + }, + { + "type": "Array of ReactionType", + "description": "New list of reaction types that have been set by the user", + "html_description": "New list of reaction types that have been set by the user", + "rst_description": "New list of reaction types that have been set by the user\n", + "name": "new_reaction", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MessageReactionUpdated/replace.yml b/.butcher/types/MessageReactionUpdated/replace.yml new file mode 100644 index 00000000..80c48d76 --- /dev/null +++ b/.butcher/types/MessageReactionUpdated/replace.yml @@ -0,0 +1,5 @@ +annotations: + date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/OrderInfo/entity.json b/.butcher/types/OrderInfo/entity.json new file mode 100644 index 00000000..42c6296b --- /dev/null +++ b/.butcher/types/OrderInfo/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "orderinfo", + "name": "OrderInfo", + "description": "This object represents information about an order.", + "html_description": "

This object represents information about an order.

", + "rst_description": "This object represents information about an order.", + "annotations": [ + { + "type": "String", + "description": "User name", + "html_description": "Optional. User name", + "rst_description": "*Optional*. User name\n", + "name": "name", + "required": false + }, + { + "type": "String", + "description": "User's phone number", + "html_description": "Optional. User's phone number", + "rst_description": "*Optional*. User's phone number\n", + "name": "phone_number", + "required": false + }, + { + "type": "String", + "description": "User email", + "html_description": "Optional. User email", + "rst_description": "*Optional*. User email\n", + "name": "email", + "required": false + }, + { + "type": "ShippingAddress", + "description": "User shipping address", + "html_description": "Optional. User shipping address", + "rst_description": "*Optional*. User shipping address\n", + "name": "shipping_address", + "required": false + } + ], + "category": "types" + } +} 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/PaidMedia/entity.json b/.butcher/types/PaidMedia/entity.json new file mode 100644 index 00000000..cce6bf8b --- /dev/null +++ b/.butcher/types/PaidMedia/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "paidmedia", + "name": "PaidMedia", + "description": "This object describes paid media. Currently, it can be one of\n - PaidMediaPreview\n - PaidMediaPhoto\n - PaidMediaVideo", + "html_description": "

This object describes paid media. Currently, it can be one of

", + "rst_description": "This object describes paid media. Currently, it can be one of\n\n - :class:`aiogram.types.paid_media_preview.PaidMediaPreview`\n - :class:`aiogram.types.paid_media_photo.PaidMediaPhoto`\n - :class:`aiogram.types.paid_media_video.PaidMediaVideo`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/PaidMedia/subtypes.yml b/.butcher/types/PaidMedia/subtypes.yml new file mode 100644 index 00000000..6756ad51 --- /dev/null +++ b/.butcher/types/PaidMedia/subtypes.yml @@ -0,0 +1 @@ +discriminator: "type" diff --git a/.butcher/types/PaidMediaInfo/entity.json b/.butcher/types/PaidMediaInfo/entity.json new file mode 100644 index 00000000..f4ed8526 --- /dev/null +++ b/.butcher/types/PaidMediaInfo/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "paidmediainfo", + "name": "PaidMediaInfo", + "description": "Describes the paid media added to a message.", + "html_description": "

Describes the paid media added to a message.

", + "rst_description": "Describes the paid media added to a message.", + "annotations": [ + { + "type": "Integer", + "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", + "name": "star_count", + "required": true + }, + { + "type": "Array of PaidMedia", + "description": "Information about the paid media", + "html_description": "Information about the paid media", + "rst_description": "Information about the paid media\n", + "name": "paid_media", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PaidMediaPhoto/entity.json b/.butcher/types/PaidMediaPhoto/entity.json new file mode 100644 index 00000000..a2a9ecab --- /dev/null +++ b/.butcher/types/PaidMediaPhoto/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "paidmediaphoto", + "name": "PaidMediaPhoto", + "description": "The paid media is a photo.", + "html_description": "

The paid media is a photo.

", + "rst_description": "The paid media is a photo.", + "annotations": [ + { + "type": "String", + "description": "Type of the paid media, always 'photo'", + "html_description": "Type of the paid media, always “photo”", + "rst_description": "Type of the paid media, always 'photo'\n", + "name": "type", + "required": true + }, + { + "type": "Array of PhotoSize", + "description": "The photo", + "html_description": "The photo", + "rst_description": "The photo\n", + "name": "photo", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PaidMediaPreview/entity.json b/.butcher/types/PaidMediaPreview/entity.json new file mode 100644 index 00000000..a54e137f --- /dev/null +++ b/.butcher/types/PaidMediaPreview/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "paidmediapreview", + "name": "PaidMediaPreview", + "description": "The paid media isn't available before the payment.", + "html_description": "

The paid media isn't available before the payment.

", + "rst_description": "The paid media isn't available before the payment.", + "annotations": [ + { + "type": "String", + "description": "Type of the paid media, always 'preview'", + "html_description": "Type of the paid media, always “preview”", + "rst_description": "Type of the paid media, always 'preview'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Media width as defined by the sender", + "html_description": "Optional. Media width as defined by the sender", + "rst_description": "*Optional*. Media width as defined by the sender\n", + "name": "width", + "required": false + }, + { + "type": "Integer", + "description": "Media height as defined by the sender", + "html_description": "Optional. Media height as defined by the sender", + "rst_description": "*Optional*. Media height as defined by the sender\n", + "name": "height", + "required": false + }, + { + "type": "Integer", + "description": "Duration of the media in seconds as defined by the sender", + "html_description": "Optional. Duration of the media in seconds as defined by the sender", + "rst_description": "*Optional*. Duration of the media in seconds as defined by the sender\n", + "name": "duration", + "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/PaidMediaVideo/entity.json b/.butcher/types/PaidMediaVideo/entity.json new file mode 100644 index 00000000..b4433d9d --- /dev/null +++ b/.butcher/types/PaidMediaVideo/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "paidmediavideo", + "name": "PaidMediaVideo", + "description": "The paid media is a video.", + "html_description": "

The paid media is a video.

", + "rst_description": "The paid media is a video.", + "annotations": [ + { + "type": "String", + "description": "Type of the paid media, always 'video'", + "html_description": "Type of the paid media, always “video”", + "rst_description": "Type of the paid media, always 'video'\n", + "name": "type", + "required": true + }, + { + "type": "Video", + "description": "The video", + "html_description": "The video", + "rst_description": "The video\n", + "name": "video", + "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/PassportData/entity.json b/.butcher/types/PassportData/entity.json new file mode 100644 index 00000000..2c01dc79 --- /dev/null +++ b/.butcher/types/PassportData/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportdata", + "name": "PassportData", + "description": "Describes Telegram Passport data shared with the bot by the user.", + "html_description": "

Describes Telegram Passport data shared with the bot by the user.

", + "rst_description": "Describes Telegram Passport data shared with the bot by the user.", + "annotations": [ + { + "type": "Array of EncryptedPassportElement", + "description": "Array with information about documents and other Telegram Passport elements that was shared with the bot", + "html_description": "Array with information about documents and other Telegram Passport elements that was shared with the bot", + "rst_description": "Array with information about documents and other Telegram Passport elements that was shared with the bot\n", + "name": "data", + "required": true + }, + { + "type": "EncryptedCredentials", + "description": "Encrypted credentials required to decrypt the data", + "html_description": "Encrypted credentials required to decrypt the data", + "rst_description": "Encrypted credentials required to decrypt the data\n", + "name": "credentials", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementError/entity.json b/.butcher/types/PassportElementError/entity.json new file mode 100644 index 00000000..3451e40c --- /dev/null +++ b/.butcher/types/PassportElementError/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerror", + "name": "PassportElementError", + "description": "This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:\n - PassportElementErrorDataField\n - PassportElementErrorFrontSide\n - PassportElementErrorReverseSide\n - PassportElementErrorSelfie\n - PassportElementErrorFile\n - PassportElementErrorFiles\n - PassportElementErrorTranslationFile\n - PassportElementErrorTranslationFiles\n - PassportElementErrorUnspecified", + "html_description": "

This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:

", + "rst_description": "This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:\n\n - :class:`aiogram.types.passport_element_error_data_field.PassportElementErrorDataField`\n - :class:`aiogram.types.passport_element_error_front_side.PassportElementErrorFrontSide`\n - :class:`aiogram.types.passport_element_error_reverse_side.PassportElementErrorReverseSide`\n - :class:`aiogram.types.passport_element_error_selfie.PassportElementErrorSelfie`\n - :class:`aiogram.types.passport_element_error_file.PassportElementErrorFile`\n - :class:`aiogram.types.passport_element_error_files.PassportElementErrorFiles`\n - :class:`aiogram.types.passport_element_error_translation_file.PassportElementErrorTranslationFile`\n - :class:`aiogram.types.passport_element_error_translation_files.PassportElementErrorTranslationFiles`\n - :class:`aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementError/replace.yml b/.butcher/types/PassportElementError/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/PassportElementError/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/PassportElementError/subtypes.yml b/.butcher/types/PassportElementError/subtypes.yml new file mode 100644 index 00000000..fd3f58ea --- /dev/null +++ b/.butcher/types/PassportElementError/subtypes.yml @@ -0,0 +1 @@ +discriminator: "source" diff --git a/.butcher/types/PassportElementErrorDataField/entity.json b/.butcher/types/PassportElementErrorDataField/entity.json new file mode 100644 index 00000000..1db574d9 --- /dev/null +++ b/.butcher/types/PassportElementErrorDataField/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrordatafield", + "name": "PassportElementErrorDataField", + "description": "Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.", + "html_description": "

Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.

", + "rst_description": "Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be data", + "html_description": "Error source, must be data", + "rst_description": "Error source, must be *data*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the error, one of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address'", + "html_description": "The section of the user's Telegram Passport which has the error, one of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”", + "rst_description": "The section of the user's Telegram Passport which has the error, one of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Name of the data field which has the error", + "html_description": "Name of the data field which has the error", + "rst_description": "Name of the data field which has the error\n", + "name": "field_name", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded data hash", + "html_description": "Base64-encoded data hash", + "rst_description": "Base64-encoded data hash\n", + "name": "data_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorFile/entity.json b/.butcher/types/PassportElementErrorFile/entity.json new file mode 100644 index 00000000..61e45072 --- /dev/null +++ b/.butcher/types/PassportElementErrorFile/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrorfile", + "name": "PassportElementErrorFile", + "description": "Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.", + "html_description": "

Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.

", + "rst_description": "Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be file", + "html_description": "Error source, must be file", + "rst_description": "Error source, must be *file*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded file hash", + "html_description": "Base64-encoded file hash", + "rst_description": "Base64-encoded file hash\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorFiles/entity.json b/.butcher/types/PassportElementErrorFiles/entity.json new file mode 100644 index 00000000..33856a8b --- /dev/null +++ b/.butcher/types/PassportElementErrorFiles/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrorfiles", + "name": "PassportElementErrorFiles", + "description": "Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.", + "html_description": "

Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.

", + "rst_description": "Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be files", + "html_description": "Error source, must be files", + "rst_description": "Error source, must be *files*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'\n", + "name": "type", + "required": true + }, + { + "type": "Array of String", + "description": "List of base64-encoded file hashes", + "html_description": "List of base64-encoded file hashes", + "rst_description": "List of base64-encoded file hashes\n", + "name": "file_hashes", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorFrontSide/entity.json b/.butcher/types/PassportElementErrorFrontSide/entity.json new file mode 100644 index 00000000..6b3d4bae --- /dev/null +++ b/.butcher/types/PassportElementErrorFrontSide/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrorfrontside", + "name": "PassportElementErrorFrontSide", + "description": "Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.", + "html_description": "

Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.

", + "rst_description": "Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be front_side", + "html_description": "Error source, must be front_side", + "rst_description": "Error source, must be *front_side*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded hash of the file with the front side of the document", + "html_description": "Base64-encoded hash of the file with the front side of the document", + "rst_description": "Base64-encoded hash of the file with the front side of the document\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorReverseSide/entity.json b/.butcher/types/PassportElementErrorReverseSide/entity.json new file mode 100644 index 00000000..804ab05c --- /dev/null +++ b/.butcher/types/PassportElementErrorReverseSide/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrorreverseside", + "name": "PassportElementErrorReverseSide", + "description": "Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.", + "html_description": "

Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.

", + "rst_description": "Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be reverse_side", + "html_description": "Error source, must be reverse_side", + "rst_description": "Error source, must be *reverse_side*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'driver_license', 'identity_card'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “driver_license”, “identity_card”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'driver_license', 'identity_card'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded hash of the file with the reverse side of the document", + "html_description": "Base64-encoded hash of the file with the reverse side of the document", + "rst_description": "Base64-encoded hash of the file with the reverse side of the document\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorSelfie/entity.json b/.butcher/types/PassportElementErrorSelfie/entity.json new file mode 100644 index 00000000..fa8dc591 --- /dev/null +++ b/.butcher/types/PassportElementErrorSelfie/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrorselfie", + "name": "PassportElementErrorSelfie", + "description": "Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.", + "html_description": "

Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.

", + "rst_description": "Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be selfie", + "html_description": "Error source, must be selfie", + "rst_description": "Error source, must be *selfie*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded hash of the file with the selfie", + "html_description": "Base64-encoded hash of the file with the selfie", + "rst_description": "Base64-encoded hash of the file with the selfie\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorTranslationFile/entity.json b/.butcher/types/PassportElementErrorTranslationFile/entity.json new file mode 100644 index 00000000..0253dfdd --- /dev/null +++ b/.butcher/types/PassportElementErrorTranslationFile/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrortranslationfile", + "name": "PassportElementErrorTranslationFile", + "description": "Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.", + "html_description": "

Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.

", + "rst_description": "Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be translation_file", + "html_description": "Error source, must be translation_file", + "rst_description": "Error source, must be *translation_file*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "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'", + "html_description": "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”", + "rst_description": "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'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded file hash", + "html_description": "Base64-encoded file hash", + "rst_description": "Base64-encoded file hash\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorTranslationFiles/entity.json b/.butcher/types/PassportElementErrorTranslationFiles/entity.json new file mode 100644 index 00000000..98ddf11d --- /dev/null +++ b/.butcher/types/PassportElementErrorTranslationFiles/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrortranslationfiles", + "name": "PassportElementErrorTranslationFiles", + "description": "Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.", + "html_description": "

Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.

", + "rst_description": "Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be translation_files", + "html_description": "Error source, must be translation_files", + "rst_description": "Error source, must be *translation_files*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "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'", + "html_description": "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”", + "rst_description": "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'\n", + "name": "type", + "required": true + }, + { + "type": "Array of String", + "description": "List of base64-encoded file hashes", + "html_description": "List of base64-encoded file hashes", + "rst_description": "List of base64-encoded file hashes\n", + "name": "file_hashes", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorUnspecified/entity.json b/.butcher/types/PassportElementErrorUnspecified/entity.json new file mode 100644 index 00000000..1116a924 --- /dev/null +++ b/.butcher/types/PassportElementErrorUnspecified/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrorunspecified", + "name": "PassportElementErrorUnspecified", + "description": "Represents an issue in an unspecified place. The error is considered resolved when new data is added.", + "html_description": "

Represents an issue in an unspecified place. The error is considered resolved when new data is added.

", + "rst_description": "Represents an issue in an unspecified place. The error is considered resolved when new data is added.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be unspecified", + "html_description": "Error source, must be unspecified", + "rst_description": "Error source, must be *unspecified*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "Type of element of the user's Telegram Passport which has the issue", + "html_description": "Type of element of the user's Telegram Passport which has the issue", + "rst_description": "Type of element of the user's Telegram Passport which has the issue\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded element hash", + "html_description": "Base64-encoded element hash", + "rst_description": "Base64-encoded element hash\n", + "name": "element_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportFile/entity.json b/.butcher/types/PassportFile/entity.json new file mode 100644 index 00000000..20b7f9c2 --- /dev/null +++ b/.butcher/types/PassportFile/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportfile", + "name": "PassportFile", + "description": "This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.", + "html_description": "

This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.

", + "rst_description": "This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.", + "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": "File size in bytes", + "html_description": "File size in bytes", + "rst_description": "File size in bytes\n", + "name": "file_size", + "required": true + }, + { + "type": "Integer", + "description": "Unix time when the file was uploaded", + "html_description": "Unix time when the file was uploaded", + "rst_description": "Unix time when the file was uploaded\n", + "name": "file_date", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportFile/replace.yml b/.butcher/types/PassportFile/replace.yml new file mode 100644 index 00000000..7a6af790 --- /dev/null +++ b/.butcher/types/PassportFile/replace.yml @@ -0,0 +1,5 @@ +annotations: + file_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/PhotoSize/entity.json b/.butcher/types/PhotoSize/entity.json new file mode 100644 index 00000000..5bf50009 --- /dev/null +++ b/.butcher/types/PhotoSize/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "photosize", + "name": "PhotoSize", + "description": "This object represents one size of a photo or a file / sticker thumbnail.", + "html_description": "

This object represents one size of a photo or a file / sticker thumbnail.

", + "rst_description": "This object represents one size of a photo or a `file `_ / :class:`aiogram.methods.sticker.Sticker` thumbnail.", + "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": "Photo width", + "html_description": "Photo width", + "rst_description": "Photo width\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Photo height", + "html_description": "Photo height", + "rst_description": "Photo height\n", + "name": "height", + "required": true + }, + { + "type": "Integer", + "description": "File size in bytes", + "html_description": "Optional. File size in bytes", + "rst_description": "*Optional*. File size in bytes\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Poll/entity.json b/.butcher/types/Poll/entity.json new file mode 100644 index 00000000..2c5ef7f1 --- /dev/null +++ b/.butcher/types/Poll/entity.json @@ -0,0 +1,165 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "poll", + "name": "Poll", + "description": "This object contains information about a poll.", + "html_description": "

This object contains information about a poll.

", + "rst_description": "This object contains information about a poll.", + "annotations": [ + { + "type": "String", + "description": "Unique poll identifier", + "html_description": "Unique poll identifier", + "rst_description": "Unique poll identifier\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Poll question, 1-300 characters", + "html_description": "Poll question, 1-300 characters", + "rst_description": "Poll question, 1-300 characters\n", + "name": "question", + "required": true + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions", + "html_description": "Optional. Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions", + "rst_description": "*Optional*. Special entities that appear in the *question*. Currently, only custom emoji entities are allowed in poll questions\n", + "name": "question_entities", + "required": false + }, + { + "type": "Array of PollOption", + "description": "List of poll options", + "html_description": "List of poll options", + "rst_description": "List of poll options\n", + "name": "options", + "required": true + }, + { + "type": "Integer", + "description": "Total number of users that voted in the poll", + "html_description": "Total number of users that voted in the poll", + "rst_description": "Total number of users that voted in the poll\n", + "name": "total_voter_count", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the poll is closed", + "html_description": "True, if the poll is closed", + "rst_description": ":code:`True`, if the poll is closed\n", + "name": "is_closed", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the poll is anonymous", + "html_description": "True, if the poll is anonymous", + "rst_description": ":code:`True`, if the poll is anonymous\n", + "name": "is_anonymous", + "required": true + }, + { + "type": "String", + "description": "Poll type, currently can be 'regular' or 'quiz'", + "html_description": "Poll type, currently can be “regular” or “quiz”", + "rst_description": "Poll type, currently can be 'regular' or 'quiz'\n", + "name": "type", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the poll allows multiple answers", + "html_description": "True, if the poll allows multiple answers", + "rst_description": ":code:`True`, if the poll allows multiple answers\n", + "name": "allows_multiple_answers", + "required": true + }, + { + "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 + }, + { + "type": "String", + "description": "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", + "html_description": "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", + "rst_description": "*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\n", + "name": "explanation", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "Special entities like usernames, URLs, bot commands, etc. that appear in the explanation", + "html_description": "Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation", + "rst_description": "*Optional*. Special entities like usernames, URLs, bot commands, etc. that appear in the *explanation*\n", + "name": "explanation_entities", + "required": false + }, + { + "type": "Integer", + "description": "Amount of time in seconds the poll will be active after creation", + "html_description": "Optional. Amount of time in seconds the poll will be active after creation", + "rst_description": "*Optional*. Amount of time in seconds the poll will be active after creation\n", + "name": "open_period", + "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the poll will be automatically closed", + "html_description": "Optional. Point in time (Unix timestamp) when the poll will be automatically closed", + "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/Poll/replace.yml b/.butcher/types/Poll/replace.yml new file mode 100644 index 00000000..fc4371b5 --- /dev/null +++ b/.butcher/types/Poll/replace.yml @@ -0,0 +1,5 @@ +annotations: + close_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/PollAnswer/entity.json b/.butcher/types/PollAnswer/entity.json new file mode 100644 index 00000000..b1e0007c --- /dev/null +++ b/.butcher/types/PollAnswer/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "pollanswer", + "name": "PollAnswer", + "description": "This object represents an answer of a user in a non-anonymous poll.", + "html_description": "

This object represents an answer of a user in a non-anonymous poll.

", + "rst_description": "This object represents an answer of a user in a non-anonymous poll.", + "annotations": [ + { + "type": "String", + "description": "Unique poll identifier", + "html_description": "Unique poll identifier", + "rst_description": "Unique poll identifier\n", + "name": "poll_id", + "required": true + }, + { + "type": "Chat", + "description": "The chat that changed the answer to the poll, if the voter is anonymous", + "html_description": "Optional. The chat that changed the answer to the poll, if the voter is anonymous", + "rst_description": "*Optional*. The chat that changed the answer to the poll, if the voter is anonymous\n", + "name": "voter_chat", + "required": false + }, + { + "type": "User", + "description": "The user that changed the answer to the poll, if the voter isn't anonymous", + "html_description": "Optional. The user that changed the answer to the poll, if the voter isn't anonymous", + "rst_description": "*Optional*. The user that changed the answer to the poll, if the voter isn't anonymous\n", + "name": "user", + "required": false + }, + { + "type": "Array of Integer", + "description": "0-based identifiers of chosen answer options. May be empty if the vote was retracted.", + "html_description": "0-based identifiers of chosen answer options. May be empty if the vote was retracted.", + "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 new file mode 100644 index 00000000..c592d13a --- /dev/null +++ b/.butcher/types/PollOption/entity.json @@ -0,0 +1,73 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "polloption", + "name": "PollOption", + "description": "This object contains information about one answer option in a poll.", + "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", + "html_description": "Option text, 1-100 characters", + "rst_description": "Option text, 1-100 characters\n", + "name": "text", + "required": true + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts", + "html_description": "Optional. Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts", + "rst_description": "*Optional*. Special entities that appear in the option *text*. Currently, only custom emoji entities are allowed in poll option texts\n", + "name": "text_entities", + "required": false + }, + { + "type": "Integer", + "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/PreCheckoutQuery/aliases.yml b/.butcher/types/PreCheckoutQuery/aliases.yml new file mode 100644 index 00000000..780f3bd1 --- /dev/null +++ b/.butcher/types/PreCheckoutQuery/aliases.yml @@ -0,0 +1,4 @@ +answer: + method: answerPreCheckoutQuery + fill: + pre_checkout_query_id: self.id diff --git a/.butcher/types/PreCheckoutQuery/entity.json b/.butcher/types/PreCheckoutQuery/entity.json new file mode 100644 index 00000000..a524fc5f --- /dev/null +++ b/.butcher/types/PreCheckoutQuery/entity.json @@ -0,0 +1,73 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "precheckoutquery", + "name": "PreCheckoutQuery", + "description": "This object contains information about an incoming pre-checkout query.", + "html_description": "

This object contains information about an incoming pre-checkout query.

", + "rst_description": "This object contains information about an incoming pre-checkout query.", + "annotations": [ + { + "type": "String", + "description": "Unique query identifier", + "html_description": "Unique query identifier", + "rst_description": "Unique query identifier\n", + "name": "id", + "required": true + }, + { + "type": "User", + "description": "User who sent the query", + "html_description": "User who sent the query", + "rst_description": "User who sent the query\n", + "name": "from", + "required": true + }, + { + "type": "String", + "description": "Three-letter ISO 4217 currency code, or 'XTR' for payments in Telegram Stars", + "html_description": "Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars", + "rst_description": "Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars `_\n", + "name": "currency", + "required": true + }, + { + "type": "Integer", + "description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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 price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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 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).\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": "Identifier of the shipping option chosen by the user", + "html_description": "Optional. Identifier of the shipping option chosen by the user", + "rst_description": "*Optional*. Identifier of the shipping option chosen by the user\n", + "name": "shipping_option_id", + "required": false + }, + { + "type": "OrderInfo", + "description": "Order information provided by the user", + "html_description": "Optional. Order information provided by the user", + "rst_description": "*Optional*. Order information provided by the user\n", + "name": "order_info", + "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/ProximityAlertTriggered/entity.json b/.butcher/types/ProximityAlertTriggered/entity.json new file mode 100644 index 00000000..ede85d2b --- /dev/null +++ b/.butcher/types/ProximityAlertTriggered/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "proximityalerttriggered", + "name": "ProximityAlertTriggered", + "description": "This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.", + "html_description": "

This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.

", + "rst_description": "This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.", + "annotations": [ + { + "type": "User", + "description": "User that triggered the alert", + "html_description": "User that triggered the alert", + "rst_description": "User that triggered the alert\n", + "name": "traveler", + "required": true + }, + { + "type": "User", + "description": "User that set the alert", + "html_description": "User that set the alert", + "rst_description": "User that set the alert\n", + "name": "watcher", + "required": true + }, + { + "type": "Integer", + "description": "The distance between the users", + "html_description": "The distance between the users", + "rst_description": "The distance between the users\n", + "name": "distance", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ReactionCount/entity.json b/.butcher/types/ReactionCount/entity.json new file mode 100644 index 00000000..fc57034b --- /dev/null +++ b/.butcher/types/ReactionCount/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "reactioncount", + "name": "ReactionCount", + "description": "Represents a reaction added to a message along with the number of times it was added.", + "html_description": "

Represents a reaction added to a message along with the number of times it was added.

", + "rst_description": "Represents a reaction added to a message along with the number of times it was added.", + "annotations": [ + { + "type": "ReactionType", + "description": "Type of the reaction", + "html_description": "Type of the reaction", + "rst_description": "Type of the reaction\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Number of times the reaction was added", + "html_description": "Number of times the reaction was added", + "rst_description": "Number of times the reaction was added\n", + "name": "total_count", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ReactionType/entity.json b/.butcher/types/ReactionType/entity.json new file mode 100644 index 00000000..8063b1a7 --- /dev/null +++ b/.butcher/types/ReactionType/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "reactiontype", + "name": "ReactionType", + "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/ReactionType/subtypes.yml b/.butcher/types/ReactionType/subtypes.yml new file mode 100644 index 00000000..6756ad51 --- /dev/null +++ b/.butcher/types/ReactionType/subtypes.yml @@ -0,0 +1 @@ +discriminator: "type" diff --git a/.butcher/types/ReactionTypeCustomEmoji/entity.json b/.butcher/types/ReactionTypeCustomEmoji/entity.json new file mode 100644 index 00000000..a146fa52 --- /dev/null +++ b/.butcher/types/ReactionTypeCustomEmoji/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "reactiontypecustomemoji", + "name": "ReactionTypeCustomEmoji", + "description": "The reaction is based on a custom emoji.", + "html_description": "

The reaction is based on a custom emoji.

", + "rst_description": "The reaction is based on a custom emoji.", + "annotations": [ + { + "type": "String", + "description": "Type of the reaction, always 'custom_emoji'", + "html_description": "Type of the reaction, always “custom_emoji”", + "rst_description": "Type of the reaction, always 'custom_emoji'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Custom emoji identifier", + "html_description": "Custom emoji identifier", + "rst_description": "Custom emoji identifier\n", + "name": "custom_emoji_id", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ReactionTypeEmoji/entity.json b/.butcher/types/ReactionTypeEmoji/entity.json new file mode 100644 index 00000000..263c779c --- /dev/null +++ b/.butcher/types/ReactionTypeEmoji/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "reactiontypeemoji", + "name": "ReactionTypeEmoji", + "description": "The reaction is based on an emoji.", + "html_description": "

The reaction is based on an emoji.

", + "rst_description": "The reaction is based on an emoji.", + "annotations": [ + { + "type": "String", + "description": "Type of the reaction, always 'emoji'", + "html_description": "Type of the reaction, always “emoji”", + "rst_description": "Type of the reaction, always 'emoji'\n", + "name": "type", + "required": true + }, + { + "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", + "name": "emoji", + "required": true + } + ], + "category": "types" + } +} 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/ReplyKeyboardMarkup/entity.json b/.butcher/types/ReplyKeyboardMarkup/entity.json new file mode 100644 index 00000000..23f83ec3 --- /dev/null +++ b/.butcher/types/ReplyKeyboardMarkup/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "replykeyboardmarkup", + "name": "ReplyKeyboardMarkup", + "description": "This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account.", + "html_description": "

This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account.

", + "rst_description": "This object represents a `custom keyboard `_ with reply options (see `Introduction to bots `_ for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account.", + "annotations": [ + { + "type": "Array of Array of KeyboardButton", + "description": "Array of button rows, each represented by an Array of KeyboardButton objects", + "html_description": "Array of button rows, each represented by an Array of KeyboardButton objects", + "rst_description": "Array of button rows, each represented by an Array of :class:`aiogram.types.keyboard_button.KeyboardButton` objects\n", + "name": "keyboard", + "required": true + }, + { + "type": "Boolean", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "is_persistent", + "required": false + }, + { + "type": "Boolean", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "resize_keyboard", + "required": false + }, + { + "type": "Boolean", + "description": "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.", + "html_description": "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.", + "rst_description": "*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*.\n", + "name": "one_time_keyboard", + "required": false + }, + { + "type": "String", + "description": "The placeholder to be shown in the input field when the keyboard is active; 1-64 characters", + "html_description": "Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters", + "rst_description": "*Optional*. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters\n", + "name": "input_field_placeholder", + "required": false + }, + { + "type": "Boolean", + "description": "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 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.\n\nExample: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.", + "html_description": "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 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.
\n
\nExample: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.", + "rst_description": "*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.\n\n\n\n*Example:* A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.\n", + "name": "selective", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ReplyKeyboardMarkup/replace.yml b/.butcher/types/ReplyKeyboardMarkup/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/ReplyKeyboardMarkup/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/ReplyKeyboardRemove/entity.json b/.butcher/types/ReplyKeyboardRemove/entity.json new file mode 100644 index 00000000..48f49840 --- /dev/null +++ b/.butcher/types/ReplyKeyboardRemove/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "replykeyboardremove", + "name": "ReplyKeyboardRemove", + "description": "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 ReplyKeyboardMarkup). Not supported in channels and for messages sent on behalf of a Telegram Business account.", + "html_description": "

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 ReplyKeyboardMarkup). Not supported in channels and for messages sent on behalf of a Telegram Business account.

", + "rst_description": "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`). Not supported in channels and for messages sent on behalf of a Telegram Business account.", + "annotations": [ + { + "type": "True", + "description": "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 ReplyKeyboardMarkup)", + "html_description": "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 ReplyKeyboardMarkup)", + "rst_description": "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`)\n", + "name": "remove_keyboard", + "required": true + }, + { + "type": "Boolean", + "description": "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 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.\n\nExample: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.", + "html_description": "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 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.
\n
\nExample: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.", + "rst_description": "*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.\n\n\n\n*Example:* A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.\n", + "name": "selective", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ReplyKeyboardRemove/replace.yml b/.butcher/types/ReplyKeyboardRemove/replace.yml new file mode 100644 index 00000000..9d23e3b1 --- /dev/null +++ b/.butcher/types/ReplyKeyboardRemove/replace.yml @@ -0,0 +1,5 @@ +bases: + - MutableTelegramObject +annotations: + remove_keyboard: + const: "True" diff --git a/.butcher/types/ReplyParameters/default.yml b/.butcher/types/ReplyParameters/default.yml new file mode 100644 index 00000000..e14c0b0b --- /dev/null +++ b/.butcher/types/ReplyParameters/default.yml @@ -0,0 +1,2 @@ +quote_parse_mode: parse_mode +allow_sending_without_reply: allow_sending_without_reply diff --git a/.butcher/types/ReplyParameters/entity.json b/.butcher/types/ReplyParameters/entity.json new file mode 100644 index 00000000..0d11d31a --- /dev/null +++ b/.butcher/types/ReplyParameters/entity.json @@ -0,0 +1,89 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "replyparameters", + "name": "ReplyParameters", + "description": "Describes reply parameters for the message that is being sent.", + "html_description": "

Describes reply parameters for the message that is being sent.

", + "rst_description": "Describes reply parameters for the message that is being sent.", + "annotations": [ + { + "type": "Integer", + "description": "Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified", + "html_description": "Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified", + "rst_description": "Identifier of the message that will be replied to in the current chat, or in the chat *chat_id* if it is specified\n", + "name": "message_id", + "required": true + }, + { + "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 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 + }, + { + "type": "Boolean", + "description": "Pass True if the message should be sent even if the specified message to be replied to is not found. Always False for replies in another chat or forum topic. Always True for messages sent on behalf of a business account.", + "html_description": "Optional. Pass True if the message should be sent even if the specified message to be replied to is not found. Always False for replies in another chat or forum topic. Always True for messages sent on behalf of a business account.", + "rst_description": "*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.\n", + "name": "allow_sending_without_reply", + "required": false + }, + { + "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, 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 + }, + { + "type": "String", + "description": "Mode for parsing entities in the quote. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the quote. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the quote. See `formatting options `_ for more details.\n", + "name": "quote_parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode.", + "html_description": "Optional. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode.", + "rst_description": "*Optional*. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of *quote_parse_mode*.\n", + "name": "quote_entities", + "required": false + }, + { + "type": "Integer", + "description": "Position of the quote in the original message in UTF-16 code units", + "html_description": "Optional. Position of the quote in the original message in UTF-16 code units", + "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/ResponseParameters/entity.json b/.butcher/types/ResponseParameters/entity.json new file mode 100644 index 00000000..02abbbad --- /dev/null +++ b/.butcher/types/ResponseParameters/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "responseparameters", + "name": "ResponseParameters", + "description": "Describes why a request was unsuccessful.", + "html_description": "

Describes why a request was unsuccessful.

", + "rst_description": "Describes why a request was unsuccessful.", + "annotations": [ + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "migrate_to_chat_id", + "required": false + }, + { + "type": "Integer", + "description": "In case of exceeding flood control, the number of seconds left to wait before the request can be repeated", + "html_description": "Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated", + "rst_description": "*Optional*. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated\n", + "name": "retry_after", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/RevenueWithdrawalState/entity.json b/.butcher/types/RevenueWithdrawalState/entity.json new file mode 100644 index 00000000..647f2684 --- /dev/null +++ b/.butcher/types/RevenueWithdrawalState/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "revenuewithdrawalstate", + "name": "RevenueWithdrawalState", + "description": "This object describes the state of a revenue withdrawal operation. Currently, it can be one of\n - RevenueWithdrawalStatePending\n - RevenueWithdrawalStateSucceeded\n - RevenueWithdrawalStateFailed", + "html_description": "

This object describes the state of a revenue withdrawal operation. Currently, it can be one of

", + "rst_description": "This object describes the state of a revenue withdrawal operation. Currently, it can be one of\n\n - :class:`aiogram.types.revenue_withdrawal_state_pending.RevenueWithdrawalStatePending`\n - :class:`aiogram.types.revenue_withdrawal_state_succeeded.RevenueWithdrawalStateSucceeded`\n - :class:`aiogram.types.revenue_withdrawal_state_failed.RevenueWithdrawalStateFailed`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/RevenueWithdrawalState/subtypes.yml b/.butcher/types/RevenueWithdrawalState/subtypes.yml new file mode 100644 index 00000000..6756ad51 --- /dev/null +++ b/.butcher/types/RevenueWithdrawalState/subtypes.yml @@ -0,0 +1 @@ +discriminator: "type" diff --git a/.butcher/types/RevenueWithdrawalStateFailed/entity.json b/.butcher/types/RevenueWithdrawalStateFailed/entity.json new file mode 100644 index 00000000..bcf914e3 --- /dev/null +++ b/.butcher/types/RevenueWithdrawalStateFailed/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "revenuewithdrawalstatefailed", + "name": "RevenueWithdrawalStateFailed", + "description": "The withdrawal failed and the transaction was refunded.", + "html_description": "

The withdrawal failed and the transaction was refunded.

", + "rst_description": "The withdrawal failed and the transaction was refunded.", + "annotations": [ + { + "type": "String", + "description": "Type of the state, always 'failed'", + "html_description": "Type of the state, always “failed”", + "rst_description": "Type of the state, always 'failed'\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/RevenueWithdrawalStatePending/entity.json b/.butcher/types/RevenueWithdrawalStatePending/entity.json new file mode 100644 index 00000000..99e8dc90 --- /dev/null +++ b/.butcher/types/RevenueWithdrawalStatePending/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "revenuewithdrawalstatepending", + "name": "RevenueWithdrawalStatePending", + "description": "The withdrawal is in progress.", + "html_description": "

The withdrawal is in progress.

", + "rst_description": "The withdrawal is in progress.", + "annotations": [ + { + "type": "String", + "description": "Type of the state, always 'pending'", + "html_description": "Type of the state, always “pending”", + "rst_description": "Type of the state, always 'pending'\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/RevenueWithdrawalStateSucceeded/entity.json b/.butcher/types/RevenueWithdrawalStateSucceeded/entity.json new file mode 100644 index 00000000..2c6888d6 --- /dev/null +++ b/.butcher/types/RevenueWithdrawalStateSucceeded/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "revenuewithdrawalstatesucceeded", + "name": "RevenueWithdrawalStateSucceeded", + "description": "The withdrawal succeeded.", + "html_description": "

The withdrawal succeeded.

", + "rst_description": "The withdrawal succeeded.", + "annotations": [ + { + "type": "String", + "description": "Type of the state, always 'succeeded'", + "html_description": "Type of the state, always “succeeded”", + "rst_description": "Type of the state, always 'succeeded'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Date the withdrawal was completed in Unix time", + "html_description": "Date the withdrawal was completed in Unix time", + "rst_description": "Date the withdrawal was completed in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "String", + "description": "An HTTPS URL that can be used to see transaction details", + "html_description": "An HTTPS URL that can be used to see transaction details", + "rst_description": "An HTTPS URL that can be used to see transaction details\n", + "name": "url", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/RevenueWithdrawalStateSucceeded/replace.yml b/.butcher/types/RevenueWithdrawalStateSucceeded/replace.yml new file mode 100644 index 00000000..80c48d76 --- /dev/null +++ b/.butcher/types/RevenueWithdrawalStateSucceeded/replace.yml @@ -0,0 +1,5 @@ +annotations: + date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/SentWebAppMessage/entity.json b/.butcher/types/SentWebAppMessage/entity.json new file mode 100644 index 00000000..1960264d --- /dev/null +++ b/.butcher/types/SentWebAppMessage/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "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" + } +} diff --git a/.butcher/types/SharedUser/entity.json b/.butcher/types/SharedUser/entity.json new file mode 100644 index 00000000..af99a0b4 --- /dev/null +++ b/.butcher/types/SharedUser/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "shareduser", + "name": "SharedUser", + "description": "This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button.", + "html_description": "

This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button.

", + "rst_description": "This object contains information about a user that was shared with the bot using a :class:`aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers` button.", + "annotations": [ + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "user_id", + "required": true + }, + { + "type": "String", + "description": "First name of the user, if the name was requested by the bot", + "html_description": "Optional. First name of the user, if the name was requested by the bot", + "rst_description": "*Optional*. First name of the user, if the name was requested by the bot\n", + "name": "first_name", + "required": false + }, + { + "type": "String", + "description": "Last name of the user, if the name was requested by the bot", + "html_description": "Optional. Last name of the user, if the name was requested by the bot", + "rst_description": "*Optional*. Last name of the user, if the name was requested by the bot\n", + "name": "last_name", + "required": false + }, + { + "type": "String", + "description": "Username of the user, if the username was requested by the bot", + "html_description": "Optional. Username of the user, if the username was requested by the bot", + "rst_description": "*Optional*. Username of the user, if the username was requested by the bot\n", + "name": "username", + "required": false + }, + { + "type": "Array of PhotoSize", + "description": "Available sizes of the chat photo, if the photo was requested by the bot", + "html_description": "Optional. Available sizes of the chat photo, if the photo was requested by the bot", + "rst_description": "*Optional*. Available sizes of the chat photo, if the photo was requested by the bot\n", + "name": "photo", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ShippingAddress/entity.json b/.butcher/types/ShippingAddress/entity.json new file mode 100644 index 00000000..6f5263da --- /dev/null +++ b/.butcher/types/ShippingAddress/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "shippingaddress", + "name": "ShippingAddress", + "description": "This object represents a shipping address.", + "html_description": "

This object represents a shipping address.

", + "rst_description": "This object represents a shipping address.", + "annotations": [ + { + "type": "String", + "description": "Two-letter ISO 3166-1 alpha-2 country code", + "html_description": "Two-letter ISO 3166-1 alpha-2 country code", + "rst_description": "Two-letter `ISO 3166-1 alpha-2 `_ country code\n", + "name": "country_code", + "required": true + }, + { + "type": "String", + "description": "State, if applicable", + "html_description": "State, if applicable", + "rst_description": "State, if applicable\n", + "name": "state", + "required": true + }, + { + "type": "String", + "description": "City", + "html_description": "City", + "rst_description": "City\n", + "name": "city", + "required": true + }, + { + "type": "String", + "description": "First line for the address", + "html_description": "First line for the address", + "rst_description": "First line for the address\n", + "name": "street_line1", + "required": true + }, + { + "type": "String", + "description": "Second line for the address", + "html_description": "Second line for the address", + "rst_description": "Second line for the address\n", + "name": "street_line2", + "required": true + }, + { + "type": "String", + "description": "Address post code", + "html_description": "Address post code", + "rst_description": "Address post code\n", + "name": "post_code", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ShippingOption/entity.json b/.butcher/types/ShippingOption/entity.json new file mode 100644 index 00000000..5288408c --- /dev/null +++ b/.butcher/types/ShippingOption/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "shippingoption", + "name": "ShippingOption", + "description": "This object represents one shipping option.", + "html_description": "

This object represents one shipping option.

", + "rst_description": "This object represents one shipping option.", + "annotations": [ + { + "type": "String", + "description": "Shipping option identifier", + "html_description": "Shipping option identifier", + "rst_description": "Shipping option identifier\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Option title", + "html_description": "Option title", + "rst_description": "Option title\n", + "name": "title", + "required": true + }, + { + "type": "Array of LabeledPrice", + "description": "List of price portions", + "html_description": "List of price portions", + "rst_description": "List of price portions\n", + "name": "prices", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ShippingQuery/aliases.yml b/.butcher/types/ShippingQuery/aliases.yml new file mode 100644 index 00000000..7fb73655 --- /dev/null +++ b/.butcher/types/ShippingQuery/aliases.yml @@ -0,0 +1,4 @@ +answer: + method: answerShippingQuery + fill: + shipping_query_id: self.id diff --git a/.butcher/types/ShippingQuery/entity.json b/.butcher/types/ShippingQuery/entity.json new file mode 100644 index 00000000..4d6cd4f1 --- /dev/null +++ b/.butcher/types/ShippingQuery/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "shippingquery", + "name": "ShippingQuery", + "description": "This object contains information about an incoming shipping query.", + "html_description": "

This object contains information about an incoming shipping query.

", + "rst_description": "This object contains information about an incoming shipping query.", + "annotations": [ + { + "type": "String", + "description": "Unique query identifier", + "html_description": "Unique query identifier", + "rst_description": "Unique query identifier\n", + "name": "id", + "required": true + }, + { + "type": "User", + "description": "User who sent the query", + "html_description": "User who sent the query", + "rst_description": "User who sent the query\n", + "name": "from", + "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": "ShippingAddress", + "description": "User specified shipping address", + "html_description": "User specified shipping address", + "rst_description": "User specified shipping address\n", + "name": "shipping_address", + "required": true + } + ], + "category": "types" + } +} 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 new file mode 100644 index 00000000..7c4dd49b --- /dev/null +++ b/.butcher/types/StarTransaction/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "startransaction", + "name": "StarTransaction", + "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 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": "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", + "html_description": "Date the transaction was created in Unix time", + "rst_description": "Date the transaction was created in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "TransactionPartner", + "description": "Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions", + "html_description": "Optional. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions", + "rst_description": "*Optional*. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions\n", + "name": "source", + "required": false + }, + { + "type": "TransactionPartner", + "description": "Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions", + "html_description": "Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions", + "rst_description": "*Optional*. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions\n", + "name": "receiver", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/StarTransaction/replace.yml b/.butcher/types/StarTransaction/replace.yml new file mode 100644 index 00000000..80c48d76 --- /dev/null +++ b/.butcher/types/StarTransaction/replace.yml @@ -0,0 +1,5 @@ +annotations: + date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/StarTransactions/entity.json b/.butcher/types/StarTransactions/entity.json new file mode 100644 index 00000000..a3983697 --- /dev/null +++ b/.butcher/types/StarTransactions/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "startransactions", + "name": "StarTransactions", + "description": "Contains a list of Telegram Star transactions.", + "html_description": "

Contains a list of Telegram Star transactions.

", + "rst_description": "Contains a list of Telegram Star transactions.", + "annotations": [ + { + "type": "Array of StarTransaction", + "description": "The list of transactions", + "html_description": "The list of transactions", + "rst_description": "The list of transactions\n", + "name": "transactions", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Sticker/aliases.yml b/.butcher/types/Sticker/aliases.yml new file mode 100644 index 00000000..c02126fe --- /dev/null +++ b/.butcher/types/Sticker/aliases.yml @@ -0,0 +1,8 @@ +set_position_in_set: + method: setStickerPositionInSet + fill: &set-target + sticker: self.file_id + +delete_from_set: + method: deleteStickerFromSet + fill: *set-target diff --git a/.butcher/types/Sticker/entity.json b/.butcher/types/Sticker/entity.json new file mode 100644 index 00000000..702f84e5 --- /dev/null +++ b/.butcher/types/Sticker/entity.json @@ -0,0 +1,137 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "sticker", + "name": "Sticker", + "description": "This object represents a sticker.", + "html_description": "

This object represents a sticker.

", + "rst_description": "This object represents a sticker.", + "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": "String", + "description": "Type of the sticker, currently one of 'regular', 'mask', 'custom_emoji'. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video.", + "html_description": "Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video.", + "rst_description": "Type of the sticker, currently one of 'regular', 'mask', 'custom_emoji'. The type of the sticker is independent from its format, which is determined by the fields *is_animated* and *is_video*.\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Sticker width", + "html_description": "Sticker width", + "rst_description": "Sticker width\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Sticker height", + "html_description": "Sticker height", + "rst_description": "Sticker height\n", + "name": "height", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the sticker is animated", + "html_description": "True, if the sticker is animated", + "rst_description": ":code:`True`, if the sticker is `animated `_\n", + "name": "is_animated", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the sticker is a video sticker", + "html_description": "True, if the sticker is a video sticker", + "rst_description": ":code:`True`, if the sticker is a `video sticker `_\n", + "name": "is_video", + "required": true + }, + { + "type": "PhotoSize", + "description": "Sticker thumbnail in the .WEBP or .JPG format", + "html_description": "Optional. Sticker thumbnail in the .WEBP or .JPG format", + "rst_description": "*Optional*. Sticker thumbnail in the .WEBP or .JPG format\n", + "name": "thumbnail", + "required": false + }, + { + "type": "String", + "description": "Emoji associated with the sticker", + "html_description": "Optional. Emoji associated with the sticker", + "rst_description": "*Optional*. Emoji associated with the sticker\n", + "name": "emoji", + "required": false + }, + { + "type": "String", + "description": "Name of the sticker set to which the sticker belongs", + "html_description": "Optional. Name of the sticker set to which the sticker belongs", + "rst_description": "*Optional*. Name of the sticker set to which the sticker belongs\n", + "name": "set_name", + "required": false + }, + { + "type": "File", + "description": "For premium regular stickers, premium animation for the sticker", + "html_description": "Optional. For premium regular stickers, premium animation for the sticker", + "rst_description": "*Optional*. For premium regular stickers, premium animation for the sticker\n", + "name": "premium_animation", + "required": false + }, + { + "type": "MaskPosition", + "description": "For mask stickers, the position where the mask should be placed", + "html_description": "Optional. For mask stickers, the position where the mask should be placed", + "rst_description": "*Optional*. For mask stickers, the position where the mask should be placed\n", + "name": "mask_position", + "required": false + }, + { + "type": "String", + "description": "For custom emoji stickers, unique identifier of the custom emoji", + "html_description": "Optional. For custom emoji stickers, unique identifier of the custom emoji", + "rst_description": "*Optional*. For custom emoji stickers, unique identifier of the custom emoji\n", + "name": "custom_emoji_id", + "required": false + }, + { + "type": "True", + "description": "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", + "html_description": "Optional. 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", + "rst_description": "*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\n", + "name": "needs_repainting", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes", + "html_description": "Optional. File size in bytes", + "rst_description": "*Optional*. File size in bytes\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/StickerSet/entity.json b/.butcher/types/StickerSet/entity.json new file mode 100644 index 00000000..e9c1fe5b --- /dev/null +++ b/.butcher/types/StickerSet/entity.json @@ -0,0 +1,81 @@ +{ + "meta": {}, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "stickerset", + "name": "StickerSet", + "description": "This object represents a sticker set.", + "html_description": "

This object represents a sticker set.

", + "rst_description": "This object represents a sticker set.", + "annotations": [ + { + "type": "String", + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name", + "required": true + }, + { + "type": "String", + "description": "Sticker set title", + "html_description": "Sticker set title", + "rst_description": "Sticker set title\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Type of stickers in the set, currently one of 'regular', 'mask', 'custom_emoji'", + "html_description": "Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji”", + "rst_description": "Type of stickers in the set, currently one of 'regular', 'mask', 'custom_emoji'\n", + "name": "sticker_type", + "required": true + }, + { + "type": "Array of Sticker", + "description": "List of all set stickers", + "html_description": "List of all set stickers", + "rst_description": "List of all set stickers\n", + "name": "stickers", + "required": true + }, + { + "type": "PhotoSize", + "description": "Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format", + "html_description": "Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format", + "rst_description": "*Optional*. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format\n", + "name": "thumbnail", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the sticker set contains animated stickers", + "html_description": "True, if the sticker set contains animated stickers", + "rst_description": ":code:`True`, if the sticker set contains `animated stickers `_\n", + "name": "is_animated", + "required": false, + "deprecated": { + "version": "7.2", + "release_date": "2024-03-31" + } + }, + { + "type": "Boolean", + "description": "True, if the sticker set contains video stickers", + "html_description": "True, if the sticker set contains video stickers", + "rst_description": ":code:`True`, if the sticker set contains `video stickers `_\n", + "name": "is_video", + "required": false, + "deprecated": { + "version": "7.2", + "release_date": "2024-03-31" + } + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Story/entity.json b/.butcher/types/Story/entity.json new file mode 100644 index 00000000..e5eb1451 --- /dev/null +++ b/.butcher/types/Story/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "story", + "name": "Story", + "description": "This object represents a story.", + "html_description": "

This object represents a story.

", + "rst_description": "This object represents a story.", + "annotations": [ + { + "type": "Chat", + "description": "Chat that posted the story", + "html_description": "Chat that posted the story", + "rst_description": "Chat that posted the story\n", + "name": "chat", + "required": true + }, + { + "type": "Integer", + "description": "Unique identifier for the story in the chat", + "html_description": "Unique identifier for the story in the chat", + "rst_description": "Unique identifier for the story in the chat\n", + "name": "id", + "required": true + } + ], + "category": "types" + } +} 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 new file mode 100644 index 00000000..4dabc153 --- /dev/null +++ b/.butcher/types/SuccessfulPayment/entity.json @@ -0,0 +1,97 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "successfulpayment", + "name": "SuccessfulPayment", + "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", + "description": "Three-letter ISO 4217 currency code, or 'XTR' for payments in Telegram Stars", + "html_description": "Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars", + "rst_description": "Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars `_\n", + "name": "currency", + "required": true + }, + { + "type": "Integer", + "description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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 price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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 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).\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": "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", + "html_description": "Optional. Identifier of the shipping option chosen by the user", + "rst_description": "*Optional*. Identifier of the shipping option chosen by the user\n", + "name": "shipping_option_id", + "required": false + }, + { + "type": "OrderInfo", + "description": "Order information provided by the user", + "html_description": "Optional. Order information provided by the user", + "rst_description": "*Optional*. Order information provided by the user\n", + "name": "order_info", + "required": false + }, + { + "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": "Provider payment identifier", + "rst_description": "Provider payment identifier\n", + "name": "provider_payment_charge_id", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/SuggestedPostApprovalFailed/entity.json b/.butcher/types/SuggestedPostApprovalFailed/entity.json new file mode 100644 index 00000000..d5d8bd6b --- /dev/null +++ b/.butcher/types/SuggestedPostApprovalFailed/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "suggestedpostapprovalfailed", + "name": "SuggestedPostApprovalFailed", + "description": "Describes a service message about the failed approval of a suggested post. Currently, only caused by insufficient user funds at the time of approval.", + "html_description": "

Describes a service message about the failed approval of a suggested post. Currently, only caused by insufficient user funds at the time of approval.

", + "rst_description": "Describes a service message about the failed approval of a suggested post. Currently, only caused by insufficient user funds at the time of approval.", + "annotations": [ + { + "type": "Message", + "description": "Message containing the suggested post whose approval has failed. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "html_description": "Optional. Message containing the suggested post whose approval has failed. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "rst_description": "*Optional*. Message containing the suggested post whose approval has failed. Note that the :class:`aiogram.types.message.Message` object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n", + "name": "suggested_post_message", + "required": false + }, + { + "type": "SuggestedPostPrice", + "description": "Expected price of the post", + "html_description": "Expected price of the post", + "rst_description": "Expected price of the post\n", + "name": "price", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/SuggestedPostApproved/entity.json b/.butcher/types/SuggestedPostApproved/entity.json new file mode 100644 index 00000000..3472ad3b --- /dev/null +++ b/.butcher/types/SuggestedPostApproved/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "suggestedpostapproved", + "name": "SuggestedPostApproved", + "description": "Describes a service message about the approval of a suggested post.", + "html_description": "

Describes a service message about the approval of a suggested post.

", + "rst_description": "Describes a service message about the approval of a suggested post.", + "annotations": [ + { + "type": "Message", + "description": "Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "html_description": "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "rst_description": "*Optional*. Message containing the suggested post. Note that the :class:`aiogram.types.message.Message` object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n", + "name": "suggested_post_message", + "required": false + }, + { + "type": "SuggestedPostPrice", + "description": "Amount paid for the post", + "html_description": "Optional. Amount paid for the post", + "rst_description": "*Optional*. Amount paid for the post\n", + "name": "price", + "required": false + }, + { + "type": "Integer", + "description": "Date when the post will be published", + "html_description": "Date when the post will be published", + "rst_description": "Date when the post will be published\n", + "name": "send_date", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/SuggestedPostApproved/replace.yml b/.butcher/types/SuggestedPostApproved/replace.yml new file mode 100644 index 00000000..26ef9ec3 --- /dev/null +++ b/.butcher/types/SuggestedPostApproved/replace.yml @@ -0,0 +1,5 @@ +annotations: + send_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/SuggestedPostDeclined/entity.json b/.butcher/types/SuggestedPostDeclined/entity.json new file mode 100644 index 00000000..c1426421 --- /dev/null +++ b/.butcher/types/SuggestedPostDeclined/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "suggestedpostdeclined", + "name": "SuggestedPostDeclined", + "description": "Describes a service message about the rejection of a suggested post.", + "html_description": "

Describes a service message about the rejection of a suggested post.

", + "rst_description": "Describes a service message about the rejection of a suggested post.", + "annotations": [ + { + "type": "Message", + "description": "Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "html_description": "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "rst_description": "*Optional*. Message containing the suggested post. Note that the :class:`aiogram.types.message.Message` object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n", + "name": "suggested_post_message", + "required": false + }, + { + "type": "String", + "description": "Comment with which the post was declined", + "html_description": "Optional. Comment with which the post was declined", + "rst_description": "*Optional*. Comment with which the post was declined\n", + "name": "comment", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/SuggestedPostInfo/entity.json b/.butcher/types/SuggestedPostInfo/entity.json new file mode 100644 index 00000000..0a26de70 --- /dev/null +++ b/.butcher/types/SuggestedPostInfo/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "suggestedpostinfo", + "name": "SuggestedPostInfo", + "description": "Contains information about a suggested post.", + "html_description": "

Contains information about a suggested post.

", + "rst_description": "Contains information about a suggested post.", + "annotations": [ + { + "type": "String", + "description": "State of the suggested post. Currently, it can be one of 'pending', 'approved', 'declined'.", + "html_description": "State of the suggested post. Currently, it can be one of “pending”, “approved”, “declined”.", + "rst_description": "State of the suggested post. Currently, it can be one of 'pending', 'approved', 'declined'.\n", + "name": "state", + "required": true + }, + { + "type": "SuggestedPostPrice", + "description": "Proposed price of the post. If the field is omitted, then the post is unpaid.", + "html_description": "Optional. Proposed price of the post. If the field is omitted, then the post is unpaid.", + "rst_description": "*Optional*. Proposed price of the post. If the field is omitted, then the post is unpaid.\n", + "name": "price", + "required": false + }, + { + "type": "Integer", + "description": "Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it.", + "html_description": "Optional. Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it.", + "rst_description": "*Optional*. Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it.\n", + "name": "send_date", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/SuggestedPostInfo/replace.yml b/.butcher/types/SuggestedPostInfo/replace.yml new file mode 100644 index 00000000..26ef9ec3 --- /dev/null +++ b/.butcher/types/SuggestedPostInfo/replace.yml @@ -0,0 +1,5 @@ +annotations: + send_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/SuggestedPostPaid/entity.json b/.butcher/types/SuggestedPostPaid/entity.json new file mode 100644 index 00000000..9cdb2143 --- /dev/null +++ b/.butcher/types/SuggestedPostPaid/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "suggestedpostpaid", + "name": "SuggestedPostPaid", + "description": "Describes a service message about a successful payment for a suggested post.", + "html_description": "

Describes a service message about a successful payment for a suggested post.

", + "rst_description": "Describes a service message about a successful payment for a suggested post.", + "annotations": [ + { + "type": "Message", + "description": "Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "html_description": "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "rst_description": "*Optional*. Message containing the suggested post. Note that the :class:`aiogram.types.message.Message` object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n", + "name": "suggested_post_message", + "required": false + }, + { + "type": "String", + "description": "Currency in which the payment was made. Currently, one of 'XTR' for Telegram Stars or 'TON' for toncoins", + "html_description": "Currency in which the payment was made. Currently, one of “XTR” for Telegram Stars or “TON” for toncoins", + "rst_description": "Currency in which the payment was made. Currently, one of 'XTR' for Telegram Stars or 'TON' for toncoins\n", + "name": "currency", + "required": true + }, + { + "type": "Integer", + "description": "The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only", + "html_description": "Optional. The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only", + "rst_description": "*Optional*. The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only\n", + "name": "amount", + "required": false + }, + { + "type": "StarAmount", + "description": "The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only", + "html_description": "Optional. The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only", + "rst_description": "*Optional*. The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only\n", + "name": "star_amount", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/SuggestedPostParameters/entity.json b/.butcher/types/SuggestedPostParameters/entity.json new file mode 100644 index 00000000..a4d49f98 --- /dev/null +++ b/.butcher/types/SuggestedPostParameters/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "suggestedpostparameters", + "name": "SuggestedPostParameters", + "description": "Contains parameters of a post that is being suggested by the bot.", + "html_description": "

Contains parameters of a post that is being suggested by the bot.

", + "rst_description": "Contains parameters of a post that is being suggested by the bot.", + "annotations": [ + { + "type": "SuggestedPostPrice", + "description": "Proposed price for the post. If the field is omitted, then the post is unpaid.", + "html_description": "Optional. Proposed price for the post. If the field is omitted, then the post is unpaid.", + "rst_description": "*Optional*. Proposed price for the post. If the field is omitted, then the post is unpaid.\n", + "name": "price", + "required": false + }, + { + "type": "Integer", + "description": "Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it.", + "html_description": "Optional. Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it.", + "rst_description": "*Optional*. Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it.\n", + "name": "send_date", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/SuggestedPostParameters/replace.yml b/.butcher/types/SuggestedPostParameters/replace.yml new file mode 100644 index 00000000..26ef9ec3 --- /dev/null +++ b/.butcher/types/SuggestedPostParameters/replace.yml @@ -0,0 +1,5 @@ +annotations: + send_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/SuggestedPostPrice/entity.json b/.butcher/types/SuggestedPostPrice/entity.json new file mode 100644 index 00000000..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 new file mode 100644 index 00000000..08cf6edf --- /dev/null +++ b/.butcher/types/SwitchInlineQueryChosenChat/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "switchinlinequerychosenchat", + "name": "SwitchInlineQueryChosenChat", + "description": "This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.", + "html_description": "

This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.

", + "rst_description": "This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.", + "annotations": [ + { + "type": "String", + "description": "The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted", + "html_description": "Optional. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted", + "rst_description": "*Optional*. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted\n", + "name": "query", + "required": false + }, + { + "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*. :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*. :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*. :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*. :code:`True`, if channel chats can be chosen\n", + "name": "allow_channel_chats", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/TextQuote/entity.json b/.butcher/types/TextQuote/entity.json new file mode 100644 index 00000000..26b587e9 --- /dev/null +++ b/.butcher/types/TextQuote/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "textquote", + "name": "TextQuote", + "description": "This object contains information about the quoted part of a message that is replied to by the given message.", + "html_description": "

This object contains information about the quoted part of a message that is replied to by the given message.

", + "rst_description": "This object contains information about the quoted part of a message that is replied to by the given message.", + "annotations": [ + { + "type": "String", + "description": "Text of the quoted part of a message that is replied to by the given message", + "html_description": "Text of the quoted part of a message that is replied to by the given message", + "rst_description": "Text of the quoted part of a message that is replied to by the given message\n", + "name": "text", + "required": true + }, + { + "type": "Array of MessageEntity", + "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 + }, + { + "type": "Integer", + "description": "Approximate quote position in the original message in UTF-16 code units as specified by the sender", + "html_description": "Approximate quote position in the original message in UTF-16 code units as specified by the sender", + "rst_description": "Approximate quote position in the original message in UTF-16 code units as specified by the sender\n", + "name": "position", + "required": true + }, + { + "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*. :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 + } + ], + "category": "types" + } +} diff --git a/.butcher/types/TransactionPartner/entity.json b/.butcher/types/TransactionPartner/entity.json new file mode 100644 index 00000000..0216005e --- /dev/null +++ b/.butcher/types/TransactionPartner/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "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 - 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/TransactionPartner/subtypes.yml b/.butcher/types/TransactionPartner/subtypes.yml new file mode 100644 index 00000000..6756ad51 --- /dev/null +++ b/.butcher/types/TransactionPartner/subtypes.yml @@ -0,0 +1 @@ +discriminator: "type" 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/TransactionPartnerFragment/entity.json b/.butcher/types/TransactionPartnerFragment/entity.json new file mode 100644 index 00000000..e4964bd4 --- /dev/null +++ b/.butcher/types/TransactionPartnerFragment/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "transactionpartnerfragment", + "name": "TransactionPartnerFragment", + "description": "Describes a withdrawal transaction with Fragment.", + "html_description": "

Describes a withdrawal transaction with Fragment.

", + "rst_description": "Describes a withdrawal transaction with Fragment.", + "annotations": [ + { + "type": "String", + "description": "Type of the transaction partner, always 'fragment'", + "html_description": "Type of the transaction partner, always “fragment”", + "rst_description": "Type of the transaction partner, always 'fragment'\n", + "name": "type", + "required": true + }, + { + "type": "RevenueWithdrawalState", + "description": "State of the transaction if the transaction is outgoing", + "html_description": "Optional. State of the transaction if the transaction is outgoing", + "rst_description": "*Optional*. State of the transaction if the transaction is outgoing\n", + "name": "withdrawal_state", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/TransactionPartnerOther/entity.json b/.butcher/types/TransactionPartnerOther/entity.json new file mode 100644 index 00000000..203cd32a --- /dev/null +++ b/.butcher/types/TransactionPartnerOther/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "transactionpartnerother", + "name": "TransactionPartnerOther", + "description": "Describes a transaction with an unknown source or recipient.", + "html_description": "

Describes a transaction with an unknown source or recipient.

", + "rst_description": "Describes a transaction with an unknown source or recipient.", + "annotations": [ + { + "type": "String", + "description": "Type of the transaction partner, always 'other'", + "html_description": "Type of the transaction partner, always “other”", + "rst_description": "Type of the transaction partner, always 'other'\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/TransactionPartnerTelegramAds/entity.json b/.butcher/types/TransactionPartnerTelegramAds/entity.json new file mode 100644 index 00000000..2af27d5c --- /dev/null +++ b/.butcher/types/TransactionPartnerTelegramAds/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "transactionpartnertelegramads", + "name": "TransactionPartnerTelegramAds", + "description": "Describes a withdrawal transaction to the Telegram Ads platform.", + "html_description": "

Describes a withdrawal transaction to the Telegram Ads platform.

", + "rst_description": "Describes a withdrawal transaction to the Telegram Ads platform.", + "annotations": [ + { + "type": "String", + "description": "Type of the transaction partner, always 'telegram_ads'", + "html_description": "Type of the transaction partner, always “telegram_ads”", + "rst_description": "Type of the transaction partner, always 'telegram_ads'\n", + "name": "type", + "required": true + } + ], + "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 new file mode 100644 index 00000000..83ef4671 --- /dev/null +++ b/.butcher/types/TransactionPartnerUser/entity.json @@ -0,0 +1,97 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "transactionpartneruser", + "name": "TransactionPartnerUser", + "description": "Describes a transaction with a user.", + "html_description": "

Describes a transaction with a user.

", + "rst_description": "Describes a transaction with a user.", + "annotations": [ + { + "type": "String", + "description": "Type of the transaction partner, always 'user'", + "html_description": "Type of the transaction partner, always “user”", + "rst_description": "Type of the transaction partner, always 'user'\n", + "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", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "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. 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 new file mode 100644 index 00000000..47b1c70c --- /dev/null +++ b/.butcher/types/Update/entity.json @@ -0,0 +1,217 @@ +{ + "meta": {}, + "group": { + "title": "Getting updates", + "anchor": "getting-updates" + }, + "object": { + "anchor": "update", + "name": "Update", + "description": "This object represents an incoming update.\nAt most one of the optional parameters can be present in any given update.", + "html_description": "

This object represents an incoming update.
\nAt most one of the optional parameters can be present in any given update.

", + "rst_description": "This `object `_ represents an incoming update.\n\nAt most **one** of the optional parameters can be present in any given update.", + "annotations": [ + { + "type": "Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "update_id", + "required": true + }, + { + "type": "Message", + "description": "New incoming message of any kind - text, photo, sticker, etc.", + "html_description": "Optional. New incoming message of any kind - text, photo, sticker, etc.", + "rst_description": "*Optional*. New incoming message of any kind - text, photo, sticker, etc.\n", + "name": "message", + "required": false + }, + { + "type": "Message", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "edited_message", + "required": false + }, + { + "type": "Message", + "description": "New incoming channel post of any kind - text, photo, sticker, etc.", + "html_description": "Optional. New incoming channel post of any kind - text, photo, sticker, etc.", + "rst_description": "*Optional*. New incoming channel post of any kind - text, photo, sticker, etc.\n", + "name": "channel_post", + "required": false + }, + { + "type": "Message", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "edited_channel_post", + "required": false + }, + { + "type": "BusinessConnection", + "description": "The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot", + "html_description": "Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot", + "rst_description": "*Optional*. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot\n", + "name": "business_connection", + "required": false + }, + { + "type": "Message", + "description": "New message from a connected business account", + "html_description": "Optional. New message from a connected business account", + "rst_description": "*Optional*. New message from a connected business account\n", + "name": "business_message", + "required": false + }, + { + "type": "Message", + "description": "New version of a message from a connected business account", + "html_description": "Optional. New version of a message from a connected business account", + "rst_description": "*Optional*. New version of a message from a connected business account\n", + "name": "edited_business_message", + "required": false + }, + { + "type": "BusinessMessagesDeleted", + "description": "Messages were deleted from a connected business account", + "html_description": "Optional. Messages were deleted from a connected business account", + "rst_description": "*Optional*. Messages were deleted from a connected business account\n", + "name": "deleted_business_messages", + "required": false + }, + { + "type": "MessageReactionUpdated", + "description": "A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify \"message_reaction\" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots.", + "html_description": "Optional. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify \"message_reaction\" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots.", + "rst_description": "*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.\n", + "name": "message_reaction", + "required": false + }, + { + "type": "MessageReactionCountUpdated", + "description": "Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify \"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.", + "html_description": "Optional. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify \"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.", + "rst_description": "*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.\n", + "name": "message_reaction_count", + "required": false + }, + { + "type": "InlineQuery", + "description": "New incoming inline query", + "html_description": "Optional. New incoming inline query", + "rst_description": "*Optional*. New incoming `inline `_ query\n", + "name": "inline_query", + "required": false + }, + { + "type": "ChosenInlineResult", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "chosen_inline_result", + "required": false + }, + { + "type": "CallbackQuery", + "description": "New incoming callback query", + "html_description": "Optional. New incoming callback query", + "rst_description": "*Optional*. New incoming callback query\n", + "name": "callback_query", + "required": false + }, + { + "type": "ShippingQuery", + "description": "New incoming shipping query. Only for invoices with flexible price", + "html_description": "Optional. New incoming shipping query. Only for invoices with flexible price", + "rst_description": "*Optional*. New incoming shipping query. Only for invoices with flexible price\n", + "name": "shipping_query", + "required": false + }, + { + "type": "PreCheckoutQuery", + "description": "New incoming pre-checkout query. Contains full information about checkout", + "html_description": "Optional. New incoming pre-checkout query. Contains full information about checkout", + "rst_description": "*Optional*. New incoming pre-checkout query. Contains full information about checkout\n", + "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", + "html_description": "Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot", + "rst_description": "*Optional*. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot\n", + "name": "poll", + "required": false + }, + { + "type": "PollAnswer", + "description": "A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "poll_answer", + "required": false + }, + { + "type": "ChatMemberUpdated", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "my_chat_member", + "required": false + }, + { + "type": "ChatMemberUpdated", + "description": "A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify \"chat_member\" in the list of allowed_updates to receive these updates.", + "html_description": "Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify \"chat_member\" in the list of allowed_updates to receive these updates.", + "rst_description": "*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.\n", + "name": "chat_member", + "required": false + }, + { + "type": "ChatJoinRequest", + "description": "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.", + "html_description": "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.", + "rst_description": "*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.\n", + "name": "chat_join_request", + "required": false + }, + { + "type": "ChatBoostUpdated", + "description": "A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.", + "html_description": "Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.", + "rst_description": "*Optional*. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.\n", + "name": "chat_boost", + "required": false + }, + { + "type": "ChatBoostRemoved", + "description": "A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.", + "html_description": "Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.", + "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 new file mode 100644 index 00000000..51e3e370 --- /dev/null +++ b/.butcher/types/User/aliases.yml @@ -0,0 +1,8 @@ +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 new file mode 100644 index 00000000..ce116110 --- /dev/null +++ b/.butcher/types/User/entity.json @@ -0,0 +1,145 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "user", + "name": "User", + "description": "This object represents a Telegram user or bot.", + "html_description": "

This object represents a Telegram user or bot.

", + "rst_description": "This object represents a Telegram user or bot.", + "annotations": [ + { + "type": "Integer", + "description": "Unique identifier for this user or bot. 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 for this user or bot. 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 for this user or bot. 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": "id", + "required": true + }, + { + "type": "Boolean", + "description": "True, if this user is a bot", + "html_description": "True, if this user is a bot", + "rst_description": ":code:`True`, if this user is a bot\n", + "name": "is_bot", + "required": true + }, + { + "type": "String", + "description": "User's or bot's first name", + "html_description": "User's or bot's first name", + "rst_description": "User's or bot's first name\n", + "name": "first_name", + "required": true + }, + { + "type": "String", + "description": "User's or bot's last name", + "html_description": "Optional. User's or bot's last name", + "rst_description": "*Optional*. User's or bot's last name\n", + "name": "last_name", + "required": false + }, + { + "type": "String", + "description": "User's or bot's username", + "html_description": "Optional. User's or bot's username", + "rst_description": "*Optional*. User's or bot's username\n", + "name": "username", + "required": false + }, + { + "type": "String", + "description": "IETF language tag of the user's language", + "html_description": "Optional. IETF language tag of the user's language", + "rst_description": "*Optional*. `IETF language tag `_ of the user's language\n", + "name": "language_code", + "required": false + }, + { + "type": "True", + "description": "True, if this user is a Telegram Premium user", + "html_description": "Optional. True, if this user is a Telegram Premium user", + "rst_description": "*Optional*. :code:`True`, if this user is a Telegram Premium user\n", + "name": "is_premium", + "required": false + }, + { + "type": "True", + "description": "True, if this user added the bot to the attachment menu", + "html_description": "Optional. True, if this user added the bot to the attachment menu", + "rst_description": "*Optional*. :code:`True`, if this user added the bot to the attachment menu\n", + "name": "added_to_attachment_menu", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the bot can be invited to groups. Returned only in getMe.", + "html_description": "Optional. True, if the bot can be invited to groups. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if the bot can be invited to groups. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "can_join_groups", + "required": false + }, + { + "type": "Boolean", + "description": "True, if privacy mode is disabled for the bot. Returned only in getMe.", + "html_description": "Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if `privacy mode `_ is disabled for the bot. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "can_read_all_group_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the bot supports inline queries. Returned only in getMe.", + "html_description": "Optional. True, if the bot supports inline queries. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if the bot supports inline queries. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "supports_inline_queries", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.", + "html_description": "Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.", + "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/UserChatBoosts/entity.json b/.butcher/types/UserChatBoosts/entity.json new file mode 100644 index 00000000..7c4a7fce --- /dev/null +++ b/.butcher/types/UserChatBoosts/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "userchatboosts", + "name": "UserChatBoosts", + "description": "This object represents a list of boosts added to a chat by a user.", + "html_description": "

This object represents a list of boosts added to a chat by a user.

", + "rst_description": "This object represents a list of boosts added to a chat by a user.", + "annotations": [ + { + "type": "Array of ChatBoost", + "description": "The list of boosts added to the chat by the user", + "html_description": "The list of boosts added to the chat by the user", + "rst_description": "The list of boosts added to the chat by the user\n", + "name": "boosts", + "required": true + } + ], + "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/UserProfilePhotos/entity.json b/.butcher/types/UserProfilePhotos/entity.json new file mode 100644 index 00000000..d6406d9e --- /dev/null +++ b/.butcher/types/UserProfilePhotos/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "userprofilephotos", + "name": "UserProfilePhotos", + "description": "This object represent a user's profile pictures.", + "html_description": "

This object represent a user's profile pictures.

", + "rst_description": "This object represent a user's profile pictures.", + "annotations": [ + { + "type": "Integer", + "description": "Total number of profile pictures the target user has", + "html_description": "Total number of profile pictures the target user has", + "rst_description": "Total number of profile pictures the target user has\n", + "name": "total_count", + "required": true + }, + { + "type": "Array of Array of PhotoSize", + "description": "Requested profile pictures (in up to 4 sizes each)", + "html_description": "Requested profile pictures (in up to 4 sizes each)", + "rst_description": "Requested profile pictures (in up to 4 sizes each)\n", + "name": "photos", + "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/UserShared/entity.json b/.butcher/types/UserShared/entity.json new file mode 100644 index 00000000..76360ca2 --- /dev/null +++ b/.butcher/types/UserShared/entity.json @@ -0,0 +1,38 @@ +{ + "meta": { + "deprecated": { + "version": "7.0", + "release_date": "2023-12-29" + } + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "usershared", + "name": "UserShared", + "description": "This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button.", + "html_description": "

This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button.

", + "rst_description": "This object contains information about the user whose identifier was shared with the bot using a :class:`aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser` button.", + "annotations": [ + { + "type": "Integer", + "description": "Identifier of the request", + "html_description": "Identifier of the request", + "rst_description": "Identifier of the request\n", + "name": "request_id", + "required": true + }, + { + "type": "Integer", + "description": "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 a 64-bit integer or double-precision float type are safe for storing this identifier. 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.", + "html_description": "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 a 64-bit integer or double-precision float type are safe for storing this identifier. 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.", + "rst_description": "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 a 64-bit integer or double-precision float type are safe for storing this identifier. 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.\n", + "name": "user_id", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/UsersShared/entity.json b/.butcher/types/UsersShared/entity.json new file mode 100644 index 00000000..e105e039 --- /dev/null +++ b/.butcher/types/UsersShared/entity.json @@ -0,0 +1,45 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "usersshared", + "name": "UsersShared", + "description": "This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.", + "html_description": "

This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.

", + "rst_description": "This object contains information about the users whose identifiers were shared with the bot using a :class:`aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers` button.", + "annotations": [ + { + "type": "Integer", + "description": "Identifier of the request", + "html_description": "Identifier of the request", + "rst_description": "Identifier of the request\n", + "name": "request_id", + "required": true + }, + { + "type": "Array of SharedUser", + "description": "Information about users shared with the bot.", + "html_description": "Information about users shared with the bot.", + "rst_description": "Information about users shared with the bot.\n", + "name": "users", + "required": true + }, + { + "type": "Array of Integer", + "description": "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.", + "html_description": "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.", + "rst_description": "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.\n", + "name": "user_ids", + "required": false, + "deprecated": { + "version": "7.2", + "release_date": "2024-03-31" + } + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Venue/entity.json b/.butcher/types/Venue/entity.json new file mode 100644 index 00000000..3711d325 --- /dev/null +++ b/.butcher/types/Venue/entity.json @@ -0,0 +1,73 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "venue", + "name": "Venue", + "description": "This object represents a venue.", + "html_description": "

This object represents a venue.

", + "rst_description": "This object represents a venue.", + "annotations": [ + { + "type": "Location", + "description": "Venue location. Can't be a live location", + "html_description": "Venue location. Can't be a live location", + "rst_description": "Venue location. Can't be a live location\n", + "name": "location", + "required": true + }, + { + "type": "String", + "description": "Name of the venue", + "html_description": "Name of the venue", + "rst_description": "Name of the venue\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Address of the venue", + "html_description": "Address of the venue", + "rst_description": "Address of the venue\n", + "name": "address", + "required": true + }, + { + "type": "String", + "description": "Foursquare identifier of the venue", + "html_description": "Optional. Foursquare identifier of the venue", + "rst_description": "*Optional*. Foursquare identifier of the venue\n", + "name": "foursquare_id", + "required": false + }, + { + "type": "String", + "description": "Foursquare type of the venue. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)", + "html_description": "Optional. Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)", + "rst_description": "*Optional*. Foursquare type of the venue. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)\n", + "name": "foursquare_type", + "required": false + }, + { + "type": "String", + "description": "Google Places identifier of the venue", + "html_description": "Optional. Google Places identifier of the venue", + "rst_description": "*Optional*. Google Places identifier of the venue\n", + "name": "google_place_id", + "required": false + }, + { + "type": "String", + "description": "Google Places type of the venue. (See supported types.)", + "html_description": "Optional. Google Places type of the venue. (See supported types.)", + "rst_description": "*Optional*. Google Places type of the venue. (See `supported types `_.)\n", + "name": "google_place_type", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Video/entity.json b/.butcher/types/Video/entity.json new file mode 100644 index 00000000..41ec3bb6 --- /dev/null +++ b/.butcher/types/Video/entity.json @@ -0,0 +1,113 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "video", + "name": "Video", + "description": "This object represents a video file.", + "html_description": "

This object represents a video file.

", + "rst_description": "This object represents a video file.", + "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 as defined by the sender", + "html_description": "Video width as defined by the sender", + "rst_description": "Video width as defined by the sender\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Video height as defined by the sender", + "html_description": "Video height as defined by the sender", + "rst_description": "Video height as defined by the sender\n", + "name": "height", + "required": true + }, + { + "type": "Integer", + "description": "Duration of the video in seconds as defined by the sender", + "html_description": "Duration of the video in seconds as defined by the sender", + "rst_description": "Duration of the video in seconds as defined by the sender\n", + "name": "duration", + "required": true + }, + { + "type": "PhotoSize", + "description": "Video thumbnail", + "html_description": "Optional. Video thumbnail", + "rst_description": "*Optional*. Video thumbnail\n", + "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", + "html_description": "Optional. Original filename as defined by the sender", + "rst_description": "*Optional*. Original filename as defined by the sender\n", + "name": "file_name", + "required": false + }, + { + "type": "String", + "description": "MIME type of the file as defined by the sender", + "html_description": "Optional. MIME type of the file as defined by the sender", + "rst_description": "*Optional*. MIME type of the file as defined by the sender\n", + "name": "mime_type", + "required": false + }, + { + "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/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/VideoChatEnded/entity.json b/.butcher/types/VideoChatEnded/entity.json new file mode 100644 index 00000000..bd3cf1e4 --- /dev/null +++ b/.butcher/types/VideoChatEnded/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "videochatended", + "name": "VideoChatEnded", + "description": "This object represents a service message about a video chat ended in the chat.", + "html_description": "

This object represents a service message about a video chat ended in the chat.

", + "rst_description": "This object represents a service message about a video chat ended in the chat.", + "annotations": [ + { + "type": "Integer", + "description": "Video chat duration in seconds", + "html_description": "Video chat duration in seconds", + "rst_description": "Video chat duration in seconds\n", + "name": "duration", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/VideoChatParticipantsInvited/entity.json b/.butcher/types/VideoChatParticipantsInvited/entity.json new file mode 100644 index 00000000..d0758387 --- /dev/null +++ b/.butcher/types/VideoChatParticipantsInvited/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "videochatparticipantsinvited", + "name": "VideoChatParticipantsInvited", + "description": "This object represents a service message about new members invited to a video chat.", + "html_description": "

This object represents a service message about new members invited to a video chat.

", + "rst_description": "This object represents a service message about new members invited to a video chat.", + "annotations": [ + { + "type": "Array of User", + "description": "New members that were invited to the video chat", + "html_description": "New members that were invited to the video chat", + "rst_description": "New members that were invited to the video chat\n", + "name": "users", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/VideoChatScheduled/entity.json b/.butcher/types/VideoChatScheduled/entity.json new file mode 100644 index 00000000..37393d7b --- /dev/null +++ b/.butcher/types/VideoChatScheduled/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "videochatscheduled", + "name": "VideoChatScheduled", + "description": "This object represents a service message about a video chat scheduled in the chat.", + "html_description": "

This object represents a service message about a video chat scheduled in the chat.

", + "rst_description": "This object represents a service message about a video chat scheduled in the chat.", + "annotations": [ + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator", + "html_description": "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator", + "rst_description": "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator\n", + "name": "start_date", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/VideoChatScheduled/replace.yml b/.butcher/types/VideoChatScheduled/replace.yml new file mode 100644 index 00000000..8aa22091 --- /dev/null +++ b/.butcher/types/VideoChatScheduled/replace.yml @@ -0,0 +1,5 @@ +annotations: + start_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/VideoChatStarted/entity.json b/.butcher/types/VideoChatStarted/entity.json new file mode 100644 index 00000000..c870523f --- /dev/null +++ b/.butcher/types/VideoChatStarted/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "videochatstarted", + "name": "VideoChatStarted", + "description": "This object represents a service message about a video chat started in the chat. Currently holds no information.", + "html_description": "

This object represents a service message about a video chat started in the chat. Currently holds no information.

", + "rst_description": "This object represents a service message about a video chat started in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/VideoNote/entity.json b/.butcher/types/VideoNote/entity.json new file mode 100644 index 00000000..ee6e4f18 --- /dev/null +++ b/.butcher/types/VideoNote/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "videonote", + "name": "VideoNote", + "description": "This object represents a video message (available in Telegram apps as of v.4.0).", + "html_description": "

This object represents a video message (available in Telegram apps as of v.4.0).

", + "rst_description": "This object represents a `video message `_ (available in Telegram apps as of `v.4.0 `_).", + "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 and height (diameter of the video message) as defined by the sender", + "html_description": "Video width and height (diameter of the video message) as defined by the sender", + "rst_description": "Video width and height (diameter of the video message) as defined by the sender\n", + "name": "length", + "required": true + }, + { + "type": "Integer", + "description": "Duration of the video in seconds as defined by the sender", + "html_description": "Duration of the video in seconds as defined by the sender", + "rst_description": "Duration of the video in seconds as defined by the sender\n", + "name": "duration", + "required": true + }, + { + "type": "PhotoSize", + "description": "Video thumbnail", + "html_description": "Optional. Video thumbnail", + "rst_description": "*Optional*. Video thumbnail\n", + "name": "thumbnail", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes", + "html_description": "Optional. File size in bytes", + "rst_description": "*Optional*. File size in bytes\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + } +} 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/Voice/entity.json b/.butcher/types/Voice/entity.json new file mode 100644 index 00000000..0bfae946 --- /dev/null +++ b/.butcher/types/Voice/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "voice", + "name": "Voice", + "description": "This object represents a voice note.", + "html_description": "

This object represents a voice note.

", + "rst_description": "This object represents a voice note.", + "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": "Duration of the audio in seconds as defined by the sender", + "html_description": "Duration of the audio in seconds as defined by the sender", + "rst_description": "Duration of the audio in seconds as defined by the sender\n", + "name": "duration", + "required": true + }, + { + "type": "String", + "description": "MIME type of the file as defined by the sender", + "html_description": "Optional. MIME type of the file as defined by the sender", + "rst_description": "*Optional*. MIME type of the file as defined by the sender\n", + "name": "mime_type", + "required": false + }, + { + "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/WebAppData/entity.json b/.butcher/types/WebAppData/entity.json new file mode 100644 index 00000000..0a41a879 --- /dev/null +++ b/.butcher/types/WebAppData/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "webappdata", + "name": "WebAppData", + "description": "Describes data sent from a Web App to the bot.", + "html_description": "

Describes data sent from a Web App to the bot.

", + "rst_description": "Describes data sent from a `Web App `_ to the bot.", + "annotations": [ + { + "type": "String", + "description": "The data. Be aware that a bad client can send arbitrary data in this field.", + "html_description": "The data. Be aware that a bad client can send arbitrary data in this field.", + "rst_description": "The data. Be aware that a bad client can send arbitrary data in this field.\n", + "name": "data", + "required": true + }, + { + "type": "String", + "description": "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.", + "html_description": "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.", + "rst_description": "Text of the *web_app* keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.\n", + "name": "button_text", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/WebAppInfo/entity.json b/.butcher/types/WebAppInfo/entity.json new file mode 100644 index 00000000..aaeed289 --- /dev/null +++ b/.butcher/types/WebAppInfo/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "webappinfo", + "name": "WebAppInfo", + "description": "Describes a Web App.", + "html_description": "

Describes a Web App.

", + "rst_description": "Describes a `Web App `_.", + "annotations": [ + { + "type": "String", + "description": "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps", + "html_description": "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps", + "rst_description": "An HTTPS URL of a Web App to be opened with additional data as specified in `Initializing Web Apps `_\n", + "name": "url", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/WebhookInfo/entity.json b/.butcher/types/WebhookInfo/entity.json new file mode 100644 index 00000000..62e578c0 --- /dev/null +++ b/.butcher/types/WebhookInfo/entity.json @@ -0,0 +1,89 @@ +{ + "meta": {}, + "group": { + "title": "Getting updates", + "anchor": "getting-updates" + }, + "object": { + "anchor": "webhookinfo", + "name": "WebhookInfo", + "description": "Describes the current status of a webhook.", + "html_description": "

Describes the current status of a webhook.

", + "rst_description": "Describes the current status of a webhook.", + "annotations": [ + { + "type": "String", + "description": "Webhook URL, may be empty if webhook is not set up", + "html_description": "Webhook URL, may be empty if webhook is not set up", + "rst_description": "Webhook URL, may be empty if webhook is not set up\n", + "name": "url", + "required": true + }, + { + "type": "Boolean", + "description": "True, if a custom certificate was provided for webhook certificate checks", + "html_description": "True, if a custom certificate was provided for webhook certificate checks", + "rst_description": ":code:`True`, if a custom certificate was provided for webhook certificate checks\n", + "name": "has_custom_certificate", + "required": true + }, + { + "type": "Integer", + "description": "Number of updates awaiting delivery", + "html_description": "Number of updates awaiting delivery", + "rst_description": "Number of updates awaiting delivery\n", + "name": "pending_update_count", + "required": true + }, + { + "type": "String", + "description": "Currently used webhook IP address", + "html_description": "Optional. Currently used webhook IP address", + "rst_description": "*Optional*. Currently used webhook IP address\n", + "name": "ip_address", + "required": false + }, + { + "type": "Integer", + "description": "Unix time for the most recent error that happened when trying to deliver an update via webhook", + "html_description": "Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook", + "rst_description": "*Optional*. Unix time for the most recent error that happened when trying to deliver an update via webhook\n", + "name": "last_error_date", + "required": false + }, + { + "type": "String", + "description": "Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook", + "html_description": "Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook", + "rst_description": "*Optional*. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook\n", + "name": "last_error_message", + "required": false + }, + { + "type": "Integer", + "description": "Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters", + "html_description": "Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters", + "rst_description": "*Optional*. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters\n", + "name": "last_synchronization_error_date", + "required": false + }, + { + "type": "Integer", + "description": "The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery", + "html_description": "Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery", + "rst_description": "*Optional*. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery\n", + "name": "max_connections", + "required": false + }, + { + "type": "Array of String", + "description": "A list of update types the bot is subscribed to. Defaults to all update types except chat_member", + "html_description": "Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member", + "rst_description": "*Optional*. A list of update types the bot is subscribed to. Defaults to all update types except *chat_member*\n", + "name": "allowed_updates", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/WebhookInfo/replace.yml b/.butcher/types/WebhookInfo/replace.yml new file mode 100644 index 00000000..5a784309 --- /dev/null +++ b/.butcher/types/WebhookInfo/replace.yml @@ -0,0 +1,6 @@ +annotations: + last_error_date: &date + parsed_type: + type: std + name: DateTime + last_synchronization_error_date: *date diff --git a/.butcher/types/WriteAccessAllowed/entity.json b/.butcher/types/WriteAccessAllowed/entity.json new file mode 100644 index 00000000..50d990bc --- /dev/null +++ b/.butcher/types/WriteAccessAllowed/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "writeaccessallowed", + "name": "WriteAccessAllowed", + "description": "This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess.", + "html_description": "

This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess.

", + "rst_description": "This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method `requestWriteAccess `_.", + "annotations": [ + { + "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*. :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 + }, + { + "type": "String", + "description": "Name of the Web App, if the access was granted when the Web App was launched from a link", + "html_description": "Optional. Name of the Web App, if the access was granted when the Web App was launched from a link", + "rst_description": "*Optional*. Name of the Web App, if the access was granted when the Web App was launched from a link\n", + "name": "web_app_name", + "required": false + }, + { + "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*. :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 + } + ], + "category": "types" + } +} 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/.coveragerc b/.coveragerc deleted file mode 100644 index e1862099..00000000 --- a/.coveragerc +++ /dev/null @@ -1,6 +0,0 @@ -[report] -exclude_lines = - pragma: no cover - if TYPE_CHECKING: - @abstractmethod - @overload diff --git a/.editorconfig b/.editorconfig index f519610f..1ad65bb7 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,11 +9,14 @@ insert_final_newline = true trim_trailing_whitespace = true max_line_length = 99 -[**.{yml,yaml}] +[**.{yml,yaml,json}] indent_size = 2 [**.{md,txt,rst}] trim_trailing_whitespace = false +[**.rst] +indent_size = 2 + [Makefile] indent_style = tab diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 9e19cd03..00000000 --- a/.flake8 +++ /dev/null @@ -1,12 +0,0 @@ -[flake8] -max-line-length = 99 -select = C,E,F,W,B,B950 -ignore = E501,W503,E203 -exclude = - .git - build - dist - venv - docs - *.egg-info - experiment.py 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 d643b3f0..c4430ef6 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1 @@ open_collective: aiogram -patreon: aiogram diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml new file mode 100644 index 00000000..89ec316c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yaml @@ -0,0 +1,100 @@ +name: Bug report +description: Report issues affecting the framework or the documentation. +labels: + - bug +body: + - type: checkboxes + attributes: + label: Checklist + options: + - label: I am sure the error is coming from aiogram code + required: true + - label: I have searched in the issue tracker for similar bug reports, including closed ones + required: true + + - type: markdown + attributes: + value: | + ## Context + + Please provide as much information as possible. This will help us to reproduce the issue and fix it. + + - type: input + attributes: + label: Operating system + placeholder: e.g. Ubuntu 20.04.2 LTS + validations: + required: true + + - type: input + attributes: + label: Python version + description: (`python --version` inside your virtualenv) + placeholder: e.g. 3.10.1 + validations: + required: true + + - type: input + attributes: + label: aiogram version + description: (`pip show aiogram` inside your virtualenv) + placeholder: e.g. 2.21 or 3.0b3 + validations: + required: true + + - type: textarea + attributes: + label: Expected behavior + description: Please describe the behavior you are expecting. + placeholder: E.g. the bot should send a message with the text "Hello, world!". + validations: + required: true + + - type: textarea + attributes: + label: Current behavior + description: Please describe the behavior you are currently experiencing. + placeholder: E.g. the bot doesn't send any message. + validations: + required: true + + - type: textarea + attributes: + label: Steps to reproduce + description: Please describe the steps you took to reproduce the behavior. + placeholder: | + 1. step 1 + 2. step 2 + 3. ... + 4. you get it... + validations: + required: true + + - type: textarea + attributes: + label: Code example + description: Provide a [minimal, reproducible](https://stackoverflow.com/help/minimal-reproducible-example) and properly formatted example (if applicable). + placeholder: | + from aiogram import Bot, Dispatcher + ... + render: python3 + + - type: textarea + attributes: + label: Logs + description: Provide the complete traceback (if applicable) or other kind of logs. + placeholder: | + Traceback (most recent call last): + File "main.py", line 1, in + ... + SomeException: ... + render: sh + + - type: textarea + attributes: + label: Additional information + description: Please provide any additional information that may help us to reproduce the issue. + placeholder: | + E.g. this behavior is reproducible only in group chats. + + You can also attach additional screenshots, logs, or other files. diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 6adfd76b..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - ---- -name: Bug report -about: Create a report to help us improve - ---- - -## Context - -Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions. - -* Operating System: -* Python Version: -* aiogram version: -* aiohttp version: -* uvloop version (if installed): - -## Expected Behavior - -Please describe the behavior you are expecting - -## Current Behavior - -What is the current behavior? - -## Failure Information (for bugs) - -Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template. - -### Steps to Reproduce - -Please provide detailed steps for reproducing the issue. - -1. step 1 -2. step 2 -3. you get it... - -### Failure Logs - -Please include any relevant log snippets or files here. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..aee2a9d6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: true +contact_links: + - name: Discuss anything related to the framework + url: https://github.com/aiogram/aiogram/discussions + about: Ask a question about aiogram or share your code snippets and ideas. + - name: Join our Telegram channel + url: https://t.me/aiogram_live + about: Get the latest updates about the framework. + - name: Join our Telegram chat + url: https://t.me/aiogram + about: Get help, ask questions, and discuss the framework in real-time. diff --git a/.github/ISSUE_TEMPLATE/feature.yaml b/.github/ISSUE_TEMPLATE/feature.yaml new file mode 100644 index 00000000..257417f1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yaml @@ -0,0 +1,56 @@ +name: Feature request +description: Report features you would like to see or improve in the framework. +labels: + - enhancement +body: + - type: dropdown + attributes: + label: aiogram version + description: (`pip show aiogram` inside your virtualenv) + options: + - 3.x + - 2.x + - both + - n/a + validations: + required: true + + - type: textarea + attributes: + label: Problem + description: Is your feature request related to a specific problem? If not, please describe the general idea of your request. + placeholder: e.g. I want to send a photo to a user by url. + validations: + required: true + + - type: textarea + attributes: + label: Possible solution + description: Describe the solution you would like to see in the framework. + placeholder: e.g. Add a method to send a photo to a user by url. + validations: + required: true + + - type: textarea + attributes: + label: Alternatives + description: What other solutions do you have in mind? + placeholder: e.g. I'm sending a text message with photo url. + + - type: textarea + attributes: + label: Code example + description: A small code example that demonstrates the behavior you would like to see. + placeholder: | + await bot.send_photo(user_id, photo_url) + ... + render: python3 + + - type: textarea + attributes: + label: Additional information + description: Any additional information you would like to provide. + placeholder: | + E.g. this method should also cache images to speed up further sending. + + You can also attach additional pictures or other files. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d92..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ade26bd1..9a4d9351 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -30,6 +30,5 @@ Please describe the tests that you ran to verify your changes. Provide instructi - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have made corresponding changes to the documentation -- [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index f6c0d175..00000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Deploy - -on: - push: - tags: - - 'v3.*' - -jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - - name: Set up Python 3.9 - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - - name: Install dependencies - run: | - pip install -U pip virtualenv poetry - poetry config virtualenvs.create false - - name: Build - run: | - poetry build - - name: Try install wheel - run: | - mkdir -p try_install - cd try_install - virtualenv venv - venv/bin/pip install ../dist/aiogram-*.whl - venv/bin/python -c "import aiogram; print(aiogram.__version__)" - - name: Publish artifacts - uses: actions/upload-artifact@v2 - with: - name: dist - path: dist/* - - publish: - name: Publish - needs: build - if: "success() && startsWith(github.ref, 'refs/tags/')" - runs-on: ubuntu-latest - steps: - - name: Download artifacts - uses: actions/download-artifact@v1 - with: - name: dist - path: dist - -# - name: Publish a Python distribution to Test PyPI -# uses: pypa/gh-action-pypi-publish@master -## if: github.event.action != 'published' -# with: -# user: __token__ -# password: ${{ secrets.PYPI_TEST_TOKEN }} -# repository_url: https://test.pypi.org/legacy/ - - - name: Publish a Python distribution to PyPI - uses: pypa/gh-action-pypi-publish@master -# if: github.event.action == 'published' - with: - user: __token__ - password: ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/label_pr.yaml b/.github/workflows/label_pr.yaml new file mode 100644 index 00000000..dda333ae --- /dev/null +++ b/.github/workflows/label_pr.yaml @@ -0,0 +1,17 @@ +name: Label new pull request + +on: + pull_request_target: + types: + - opened + branches: + - dev-3.x + +jobs: + put-label: + runs-on: ubuntu-latest + steps: + - name: Add 3.x label + uses: andymckay/labeler@master + with: + add-labels: 3.x diff --git a/.github/workflows/pull_request_changelog.yml b/.github/workflows/pull_request_changelog.yml new file mode 100644 index 00000000..ecbfd2bc --- /dev/null +++ b/.github/workflows/pull_request_changelog.yml @@ -0,0 +1,99 @@ +name: "Check that changes are described" +on: + pull_request_target: + types: + - "opened" + - "reopened" + - "synchronize" + - "labeled" + - "unlabeled" + +jobs: + changes-required: + runs-on: ubuntu-latest + if: "!contains(github.event.pull_request.labels.*.name, 'skip news')" + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: '0' + + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install towncrier + run: pip install -U towncrier + + - name: Check changelog + env: + BASE_BRANCH: ${{ github.base_ref }} + run: | + git fetch --no-tags origin +refs/heads/${BASE_BRANCH}:refs/remotes/origin/${BASE_BRANCH} + towncrier check --compare-with origin/${BASE_BRANCH} + + - name: Find bot comment + if: "always()" + uses: peter-evans/find-comment@v3 + id: fc + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: 'github-actions[bot]' + body-includes: Changelog + + - name: Ask for changelog + if: "failure()" + uses: peter-evans/create-or-update-comment@v4 + with: + edit-mode: replace + comment-id: ${{ steps.fc.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: | + # :x: Changelog is required! + + You need to add a brief description of the changes to the `CHANGES` directory. + + Changes file should be named like `..rst`, + example `1234.bugfix.rst` where `1234` is the PR or issue number and `bugfix` is the category. + + The content of the file should be a brief description of the changes in + the PR in the format of a description of what has been done. + + Possible categories are: `feature`, `bugfix`, `doc`, `removal` and `misc`. + + - name: Changelog found + if: "success()" + uses: peter-evans/create-or-update-comment@v4 + with: + edit-mode: replace + comment-id: ${{ steps.fc.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: | + # :heavy_check_mark: Changelog found. + + Thank you for adding a description of the changes + + skip-news: + runs-on: ubuntu-latest + if: "contains(github.event.pull_request.labels.*.name, 'skip news')" + steps: + - name: Find bot comment + uses: peter-evans/find-comment@v3 + id: fc + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: 'github-actions[bot]' + body-includes: Changelog + + - name: Comment when docs is not needed + uses: peter-evans/create-or-update-comment@v4 + with: + edit-mode: replace + comment-id: ${{ steps.fc.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: | + # :corn: Changelog is not needed. + + This PR does not require a changelog because `skip news` label is present. diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml new file mode 100644 index 00000000..d0084593 --- /dev/null +++ b/.github/workflows/pypi-release.yml @@ -0,0 +1,61 @@ +name: "Deploy" + +on: + push: + tags: + - 'v3.*' + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Set up Python 3.14 + uses: actions/setup-python@v6 + with: + python-version: "3.14" + + - 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: Build distribution + run: uv build + + - name: Try install wheel + run: | + pip install -U virtualenv + mkdir -p try_install + cd try_install + virtualenv venv + venv/bin/pip install ../dist/aiogram-*.whl + venv/bin/python -c "import aiogram; print(aiogram.__version__)" + - name: Publish artifacts + uses: actions/upload-artifact@v6 + with: + name: dist + path: dist/* + + publish: + name: Publish + needs: build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/project/aiogram/${{ steps.package-version.outputs.value }}/ + permissions: + id-token: write + steps: + - name: Download artifacts + uses: actions/download-artifact@v7 + with: + name: dist + path: dist + + - name: Publish a Python distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 73eac1b8..2937cb60 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,90 +4,145 @@ on: push: branches: - dev-3.x + paths: + - ".github/workflows/tests.yml" + - "aiogram/**" + - "tests/**" + - "codecov.yaml" + - "pyproject.toml" pull_request: branches: - dev-3.x + paths: + - ".github/workflows/tests.yml" + - "aiogram/**" + - "tests/**" + - "pyproject.toml" jobs: - build: + tests: strategy: fail-fast: false - max-parallel: 9 matrix: os: - ubuntu-latest - macos-latest - windows-latest python-version: - - '3.8' - - '3.9' - - '3.10' + - "3.10" + - "3.11" + - "3.12" + - "3.13" + - "3.14" defaults: - # Windows is sucks. Force use bash instead of PowerShell + # Windows sucks. Force use bash instead of PowerShell + run: + shell: bash + + runs-on: ${{ matrix.os }} + + env: + # Windows has some limitations: + # – Redis and MongoDB is not supported on GitHub Windows runners; + IS_WINDOWS: ${{ startswith(matrix.os, 'windows') }} + # MongoDB has some limitations: + # – MongoDB container action is only supported on Linux; + IS_UBUNTU: ${{ startswith(matrix.os, 'ubuntu') }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true + + - name: Install project dependencies + run: | + uv sync --all-extras --group dev --group test + + - name: Lint code + run: | + 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: "8" + + - name: Setup mongodb + if: ${{ env.IS_UBUNTU == 'true' }} + uses: supercharge/mongodb-github-action@1.12.0 + with: + mongodb-version: "8" + mongodb-username: mongo + mongodb-password: mongo + mongodb-port: 27017 + + - name: Run tests + run: | + 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" + uv run pytest $flags + + - name: Upload coverage data + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + flags: unittests + name: py-${{ matrix.python-version }}-${{ matrix.os }} + fail_ci_if_error: true + + pypy-tests: + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + # - windows-latest + python-version: + - "pypy3.10" + - "pypy3.11" + + defaults: + # Windows sucks. Force use bash instead of PowerShell run: shell: bash runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@master + - name: Checkout code + uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - - name: Install and configure Poetry - uses: snok/install-poetry@v1 + - name: Install uv + uses: astral-sh/setup-uv@v7 with: - version: 1.1.11 - virtualenvs-create: true - virtualenvs-in-project: true - installer-parallel: true + enable-cache: true - - name: Setup redis - if: ${{ matrix.os != 'windows-latest' }} - uses: shogo82148/actions-setup-redis@v1 - with: - redis-version: 6 - - - name: Load cached venv - id: cached-poetry-dependencies - uses: actions/cache@v2 - with: - path: .venv - key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}-${{ secrets.CACHE_VERSION }} - - - name: Project dependencies - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + - name: Install project dependencies run: | - poetry install --no-interaction -E fast -E redis -E proxy -E i18n -E docs + uv sync --all-extras --group dev --group test - - name: Lint code + - name: Run tests run: | - poetry run flake8 aiogram - poetry run mypy aiogram - - - name: Check code-style (Black) - run: | - poetry run black --check --diff aiogram tests - - - name: Run tests (with Redis) - if: ${{ matrix.os != 'windows-latest' }} - run: | - poetry run pytest --cov=aiogram --cov-config .coveragerc --cov-report=xml --redis redis://localhost:6379/0 - - - name: Run tests (without Redis) - # Redis can't be used on GitHub Windows Runners - if: ${{ matrix.os == 'windows-latest' }} - run: | - poetry run pytest --cov=aiogram --cov-config .coveragerc --cov-report=xml - - - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - file: coverage.xml - flags: unittests - name: py-${{ matrix.python-version }}-${{ matrix.os }} - fail_ci_if_error: true + flags="" + uv run pytest $flags diff --git a/.gitignore b/.gitignore index 4ffb8359..d1dbf6d6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,8 @@ __pycache__/ *.py[cod] +*.mo + env/ build/ _build/ @@ -11,7 +13,7 @@ dist/ site/ *.egg-info/ *.egg -aiogram/_meta.py +.ruff_cache .mypy_cache .pytest_cache diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 07fbe618..891f4221 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,28 +1,22 @@ - - repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 + rev: v6.0.0 hooks: - - id: end-of-file-fixer - - id: trailing-whitespace - - id: check-merge-conflict + - id: "trailing-whitespace" + - id: "check-case-conflict" + - id: "check-merge-conflict" + - id: "debug-statements" + - id: "end-of-file-fixer" + - id: "mixed-line-ending" + - id: "detect-private-key" + - id: "check-yaml" + - id: "check-toml" + - id: "check-json" - - repo: https://github.com/psf/black - rev: 21.8b0 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: 'v0.14.0' hooks: - - id: black + - id: ruff files: &files '^(aiogram|tests|examples)' - - - repo: https://github.com/pre-commit/mirrors-isort - rev: v5.9.3 - hooks: - - id: isort - additional_dependencies: [ toml ] - files: *files - - repo: https://gitlab.com/pycqa/flake8 - rev: 3.9.2 - hooks: - - id: flake8 - args: [ '--config=.flake8' ] + - id: ruff-format files: *files diff --git a/.readthedocs.yml b/.readthedocs.yml index 1efe11cb..90f0fc0a 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,14 +1,14 @@ version: 2 +build: + os: ubuntu-22.04 + tools: + python: "3.11" + jobs: + post_install: + - pip install .[docs,redis,mongo] + sphinx: configuration: docs/conf.py formats: all - -python: - version: 3.8 - install: - - method: pip - path: . - extra_requirements: - - docs 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 9216b305..4e67682c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -12,8 +12,2141 @@ Changelog WARNING: Don't drop the next directive! +.. towncrier-draft-entries:: [UPCOMING UPDATE] + .. 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) +=================== + +Features +-------- + +- Added ChatMember resolution tool and updated 2.x migration guide. + `#1525 `_ +- Added full support of `Bot API 7.6 `_ + + - Added the classes :class:`aiogram.types.paid_media.PaidMedia`, + :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. + - Added the method :class:`aiogram.methods.send_paid_media.SendPaidMedia` + 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. + - Documented that the methods :class:`aiogram.methods.copy_message.CopyMessage` + and :class:`aiogram.methods.copy_messages.CopyMessages` cannot be used to copy paid media. + - Added the field :code:`can_send_paid_media` to the class + :class:`aiogram.types.chat_full_info.ChatFullInfo`. + - Added the field :code:`paid_media` to the classes + :class:`aiogram.types.message.Message` and + :class:`aiogram.types.external_reply_info.ExternalReplyInfo`. + - Added the class + :class:`aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds`, + containing information about Telegram Star transactions involving the Telegram Ads Platform. + - Added the field :code:`invoice_payload` to the class + :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`, + containing the bot-specified invoice payload. + - Changed the default opening mode for Direct Link Mini Apps. + - Added support for launching Web Apps via t.me link in the class + :class:`aiogram.types.menu_button_web_app.MenuButtonWebApp`. + - Added the field :code:`section_separator_color` to the class :code:`ThemeParams`. + `#1533 `_ + + +Bugfixes +-------- + +- Fixed event context resolving for the callback query that is coming from the business account + `#1520 `_ + + +3.8.0 (2024-06-19) +=================== + +Features +-------- + +- Added utility to safely deserialize any Telegram object or method to a JSON-compatible object (dict). + (:ref:`>> Read more `) + `#1450 `_ +- Added full support of `Bot API 7.5 `_ + + - Added the classes :class:`aiogram.types.star_transactions.StarTransactions`, + :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. + - Added the method :class:`aiogram.methods.get_star_transactions.GetStarTransactions` + that can be used to get the list of all Telegram Star transactions for the bot. + - Added support for callback buttons in + :class:`aiogram.types.inline_keyboard_markup.InlineKeyboardMarkup` + for messages sent on behalf of a business account. + - Added support for callback queries originating from a message sent + on behalf of a business account. + - Added the parameter :code:`business_connection_id` to the methods + :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. + - Added the parameter :code:`business_connection_id` to the method + :class:`aiogram.methods.stop_poll.StopPoll`, + allowing the bot to stop polls it sent on behalf of a business account. + `#1518 `_ + + +Bugfixes +-------- + +- Increased DNS cache ttl setting to aiohttp session as a workaround for DNS resolution issues in aiohttp. + `#1500 `_ + + +Improved Documentation +---------------------- + +- Fixed MongoStorage section in the documentation by adding extra dependency to ReadTheDocs configuration. + `#1501 `_ +- Added information about dependency changes to the :code:`2.x --> 3.x` migration guide. + `#1504 `_ + + +Misc +---- + +- [Only for contributors] Fail redis and mongo tests if incorrect URI provided + some storages tests refactoring + + If incorrect URIs provided to "--redis" and/or "--mongo" options tests should fail with errors instead of skipping. + Otherwise the next scenario is possible: + 1) developer breaks RedisStorage and/or MongoStorage code + 2) tests are run with incorrect redis and/or mongo URIsprovided by "--redis" and "--mongo" options (for example, wrong port specified) + 3) tests pass because skipping doesn't fail tests run + 4) developer or reviewer doesn't notice that redis and/or mongo tests were skipped + 5) broken code gets in codebase + + Also some refactorings done (related with storages and storages tests). + `#1510 `_ + + +3.7.0 (2024-05-31) +=================== + +Features +-------- + +- Added new storage :code:`aiogram.fsm.storage.MongoStorage` for Finite State Machine based on Mongo DB (using :code:`motor` library) + `#1434 `_ +- Added full support of `Bot API 7.4 `_ + `#1498 `_ + + +Bugfixes +-------- + +- Fixed wrong :code:`MarkdownV2` custom emoji parsing in :code:`aiogram.utils.text_decorations` + `#1496 `_ + + +Deprecations and Removals +------------------------- + +- 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 `_ + + +Misc +---- + +- 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 `_ + + +3.6.0 (2024-05-06) +=================== + +Features +-------- + +- Added full support of `Bot API 7.3 `_ + `#1480 `_ + + +Improved Documentation +---------------------- + +- Added telegram objects transformation block in 2.x -> 3.x migration guide + `#1412 `_ + + +3.5.0 (2024-04-23) +=================== + +Features +-------- + +- Added **message_thread_id** parameter to **ChatActionSender** class methods. + `#1437 `_ +- Added context manager interface to Bot instance, from now you can use: + + .. code-block:: python + + async with Bot(...) as bot: + ... + + instead of + + .. code-block:: python + + async with Bot(...).context() as bot: + ... + `#1468 `_ + + +Bugfixes +-------- + +- - **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. + + - **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. + + - **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. + `#1424 `_ +- Fixed poll answer FSM context by handling :code:`voter_chat` for :code:`poll_answer` event + `#1436 `_ +- Added missing error handling to :code:`_background_feed_update` (when in :code:`handle_in_background=True` webhook mode) + `#1458 `_ + + +Improved Documentation +---------------------- + +- Added WebAppChat class to WebApp docs, updated uk_UA localisation of WebApp docs. + `#1433 `_ + + +Misc +---- + +- Added full support of `Bot API 7.2 `_ + `#1444 `_ +- Loosened pydantic version upper restriction from ``<2.7`` to ``<2.8`` + `#1460 `_ + + +3.4.1 (2024-02-17) +=================== + +Bugfixes +-------- + +- Fixed JSON serialization of the :code:`LinkPreviewOptions` class while it is passed + as bot-wide default options. + `#1418 `_ + + +3.4.0 (2024-02-16) +=================== + +Features +-------- + +- Reworked bot-wide globals like :code:`parse_mode`, :code:`disable_web_page_preview`, and others to be more flexible. + + .. warning:: + + Note that the old way of setting these global bot properties is now deprecated and will be removed in the next major release. + `#1392 `_ +- A new enum :code:`KeyboardButtonPollTypeType` for :code:`KeyboardButtonPollTypeType.type` field has bed added. + `#1398 `_ +- Added full support of `Bot API 7.1 `_ + + - Added support for the administrator rights :code:`can_post_stories`, :code:`can_edit_stories`, :code:`can_delete_stories` in supergroups. + - 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. + - Added the field :code:`sender_boost_count` to the class :code:`Message`. + - Added the field :code:`reply_to_story` to the class :code:`Message`. + - Added the fields :code:`chat` and :code:`id` to the class :code:`Story`. + - Added the field :code:`unrestrict_boost_count` to the class :code:`Chat`. + - Added the field :code:`custom_emoji_sticker_set_name` to the class :code:`Chat`. + `#1417 `_ + + +Bugfixes +-------- + +- Update KeyboardBuilder utility, fixed type-hints for button method, adjusted limits of the different markup types to real world values. + `#1399 `_ +- Added new :code:`reply_parameters` param to :code:`message.send_copy` because it hasn't been added there + `#1403 `_ + + +Improved Documentation +---------------------- + +- Add notion "Working with plural forms" in documentation Utils -> Translation + `#1395 `_ + + +3.3.0 (2023-12-31) +=================== + +Features +-------- + +- Added full support of `Bot API 7.0 `_ + + - Reactions + - Replies 2.0 + - Link Preview Customization + - Block Quotation + - Multiple Message Actions + - Requests for multiple users + - Chat Boosts + - Giveaway + - Other changes + `#1387 `_ + + +3.2.0 (2023-11-24) +=================== + +Features +-------- + +- Introduced Scenes feature that helps you to simplify user interactions using Finite State Machine. + Read more about 👉 :ref:`Scenes `. + `#1280 `_ +- 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 groups without topics. + `#1343 `_ + + +Bugfixes +-------- + +- Fixed :code:`parse_mode` argument in the in :code:`Message.send_copy` shortcut. Disable by default. + `#1332 `_ +- Added ability to get handler flags from filters. + `#1360 `_ +- Fixed a situation where a :code:`CallbackData` could not be parsed without a default value. + `#1368 `_ + + +Improved Documentation +---------------------- + +- Corrected grammatical errors, improved sentence structures, translation for migration 2.x-3.x + `#1302 `_ +- Minor typo correction, specifically in module naming + some grammar. + `#1340 `_ +- 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 `_ +- Minor typo correction in middleware docs. + `#1353 `_ + + +Misc +---- + +- Fixed ResourceWarning in the tests, reworked :code:`RedisEventsIsolation` fixture to use Redis connection from :code:`RedisStorage` + `#1320 `_ +- Updated dependencies, bumped minimum required version: + + - :code:`magic-filter` - fixed `.resolve` operation + - :code:`pydantic` - fixed compatibility (broken in 2.4) + - :code:`aiodns` - added new dependency to the :code:`fast` extras (:code:`pip install aiogram[fast]`) + - *others...* + `#1327 `_ +- Prevent update handling task pointers from being garbage collected, backport from 2.x + `#1331 `_ +- Updated :code:`typing-extensions` package version range in dependencies to fix compatibility with :code:`FastAPI` + `#1347 `_ +- Introduce Python 3.12 support + `#1354 `_ +- Speeded up CallableMixin processing by caching references to nested objects and simplifying kwargs assembly. + `#1357 `_ +- Added :code:`pydantic` v2.5 support. + `#1361 `_ +- Updated :code:`thumbnail` fields type to :code:`InputFile` only + `#1372 `_ + + +3.1.1 (2023-09-25) +=================== + +Bugfixes +-------- + +- Fixed `pydantic` version <2.4, since 2.4 has breaking changes. + `#1322 `_ + + +3.1.0 (2023-09-22) +=================== + +Features +-------- + +- Added support for custom encoders/decoders for payload (and also for deep-linking). + `#1262 `_ +- Added :class:`aiogram.utils.input_media.MediaGroupBuilder` for media group construction. + `#1293 `_ +- Added full support of `Bot API 6.9 `_ + `#1319 `_ + + +Bugfixes +-------- + +- Added actual param hints for `InlineKeyboardBuilder` and `ReplyKeyboardBuilder`. + `#1303 `_ +- Fixed priority of events isolation, now user state will be loaded only after lock is acquired + `#1317 `_ + + +3.0.0 (2023-09-01) +=================== + +Bugfixes +-------- + +- 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 `_ +- Fixed magic :code:`.as_(...)` operation for values that can be interpreted as `False` (e.g. `0`). + `#1281 `_ +- Italic markdown from utils now uses correct decorators + `#1282 `_ +- Fixed method :code:`Message.send_copy` for stickers. + `#1284 `_ +- Fixed :code:`Message.send_copy` method, which was not working properly with stories, so not you can copy stories too (forwards messages). + `#1286 `_ +- Fixed error overlapping when validation error is caused by remove_unset root validator in base types and methods. + `#1290 `_ + + +3.0.0rc2 (2023-08-18) +====================== + +Bugfixes +-------- + +- Fixed missing message content types (:code:`ContentType.USER_SHARED`, :code:`ContentType.CHAT_SHARED`) + `#1252 `_ +- Fixed nested hashtag, cashtag and email message entities not being parsed correctly when these entities are inside another entity. + `#1259 `_ +- 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 `_ + + +Improved Documentation +---------------------- + +- Added error handling example `examples/error_handling.py` + `#1099 `_ +- Added a few words about skipping pending updates + `#1251 `_ +- Added a section on Dependency Injection technology + `#1253 `_ +- This update includes the addition of a multi-file bot example to the repository. + `#1254 `_ +- Refactored examples code to use aiogram enumerations and enhanced chat messages with markdown + beautification's for a more user-friendly display. + `#1256 `_ +- Supplemented "Finite State Machine" section in Migration FAQ + `#1264 `_ +- Removed extra param in docstring of TelegramEventObserver's filter method + and fixed typo in I18n documentation. + `#1268 `_ + + +Misc +---- + +- Enhanced the warning message in dispatcher to include a JSON dump of the update when update type is not known. + `#1269 `_ +- Added support for `Bot API 6.8 `_ + `#1275 `_ + + +3.0.0rc1 (2023-08-06) +====================== + +Features +-------- + +- Added Currency enum. + You can use it like this: + + .. code-block:: python + + from aiogram.enums import Currency + + await bot.send_invoice( + ..., + currency=Currency.USD, + ... + ) + `#1194 `_ +- Updated keyboard builders with new methods for integrating buttons and keyboard creation more seamlessly. + Added functionality to create buttons from existing markup and attach another builder. + This improvement aims to make the keyboard building process more user-friendly and flexible. + `#1236 `_ +- Added support for message_thread_id in ChatActionSender + `#1249 `_ + + +Bugfixes +-------- + +- Fixed polling startup when "bot" key is passed manually into dispatcher workflow data + `#1242 `_ +- Added codegen configuration for lost shortcuts: + + - ShippingQuery.answer + - PreCheckoutQuery.answer + - Message.delete_reply_markup + `#1244 `_ + + +Improved Documentation +---------------------- + +- Added documentation for webhook and polling modes. + `#1241 `_ + + +Misc +---- + +- Reworked InputFile reading, removed :code:`__aiter__` method, added `bot: Bot` argument to + the :code:`.read(...)` method, so, from now URLInputFile can be used without specifying + bot instance. + `#1238 `_ +- Code-generated :code:`__init__` typehints in types and methods to make IDE happy without additional pydantic plugin + `#1245 `_ + + +3.0.0b9 (2023-07-30) +===================== + +Features +-------- + +- Added new shortcuts for :class:`aiogram.types.chat_member_updated.ChatMemberUpdated` + to send message to chat that member joined/left. + `#1234 `_ +- Added new shortcuts for :class:`aiogram.types.chat_join_request.ChatJoinRequest` + to make easier access to sending messages to users who wants to join to chat. + `#1235 `_ + + +Bugfixes +-------- + +- Fixed bot assignment in the :code:`Message.send_copy` shortcut + `#1232 `_ +- Added model validation to remove UNSET before field validation. + This change was necessary to correctly handle parse_mode where 'UNSET' is used as a sentinel value. + Without the removal of 'UNSET', it would create issues when passed to model initialization from Bot.method_name. + 'UNSET' was also added to typing. + `#1233 `_ +- Updated pydantic to 2.1 with few bugfixes + + +Improved Documentation +---------------------- + +- Improved docs, added basic migration guide (will be expanded later) + `#1143 `_ + + +Deprecations and Removals +------------------------- + +- 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 context instance in the wrong place. + `#1230 `_ + + +3.0.0b8 (2023-07-17) +===================== + +Features +-------- + +- 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 `_ +- Added support for FSM in Forum topics. + + The strategy can be changed in dispatcher: + + .. code-block:: python + + from aiogram.fsm.strategy import FSMStrategy + ... + dispatcher = Dispatcher( + fsm_strategy=FSMStrategy.USER_IN_TOPIC, + storage=..., # Any persistent storage + ) + + .. note:: + + If you have implemented you own storages you should extend record key generation + with new one attribute - :code:`thread_id` + `#1161 `_ +- Improved CallbackData serialization. + + - Minimized UUID (hex without dashes) + - Replaced bool values with int (true=1, false=0) + `#1163 `_ +- Added a tool to make text formatting flexible and easy. + More details on the :ref:`corresponding documentation page ` + `#1172 `_ +- Added :code:`X-Telegram-Bot-Api-Secret-Token` header check + `#1173 `_ +- Made :code:`allowed_updates` list to revolve automatically in start_polling method if not set explicitly. + `#1178 `_ +- Added possibility to pass custom headers to :class:`URLInputFile` object + `#1191 `_ + + +Bugfixes +-------- + +- Change type of result in InlineQueryResult enum for :code:`InlineQueryResultCachedMpeg4Gif` + and :code:`InlineQueryResultMpeg4Gif` to more correct according to documentation. + + Change regexp for entities parsing to more correct (:code:`InlineQueryResultType.yml`). + `#1146 `_ +- Fixed signature of startup/shutdown events to include the :code:`**dispatcher.workflow_data` as the handler arguments. + `#1155 `_ +- Added missing :code:`FORUM_TOPIC_EDITED` value to content_type property + `#1160 `_ +- Fixed compatibility with Python 3.8-3.9 (from previous release) + `#1162 `_ +- Fixed the markdown spoiler parser. + `#1176 `_ +- Fixed workflow data propagation + `#1196 `_ +- Fixed the serialization error associated with nested subtypes + like InputMedia, ChatMember, etc. + + The previously generated code resulted in an invalid schema under pydantic v2, + which has stricter type parsing. + Hence, subtypes without the specification of all subtype unions were generating + an empty object. This has been rectified now. + `#1213 `_ + + +Improved Documentation +---------------------- + +- Changed small grammar typos for :code:`upload_file` + `#1133 `_ + + +Deprecations and Removals +------------------------- + +- Removed text filter in due to is planned to remove this filter few versions ago. + + Use :code:`F.text` instead + `#1170 `_ + + +Misc +---- + +- Added full support of `Bot API 6.6 `_ + + .. danger:: + + 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. + `#1139 `_ +- Added full support of `Bot API 6.7 `_ + + .. warning:: + + Note that arguments *switch_pm_parameter* and *switch_pm_text* was deprecated + and should be changed to *button* argument as described in API docs. + `#1168 `_ +- Updated `Pydantic to V2 `_ + + .. warning:: + + Be careful, not all libraries is already updated to using V2 + `#1202 `_ +- Added global defaults :code:`disable_web_page_preview` and :code:`protect_content` in addition to :code:`parse_mode` to the Bot instance, + reworked internal request builder mechanism. + `#1142 `_ +- Removed bot parameters from storages + `#1144 `_ + +- Replaced ContextVar's with a new feature called `Validation Context `_ + in Pydantic to improve the clarity, usability, and versatility of handling the Bot instance within method shortcuts. + + .. danger:: + + **Breaking**: The 'bot' argument now is required in `URLInputFile` + `#1210 `_ +- Updated magic-filter with new features + + - Added hint for :code:`len(F)` error + - Added not in operation + `#1221 `_ + + +3.0.0b7 (2023-02-18) +===================== + +.. warning:: + + 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. + + Sorry for the inconvenience, it will be fixed in the next version. + + This code will not work: + + .. code-block:: python + + dp = Dispatcher() + + def main(): + ... + dp.run_polling(...) + + main() + + But if you change it like this it should works as well: + + .. code-block:: python + + router = Router() + + async def main(): + dp = Dispatcher() + dp.include_router(router) + ... + dp.start_polling(...) + + asyncio.run(main()) + + +Features +-------- + +- Added missing shortcuts, new enums, reworked old stuff + + **Breaking** + All previously added enums is re-generated in new place - `aiogram.enums` instead of `aiogram.types` + + **Added enums:** :class:`aiogram.enums.bot_command_scope_type.BotCommandScopeType`, + :class:`aiogram.enums.chat_action.ChatAction`, + :class:`aiogram.enums.chat_member_status.ChatMemberStatus`, + :class:`aiogram.enums.chat_type.ChatType`, + :class:`aiogram.enums.content_type.ContentType`, + :class:`aiogram.enums.dice_emoji.DiceEmoji`, + :class:`aiogram.enums.inline_query_result_type.InlineQueryResultType`, + :class:`aiogram.enums.input_media_type.InputMediaType`, + :class:`aiogram.enums.mask_position_point.MaskPositionPoint`, + :class:`aiogram.enums.menu_button_type.MenuButtonType`, + :class:`aiogram.enums.message_entity_type.MessageEntityType`, + :class:`aiogram.enums.parse_mode.ParseMode`, + :class:`aiogram.enums.poll_type.PollType`, + :class:`aiogram.enums.sticker_type.StickerType`, + :class:`aiogram.enums.topic_icon_color.TopicIconColor`, + :class:`aiogram.enums.update_type.UpdateType`, + + **Added shortcuts**: + + - *Chat* :meth:`aiogram.types.chat.Chat.get_administrators`, + :meth:`aiogram.types.chat.Chat.delete_message`, + :meth:`aiogram.types.chat.Chat.revoke_invite_link`, + :meth:`aiogram.types.chat.Chat.edit_invite_link`, + :meth:`aiogram.types.chat.Chat.create_invite_link`, + :meth:`aiogram.types.chat.Chat.export_invite_link`, + :meth:`aiogram.types.chat.Chat.do`, + :meth:`aiogram.types.chat.Chat.delete_sticker_set`, + :meth:`aiogram.types.chat.Chat.set_sticker_set`, + :meth:`aiogram.types.chat.Chat.get_member`, + :meth:`aiogram.types.chat.Chat.get_member_count`, + :meth:`aiogram.types.chat.Chat.leave`, + :meth:`aiogram.types.chat.Chat.unpin_all_messages`, + :meth:`aiogram.types.chat.Chat.unpin_message`, + :meth:`aiogram.types.chat.Chat.pin_message`, + :meth:`aiogram.types.chat.Chat.set_administrator_custom_title`, + :meth:`aiogram.types.chat.Chat.set_permissions`, + :meth:`aiogram.types.chat.Chat.promote`, + :meth:`aiogram.types.chat.Chat.restrict`, + :meth:`aiogram.types.chat.Chat.unban`, + :meth:`aiogram.types.chat.Chat.ban`, + :meth:`aiogram.types.chat.Chat.set_description`, + :meth:`aiogram.types.chat.Chat.set_title`, + :meth:`aiogram.types.chat.Chat.delete_photo`, + :meth:`aiogram.types.chat.Chat.set_photo`, + - *Sticker*: :meth:`aiogram.types.sticker.Sticker.set_position_in_set`, + :meth:`aiogram.types.sticker.Sticker.delete_from_set`, + - *User*: :meth:`aiogram.types.user.User.get_profile_photos` + `#952 `_ +- Added :ref:`callback answer ` feature + `#1091 `_ +- Added a method that allows you to compactly register routers + `#1117 `_ + + +Bugfixes +-------- + +- Check status code when downloading file + `#816 `_ +- Fixed `ignore_case` parameter in :obj:`aiogram.filters.command.Command` filter + `#1106 `_ + + +Misc +---- + +- Added integration with new code-generator named `Butcher `_ + `#1069 `_ +- Added full support of `Bot API 6.4 `_ + `#1088 `_ +- Updated package metadata, moved build internals from Poetry to Hatch, added contributing guides. + `#1095 `_ +- Added full support of `Bot API 6.5 `_ + + .. danger:: + + 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 + `#1112 `_ +- Replaced error :code:`TypeError: TelegramEventObserver.__call__() got an unexpected keyword argument ''` + with a more understandable one for developers and with a link to the documentation. + `#1114 `_ +- Added possibility to reply into webhook with files + `#1120 `_ +- Reworked graceful shutdown. Added method to stop polling. + Now polling started from dispatcher can be stopped by signals gracefully without errors (on Linux and Mac). + `#1124 `_ + + +3.0.0b6 (2022-11-18) +===================== + +Features +-------- + +- (again) Added possibility to combine filters with an *and*/*or* operations. + + Read more in ":ref:`Combining filters `" documentation section + `#1018 `_ +- Added following methods to ``Message`` class: + + - :code:`Message.forward(...)` + - :code:`Message.edit_media(...)` + - :code:`Message.edit_live_location(...)` + - :code:`Message.stop_live_location(...)` + - :code:`Message.pin(...)` + - :code:`Message.unpin()` + `#1030 `_ +- Added following methods to :code:`User` class: + + - :code:`User.mention_markdown(...)` + - :code:`User.mention_html(...)` + `#1049 `_ +- Added full support of `Bot API 6.3 `_ + `#1057 `_ + + +Bugfixes +-------- + +- Fixed :code:`Message.send_invoice` and :code:`Message.reply_invoice`, added missing arguments + `#1047 `_ +- Fixed copy and forward in: + + - :code:`Message.answer(...)` + - :code:`Message.copy_to(...)` + `#1064 `_ + + +Improved Documentation +---------------------- + +- Fixed UA translations in index.po + `#1017 `_ +- Fix typehints for :code:`Message`, :code:`reply_media_group` and :code:`answer_media_group` methods + `#1029 `_ +- Removed an old now non-working feature + `#1060 `_ + + +Misc +---- + +- Enabled testing on Python 3.11 + `#1044 `_ +- 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 fails with reason :code:`[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain` + `#1066 `_ + + +3.0.0b5 (2022-10-02) +===================== + +Features +-------- + +- Add PyPy support and run tests under PyPy + `#985 `_ +- Added message text to aiogram exceptions representation + `#988 `_ +- Added warning about using magic filter from `magic_filter` instead of `aiogram`'s ones. + Is recommended to use `from aiogram import F` instead of `from magic_filter import F` + `#990 `_ +- Added more detailed error when server response can't be deserialized. This feature will help to debug unexpected responses from the Server + `#1014 `_ + + +Bugfixes +-------- + +- Reworked error event, introduced :class:`aiogram.types.error_event.ErrorEvent` object. + `#898 `_ +- Fixed escaping markdown in `aiogram.utils.markdown` module + `#903 `_ +- Fixed polling crash when Telegram Bot API raises HTTP 429 status-code. + `#995 `_ +- Fixed empty mention in command parsing, now it will be None instead of an empty string + `#1013 `_ + + +Improved Documentation +---------------------- + +- Initialized Docs translation (added Ukrainian language) + `#925 `_ + + +Deprecations and Removals +------------------------- + +- Removed filters factory as described in corresponding issue. + `#942 `_ + + +Misc +---- + +- Now Router/Dispatcher accepts only keyword arguments. + `#982 `_ + + +3.0.0b4 (2022-08-14) +===================== + +Features +-------- + +- Add class helper ChatAction for constants that Telegram BotAPI uses in sendChatAction request. + In my opinion, this will help users and will also improve compatibility with 2.x version + where similar class was called "ChatActions". + `#803 `_ +- Added possibility to combine filters or invert result + + Example: + + .. code-block:: python + + Text(text="demo") | Command(commands=["demo"]) + MyFilter() & AnotherFilter() + ~StateFilter(state='my-state') + + `#894 `_ +- Fixed type hints for redis TTL params. + `#922 `_ +- Added `full_name` shortcut for `Chat` object + `#929 `_ + + +Bugfixes +-------- + +- Fixed false-positive coercing of Union types in API methods + `#901 `_ +- Added 3 missing content types: + + * proximity_alert_triggered + * supergroup_chat_created + * channel_chat_created + `#906 `_ +- Fixed the ability to compare the state, now comparison to copy of the state will return `True`. + `#927 `_ +- Fixed default lock kwargs in RedisEventIsolation. + `#972 `_ + + +Misc +---- + +- Restrict including routers with strings + `#896 `_ +- Changed CommandPatterType to CommandPatternType in `aiogram/dispatcher/filters/command.py` + `#907 `_ +- Added full support of `Bot API 6.1 `_ + `#936 `_ +- **Breaking!** More flat project structure + + These packages was moved, imports in your code should be fixed: + + - :code:`aiogram.dispatcher.filters` -> :code:`aiogram.filters` + - :code:`aiogram.dispatcher.fsm` -> :code:`aiogram.fsm` + - :code:`aiogram.dispatcher.handler` -> :code:`aiogram.handler` + - :code:`aiogram.dispatcher.webhook` -> :code:`aiogram.webhook` + - :code:`aiogram.dispatcher.flags/*` -> :code:`aiogram.dispatcher.flags` (single module instead of package) + `#938 `_ +- Removed deprecated :code:`router._handler` and :code:`router.register__handler` methods. + `#941 `_ +- Deprecated filters factory. It will be removed in next Beta (3.0b5) + `#942 `_ +- `MessageEntity` method `get_text` was removed and `extract` was renamed to `extract_from` + `#944 `_ +- Added full support of `Bot API 6.2 `_ + `#975 `_ + + +3.0.0b3 (2022-04-19) +===================== + +Features +-------- + +- Added possibility to get command magic result as handler argument + `#889 `_ +- Added full support of `Telegram Bot API 6.0 `_ + `#890 `_ + + +Bugfixes +-------- + +- Fixed I18n lazy-proxy. Disabled caching. + `#839 `_ +- Added parsing of spoiler message entity + `#865 `_ +- Fixed default `parse_mode` for `Message.copy_to()` method. + `#876 `_ +- Fixed CallbackData factory parsing IntEnum's + `#885 `_ + + +Misc +---- + +- Added automated check that pull-request adds a changes description to **CHANGES** directory + `#873 `_ +- Changed :code:`Message.html_text` and :code:`Message.md_text` attributes behaviour when message has no text. + The empty string will be used instead of raising error. + `#874 `_ +- Used `redis-py` instead of `aioredis` package in due to this packages was merged into single one + `#882 `_ +- Solved common naming problem with middlewares that confusing too much developers + - now you can't see the `middleware` and `middlewares` attributes at the same point + because this functionality encapsulated to special interface. + `#883 `_ + + 3.0.0b2 (2022-02-19) ===================== diff --git a/CHANGES/839.bugix b/CHANGES/839.bugix deleted file mode 100644 index 89bbe247..00000000 --- a/CHANGES/839.bugix +++ /dev/null @@ -1 +0,0 @@ -Fixed I18n lazy-proxy. Disabled caching. diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 00000000..6eb723ae --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,23 @@ +# This CITATION.cff file was generated with cffinit. +# Visit https://bit.ly/cffinit to generate yours today! + +cff-version: 1.2.0 +title: aiogram +message: >- + If you use this software, please cite it using the + metadata from this file. +type: software +authors: + - given-names: Oleksandr + family-names: Onufriichuk + email: im@aiogram.dev +repository-code: 'https://github.com/aiogram/aiogram' +url: 'https://aiogram.dev' +abstract: >- + aiogram is a modern and fully asynchronous framework for + Telegram Bot API written in Python using asyncio +keywords: + - aiogram + - telegram + - bot +license: MIT 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/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..93f96099 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1 @@ +Please read the [Contributing](https://docs.aiogram.dev/en/dev-3.x/contributing.html) guidelines in the documentation site. diff --git a/LICENSE b/LICENSE index 872283c6..caa060cc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2017-2019 Alex Root Junior +Copyright (c) 2017 - present Alex Root Junior Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software diff --git a/Makefile b/Makefile index c0508fea..a92db1f8 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,4 @@ -.DEFAULT_GOAL := help - -base_python := python3 -py := poetry run -python := $(py) python +.DEFAULT_GOAL := lint package_dir := aiogram tests_dir := tests @@ -12,44 +8,12 @@ code_dir := $(package_dir) $(tests_dir) $(scripts_dir) $(examples_dir) reports_dir := reports redis_connection := redis://localhost:6379 - -.PHONY: help -help: - @echo "=======================================================================================" - @echo " aiogram build tools " - @echo "=======================================================================================" - @echo "Environment:" - @echo " help: Show this message" - @echo " install: Install development dependencies" - @echo " clean: Delete temporary files" - @echo "" - @echo "Code quality:" - @echo " lint: Lint code by isort, black, flake8 and mypy tools" - @echo " reformat: Reformat code by isort and black tools" - @echo "" - @echo "Tests:" - @echo " test: Run tests" - @echo " test-coverage: Run tests with HTML reporting (results + coverage)" - @echo " test-coverage-report: Open coverage report in default system web browser" - @echo "" - @echo "Documentation:" - @echo " docs: Build docs" - @echo " docs-serve: Serve docs for local development" - @echo " docs-prepare-reports: Move all HTML reports to docs dir" - @echo "" - @echo "Project" - @echo " build: Run tests build package and docs" - @echo "" +mongo_connection := mongodb://mongo:mongo@localhost:27017 # ================================================================================================= # Environment # ================================================================================================= -.PHONY: install -install: - poetry install -E fast -E redis -E proxy -E i18n -E docs - $(py) pre-commit install - .PHONY: clean clean: rm -rf `find . -name __pycache__` @@ -60,7 +24,12 @@ clean: rm -rf *.egg-info rm -f report.html rm -f .coverage - rm -rf {build,dist,site,.cache,.mypy_cache,reports} + rm -rf {build,dist,site,.cache,.mypy_cache,.ruff_cache,reports} + +.PHONY: install +install: clean + uv sync --all-extras --group dev --group test + uv run pre-commit install # ================================================================================================= # Code quality @@ -68,16 +37,14 @@ clean: .PHONY: lint lint: - $(py) isort --check-only $(code_dir) - $(py) black --check --diff $(code_dir) - $(py) flake8 $(code_dir) - $(py) mypy $(package_dir) - # TODO: wemake-python-styleguide + 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: - $(py) black $(code_dir) - $(py) isort $(code_dir) + uv run ruff format $(code_dir) + uv run ruff check --fix $(code_dir) # ================================================================================================= # Tests @@ -88,62 +55,78 @@ test-run-services: .PHONY: test test: test-run-services - $(py) pytest --cov=aiogram --cov-config .coveragerc tests/ --redis $(redis_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/ - $(py) pytest --cov=aiogram --cov-config .coveragerc --html=$(reports_dir)/tests/index.html tests/ --redis $(redis_connection) - -.PHONY: test-coverage-report -test-coverage-report: - $(py) 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: - $(py) 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 # ================================================================================================= -.PHONY: docs-serve +locales := uk_UA +locale_targets := $(addprefix docs-serve-, $(locales)) +locales_pot := _build/gettext +docs_dir := docs + +docs-gettext: + 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: - rm -rf docs/_build - $(py) sphinx-autobuild --watch aiogram/ docs/ docs/_build/ + 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-%: + $(MAKE) docs-serve OPTS="-D language=$(subst docs-serve-,,$@)" +.PHONY: $(locale_targets) # ================================================================================================= # Project # ================================================================================================= .PHONY: build -build: clean flake8-report mypy-report test-coverage - mkdir -p site/simple - poetry build - mv dist site/simple/aiogram +build: clean + uv build .PHONY: bump bump: - poetry 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: - 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-draft-github towncrier-build +prepare-release: bump towncrier-build -.PHONY: tag-release -tag-release: - git tag v$(poetry version -s) +.PHONY: release +release: + git add . + 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 99b88c07..94c8da9f 100644 --- a/README.rst +++ b/README.rst @@ -1,85 +1,80 @@ -#################### -aiogram |beta badge| -#################### +####### +aiogram +####### -.. danger:: - This version is still in development! - -.. image:: https://img.shields.io/pypi/l/aiogram.svg +.. image:: https://img.shields.io/pypi/l/aiogram.svg?style=flat-square :target: https://opensource.org/licenses/MIT :alt: MIT License -.. image:: https://img.shields.io/pypi/pyversions/aiogram.svg - :target: https://pypi.python.org/pypi/aiogram - :alt: Supported python versions - -.. image:: https://img.shields.io/badge/Telegram%20Bot%20API-5.7-blue.svg?logo=telegram - :target: https://core.telegram.org/bots/api - :alt: Telegram Bot API - -.. image:: https://github.com/aiogram/aiogram/workflows/Tests/badge.svg?branch=dev-3.x - :target: https://github.com/aiogram/aiogram/actions - :alt: Tests - -.. image:: https://img.shields.io/pypi/v/aiogram.svg - :target: https://pypi.python.org/pypi/aiogram - :alt: PyPi Package Version - -.. image:: https://img.shields.io/pypi/status/aiogram.svg +.. image:: https://img.shields.io/pypi/status/aiogram.svg?style=flat-square :target: https://pypi.python.org/pypi/aiogram :alt: PyPi status -.. image:: https://img.shields.io/pypi/dm/aiogram.svg +.. image:: https://img.shields.io/pypi/v/aiogram.svg?style=flat-square + :target: https://pypi.python.org/pypi/aiogram + :alt: PyPi Package Version + +.. image:: https://img.shields.io/pypi/dm/aiogram.svg?style=flat-square :target: https://pypi.python.org/pypi/aiogram :alt: Downloads -.. image:: https://img.shields.io/badge/telegram-aiogram-blue.svg - :target: https://t.me/aiogram_live - :alt: [Telegram] aiogram live +.. image:: https://img.shields.io/pypi/pyversions/aiogram.svg?style=flat-square + :target: https://pypi.python.org/pypi/aiogram + :alt: Supported python versions + +.. image:: https://img.shields.io/badge/dynamic/json?color=blue&logo=telegram&label=Telegram%20Bot%20API&query=%24.api.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Faiogram%2Faiogram%2Fdev-3.x%2F.butcher%2Fschema%2Fschema.json&style=flat-square + :target: https://core.telegram.org/bots/api + :alt: Telegram Bot API + +.. image:: https://img.shields.io/github/actions/workflow/status/aiogram/aiogram/tests.yml?branch=dev-3.x&style=flat-square + :target: https://github.com/aiogram/aiogram/actions + :alt: Tests .. image:: https://img.shields.io/codecov/c/github/aiogram/aiogram?style=flat-square :target: https://app.codecov.io/gh/aiogram/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 `_. Make your bots faster and more powerful! -.. danger:: +Documentation: + - 🇺🇸 `English `_ + - 🇺🇦 `Ukrainian `_ - **Breaking News:** - - *aiogram* 3.0 has breaking changes. - - It breaks backward compatibility by introducing new breaking changes! Features ======== - Asynchronous (`asyncio docs `_, :pep:`492`) - Has type hints (:pep:`484`) and can be used with `mypy `_ -- Supports `Telegram Bot API 5.3 `_ +- Supports `PyPy `_ +- 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 +- Uses powerful `magic filters `_ - Middlewares (incoming updates and API calls) - Provides `Replies into Webhook `_ - Integrated I18n/L10n support with GNU Gettext (or Fluent) + .. warning:: - It is strongly advised that you have prior experience working - with `asyncio `_ + It is strongly advised that you have prior experience working + with `asyncio `_ before beginning to use **aiogram**. If you have any questions, you can visit our community chats on Telegram: - - `English language `_ - - `Russian language `_ - - -.. |beta badge| image:: https://img.shields.io/badge/-beta-orange - :alt: Beta badge + - 🇺🇸 `@aiogram `_ + - 🇺🇦 `@aiogramua `_ + - 🇺🇿 `@aiogram_uz `_ + - 🇰🇿 `@aiogram_kz `_ + - 🇷🇺 `@aiogram_ru `_ + - 🇮🇷 `@aiogram_fa `_ + - 🇮🇹 `@aiogram_it `_ + - 🇧🇷 `@aiogram_br `_ diff --git a/aiogram/__init__.py b/aiogram/__init__.py index d734cb83..e38c03b1 100644 --- a/aiogram/__init__.py +++ b/aiogram/__init__.py @@ -1,43 +1,32 @@ +from aiogram.dispatcher.flags import FlagGenerator + +from . import enums, methods, types +from .__meta__ import __api_version__, __version__ from .client import session from .client.bot import Bot -from .dispatcher import filters, handler from .dispatcher.dispatcher import Dispatcher -from .dispatcher.flags.flag import FlagGenerator from .dispatcher.middlewares.base import BaseMiddleware from .dispatcher.router import Router from .utils.magic_filter import MagicFilter -from .utils.text_decorations import html_decoration as _html_decoration -from .utils.text_decorations import markdown_decoration as _markdown_decoration - -try: - import uvloop as _uvloop - - _uvloop.install() -except ImportError: # pragma: no cover - pass +from .utils.text_decorations import html_decoration as html +from .utils.text_decorations import markdown_decoration as md F = MagicFilter() -html = _html_decoration -md = _markdown_decoration flags = FlagGenerator() __all__ = ( + "BaseMiddleware", + "Bot", + "Dispatcher", + "F", + "Router", "__api_version__", "__version__", - "types", - "methods", - "Bot", - "session", - "Dispatcher", - "Router", - "BaseMiddleware", - "filters", - "handler", - "F", + "enums", + "flags", "html", "md", - "flags", + "methods", + "session", + "types", ) - -__version__ = "3.0.0b2" -__api_version__ = "5.7" diff --git a/aiogram/__meta__.py b/aiogram/__meta__.py new file mode 100644 index 00000000..f60aa330 --- /dev/null +++ b/aiogram/__meta__.py @@ -0,0 +1,2 @@ +__version__ = "3.27.0" +__api_version__ = "9.6" diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index 94feb7b8..e85c1367 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -1,24 +1,19 @@ 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, TypeVar, - Union, cast, ) import aiofiles -from aiogram.utils.mixins import ContextInstanceMixin from aiogram.utils.token import extract_bot_id, validate_token from ..methods import ( @@ -27,59 +22,117 @@ from ..methods import ( AnswerInlineQuery, AnswerPreCheckoutQuery, AnswerShippingQuery, + AnswerWebAppQuery, ApproveChatJoinRequest, + ApproveSuggestedPost, BanChatMember, BanChatSenderChat, Close, + CloseForumTopic, + CloseGeneralForumTopic, + ConvertGiftToStars, CopyMessage, + CopyMessages, CreateChatInviteLink, + CreateChatSubscriptionInviteLink, + CreateForumTopic, + CreateInvoiceLink, CreateNewStickerSet, DeclineChatJoinRequest, + DeclineSuggestedPost, + DeleteBusinessMessages, DeleteChatPhoto, DeleteChatStickerSet, + DeleteForumTopic, DeleteMessage, + DeleteMessages, 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, - GetChatMembersCount, + GetChatMenuButton, + GetCustomEmojiStickers, GetFile, + GetForumTopicIconStickers, GetGameHighScores, + GetManagedBotToken, GetMe, GetMyCommands, + GetMyDefaultAdministratorRights, + GetMyDescription, + GetMyName, + GetMyShortDescription, + GetMyStarBalance, + GetStarTransactions, GetStickerSet, GetUpdates, + GetUserChatBoosts, + GetUserGifts, + GetUserProfileAudios, GetUserProfilePhotos, GetWebhookInfo, - KickChatMember, + 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, SendSticker, @@ -87,80 +140,134 @@ from ..methods import ( SendVideo, SendVideoNote, SendVoice, + SetBusinessAccountBio, + SetBusinessAccountGiftSettings, + SetBusinessAccountName, + SetBusinessAccountProfilePhoto, + SetBusinessAccountUsername, SetChatAdministratorCustomTitle, SetChatDescription, + SetChatMemberTag, + SetChatMenuButton, SetChatPermissions, SetChatPhoto, SetChatStickerSet, SetChatTitle, + SetCustomEmojiStickerSetThumbnail, SetGameScore, + SetMessageReaction, SetMyCommands, + SetMyDefaultAdministratorRights, + SetMyDescription, + SetMyName, + SetMyProfilePhoto, + SetMyShortDescription, SetPassportDataErrors, + SetStickerEmojiList, + SetStickerKeywords, + SetStickerMaskPosition, SetStickerPositionInSet, - SetStickerSetThumb, + SetStickerSetThumbnail, + SetStickerSetTitle, + SetUserEmojiStatus, SetWebhook, StopMessageLiveLocation, StopPoll, TelegramMethod, + TransferBusinessAccountStars, + TransferGift, UnbanChatMember, UnbanChatSenderChat, + UnhideGeneralForumTopic, UnpinAllChatMessages, + UnpinAllForumTopicMessages, + UnpinAllGeneralForumTopicMessages, UnpinChatMessage, + UpgradeGift, UploadStickerFile, + VerifyChat, + VerifyUser, ) from ..types import ( - UNSET, + AcceptedGiftTypes, BotCommand, - BotCommandScope, - Chat, + BotCommandScopeUnion, + BotDescription, + BotName, + BotShortDescription, + BusinessConnection, + ChatAdministratorRights, + ChatFullInfo, + ChatIdUnion, ChatInviteLink, - ChatMemberAdministrator, - ChatMemberBanned, - ChatMemberLeft, - ChatMemberMember, - ChatMemberOwner, - ChatMemberRestricted, ChatPermissions, + DateTimeUnion, Downloadable, File, - ForceReply, + ForumTopic, GameHighScore, + Gifts, InlineKeyboardMarkup, - InlineQueryResult, + InlineQueryResultsButton, + InlineQueryResultUnion, + InputChecklist, InputFile, - InputMedia, - InputMediaAudio, - InputMediaDocument, - InputMediaPhoto, - InputMediaVideo, + InputFileUnion, + InputMediaUnion, + InputPaidMediaUnion, + InputPollOptionUnion, + InputProfilePhotoUnion, + InputSticker, + InputStoryContentUnion, + KeyboardButton, LabeledPrice, + LinkPreviewOptions, MaskPosition, + MediaUnion, + MenuButtonUnion, Message, MessageEntity, MessageId, - PassportElementError, + OwnedGifts, + PassportElementErrorUnion, Poll, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + PreparedInlineMessage, + PreparedKeyboardButton, + ReactionTypeUnion, + ReplyMarkupUnion, + ReplyParameters, + ResultChatMemberUnion, + ResultMenuButtonUnion, + SentWebAppMessage, ShippingOption, + StarAmount, + StarTransactions, + Sticker, StickerSet, + Story, + StoryArea, + SuggestedPostParameters, Update, User, + UserChatBoosts, + UserProfileAudios, UserProfilePhotos, WebhookInfo, ) +from .default import Default, DefaultBotProperties from .session.aiohttp import AiohttpSession from .session.base import BaseSession T = TypeVar("T") -class Bot(ContextInstanceMixin["Bot"]): +class Bot: def __init__( self, token: str, - session: Optional[BaseSession] = None, - parse_mode: Optional[str] = None, + session: BaseSession | None = None, + default: DefaultBotProperties | None = None, + **kwargs: Any, ) -> None: """ Bot class @@ -168,7 +275,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param token: Telegram Bot token `Obtained from @BotFather `_ :param session: HTTP Client session (For example AiohttpSession). If not specified it will be automatically created. - :param parse_mode: Default parse mode. + :param default: Default bot properties. If specified it will be propagated into the API methods at runtime. :raise TokenValidationError: When token has invalid format this exception will be raised """ @@ -177,11 +284,51 @@ class Bot(ContextInstanceMixin["Bot"]): if session is None: session = AiohttpSession() + if default is None: + default = DefaultBotProperties() self.session = session - self.parse_mode = parse_mode + + # 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") + 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 + or protect_content is not None + ): + example_kwargs = { + "parse_mode": parse_mode, + "link_preview_is_disabled": link_preview_is_disabled, + "protect_content": protect_content, + } + replacement_spec = ", ".join( + f"{k}={v!r}" for k, v in example_kwargs.items() if v is not None + ) + raise TypeError( + "Passing `parse_mode`, `disable_web_page_preview` or `protect_content` " + "to Bot initializer is not supported anymore. These arguments have been removed " + f"in 3.7.0 version. Use `default=DefaultBotProperties({replacement_spec})` argument instead." + ) + + self.default = default + self.__token = token - self._me: Optional[User] = None + self._me: User | None = None + + async def __aenter__(self) -> Bot: + return self + + async def __aexit__( + self, + exc_type: type[BaseException] | None, + exc_value: BaseException | None, + traceback: TracebackType | None, + ) -> None: + await self.session.close() @property def token(self) -> str: @@ -201,18 +348,21 @@ class Bot(ContextInstanceMixin["Bot"]): """ Generate bot context - :param auto_close: + :param auto_close: close session on exit :return: """ - token = self.set_current(self) try: yield self finally: if auto_close: await self.session.close() - self.reset_current(token) async def me(self) -> User: + """ + Cached alias for getMe method + + :return: + """ if self._me is None: # pragma: no cover self._me = await self.get_me() return self._me @@ -230,7 +380,7 @@ class Bot(ContextInstanceMixin["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: @@ -238,7 +388,7 @@ class Bot(ContextInstanceMixin["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): @@ -246,12 +396,12 @@ class Bot(ContextInstanceMixin["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. @@ -270,32 +420,37 @@ class Bot(ContextInstanceMixin["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: url = self.session.api.file_url(self.__token, file_path) - stream = self.session.stream_content(url=url, timeout=timeout, chunk_size=chunk_size) + stream = self.session.stream_content( + url=url, + timeout=timeout, + chunk_size=chunk_size, + raise_for_status=True, + ) try: if isinstance(destination, (str, pathlib.Path)): - return await self.__download_file(destination=destination, stream=stream) - else: - return await self.__download_file_binary_io( - destination=destination, seek=seek, stream=stream - ) + await self.__download_file(destination=destination, stream=stream) + return None + return await self.__download_file_binary_io( + destination=destination, seek=seek, stream=stream + ) finally: if close_stream: await stream.aclose() 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. @@ -312,7 +467,7 @@ class Bot(ContextInstanceMixin["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") @@ -328,9 +483,7 @@ class Bot(ContextInstanceMixin["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 @@ -358,1913 +511,57 @@ class Bot(ContextInstanceMixin["Bot"]): return False return hash(self) == hash(other) - # ============================================================================================= - # Group: Getting updates - # Source: https://core.telegram.org/bots/api#getting-updates - # ============================================================================================= - - 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]: - """ - Use this method to receive incoming updates using long polling (`wiki `_). An Array of :class:`aiogram.types.update.Update` objects is returned. - - **Notes** - - **1.** This method will not work if an outgoing webhook is set up. - - **2.** In order to avoid getting duplicate updates, recalculate *offset* after each server response. - - Source: https://core.telegram.org/bots/api#getupdates - - :param offset: 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 forgotten. - :param limit: Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. - :param timeout: 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. - :param allowed_updates: 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 :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* (default). If not specified, the previous setting will be used. - :param request_timeout: Request timeout - :return: An Array of Update objects is returned. - """ - call = GetUpdates( - offset=offset, - limit=limit, - timeout=timeout, - allowed_updates=allowed_updates, - ) - return await self(call, request_timeout=request_timeout) - - 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, - request_timeout: Optional[int] = 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. - If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. :code:`https://www.example.com/`. Since nobody else knows your bot's token, you can be pretty sure it's us. - - **Notes** - - **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. - - **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. - - **3.** Ports currently supported *for Webhooks*: **443, 80, 88, 8443**. - **NEW!** If you're having any trouble setting up webhooks, please check out this `amazing guide to Webhooks `_. - - Source: https://core.telegram.org/bots/api#setwebhook - - :param url: HTTPS url to send updates to. Use an empty string to remove webhook integration - :param certificate: Upload your public key certificate so that the root certificate in use can be checked. See our `self-signed guide `_ for details. - :param ip_address: The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS - :param max_connections: 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. - :param allowed_updates: 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 :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* (default). If not specified, the previous setting will be used. - :param drop_pending_updates: Pass :code:`True` to drop all pending updates - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetWebhook( - url=url, - certificate=certificate, - ip_address=ip_address, - max_connections=max_connections, - allowed_updates=allowed_updates, - drop_pending_updates=drop_pending_updates, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_webhook( - self, - drop_pending_updates: Optional[bool] = None, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#deletewebhook - - :param drop_pending_updates: Pass :code:`True` to drop all pending updates - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = DeleteWebhook( - drop_pending_updates=drop_pending_updates, - ) - return await self(call, request_timeout=request_timeout) - - async def get_webhook_info( - self, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#getwebhookinfo - - :param request_timeout: Request timeout - :return: On success, returns a WebhookInfo object. If the bot is using getUpdates, will - return an object with the url field empty. - """ - call = GetWebhookInfo() - return await self(call, request_timeout=request_timeout) - - # ============================================================================================= - # Group: Available methods - # Source: https://core.telegram.org/bots/api#available-methods - # ============================================================================================= - - async def get_me( - self, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#getme - - :param request_timeout: Request timeout - :return: Returns basic information about the bot in form of a User object. - """ - call = GetMe() - return await self(call, request_timeout=request_timeout) - - async def log_out( - self, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#logout - - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = LogOut() - return await self(call, request_timeout=request_timeout) - - async def close( - self, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#close - - :param request_timeout: Request timeout - :return: The method will return error 429 in the first 10 minutes after the bot is - launched. Returns True on success. - """ - call = Close() - return await self(call, request_timeout=request_timeout) - - async def send_message( - self, - chat_id: Union[int, str], - text: str, - parse_mode: Optional[str] = UNSET, - entities: Optional[List[MessageEntity]] = None, - disable_web_page_preview: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - 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 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 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 disable_web_page_preview: Disables link previews for links in this 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 reply_to_message_id: If the message is a reply, ID of the original message - :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_markup: 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. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendMessage( - chat_id=chat_id, - text=text, - parse_mode=parse_mode, - entities=entities, - disable_web_page_preview=disable_web_page_preview, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def forward_message( - self, - chat_id: Union[int, str], - from_chat_id: Union[int, str], - message_id: int, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent :class:`aiogram.types.message.Message` is returned. - - 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 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 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 request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = ForwardMessage( - chat_id=chat_id, - from_chat_id=from_chat_id, - message_id=message_id, - disable_notification=disable_notification, - protect_content=protect_content, - ) - return await self(call, request_timeout=request_timeout) - - async def copy_message( - self, - chat_id: Union[int, str], - from_chat_id: Union[int, str], - message_id: int, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - caption_entities: Optional[List[MessageEntity]] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> MessageId: - """ - Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. 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. - - 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 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 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 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 reply_to_message_id: If the message is a reply, ID of the original message - :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_markup: 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. - :param request_timeout: Request timeout - :return: Returns the MessageId of the sent message on success. - """ - call = CopyMessage( - chat_id=chat_id, - from_chat_id=from_chat_id, - message_id=message_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_photo( - self, - chat_id: Union[int, str], - photo: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - caption_entities: Optional[List[MessageEntity]] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - 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 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 info on Sending Files » ` - :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 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 reply_to_message_id: If the message is a reply, ID of the original message - :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_markup: 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. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendPhoto( - chat_id=chat_id, - photo=photo, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_audio( - self, - chat_id: Union[int, str], - audio: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumb: Optional[Union[InputFile, str]] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = 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. - For sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead. - - Source: https://core.telegram.org/bots/api#sendaudio - - :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 info on Sending Files » ` - :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 thumb: 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 info 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 reply_to_message_id: If the message is a reply, ID of the original message - :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_markup: 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. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendAudio( - chat_id=chat_id, - audio=audio, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - performer=performer, - title=title, - thumb=thumb, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_document( - self, - chat_id: Union[int, str], - document: Union[InputFile, str], - thumb: Optional[Union[InputFile, str]] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#senddocument - - :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 info on Sending Files » ` - :param thumb: 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 info 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 reply_to_message_id: If the message is a reply, ID of the original message - :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_markup: 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. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendDocument( - chat_id=chat_id, - document=document, - thumb=thumb, - 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, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_video( - self, - chat_id: Union[int, str], - video: Union[InputFile, str], - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - caption_entities: Optional[List[MessageEntity]] = None, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send video files, Telegram clients support mp4 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 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 info on Sending Files » ` - :param duration: Duration of sent video in seconds - :param width: Video width - :param height: Video height - :param thumb: 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 info on Sending Files » ` - :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 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 reply_to_message_id: If the message is a reply, ID of the original message - :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_markup: 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. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendVideo( - chat_id=chat_id, - video=video, - duration=duration, - width=width, - height=height, - thumb=thumb, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - supports_streaming=supports_streaming, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_animation( - self, - chat_id: Union[int, str], - animation: Union[InputFile, str], - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - caption_entities: Optional[List[MessageEntity]] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#sendanimation - - :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 info on Sending Files » ` - :param duration: Duration of sent animation in seconds - :param width: Animation width - :param height: Animation height - :param thumb: 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 info 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 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 reply_to_message_id: If the message is a reply, ID of the original message - :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_markup: 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. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendAnimation( - chat_id=chat_id, - animation=animation, - duration=duration, - width=width, - height=height, - thumb=thumb, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_voice( - self, - chat_id: Union[int, str], - voice: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = 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 (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 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 info on Sending Files » ` - :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 reply_to_message_id: If the message is a reply, ID of the original message - :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_markup: 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. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendVoice( - chat_id=chat_id, - voice=voice, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_video_note( - self, - chat_id: Union[int, str], - video_note: Union[InputFile, str], - duration: Optional[int] = None, - length: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - As of `v.4.0 `_, Telegram clients support rounded square mp4 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 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 info on Sending Files » `. Sending video notes by a URL is currently unsupported - :param duration: Duration of sent video in seconds - :param length: Video width and height, i.e. diameter of the video message - :param thumb: 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 info 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 reply_to_message_id: If the message is a reply, ID of the original message - :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_markup: 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. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendVideoNote( - chat_id=chat_id, - video_note=video_note, - duration=duration, - length=length, - thumb=thumb, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_media_group( - self, - chat_id: Union[int, str], - media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> List[Message]: - """ - Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages `_ that were sent is returned. - - 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 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 reply_to_message_id: If the messages are a reply, ID of the original message - :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 request_timeout: Request timeout - :return: On success, an array of Messages that were sent is returned. - """ - call = SendMediaGroup( - chat_id=chat_id, - media=media, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - ) - return await self(call, request_timeout=request_timeout) - - async def send_location( - self, - chat_id: Union[int, str], - 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[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - 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 chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param latitude: Latitude of the location - :param longitude: Longitude of the location - :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 - :param live_period: Period in seconds for which the location will be updated (see `Live Locations `_, should be between 60 and 86400. - :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 reply_to_message_id: If the message is a reply, ID of the original message - :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_markup: 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. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendLocation( - chat_id=chat_id, - latitude=latitude, - longitude=longitude, - horizontal_accuracy=horizontal_accuracy, - live_period=live_period, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_message_live_location( - self, - latitude: float, - longitude: float, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = 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]: - """ - 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 - - :param latitude: Latitude of new location - :param longitude: Longitude of new location - :param chat_id: 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`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 - :param heading: Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. - :param proximity_alert_radius: Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. - :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. - :param request_timeout: Request timeout - :return: On success, if the edited message is not an inline message, the edited Message is - returned, otherwise True is returned. - """ - call = EditMessageLiveLocation( - latitude=latitude, - longitude=longitude, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - horizontal_accuracy=horizontal_accuracy, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def stop_message_live_location( - self, - 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]: - """ - 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 chat_id: 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`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message with live location to stop - :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 `_. - :param request_timeout: Request timeout - :return: On success, if the message is not an inline message, the edited Message is - returned, otherwise True is returned. - """ - call = StopMessageLiveLocation( - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_venue( - self, - chat_id: Union[int, str], - latitude: float, - 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[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - 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 chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :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 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 reply_to_message_id: If the message is a reply, ID of the original message - :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_markup: 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. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendVenue( - chat_id=chat_id, - latitude=latitude, - longitude=longitude, - title=title, - address=address, - 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, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_contact( - self, - chat_id: Union[int, str], - phone_number: str, - first_name: str, - last_name: Optional[str] = None, - vcard: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - 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 chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param phone_number: Contact's phone number - :param first_name: Contact's first name - :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 reply_to_message_id: If the message is a reply, ID of the original message - :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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove keyboard or to force a reply from the user. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendContact( - chat_id=chat_id, - phone_number=phone_number, - first_name=first_name, - last_name=last_name, - vcard=vcard, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_poll( - self, - chat_id: Union[int, str], - question: str, - options: List[str], - 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[str] = UNSET, - 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[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = 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 question: Poll question, 1-300 characters - :param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each - :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 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, which can be specified instead of *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 is_closed: Pass :code:`True`, if the poll needs to be immediately closed. This can be useful for poll preview. - :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 reply_to_message_id: If the message is a reply, ID of the original message - :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_markup: 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. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendPoll( - chat_id=chat_id, - question=question, - options=options, - is_anonymous=is_anonymous, - type=type, - allows_multiple_answers=allows_multiple_answers, - correct_option_id=correct_option_id, - explanation=explanation, - explanation_parse_mode=explanation_parse_mode, - explanation_entities=explanation_entities, - open_period=open_period, - close_date=close_date, - is_closed=is_closed, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_dice( - self, - chat_id: Union[int, str], - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#senddice - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :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 reply_to_message_id: If the message is a reply, ID of the original message - :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_markup: 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. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendDice( - chat_id=chat_id, - emoji=emoji, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_chat_action( - self, - chat_id: Union[int, str], - action: str, - request_timeout: Optional[int] = 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. - - Example: The `ImageBot `_ needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please wait…', the bot may use :class:`aiogram.methods.send_chat_action.SendChatAction` with *action* = *upload_photo*. The user will see a 'sending photo' status for the bot. - - We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive. - - 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 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 request_timeout: Request timeout - :return: Returns True on success. - """ - call = SendChatAction( - chat_id=chat_id, - action=action, - ) - return await self(call, request_timeout=request_timeout) - - async def get_user_profile_photos( + async def add_sticker_to_set( self, user_id: int, - offset: Optional[int] = None, - limit: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> UserProfilePhotos: + name: str, + sticker: InputSticker, + request_timeout: int | None = None, + ) -> bool: """ - Use this method to get a list of profile pictures for a user. Returns a :class:`aiogram.types.user_profile_photos.UserProfilePhotos` object. + 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. - Source: https://core.telegram.org/bots/api#getuserprofilephotos + Source: https://core.telegram.org/bots/api#addstickertoset - :param user_id: Unique identifier of the target user - :param offset: Sequential number of the first photo to be returned. By default, all photos are returned. - :param limit: Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. + :param user_id: User identifier of sticker set owner + :param name: Sticker set name + :param sticker: 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 isn't changed. :param request_timeout: Request timeout - :return: Returns a UserProfilePhotos object. + :return: Returns :code:`True` on success. """ - call = GetUserProfilePhotos( + + call = AddStickerToSet( user_id=user_id, - offset=offset, - limit=limit, - ) - return await self(call, request_timeout=request_timeout) - - async def get_file( - self, - file_id: str, - request_timeout: Optional[int] = None, - ) -> File: - """ - Use this method to get basic info 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. - **Note:** This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received. - - Source: https://core.telegram.org/bots/api#getfile - - :param file_id: File identifier to get info about - :param request_timeout: Request timeout - :return: On success, a File object is returned. - """ - call = GetFile( - file_id=file_id, - ) - return await self(call, request_timeout=request_timeout) - - async def ban_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - revoke_messages: Optional[bool] = None, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#banchatmember - - :param chat_id: Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param until_date: 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. - :param revoke_messages: 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. - :param request_timeout: Request timeout - :return: 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. Returns True on success. - """ - call = BanChatMember( - chat_id=chat_id, - user_id=user_id, - until_date=until_date, - revoke_messages=revoke_messages, - ) - return await self(call, request_timeout=request_timeout) - - async def kick_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - revoke_messages: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - .. warning: - - Renamed from :code:`kickChatMember` in 5.3 bot API version and can be removed in near future - - 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. - - Source: https://core.telegram.org/bots/api#banchatmember - - :param chat_id: Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param until_date: 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. - :param revoke_messages: 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. - :param request_timeout: Request timeout - :return: 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. Returns True on success. - """ - call = KickChatMember( - chat_id=chat_id, - user_id=user_id, - until_date=until_date, - revoke_messages=revoke_messages, - ) - return await self(call, request_timeout=request_timeout) - - async def unban_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - only_if_banned: Optional[bool] = None, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#unbanchatmember - - :param chat_id: Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param only_if_banned: Do nothing if the user is not banned - :param request_timeout: Request timeout - :return: The user will not return to the group or channel automatically, but will be able - to join via link, etc. Returns True on success. - """ - call = UnbanChatMember( - chat_id=chat_id, - user_id=user_id, - only_if_banned=only_if_banned, - ) - return await self(call, request_timeout=request_timeout) - - async def restrict_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - permissions: ChatPermissions, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#restrictchatmember - - :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 permissions: A JSON-serialized object for new user permissions - :param until_date: 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 - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = RestrictChatMember( - chat_id=chat_id, - user_id=user_id, - permissions=permissions, - until_date=until_date, - ) - return await self(call, request_timeout=request_timeout) - - async def promote_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - is_anonymous: Optional[bool] = None, - can_manage_chat: Optional[bool] = None, - can_post_messages: Optional[bool] = None, - can_edit_messages: Optional[bool] = None, - can_delete_messages: Optional[bool] = None, - can_manage_voice_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_pin_messages: Optional[bool] = None, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#promotechatmember - - :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, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege - :param can_post_messages: Pass :code:`True`, if the administrator can create channel posts, channels only - :param can_edit_messages: Pass :code:`True`, if the administrator can edit messages of other users and can pin messages, channels only - :param can_delete_messages: Pass :code:`True`, if the administrator can delete messages of other users - :param can_manage_voice_chats: Pass :code:`True`, if the administrator can manage voice chats - :param can_restrict_members: Pass :code:`True`, if the administrator can restrict, ban or unban chat members - :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 he has 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_pin_messages: Pass :code:`True`, if the administrator can pin messages, supergroups only - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = PromoteChatMember( - chat_id=chat_id, - user_id=user_id, - is_anonymous=is_anonymous, - can_manage_chat=can_manage_chat, - can_post_messages=can_post_messages, - can_edit_messages=can_edit_messages, - can_delete_messages=can_delete_messages, - can_manage_voice_chats=can_manage_voice_chats, - can_restrict_members=can_restrict_members, - can_promote_members=can_promote_members, - can_change_info=can_change_info, - can_invite_users=can_invite_users, - can_pin_messages=can_pin_messages, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_administrator_custom_title( - self, - chat_id: Union[int, str], - user_id: int, - custom_title: str, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#setchatadministratorcustomtitle - - :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 custom_title: New custom title for the administrator; 0-16 characters, emoji are not allowed - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetChatAdministratorCustomTitle( - chat_id=chat_id, - user_id=user_id, - custom_title=custom_title, - ) - return await self(call, request_timeout=request_timeout) - - async def ban_chat_sender_chat( - self, - chat_id: Union[int, str], - sender_chat_id: int, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#banchatsenderchat - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param sender_chat_id: Unique identifier of the target sender chat - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = BanChatSenderChat( - chat_id=chat_id, - sender_chat_id=sender_chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def unban_chat_sender_chat( - self, - chat_id: Union[int, str], - sender_chat_id: int, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#unbanchatsenderchat - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param sender_chat_id: Unique identifier of the target sender chat - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = UnbanChatSenderChat( - chat_id=chat_id, - sender_chat_id=sender_chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_permissions( - self, - chat_id: Union[int, str], - permissions: ChatPermissions, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#setchatpermissions - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param permissions: A JSON-serialized object for new default chat permissions - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetChatPermissions( - chat_id=chat_id, - permissions=permissions, - ) - return await self(call, request_timeout=request_timeout) - - async def export_chat_invite_link( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = 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. - - Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again. - - Source: https://core.telegram.org/bots/api#exportchatinvitelink - - :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 the new invite link as String on success. - """ - call = ExportChatInviteLink( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - 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, - ) -> 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. - - Source: https://core.telegram.org/bots/api#createchatinvitelink - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param name: Invite link name; 0-32 characters - :param expire_date: Point in time (Unix timestamp) when the link will expire - :param member_limit: Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 - :param creates_join_request: :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 - :param request_timeout: Request timeout - :return: Returns the new invite link as ChatInviteLink object. - """ - call = CreateChatInviteLink( - chat_id=chat_id, name=name, - expire_date=expire_date, - member_limit=member_limit, - creates_join_request=creates_join_request, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_chat_invite_link( - self, - chat_id: Union[int, str], - 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, - ) -> 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. - - Source: https://core.telegram.org/bots/api#editchatinvitelink - - :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 expire_date: Point in time (Unix timestamp) when the link will expire - :param member_limit: Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 - :param creates_join_request: :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 - :param request_timeout: Request timeout - :return: Returns the edited invite link as a ChatInviteLink object. - """ - call = EditChatInviteLink( - chat_id=chat_id, - invite_link=invite_link, - name=name, - expire_date=expire_date, - member_limit=member_limit, - creates_join_request=creates_join_request, - ) - return await self(call, request_timeout=request_timeout) - - async def revoke_chat_invite_link( - self, - chat_id: Union[int, str], - invite_link: str, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#revokechatinvitelink - - :param chat_id: Unique identifier of the target chat or username of the target channel (in the format :code:`@channelusername`) - :param invite_link: The invite link to revoke - :param request_timeout: Request timeout - :return: Returns the revoked invite link as ChatInviteLink object. - """ - call = RevokeChatInviteLink( - chat_id=chat_id, - invite_link=invite_link, - ) - return await self(call, request_timeout=request_timeout) - - async def approve_chat_join_request( - self, - chat_id: Union[int, str], - user_id: int, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#approvechatjoinrequest - - :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 request_timeout: Request timeout - :return: Returns True on success. - """ - call = ApproveChatJoinRequest( - chat_id=chat_id, - user_id=user_id, - ) - return await self(call, request_timeout=request_timeout) - - async def decline_chat_join_request( - self, - chat_id: Union[int, str], - user_id: int, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#declinechatjoinrequest - - :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 request_timeout: Request timeout - :return: Returns True on success. - """ - call = DeclineChatJoinRequest( - chat_id=chat_id, - user_id=user_id, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_photo( - self, - chat_id: Union[int, str], - photo: InputFile, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#setchatphoto - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param photo: New chat photo, uploaded using multipart/form-data - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetChatPhoto( - chat_id=chat_id, - photo=photo, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_chat_photo( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#deletechatphoto - - :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 True on success. - """ - call = DeleteChatPhoto( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_title( - self, - chat_id: Union[int, str], - title: str, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#setchattitle - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param title: New chat title, 1-255 characters - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetChatTitle( - chat_id=chat_id, - title=title, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_description( - self, - chat_id: Union[int, str], - description: Optional[str] = None, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#setchatdescription - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param description: New chat description, 0-255 characters - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetChatDescription( - chat_id=chat_id, - description=description, - ) - return await self(call, request_timeout=request_timeout) - - async def pin_chat_message( - self, - chat_id: Union[int, str], - message_id: int, - disable_notification: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - 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 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 True on success. - """ - call = PinChatMessage( - chat_id=chat_id, - message_id=message_id, - disable_notification=disable_notification, - ) - return await self(call, request_timeout=request_timeout) - - async def unpin_chat_message( - self, - chat_id: Union[int, str], - message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - 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 request_timeout: Request timeout - :return: Returns True on success. - """ - call = UnpinChatMessage( - chat_id=chat_id, - message_id=message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def unpin_all_chat_messages( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unpinallchatmessages - - :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 True on success. - """ - call = UnpinAllChatMessages( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def leave_chat( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = 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 request_timeout: Request timeout - :return: Returns True on success. - """ - call = LeaveChat( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_chat( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> Chat: - """ - Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a :class:`aiogram.types.chat.Chat` object on success. - - Source: https://core.telegram.org/bots/api#getchat - - :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns a Chat object on success. - """ - call = GetChat( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_chat_administrators( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> List[ - Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ] - ]: - """ - Use this method to get a list of administrators in a chat. On success, returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned. - - Source: https://core.telegram.org/bots/api#getchatadministrators - - :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: On success, returns an Array of ChatMember objects that contains information - about all chat administrators except other bots. If the chat is a group or a - supergroup and no administrators were appointed, only the creator will be - returned. - """ - call = GetChatAdministrators( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_chat_member_count( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> int: - """ - Use this method to get the number of members in a chat. Returns *Int* on success. - - Source: https://core.telegram.org/bots/api#getchatmembercount - - :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns Int on success. - """ - call = GetChatMemberCount( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_chat_members_count( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> int: - """ - .. warning: - - Renamed from :code:`getChatMembersCount` in 5.3 bot API version and can be removed in near future - - Use this method to get the number of members in a chat. Returns *Int* on success. - - Source: https://core.telegram.org/bots/api#getchatmembercount - - :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns Int on success. - """ - call = GetChatMembersCount( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - request_timeout: Optional[int] = None, - ) -> Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ]: - """ - Use this method to get information about a member of a chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. - - Source: https://core.telegram.org/bots/api#getchatmember - - :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param request_timeout: Request timeout - :return: Returns a ChatMember object on success. - """ - call = GetChatMember( - chat_id=chat_id, - user_id=user_id, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_sticker_set( - self, - chat_id: Union[int, str], - sticker_set_name: str, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#setchatstickerset - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param sticker_set_name: Name of the sticker set to be set as the group sticker set - :param request_timeout: Request timeout - :return: Use the field can_set_sticker_set optionally returned in getChat requests to - check if the bot can use this method. Returns True on success. - """ - call = SetChatStickerSet( - chat_id=chat_id, - sticker_set_name=sticker_set_name, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_chat_sticker_set( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#deletechatstickerset - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param request_timeout: Request timeout - :return: Use the field can_set_sticker_set optionally returned in getChat requests to - check if the bot can use this method. Returns True on success. - """ - call = DeleteChatStickerSet( - chat_id=chat_id, + sticker=sticker, ) return await self(call, request_timeout=request_timeout) 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. + 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. - Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@Botfather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. + Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@BotFather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. Source: https://core.telegram.org/bots/api#answercallbackquery :param callback_query_id: Unique identifier for the query to be answered :param text: Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters :param show_alert: 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*. - :param url: 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. + :param url: 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. :param cache_time: 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. :param request_timeout: Request timeout - :return: On success, True is returned. + :return: Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. """ + call = AnswerCallbackQuery( callback_query_id=callback_query_id, text=text, @@ -2274,530 +571,17 @@ class Bot(ContextInstanceMixin["Bot"]): ) return await self(call, request_timeout=request_timeout) - async def set_my_commands( - self, - commands: List[BotCommand], - scope: Optional[BotCommandScope] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the list of the bot's commands. See `https://core.telegram.org/bots#commands `_`https://core.telegram.org/bots#commands `_ for more details about bot commands. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setmycommands - - :param commands: 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. - :param scope: A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`. - :param language_code: 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 - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetMyCommands( - commands=commands, - scope=scope, - language_code=language_code, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_my_commands( - self, - scope: Optional[BotCommandScope] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#deletemycommands - - :param scope: A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`. - :param language_code: 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 - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = DeleteMyCommands( - scope=scope, - language_code=language_code, - ) - return await self(call, request_timeout=request_timeout) - - async def get_my_commands( - self, - scope: Optional[BotCommandScope] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> List[BotCommand]: - """ - Use this method to get the current list of the bot's commands for the given scope and user language. Returns Array of :class:`aiogram.types.bot_command.BotCommand` on success. If commands aren't set, an empty list is returned. - - Source: https://core.telegram.org/bots/api#getmycommands - - :param scope: A JSON-serialized object, describing scope of users. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`. - :param language_code: A two-letter ISO 639-1 language code or an empty string - :param request_timeout: Request timeout - :return: Returns Array of BotCommand on success. If commands aren't set, an empty list is - returned. - """ - call = GetMyCommands( - scope=scope, - language_code=language_code, - ) - return await self(call, request_timeout=request_timeout) - - # ============================================================================================= - # Group: Updating messages - # Source: https://core.telegram.org/bots/api#updating-messages - # ============================================================================================= - - async def edit_message_text( - self, - text: str, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - entities: Optional[List[MessageEntity]] = None, - disable_web_page_preview: Optional[bool] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[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. - - Source: https://core.telegram.org/bots/api#editmessagetext - - :param text: New text of the message, 1-4096 characters after entities parsing - :param chat_id: 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`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit - :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* - :param disable_web_page_preview: Disables link previews for links in this message - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. - :param request_timeout: Request timeout - :return: On success, if the edited message is not an inline message, the edited Message is - returned, otherwise True is returned. - """ - call = EditMessageText( - text=text, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - parse_mode=parse_mode, - entities=entities, - disable_web_page_preview=disable_web_page_preview, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_message_caption( - self, - 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[str] = UNSET, - caption_entities: Optional[List[MessageEntity]] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[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. - - Source: https://core.telegram.org/bots/api#editmessagecaption - - :param chat_id: 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`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit - :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. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. - :param request_timeout: Request timeout - :return: On success, if the edited message is not an inline message, the edited Message is - returned, otherwise True is returned. - """ - call = EditMessageCaption( - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_message_media( - self, - media: InputMedia, - 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]: - """ - 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. - - Source: https://core.telegram.org/bots/api#editmessagemedia - - :param media: A JSON-serialized object for a new media content of the message - :param chat_id: 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`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit - :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 `_. - :param request_timeout: Request timeout - :return: On success, if the edited message is not an inline message, the edited Message is - returned, otherwise True is returned. - """ - call = EditMessageMedia( - media=media, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_message_reply_markup( - self, - 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]: - """ - 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. - - Source: https://core.telegram.org/bots/api#editmessagereplymarkup - - :param chat_id: 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`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit - :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 `_. - :param request_timeout: Request timeout - :return: On success, if the edited message is not an inline message, the edited Message is - returned, otherwise True is returned. - """ - call = EditMessageReplyMarkup( - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def stop_poll( - self, - chat_id: Union[int, str], - message_id: int, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#stoppoll - - :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 original message with the poll - :param reply_markup: A JSON-serialized object for a new message `inline keyboard `_. - :param request_timeout: Request timeout - :return: On success, the stopped Poll is returned. - """ - call = StopPoll( - chat_id=chat_id, - message_id=message_id, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_message( - self, - chat_id: Union[int, str], - message_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to delete a message, including service messages, with the following limitations: - - - A message can only be deleted if it was sent less than 48 hours ago. - - - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. - - - Bots can delete outgoing messages in private chats, groups, and supergroups. - - - Bots can delete incoming messages in private chats. - - - Bots granted *can_post_messages* permissions can delete outgoing messages in channels. - - - 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. - - Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletemessage - - :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 message to delete - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = DeleteMessage( - chat_id=chat_id, - message_id=message_id, - ) - return await self(call, request_timeout=request_timeout) - - # ============================================================================================= - # Group: Stickers - # Source: https://core.telegram.org/bots/api#stickers - # ============================================================================================= - - async def send_sticker( - self, - chat_id: Union[int, str], - sticker: Union[InputFile, str], - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#sendsticker - - :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 file from the Internet, or upload a new one using multipart/form-data. :ref:`More info 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 reply_to_message_id: If the message is a reply, ID of the original message - :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_markup: 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. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendSticker( - chat_id=chat_id, - sticker=sticker, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def get_sticker_set( - self, - name: str, - request_timeout: Optional[int] = None, - ) -> StickerSet: - """ - Use this method to get a sticker set. On success, a :class:`aiogram.types.sticker_set.StickerSet` object is returned. - - Source: https://core.telegram.org/bots/api#getstickerset - - :param name: Name of the sticker set - :param request_timeout: Request timeout - :return: On success, a StickerSet object is returned. - """ - call = GetStickerSet( - name=name, - ) - return await self(call, request_timeout=request_timeout) - - async def upload_sticker_file( - self, - user_id: int, - png_sticker: InputFile, - request_timeout: Optional[int] = None, - ) -> File: - """ - Use this method to upload a .PNG file with a sticker for later use in *createNewStickerSet* and *addStickerToSet* methods (can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success. - - Source: https://core.telegram.org/bots/api#uploadstickerfile - - :param user_id: User identifier of sticker file owner - :param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. :ref:`More info on Sending Files » ` - :param request_timeout: Request timeout - :return: Returns the uploaded File on success. - """ - call = UploadStickerFile( - user_id=user_id, - png_sticker=png_sticker, - ) - return await self(call, request_timeout=request_timeout) - - async def create_new_sticker_set( - self, - user_id: int, - name: str, - title: str, - emojis: str, - png_sticker: Optional[Union[InputFile, str]] = None, - tgs_sticker: Optional[InputFile] = None, - webm_sticker: Optional[InputFile] = None, - contains_masks: Optional[bool] = None, - mask_position: Optional[MaskPosition] = None, - request_timeout: Optional[int] = 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. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#createnewstickerset - - :param user_id: User identifier of created sticker set owner - :param name: 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 *'_by_'*. ** is case insensitive. 1-64 characters. - :param title: Sticker set title, 1-64 characters - :param emojis: One or more emoji corresponding to the sticker - :param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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 info on Sending Files » ` - :param tgs_sticker: **TGS** animation with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for technical requirements - :param webm_sticker: **WEBM** video with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for technical requirements - :param contains_masks: Pass :code:`True`, if a set of mask stickers should be created - :param mask_position: A JSON-serialized object for position where the mask should be placed on faces - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = CreateNewStickerSet( - user_id=user_id, - name=name, - title=title, - emojis=emojis, - png_sticker=png_sticker, - tgs_sticker=tgs_sticker, - webm_sticker=webm_sticker, - contains_masks=contains_masks, - mask_position=mask_position, - ) - return await self(call, request_timeout=request_timeout) - - async def add_sticker_to_set( - self, - user_id: int, - name: str, - emojis: str, - png_sticker: Optional[Union[InputFile, str]] = None, - tgs_sticker: Optional[InputFile] = None, - webm_sticker: Optional[InputFile] = None, - mask_position: Optional[MaskPosition] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to add a new sticker to a set created by the bot. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#addstickertoset - - :param user_id: User identifier of sticker set owner - :param name: Sticker set name - :param emojis: One or more emoji corresponding to the sticker - :param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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 info on Sending Files » ` - :param tgs_sticker: **TGS** animation with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for technical requirements - :param webm_sticker: **WEBM** video with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for technical requirements - :param mask_position: A JSON-serialized object for position where the mask should be placed on faces - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = AddStickerToSet( - user_id=user_id, - name=name, - emojis=emojis, - png_sticker=png_sticker, - tgs_sticker=tgs_sticker, - webm_sticker=webm_sticker, - mask_position=mask_position, - ) - return await self(call, request_timeout=request_timeout) - - async def set_sticker_position_in_set( - self, - sticker: str, - position: int, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#setstickerpositioninset - - :param sticker: File identifier of the sticker - :param position: New sticker position in the set, zero-based - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetStickerPositionInSet( - sticker=sticker, - position=position, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_sticker_from_set( - self, - sticker: str, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to delete a sticker from a set created by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletestickerfromset - - :param sticker: File identifier of the sticker - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = DeleteStickerFromSet( - sticker=sticker, - ) - return await self(call, request_timeout=request_timeout) - - async def set_sticker_set_thumb( - self, - name: str, - user_id: int, - thumb: Optional[Union[InputFile, str]] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickersetthumb - - :param name: Sticker set name - :param user_id: User identifier of the sticker set owner - :param thumb: A **PNG** image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a **TGS** animation with the 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 info on Sending Files » `. Animated sticker set thumbnails can't be uploaded via HTTP URL. - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetStickerSetThumb( - name=name, - user_id=user_id, - thumb=thumb, - ) - return await self(call, request_timeout=request_timeout) - - # ============================================================================================= - # Group: Inline mode - # Source: https://core.telegram.org/bots/api#inline-mode - # ============================================================================================= - async def answer_inline_query( self, inline_query_id: str, - results: List[InlineQueryResult], - cache_time: Optional[int] = None, - is_personal: Optional[bool] = None, - next_offset: Optional[str] = None, - switch_pm_text: Optional[str] = None, - switch_pm_parameter: 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. @@ -2809,59 +593,2062 @@ class Bot(ContextInstanceMixin["Bot"]): :param inline_query_id: Unique identifier for the answered query :param results: A JSON-serialized array of results for the inline query :param cache_time: The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. - :param is_personal: 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 + :param is_personal: 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. :param next_offset: 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. + :param button: A JSON-serialized object describing a button to be shown above inline query results + :param switch_pm_parameter: `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. :param switch_pm_text: 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* - :param switch_pm_parameter: `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. :param request_timeout: Request timeout - :return: On success, True is returned. + :return: On success, :code:`True` is returned. """ + call = AnswerInlineQuery( inline_query_id=inline_query_id, results=results, cache_time=cache_time, is_personal=is_personal, next_offset=next_offset, - switch_pm_text=switch_pm_text, + button=button, switch_pm_parameter=switch_pm_parameter, + switch_pm_text=switch_pm_text, ) return await self(call, request_timeout=request_timeout) - # ============================================================================================= - # Group: Payments - # Source: https://core.telegram.org/bots/api#payments - # ============================================================================================= - - async def send_invoice( + async def answer_pre_checkout_query( + self, + pre_checkout_query_id: str, + ok: bool, + 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. + + Source: https://core.telegram.org/bots/api#answerprecheckoutquery + + :param pre_checkout_query_id: Unique identifier for the query to be answered + :param ok: 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. + :param error_message: 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. + :param request_timeout: Request timeout + :return: **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent. + """ + + call = AnswerPreCheckoutQuery( + pre_checkout_query_id=pre_checkout_query_id, + ok=ok, + error_message=error_message, + ) + return await self(call, request_timeout=request_timeout) + + async def answer_shipping_query( + self, + shipping_query_id: str, + ok: bool, + 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. + + Source: https://core.telegram.org/bots/api#answershippingquery + + :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 request_timeout: Request timeout + :return: On success, :code:`True` is returned. + """ + + call = AnswerShippingQuery( + shipping_query_id=shipping_query_id, + ok=ok, + shipping_options=shipping_options, + error_message=error_message, + ) + return await self(call, request_timeout=request_timeout) + + async def answer_web_app_query( + self, + web_app_query_id: str, + 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. + + Source: https://core.telegram.org/bots/api#answerwebappquery + + :param web_app_query_id: Unique identifier for the query to be answered + :param result: A JSON-serialized object describing the message to be sent + :param request_timeout: Request timeout + :return: On success, a :class:`aiogram.types.sent_web_app_message.SentWebAppMessage` object is returned. + """ + + call = AnswerWebAppQuery( + web_app_query_id=web_app_query_id, + result=result, + ) + return await self(call, request_timeout=request_timeout) + + async def approve_chat_join_request( + self, + chat_id: ChatIdUnion, + user_id: int, + 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. + + Source: https://core.telegram.org/bots/api#approvechatjoinrequest + + :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 request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = ApproveChatJoinRequest( + chat_id=chat_id, + user_id=user_id, + ) + return await self(call, request_timeout=request_timeout) + + async def ban_chat_member( + self, + chat_id: ChatIdUnion, + user_id: int, + 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. + + Source: https://core.telegram.org/bots/api#banchatmember + + :param chat_id: Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`) + :param user_id: Unique identifier of the target user + :param until_date: 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. + :param revoke_messages: 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. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = BanChatMember( + chat_id=chat_id, + user_id=user_id, + until_date=until_date, + revoke_messages=revoke_messages, + ) + return await self(call, request_timeout=request_timeout) + + async def ban_chat_sender_chat( + self, + chat_id: ChatIdUnion, + sender_chat_id: int, + 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. + + Source: https://core.telegram.org/bots/api#banchatsenderchat + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param sender_chat_id: Unique identifier of the target sender chat + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = BanChatSenderChat( + chat_id=chat_id, + sender_chat_id=sender_chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def close( + self, + 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. + + Source: https://core.telegram.org/bots/api#close + + :param request_timeout: Request timeout + :return: Requires no parameters. + """ + + call = Close() + return await self(call, request_timeout=request_timeout) + + async def close_forum_topic( + self, + chat_id: ChatIdUnion, + message_thread_id: int, + 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. + + Source: https://core.telegram.org/bots/api#closeforumtopic + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param message_thread_id: Unique identifier for the target message thread of the forum topic + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = CloseForumTopic( + chat_id=chat_id, + message_thread_id=message_thread_id, + ) + return await self(call, request_timeout=request_timeout) + + async def copy_message( + self, + chat_id: ChatIdUnion, + from_chat_id: ChatIdUnion, + message_id: int, + 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. + + 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 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 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 + :param reply_to_message_id: If the message is a reply, ID of the original message + :param request_timeout: Request timeout + :return: Returns the :class:`aiogram.types.message_id.MessageId` of the sent message on success. + """ + + call = CopyMessage( + chat_id=chat_id, + 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, + reply_to_message_id=reply_to_message_id, + ) + return await self(call, request_timeout=request_timeout) + + async def create_chat_invite_link( + self, + 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. + + Source: https://core.telegram.org/bots/api#createchatinvitelink + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param name: Invite link name; 0-32 characters + :param expire_date: Point in time (Unix timestamp) when the link will expire + :param member_limit: The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 + :param creates_join_request: :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 + :param request_timeout: Request timeout + :return: Returns the new invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + """ + + call = CreateChatInviteLink( + chat_id=chat_id, + name=name, + expire_date=expire_date, + member_limit=member_limit, + creates_join_request=creates_join_request, + ) + return await self(call, request_timeout=request_timeout) + + async def create_forum_topic( + self, + chat_id: ChatIdUnion, + name: str, + 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 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 + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param name: Topic name, 1-128 characters + :param icon_color: 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) + :param icon_custom_emoji_id: 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. + :param request_timeout: Request timeout + :return: Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object. + """ + + call = CreateForumTopic( + chat_id=chat_id, + name=name, + icon_color=icon_color, + icon_custom_emoji_id=icon_custom_emoji_id, + ) + return await self(call, request_timeout=request_timeout) + + async def create_invoice_link( self, - chat_id: Union[int, str], title: str, description: str, payload: str, - provider_token: str, currency: str, - prices: List[LabeledPrice], - 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[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[InlineKeyboardMarkup] = 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. + + Source: https://core.telegram.org/bots/api#createinvoicelink + + :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 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. + :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. + :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 request_timeout: Request timeout + :return: Returns the created invoice link as *String* on success. + """ + + call = CreateInvoiceLink( + title=title, + description=description, + 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, + 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, + ) + return await self(call, request_timeout=request_timeout) + + async def create_new_sticker_set( + self, + user_id: int, + name: str, + title: str, + 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. + + Source: https://core.telegram.org/bots/api#createnewstickerset + + :param user_id: User identifier of created sticker set owner + :param name: 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. + :param title: Sticker set title, 1-64 characters + :param stickers: A JSON-serialized list of 1-50 initial stickers to be added to the sticker set + :param sticker_type: Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created. + :param needs_repainting: 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 + :param sticker_format: Format of stickers in the set, must be one of 'static', 'animated', 'video' + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = CreateNewStickerSet( + user_id=user_id, + name=name, + title=title, + stickers=stickers, + sticker_type=sticker_type, + needs_repainting=needs_repainting, + sticker_format=sticker_format, + ) + return await self(call, request_timeout=request_timeout) + + async def decline_chat_join_request( + self, + chat_id: ChatIdUnion, + user_id: int, + 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. + + Source: https://core.telegram.org/bots/api#declinechatjoinrequest + + :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 request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeclineChatJoinRequest( + chat_id=chat_id, + user_id=user_id, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_chat_photo( + self, + 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. + + Source: https://core.telegram.org/bots/api#deletechatphoto + + :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 = DeleteChatPhoto( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_chat_sticker_set( + self, + 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. + + Source: https://core.telegram.org/bots/api#deletechatstickerset + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeleteChatStickerSet( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_forum_topic( + self, + chat_id: ChatIdUnion, + message_thread_id: int, + request_timeout: int | None = None, + ) -> bool: + """ + 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 + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param message_thread_id: Unique identifier for the target message thread of the forum topic + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeleteForumTopic( + chat_id=chat_id, + message_thread_id=message_thread_id, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_message( + self, + chat_id: ChatIdUnion, + message_id: int, + request_timeout: int | None = None, + ) -> bool: + """ + Use this method to delete a message, including service messages, with the following limitations: + + - A message can only be deleted if it was sent less than 48 hours ago. + + - Service messages about a supergroup, channel, or forum topic creation can't be deleted. + + - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. + + - Bots can delete outgoing messages in private chats, groups, and supergroups. + + - Bots can delete incoming messages in private chats. + + - Bots granted *can_post_messages* permissions can delete outgoing messages in channels. + + - If the bot is an administrator of a group, 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. + + Source: https://core.telegram.org/bots/api#deletemessage + + :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 message to delete + :param request_timeout: Request timeout + :return: Use this method to delete a message, including service messages, with the following limitations: + """ + + call = DeleteMessage( + chat_id=chat_id, + message_id=message_id, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_my_commands( + self, + 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. + + Source: https://core.telegram.org/bots/api#deletemycommands + + :param scope: A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`. + :param language_code: 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 + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeleteMyCommands( + scope=scope, + language_code=language_code, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_sticker_from_set( + self, + sticker: str, + 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. + + Source: https://core.telegram.org/bots/api#deletestickerfromset + + :param sticker: File identifier of the sticker + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeleteStickerFromSet( + sticker=sticker, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_webhook( + self, + 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. + + Source: https://core.telegram.org/bots/api#deletewebhook + + :param drop_pending_updates: Pass :code:`True` to drop all pending updates + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeleteWebhook( + drop_pending_updates=drop_pending_updates, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_chat_invite_link( + self, + chat_id: ChatIdUnion, + invite_link: str, + 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. + + Source: https://core.telegram.org/bots/api#editchatinvitelink + + :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 expire_date: Point in time (Unix timestamp) when the link will expire + :param member_limit: The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 + :param creates_join_request: :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 + :param request_timeout: Request timeout + :return: Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + """ + + call = EditChatInviteLink( + chat_id=chat_id, + invite_link=invite_link, + name=name, + expire_date=expire_date, + member_limit=member_limit, + creates_join_request=creates_join_request, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_forum_topic( + self, + chat_id: ChatIdUnion, + message_thread_id: int, + 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 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 + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param message_thread_id: Unique identifier for the target message thread of the forum topic + :param name: New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept + :param icon_custom_emoji_id: 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 + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = EditForumTopic( + chat_id=chat_id, + message_thread_id=message_thread_id, + name=name, + icon_custom_emoji_id=icon_custom_emoji_id, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_message_caption( + self, + 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. + + 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 chat_id: 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`) + :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit + :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. + :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. Supported only for animation, photo and video messages. + :param reply_markup: A JSON-serialized object for an `inline keyboard `_. + :param request_timeout: Request timeout + :return: 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. + """ + + call = EditMessageCaption( + business_connection_id=business_connection_id, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_message_live_location( + self, + latitude: float, + longitude: float, + 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. + + Source: https://core.telegram.org/bots/api#editmessagelivelocation + + :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 chat_id: 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`) + :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit + :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 + :param heading: Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. + :param proximity_alert_radius: The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. + :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. + :param request_timeout: Request timeout + :return: 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. + """ + + call = EditMessageLiveLocation( + latitude=latitude, + longitude=longitude, + business_connection_id=business_connection_id, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + live_period=live_period, + horizontal_accuracy=horizontal_accuracy, + heading=heading, + proximity_alert_radius=proximity_alert_radius, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_message_media( + self, + 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, 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 chat_id: 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`) + :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit + :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 `_. + :param request_timeout: Request timeout + :return: 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. + """ + + call = EditMessageMedia( + media=media, + business_connection_id=business_connection_id, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_message_reply_markup( + self, + 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. + + 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 chat_id: 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`) + :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit + :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 `_. + :param request_timeout: Request timeout + :return: 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. + """ + + call = EditMessageReplyMarkup( + business_connection_id=business_connection_id, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_message_text( + self, + text: str, + 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. + + 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 chat_id: 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`) + :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit + :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* + :param link_preview_options: Link preview generation options for the message + :param reply_markup: A JSON-serialized object for an `inline keyboard `_. + :param disable_web_page_preview: Disables link previews for links in this message + :param request_timeout: Request timeout + :return: 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. + """ + + call = EditMessageText( + text=text, + business_connection_id=business_connection_id, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + parse_mode=parse_mode, + entities=entities, + link_preview_options=link_preview_options, + reply_markup=reply_markup, + disable_web_page_preview=disable_web_page_preview, + ) + return await self(call, request_timeout=request_timeout) + + async def export_chat_invite_link( + self, + 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. + + Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again. + + Source: https://core.telegram.org/bots/api#exportchatinvitelink + + :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: If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again. + """ + + call = ExportChatInviteLink( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def forward_message( + self, + chat_id: ChatIdUnion, + from_chat_id: ChatIdUnion, + message_id: int, + 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. + + 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 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 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. + """ + + call = ForwardMessage( + chat_id=chat_id, + 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: 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. + + Source: https://core.telegram.org/bots/api#getchat + + :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) + :param request_timeout: Request timeout + :return: Returns a :class:`aiogram.types.chat_full_info.ChatFullInfo` object on success. + """ + + call = GetChat( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def get_chat_administrators( + self, + 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. + + Source: https://core.telegram.org/bots/api#getchatadministrators + + :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) + :param request_timeout: Request timeout + :return: Returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects. + """ + + call = GetChatAdministrators( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def get_chat_member( + self, + chat_id: ChatIdUnion, + user_id: int, + 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. + + Source: https://core.telegram.org/bots/api#getchatmember + + :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) + :param user_id: Unique identifier of the target user + :param request_timeout: Request timeout + :return: Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. + """ + + call = GetChatMember( + chat_id=chat_id, + user_id=user_id, + ) + return await self(call, request_timeout=request_timeout) + + async def get_chat_member_count( + self, + 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. + + Source: https://core.telegram.org/bots/api#getchatmembercount + + :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) + :param request_timeout: Request timeout + :return: Returns *Int* on success. + """ + + call = GetChatMemberCount( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def get_chat_menu_button( + self, + 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. + + Source: https://core.telegram.org/bots/api#getchatmenubutton + + :param chat_id: Unique identifier for the target private chat. If not specified, default bot's menu button will be returned + :param request_timeout: Request timeout + :return: Returns :class:`aiogram.types.menu_button.MenuButton` on success. + """ + + call = GetChatMenuButton( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def get_custom_emoji_stickers( + self, + 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. + + Source: https://core.telegram.org/bots/api#getcustomemojistickers + + :param custom_emoji_ids: A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified. + :param request_timeout: Request timeout + :return: Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. + """ + + call = GetCustomEmojiStickers( + custom_emoji_ids=custom_emoji_ids, + ) + return await self(call, request_timeout=request_timeout) + + async def get_file( + self, + file_id: str, + 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. + **Note:** This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received. + + Source: https://core.telegram.org/bots/api#getfile + + :param file_id: File identifier to get information about + :param request_timeout: Request timeout + :return: You should save the file's MIME type and name (if available) when the File object is received. + """ + + call = GetFile( + file_id=file_id, + ) + return await self(call, request_timeout=request_timeout) + + async def get_forum_topic_icon_stickers( + self, + 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. + + Source: https://core.telegram.org/bots/api#getforumtopiciconstickers + + :param request_timeout: Request timeout + :return: Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. + """ + + call = GetForumTopicIconStickers() + return await self(call, request_timeout=request_timeout) + + async def get_game_high_scores( + self, + user_id: int, + 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. + + This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change. + + Source: https://core.telegram.org/bots/api#getgamehighscores + + :param user_id: Target user id + :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat + :param message_id: Required if *inline_message_id* is not specified. Identifier of the sent message + :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message + :param request_timeout: Request timeout + :return: Please note that this behavior is subject to change. + """ + + call = GetGameHighScores( + user_id=user_id, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + ) + return await self(call, request_timeout=request_timeout) + + async def get_me( + self, + 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. + + Source: https://core.telegram.org/bots/api#getme + + :param request_timeout: Request timeout + :return: Returns basic information about the bot in form of a :class:`aiogram.types.user.User` object. + """ + + call = GetMe() + return await self(call, request_timeout=request_timeout) + + async def get_my_commands( + self, + 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. + + Source: https://core.telegram.org/bots/api#getmycommands + + :param scope: A JSON-serialized object, describing scope of users. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`. + :param language_code: A two-letter ISO 639-1 language code or an empty string + :param request_timeout: Request timeout + :return: If commands aren't set, an empty list is returned. + """ + + call = GetMyCommands( + scope=scope, + language_code=language_code, + ) + return await self(call, request_timeout=request_timeout) + + async def get_my_default_administrator_rights( + self, + 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. + + Source: https://core.telegram.org/bots/api#getmydefaultadministratorrights + + :param for_channels: 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. + :param request_timeout: Request timeout + :return: Returns :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` on success. + """ + + call = GetMyDefaultAdministratorRights( + for_channels=for_channels, + ) + return await self(call, request_timeout=request_timeout) + + async def get_sticker_set( + self, + name: str, + 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. + + Source: https://core.telegram.org/bots/api#getstickerset + + :param name: Name of the sticker set + :param request_timeout: Request timeout + :return: On success, a :class:`aiogram.types.sticker_set.StickerSet` object is returned. + """ + + call = GetStickerSet( + name=name, + ) + return await self(call, request_timeout=request_timeout) + + async def get_updates( + self, + 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. + + **Notes** + + **1.** This method will not work if an outgoing webhook is set up. + + **2.** In order to avoid getting duplicate updates, recalculate *offset* after each server response. + + Source: https://core.telegram.org/bots/api#getupdates + + :param offset: 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. + :param limit: Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. + :param timeout: 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. + :param allowed_updates: 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. + :param request_timeout: Request timeout + :return: Returns an Array of :class:`aiogram.types.update.Update` objects. + """ + + call = GetUpdates( + offset=offset, + limit=limit, + timeout=timeout, + allowed_updates=allowed_updates, + ) + return await self(call, request_timeout=request_timeout) + + async def get_user_profile_photos( + self, + user_id: int, + 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. + + Source: https://core.telegram.org/bots/api#getuserprofilephotos + + :param user_id: Unique identifier of the target user + :param offset: Sequential number of the first photo to be returned. By default, all photos are returned. + :param limit: Limits the number of photos 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_photos.UserProfilePhotos` object. + """ + + call = GetUserProfilePhotos( + user_id=user_id, + offset=offset, + limit=limit, + ) + return await self(call, request_timeout=request_timeout) + + async def get_webhook_info( + self, + 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. + + Source: https://core.telegram.org/bots/api#getwebhookinfo + + :param request_timeout: Request timeout + :return: If the bot is using :class:`aiogram.methods.get_updates.GetUpdates`, will return an object with the *url* field empty. + """ + + call = GetWebhookInfo() + return await self(call, request_timeout=request_timeout) + + async def leave_chat( + self, + 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`). Channel direct messages chats aren't supported; leave the corresponding channel instead. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = LeaveChat( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def log_out( + self, + 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. + + Source: https://core.telegram.org/bots/api#logout + + :param request_timeout: Request timeout + :return: Requires no parameters. + """ + + call = LogOut() + return await self(call, request_timeout=request_timeout) + + async def pin_chat_message( + self, + chat_id: ChatIdUnion, + message_id: int, + 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. 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. + """ + + 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: ChatIdUnion, + user_id: int, + 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. + + Source: https://core.telegram.org/bots/api#promotechatmember + + :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, 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. 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, 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. + """ + + call = PromoteChatMember( + chat_id=chat_id, + user_id=user_id, + is_anonymous=is_anonymous, + can_manage_chat=can_manage_chat, + can_delete_messages=can_delete_messages, + can_manage_video_chats=can_manage_video_chats, + can_restrict_members=can_restrict_members, + can_promote_members=can_promote_members, + can_change_info=can_change_info, + can_invite_users=can_invite_users, + can_post_stories=can_post_stories, + can_edit_stories=can_edit_stories, + can_delete_stories=can_delete_stories, + can_post_messages=can_post_messages, + 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: ChatIdUnion, + message_thread_id: int, + 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. + + Source: https://core.telegram.org/bots/api#reopenforumtopic + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param message_thread_id: Unique identifier for the target message thread of the forum topic + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = ReopenForumTopic( + chat_id=chat_id, + message_thread_id=message_thread_id, + ) + return await self(call, request_timeout=request_timeout) + + async def restrict_chat_member( + self, + chat_id: ChatIdUnion, + user_id: int, + permissions: ChatPermissions, + 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. + + Source: https://core.telegram.org/bots/api#restrictchatmember + + :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 permissions: A JSON-serialized object for new user permissions + :param use_independent_chat_permissions: 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. + :param until_date: 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 + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = RestrictChatMember( + chat_id=chat_id, + user_id=user_id, + permissions=permissions, + use_independent_chat_permissions=use_independent_chat_permissions, + until_date=until_date, + ) + return await self(call, request_timeout=request_timeout) + + async def revoke_chat_invite_link( + self, + chat_id: ChatIdUnion, + invite_link: str, + 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. + + Source: https://core.telegram.org/bots/api#revokechatinvitelink + + :param chat_id: Unique identifier of the target chat or username of the target channel (in the format :code:`@channelusername`) + :param invite_link: The invite link to revoke + :param request_timeout: Request timeout + :return: Returns the revoked invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + """ + + call = RevokeChatInviteLink( + chat_id=chat_id, + invite_link=invite_link, + ) + return await self(call, request_timeout=request_timeout) + + async def send_animation( + self, + 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. + + Source: https://core.telegram.org/bots/api#sendanimation + + :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 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 + :param request_timeout: Request timeout + :return: Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. + """ + + call = SendAnimation( + chat_id=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, + ) + return await self(call, request_timeout=request_timeout) + + async def send_audio( + self, + 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. + For sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead. + + Source: https://core.telegram.org/bots/api#sendaudio + + :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 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 + :param request_timeout: Request timeout + :return: Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. + """ + + call = SendAudio( + chat_id=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, + ) + return await self(call, request_timeout=request_timeout) + + async def send_chat_action( + self, + chat_id: ChatIdUnion, + action: str, + 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. + + Example: The `ImageBot `_ needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please wait…', the bot may use :class:`aiogram.methods.send_chat_action.SendChatAction` with *action* = *upload_photo*. The user will see a 'sending photo' status for the bot. + + We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive. + + Source: https://core.telegram.org/bots/api#sendchataction + + :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 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. + """ + + call = SendChatAction( + chat_id=chat_id, + action=action, + business_connection_id=business_connection_id, + message_thread_id=message_thread_id, + ) + return await self(call, request_timeout=request_timeout) + + async def send_contact( + self, + chat_id: ChatIdUnion, + 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, + request_timeout: int | None = None, + ) -> Message: + """ + 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 chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :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 + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendContact( + chat_id=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, + ) + return await self(call, request_timeout=request_timeout) + + async def send_dice( + self, + 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. + + Source: https://core.telegram.org/bots/api#senddice + + :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 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 + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendDice( + 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, + reply_to_message_id=reply_to_message_id, + ) + return await self(call, request_timeout=request_timeout) + + async def send_document( + self, + 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. + + Source: https://core.telegram.org/bots/api#senddocument + + :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 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 + :param request_timeout: Request timeout + :return: Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. + """ + + call = SendDocument( + chat_id=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, + ) + return await self(call, request_timeout=request_timeout) + + async def send_game( + self, + chat_id: int, + 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, + 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. 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 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 + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendGame( + chat_id=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, + ) + return await self(call, request_timeout=request_timeout) + + async def send_invoice( + self, + chat_id: ChatIdUnion, + 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, + request_timeout: int | None = None, ) -> Message: """ Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -2871,41 +2658,50 @@ class Bot(ContextInstanceMixin["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 provider_token: Payments provider token, obtained via `Botfather `_ - :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_ - :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) - :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 + :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: A 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 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 + :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 - :param need_phone_number: Pass :code:`True`, if you require the user's phone number to complete the order - :param need_email: Pass :code:`True`, if you require the user's email address to complete the order - :param need_shipping_address: Pass :code:`True`, if you require the user's shipping address to complete the order - :param send_phone_number_to_provider: Pass :code:`True`, if user's phone number should be sent to provider - :param send_email_to_provider: Pass :code:`True`, if user's email address should be sent to provider - :param is_flexible: Pass :code:`True`, if the final price depends on the shipping method + :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 - :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_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 request_timeout: Request timeout - :return: On success, the sent Message is returned. + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. """ + call = SendInvoice( chat_id=chat_id, title=title, description=description, payload=payload, - provider_token=provider_token, 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, @@ -2923,134 +2719,944 @@ class Bot(ContextInstanceMixin["Bot"]): is_flexible=is_flexible, disable_notification=disable_notification, protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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, ) return await self(call, request_timeout=request_timeout) - async def answer_shipping_query( + async def send_location( self, - shipping_query_id: str, - ok: bool, - shipping_options: Optional[List[ShippingOption]] = None, - error_message: Optional[str] = None, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#answershippingquery - - :param shipping_query_id: Unique identifier for the query to be answered - :param ok: Specify :code:`True` if delivery to the specified address is possible and 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 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, True is returned. - """ - call = AnswerShippingQuery( - shipping_query_id=shipping_query_id, - ok=ok, - shipping_options=shipping_options, - error_message=error_message, - ) - return await self(call, request_timeout=request_timeout) - - async def answer_pre_checkout_query( - self, - pre_checkout_query_id: str, - ok: bool, - error_message: Optional[str] = None, - request_timeout: Optional[int] = 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. - - Source: https://core.telegram.org/bots/api#answerprecheckoutquery - - :param pre_checkout_query_id: Unique identifier for the query to be answered - :param ok: 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. - :param error_message: 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. - :param request_timeout: Request timeout - :return: On success, True is returned. - """ - call = AnswerPreCheckoutQuery( - pre_checkout_query_id=pre_checkout_query_id, - ok=ok, - error_message=error_message, - ) - return await self(call, request_timeout=request_timeout) - - # ============================================================================================= - # Group: Telegram Passport - # Source: https://core.telegram.org/bots/api#telegram-passport - # ============================================================================================= - - async def set_passport_data_errors( - self, - user_id: int, - errors: List[PassportElementError], - request_timeout: Optional[int] = 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. - Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. - - Source: https://core.telegram.org/bots/api#setpassportdataerrors - - :param user_id: User identifier - :param errors: A JSON-serialized array describing the errors - :param request_timeout: Request timeout - :return: 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 True on success. - """ - call = SetPassportDataErrors( - user_id=user_id, - errors=errors, - ) - return await self(call, request_timeout=request_timeout) - - # ============================================================================================= - # Group: Games - # Source: https://core.telegram.org/bots/api#games - # ============================================================================================= - - async def send_game( - self, - chat_id: int, - game_short_name: str, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + 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, + request_timeout: int | None = None, ) -> Message: """ - Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned. + 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#sendgame + Source: https://core.telegram.org/bots/api#sendlocation - :param chat_id: Unique identifier for the target chat - :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `Botfather `_. + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :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 - :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_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 request_timeout: Request timeout - :return: On success, the sent Message is returned. + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. """ - call = SendGame( + + call = SendLocation( chat_id=chat_id, - game_short_name=game_short_name, + 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, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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, + ) + return await self(call, request_timeout=request_timeout) + + async def send_media_group( + self, + 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 :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 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 :class:`aiogram.types.message.Message` objects that were sent is returned. + """ + + call = SendMediaGroup( + chat_id=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, + ) + return await self(call, request_timeout=request_timeout) + + async def send_message( + self, + chat_id: ChatIdUnion, + 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, + request_timeout: int | None = None, + ) -> Message: + """ + 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 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 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 + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendMessage( + chat_id=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, + ) + return await self(call, request_timeout=request_timeout) + + async def send_photo( + self, + 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. + + Source: https://core.telegram.org/bots/api#sendphoto + + :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 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 + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendPhoto( + chat_id=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, + ) + return await self(call, request_timeout=request_timeout) + + async def send_poll( + self, + chat_id: ChatIdUnion, + 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, + 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`). Polls can't be sent to channel direct messages chats. + :param question: Poll question, 1-300 characters + :param options: A JSON-serialized list of 2-12 answer options + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :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 + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendPoll( + chat_id=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, + ) + return await self(call, request_timeout=request_timeout) + + async def send_sticker( + self, + 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. + + Source: https://core.telegram.org/bots/api#sendsticker + + :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 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 + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendSticker( + chat_id=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, + ) + return await self(call, request_timeout=request_timeout) + + async def send_venue( + self, + chat_id: ChatIdUnion, + 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, + 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. + + Source: https://core.telegram.org/bots/api#sendvenue + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :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 + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendVenue( + chat_id=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, + ) + return await self(call, request_timeout=request_timeout) + + async def send_video( + self, + 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. + + Source: https://core.telegram.org/bots/api#sendvideo + + :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 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 + :param request_timeout: Request timeout + :return: Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. + """ + + call = SendVideo( + chat_id=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, + ) + return await self(call, request_timeout=request_timeout) + + async def send_video_note( + self, + 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. + + Source: https://core.telegram.org/bots/api#sendvideonote + + :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 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 + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendVideoNote( + chat_id=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, + ) + return await self(call, request_timeout=request_timeout) + + async def send_voice( + self, + 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. + + Source: https://core.telegram.org/bots/api#sendvoice + + :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 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 + :param request_timeout: Request timeout + :return: Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. + """ + + call = SendVoice( + chat_id=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, + ) + return await self(call, request_timeout=request_timeout) + + async def set_chat_administrator_custom_title( + self, + chat_id: ChatIdUnion, + user_id: int, + custom_title: str, + 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. + + Source: https://core.telegram.org/bots/api#setchatadministratorcustomtitle + + :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 custom_title: New custom title for the administrator; 0-16 characters, emoji are not allowed + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetChatAdministratorCustomTitle( + chat_id=chat_id, + user_id=user_id, + custom_title=custom_title, + ) + return await self(call, request_timeout=request_timeout) + + async def set_chat_description( + self, + 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. + + Source: https://core.telegram.org/bots/api#setchatdescription + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param description: New chat description, 0-255 characters + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetChatDescription( + chat_id=chat_id, + description=description, + ) + return await self(call, request_timeout=request_timeout) + + async def set_chat_menu_button( + self, + 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. + + Source: https://core.telegram.org/bots/api#setchatmenubutton + + :param chat_id: Unique identifier for the target private chat. If not specified, default bot's menu button will be changed + :param menu_button: A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault` + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetChatMenuButton( + chat_id=chat_id, + menu_button=menu_button, + ) + return await self(call, request_timeout=request_timeout) + + async def set_chat_permissions( + self, + chat_id: ChatIdUnion, + permissions: ChatPermissions, + 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. + + Source: https://core.telegram.org/bots/api#setchatpermissions + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param permissions: A JSON-serialized object for new default chat permissions + :param use_independent_chat_permissions: 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. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetChatPermissions( + chat_id=chat_id, + permissions=permissions, + use_independent_chat_permissions=use_independent_chat_permissions, + ) + return await self(call, request_timeout=request_timeout) + + async def set_chat_photo( + self, + chat_id: ChatIdUnion, + photo: InputFile, + 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. + + Source: https://core.telegram.org/bots/api#setchatphoto + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param photo: New chat photo, uploaded using multipart/form-data + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetChatPhoto( + chat_id=chat_id, + photo=photo, + ) + return await self(call, request_timeout=request_timeout) + + async def set_chat_sticker_set( + self, + chat_id: ChatIdUnion, + sticker_set_name: str, + 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. + + Source: https://core.telegram.org/bots/api#setchatstickerset + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param sticker_set_name: Name of the sticker set to be set as the group sticker set + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetChatStickerSet( + chat_id=chat_id, + sticker_set_name=sticker_set_name, + ) + return await self(call, request_timeout=request_timeout) + + async def set_chat_title( + self, + chat_id: ChatIdUnion, + title: str, + 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. + + Source: https://core.telegram.org/bots/api#setchattitle + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param title: New chat title, 1-128 characters + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetChatTitle( + chat_id=chat_id, + title=title, ) return await self(call, request_timeout=request_timeout) @@ -3058,13 +3664,13 @@ class Bot(ContextInstanceMixin["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`. @@ -3072,16 +3678,15 @@ class Bot(ContextInstanceMixin["Bot"]): :param user_id: User identifier :param score: New score, must be non-negative - :param force: Pass :code:`True`, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters - :param disable_edit_message: Pass :code:`True`, if the game message should not be automatically edited to include the current scoreboard + :param force: Pass :code:`True` if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters + :param disable_edit_message: Pass :code:`True` if the game message should not be automatically edited to include the current scoreboard :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat :param message_id: Required if *inline_message_id* is not specified. Identifier of the sent message :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message :param request_timeout: Request timeout - :return: On success, if the message is not an inline message, the Message is returned, - otherwise 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 False. + :return: Returns an error, if the new score is not greater than the user's current score in the chat and *force* is :code:`False`. """ + call = SetGameScore( user_id=user_id, score=score, @@ -3093,36 +3698,2335 @@ class Bot(ContextInstanceMixin["Bot"]): ) return await self(call, request_timeout=request_timeout) - async def get_game_high_scores( + async def set_my_commands( + self, + 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. + + Source: https://core.telegram.org/bots/api#setmycommands + + :param commands: 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. + :param scope: A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`. + :param language_code: 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 + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetMyCommands( + commands=commands, + scope=scope, + language_code=language_code, + ) + return await self(call, request_timeout=request_timeout) + + async def set_my_default_administrator_rights( + self, + 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. + + Source: https://core.telegram.org/bots/api#setmydefaultadministratorrights + + :param rights: A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared. + :param for_channels: 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. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetMyDefaultAdministratorRights( + rights=rights, + for_channels=for_channels, + ) + return await self(call, request_timeout=request_timeout) + + async def set_passport_data_errors( 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]: + errors: list[PassportElementErrorUnion], + request_timeout: int | None = None, + ) -> bool: """ - 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. On success, returns an *Array* of :class:`aiogram.types.game_high_score.GameHighScore` objects. + 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. + Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. - This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and his neighbors are not among them. Please note that this behavior is subject to change. + Source: https://core.telegram.org/bots/api#setpassportdataerrors - Source: https://core.telegram.org/bots/api#getgamehighscores - - :param user_id: Target user id - :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat - :param message_id: Required if *inline_message_id* is not specified. Identifier of the sent message - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message + :param user_id: User identifier + :param errors: A JSON-serialized array describing the errors :param request_timeout: Request timeout - :return: Will return the score of the specified user and several of their neighbors in a - game. On success, returns an Array of GameHighScore objects. This method will - currently return scores for the target user, plus two of their closest neighbors - on each side. Will also return the top three users if the user and his neighbors - are not among them. + :return: Supply some details in the error message to make sure the user knows how to correct the issues. """ - call = GetGameHighScores( + + call = SetPassportDataErrors( user_id=user_id, + errors=errors, + ) + return await self(call, request_timeout=request_timeout) + + async def set_sticker_position_in_set( + self, + sticker: str, + position: int, + 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. + + Source: https://core.telegram.org/bots/api#setstickerpositioninset + + :param sticker: File identifier of the sticker + :param position: New sticker position in the set, zero-based + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetStickerPositionInSet( + sticker=sticker, + position=position, + ) + return await self(call, request_timeout=request_timeout) + + async def set_webhook( + self, + url: str, + 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 (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** + + **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. + + **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. + + **3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**. + If you're having any trouble setting up webhooks, please check out this `amazing guide to webhooks `_. + + Source: https://core.telegram.org/bots/api#setwebhook + + :param url: HTTPS URL to send updates to. Use an empty string to remove webhook integration + :param certificate: Upload your public key certificate so that the root certificate in use can be checked. See our `self-signed guide `_ for details. + :param ip_address: The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS + :param max_connections: 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. + :param allowed_updates: 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. + :param drop_pending_updates: Pass :code:`True` to drop all pending updates + :param secret_token: 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. + :param request_timeout: Request timeout + :return: Please upload as InputFile, sending a String will not work. + """ + + call = SetWebhook( + url=url, + certificate=certificate, + ip_address=ip_address, + max_connections=max_connections, + allowed_updates=allowed_updates, + drop_pending_updates=drop_pending_updates, + secret_token=secret_token, + ) + return await self(call, request_timeout=request_timeout) + + async def stop_message_live_location( + self, + 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. + + 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 chat_id: 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`) + :param message_id: Required if *inline_message_id* is not specified. Identifier of the message with live location to stop + :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 `_. + :param request_timeout: Request timeout + :return: On success, if the message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. + """ + + call = StopMessageLiveLocation( + business_connection_id=business_connection_id, chat_id=chat_id, message_id=message_id, inline_message_id=inline_message_id, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def stop_poll( + self, + chat_id: ChatIdUnion, + message_id: int, + 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. + + Source: https://core.telegram.org/bots/api#stoppoll + + :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 original message with the poll + :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent + :param reply_markup: A JSON-serialized object for a new message `inline keyboard `_. + :param request_timeout: Request timeout + :return: On success, the stopped :class:`aiogram.types.poll.Poll` is returned. + """ + + call = StopPoll( + chat_id=chat_id, + message_id=message_id, + business_connection_id=business_connection_id, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def unban_chat_member( + self, + chat_id: ChatIdUnion, + user_id: int, + 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. + + Source: https://core.telegram.org/bots/api#unbanchatmember + + :param chat_id: Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`) + :param user_id: Unique identifier of the target user + :param only_if_banned: Do nothing if the user is not banned + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = UnbanChatMember( + chat_id=chat_id, + user_id=user_id, + only_if_banned=only_if_banned, + ) + return await self(call, request_timeout=request_timeout) + + async def unban_chat_sender_chat( + self, + chat_id: ChatIdUnion, + sender_chat_id: int, + 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. + + Source: https://core.telegram.org/bots/api#unbanchatsenderchat + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param sender_chat_id: Unique identifier of the target sender chat + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = UnbanChatSenderChat( + chat_id=chat_id, + sender_chat_id=sender_chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def unpin_all_chat_messages( + self, + chat_id: ChatIdUnion, + request_timeout: int | None = None, + ) -> bool: + """ + 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 + + :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 = UnpinAllChatMessages( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def unpin_all_forum_topic_messages( + self, + chat_id: ChatIdUnion, + message_thread_id: int, + request_timeout: int | None = None, + ) -> bool: + """ + 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 + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param message_thread_id: Unique identifier for the target message thread of the forum topic + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = UnpinAllForumTopicMessages( + chat_id=chat_id, + message_thread_id=message_thread_id, + ) + return await self(call, request_timeout=request_timeout) + + async def unpin_chat_message( + self, + 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. 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 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) + + async def upload_sticker_file( + self, + user_id: int, + sticker: InputFile, + sticker_format: str, + 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. + + Source: https://core.telegram.org/bots/api#uploadstickerfile + + :param user_id: User identifier of sticker file owner + :param sticker: A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See `https://core.telegram.org/stickers `_`https://core.telegram.org/stickers `_ for technical requirements. :ref:`More information on Sending Files » ` + :param sticker_format: Format of the sticker, must be one of 'static', 'animated', 'video' + :param request_timeout: Request timeout + :return: Returns the uploaded :class:`aiogram.types.file.File` on success. + """ + + call = UploadStickerFile( + user_id=user_id, + sticker=sticker, + sticker_format=sticker_format, + ) + return await self(call, request_timeout=request_timeout) + + async def close_general_forum_topic( + self, + 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. + + Source: https://core.telegram.org/bots/api#closegeneralforumtopic + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = CloseGeneralForumTopic( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_general_forum_topic( + self, + chat_id: ChatIdUnion, + name: str, + 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 the *can_manage_topics* administrator rights. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#editgeneralforumtopic + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param name: New topic name, 1-128 characters + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = EditGeneralForumTopic( + chat_id=chat_id, + name=name, + ) + return await self(call, request_timeout=request_timeout) + + async def hide_general_forum_topic( + self, + 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. + + Source: https://core.telegram.org/bots/api#hidegeneralforumtopic + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = HideGeneralForumTopic( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def reopen_general_forum_topic( + self, + 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. + + Source: https://core.telegram.org/bots/api#reopengeneralforumtopic + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = ReopenGeneralForumTopic( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def unhide_general_forum_topic( + self, + 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. + + Source: https://core.telegram.org/bots/api#unhidegeneralforumtopic + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = UnhideGeneralForumTopic( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_sticker_set( + self, + name: str, + 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. + + Source: https://core.telegram.org/bots/api#deletestickerset + + :param name: Sticker set name + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeleteStickerSet( + name=name, + ) + return await self(call, request_timeout=request_timeout) + + async def get_my_description( + self, + 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. + + Source: https://core.telegram.org/bots/api#getmydescription + + :param language_code: A two-letter ISO 639-1 language code or an empty string + :param request_timeout: Request timeout + :return: Returns :class:`aiogram.types.bot_description.BotDescription` on success. + """ + + call = GetMyDescription( + language_code=language_code, + ) + return await self(call, request_timeout=request_timeout) + + async def get_my_short_description( + self, + 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. + + Source: https://core.telegram.org/bots/api#getmyshortdescription + + :param language_code: A two-letter ISO 639-1 language code or an empty string + :param request_timeout: Request timeout + :return: Returns :class:`aiogram.types.bot_short_description.BotShortDescription` on success. + """ + + call = GetMyShortDescription( + language_code=language_code, + ) + return await self(call, request_timeout=request_timeout) + + async def set_custom_emoji_sticker_set_thumbnail( + self, + name: str, + 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. + + Source: https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail + + :param name: Sticker set name + :param custom_emoji_id: 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. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetCustomEmojiStickerSetThumbnail( + name=name, + custom_emoji_id=custom_emoji_id, + ) + return await self(call, request_timeout=request_timeout) + + async def set_my_description( + self, + 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. + + Source: https://core.telegram.org/bots/api#setmydescription + + :param description: New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language. + :param language_code: 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. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetMyDescription( + description=description, + language_code=language_code, + ) + return await self(call, request_timeout=request_timeout) + + async def set_my_short_description( + self, + 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. + + Source: https://core.telegram.org/bots/api#setmyshortdescription + + :param short_description: New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language. + :param language_code: 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. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetMyShortDescription( + short_description=short_description, + language_code=language_code, + ) + return await self(call, request_timeout=request_timeout) + + async def set_sticker_emoji_list( + self, + sticker: str, + 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. + + Source: https://core.telegram.org/bots/api#setstickeremojilist + + :param sticker: File identifier of the sticker + :param emoji_list: A JSON-serialized list of 1-20 emoji associated with the sticker + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetStickerEmojiList( + sticker=sticker, + emoji_list=emoji_list, + ) + return await self(call, request_timeout=request_timeout) + + async def set_sticker_keywords( + self, + sticker: str, + 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. + + Source: https://core.telegram.org/bots/api#setstickerkeywords + + :param sticker: File identifier of the sticker + :param keywords: A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetStickerKeywords( + sticker=sticker, + keywords=keywords, + ) + return await self(call, request_timeout=request_timeout) + + async def set_sticker_mask_position( + self, + sticker: str, + 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. + + Source: https://core.telegram.org/bots/api#setstickermaskposition + + :param sticker: File identifier of the sticker + :param mask_position: A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetStickerMaskPosition( + sticker=sticker, + mask_position=mask_position, + ) + return await self(call, request_timeout=request_timeout) + + async def set_sticker_set_thumbnail( + self, + name: str, + user_id: int, + format: str, + 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. + + Source: https://core.telegram.org/bots/api#setstickersetthumbnail + + :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#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. + """ + + call = SetStickerSetThumbnail( + name=name, + user_id=user_id, + format=format, + thumbnail=thumbnail, + ) + return await self(call, request_timeout=request_timeout) + + async def set_sticker_set_title( + self, + name: str, + title: str, + request_timeout: int | None = None, + ) -> bool: + """ + Use this method to set the title of a created sticker set. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setstickersettitle + + :param name: Sticker set name + :param title: Sticker set title, 1-64 characters + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetStickerSetTitle( + name=name, + title=title, + ) + return await self(call, request_timeout=request_timeout) + + async def get_my_name( + self, + 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. + + Source: https://core.telegram.org/bots/api#getmyname + + :param language_code: A two-letter ISO 639-1 language code or an empty string + :param request_timeout: Request timeout + :return: Returns :class:`aiogram.types.bot_name.BotName` on success. + """ + + call = GetMyName( + language_code=language_code, + ) + return await self(call, request_timeout=request_timeout) + + async def set_my_name( + self, + 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. + + Source: https://core.telegram.org/bots/api#setmyname + + :param name: New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language. + :param language_code: 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. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetMyName( + name=name, + language_code=language_code, + ) + return await self(call, request_timeout=request_timeout) + + async def unpin_all_general_forum_topic_messages( + self, + 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. + + Source: https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = UnpinAllGeneralForumTopicMessages( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def copy_messages( + self, + 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. + + Source: https://core.telegram.org/bots/api#copymessages + + :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 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 + :param request_timeout: Request timeout + :return: On success, an array of :class:`aiogram.types.message_id.MessageId` of the sent messages is returned. + """ + + call = CopyMessages( + chat_id=chat_id, + 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, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_messages( + self, + 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. + + Source: https://core.telegram.org/bots/api#deletemessages + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param message_ids: 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 + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeleteMessages( + chat_id=chat_id, + message_ids=message_ids, + ) + return await self(call, request_timeout=request_timeout) + + async def forward_messages( + self, + 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. + + Source: https://core.telegram.org/bots/api#forwardmessages + + :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 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 + :return: On success, an array of :class:`aiogram.types.message_id.MessageId` of the sent messages is returned. + """ + + call = ForwardMessages( + chat_id=chat_id, + 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, + ) + return await self(call, request_timeout=request_timeout) + + async def get_user_chat_boosts( + self, + chat_id: ChatIdUnion, + user_id: int, + 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. + + Source: https://core.telegram.org/bots/api#getuserchatboosts + + :param chat_id: Unique identifier for the chat or username of the channel (in the format :code:`@channelusername`) + :param user_id: Unique identifier of the target user + :param request_timeout: Request timeout + :return: Returns a :class:`aiogram.types.user_chat_boosts.UserChatBoosts` object. + """ + + call = GetUserChatBoosts( + chat_id=chat_id, + user_id=user_id, + ) + return await self(call, request_timeout=request_timeout) + + async def set_message_reaction( + self, + chat_id: ChatIdUnion, + message_id: int, + 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 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. 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. + """ + + call = SetMessageReaction( + chat_id=chat_id, + message_id=message_id, + reaction=reaction, + is_big=is_big, + ) + return await self(call, request_timeout=request_timeout) + + async def get_business_connection( + self, + business_connection_id: str, + 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. + + Source: https://core.telegram.org/bots/api#getbusinessconnection + + :param business_connection_id: Unique identifier of the business connection + :param request_timeout: Request timeout + :return: Returns a :class:`aiogram.types.business_connection.BusinessConnection` object on success. + """ + + call = GetBusinessConnection( + business_connection_id=business_connection_id, + ) + return await self(call, request_timeout=request_timeout) + + async def replace_sticker_in_set( + self, + user_id: int, + name: str, + old_sticker: str, + sticker: InputSticker, + 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. + + Source: https://core.telegram.org/bots/api#replacestickerinset + + :param user_id: User identifier of the sticker set owner + :param name: Sticker set name + :param old_sticker: File identifier of the replaced sticker + :param sticker: 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. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = ReplaceStickerInSet( + user_id=user_id, + name=name, + old_sticker=old_sticker, + sticker=sticker, + ) + return await self(call, request_timeout=request_timeout) + + async def refund_star_payment( + self, + user_id: int, + telegram_payment_charge_id: str, + request_timeout: int | None = None, + ) -> bool: + """ + Refunds a successful payment in `Telegram Stars `_. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#refundstarpayment + + :param user_id: Identifier of the user whose payment will be refunded + :param telegram_payment_charge_id: Telegram payment identifier + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = RefundStarPayment( + user_id=user_id, + telegram_payment_charge_id=telegram_payment_charge_id, + ) + return await self(call, request_timeout=request_timeout) + + async def get_star_transactions( + self, + 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. + + Source: https://core.telegram.org/bots/api#getstartransactions + + :param offset: Number of transactions to skip in the response + :param limit: The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100. + :param request_timeout: Request timeout + :return: On success, returns a :class:`aiogram.types.star_transactions.StarTransactions` object. + """ + + call = GetStarTransactions( + offset=offset, + limit=limit, + ) + return await self(call, request_timeout=request_timeout) + + async def send_paid_media( + self, + chat_id: ChatIdUnion, + 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, + request_timeout: int | None = None, + ) -> Message: + """ + 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`). 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 + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendPaidMedia( + 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 new file mode 100644 index 00000000..7f739fc3 --- /dev/null +++ b/aiogram/client/context_controller.py @@ -0,0 +1,35 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from pydantic import BaseModel, PrivateAttr +from typing_extensions import Self + +if TYPE_CHECKING: + from aiogram.client.bot import Bot + + +class BotContextController(BaseModel): + _bot: Bot | None = PrivateAttr() + + def model_post_init(self, __context: Any) -> None: # noqa: PYI063 + self._bot = __context.get("bot") if __context else None + + def as_(self, bot: Bot | None) -> Self: + """ + Bind object to a bot instance. + + :param bot: Bot instance + :return: self + """ + self._bot = bot + return self + + @property + def bot(self) -> Bot | None: + """ + Get bot instance. + + :return: Bot instance + """ + return self._bot diff --git a/aiogram/client/default.py b/aiogram/client/default.py new file mode 100644 index 00000000..00c8645e --- /dev/null +++ b/aiogram/client/default.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from dataclasses import dataclass +from typing import TYPE_CHECKING, Any + +from aiogram.utils.dataclass import dataclass_kwargs + +if TYPE_CHECKING: + from aiogram.types import LinkPreviewOptions + + +# @dataclass ?? +class Default: + # Is not a dataclass because of JSON serialization. + + __slots__ = ("_name",) + + def __init__(self, name: str) -> None: + self._name = name + + @property + def name(self) -> str: + return self._name + + def __str__(self) -> str: + return f"Default({self._name!r})" + + 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 + + def __hash__(self) -> int: + return hash(self._name) + + +@dataclass(**dataclass_kwargs(slots=True, kw_only=True)) +class DefaultBotProperties: + """ + Default bot properties. + """ + + parse_mode: str | None = None + """Default parse mode for messages.""" + disable_notification: bool | None = None + """Sends the message silently. Users will receive a notification with no sound.""" + protect_content: bool | None = None + """Protects content from copying.""" + allow_sending_without_reply: bool | None = None + """Allows to send messages without reply.""" + link_preview: LinkPreviewOptions | None = None + """Link preview settings.""" + link_preview_is_disabled: bool | None = None + """Disables link preview.""" + link_preview_prefer_small_media: bool | None = None + """Prefer small media in link preview.""" + link_preview_prefer_large_media: bool | None = None + """Prefer large media in link preview.""" + link_preview_show_above_text: bool | None = None + """Show link preview above text.""" + show_caption_above_media: bool | None = None + """Show caption above media.""" + + def __post_init__(self) -> None: + has_any_link_preview_option = any( + ( + self.link_preview_is_disabled, + 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 aiogram.types import LinkPreviewOptions + + self.link_preview = LinkPreviewOptions( + is_disabled=self.link_preview_is_disabled, + prefer_small_media=self.link_preview_prefer_small_media, + prefer_large_media=self.link_preview_prefer_large_media, + show_above_text=self.link_preview_show_above_text, + ) + + def __getitem__(self, item: str) -> Any: + return getattr(self, item, None) diff --git a/aiogram/client/session/aiohttp.py b/aiogram/client/session/aiohttp.py index 9d7df940..c1d0b291 100644 --- a/aiogram/client/session/aiohttp.py +++ b/aiogram/client/session/aiohttp.py @@ -1,40 +1,36 @@ from __future__ import annotations import asyncio -from typing import ( - TYPE_CHECKING, - Any, - AsyncGenerator, - Dict, - Iterable, - List, - Optional, - Tuple, - Type, - Union, - cast, -) +import ssl +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.methods import Request, TelegramMethod +from aiogram.__meta__ import __version__ +from aiogram.exceptions import TelegramNetworkError +from aiogram.methods.base import TelegramType -from ...exceptions import TelegramNetworkError -from ...methods.base import TelegramType -from .base import UNSET, BaseSession +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 @@ -46,60 +42,70 @@ def _retrieve_basic(basic: _ProxyBasic) -> Dict[str, Any]: username = proxy_auth.login password = proxy_auth.password - return dict( - proxy_type=proxy_type, - host=host, - port=port, - username=username, - password=password, - rdns=True, - ) + return { + "proxy_type": proxy_type, + "host": host, + "port": port, + "username": username, + "password": password, + "rdns": True, + } -def _prepare_connector(chain_or_plain: _ProxyType) -> Tuple[Type["TCPConnector"], Dict[str, Any]]: - from aiohttp_socks import ChainProxyConnector, ProxyConnector, ProxyInfo # type: ignore +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, dict(proxy_infos=infos) + return ChainProxyConnector, {"proxy_infos": infos} class AiohttpSession(BaseSession): - def __init__(self, proxy: Optional[_ProxyType] = None, **kwargs: Any) -> None: + def __init__(self, proxy: _ProxyType | None = None, limit: int = 100, **kwargs: Any) -> None: + """ + Client session based on aiohttp. + + :param proxy: The proxy to be used for requests. Default is None. + :param limit: The total number of simultaneous connections. Default is 100. + :param kwargs: Additional keyword arguments. + """ 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 @@ -112,7 +118,12 @@ class AiohttpSession(BaseSession): await self.close() if self._session is None or self._session.closed: - self._session = ClientSession(connector=self._connector_type(**self._connector_init)) + self._session = ClientSession( + connector=self._connector_type(**self._connector_init), + headers={ + USER_AGENT: f"{SERVER_SOFTWARE} aiogram/{__version__}", + }, + ) self._should_reset_connector = False return self._session @@ -121,47 +132,78 @@ class AiohttpSession(BaseSession): if self._session is not None and not self._session.closed: await self._session.close() - def build_form_data(self, request: Request) -> FormData: + # Wait 250 ms for the underlying SSL connections to close + # https://docs.aiohttp.org/en/stable/client_advanced.html#graceful-shutdown + await asyncio.sleep(0.25) + + def build_form_data(self, bot: Bot, method: TelegramMethod[TelegramType]) -> FormData: form = FormData(quote_fields=False) - for key, value in request.data.items(): - if value is None or value is UNSET: + 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: continue - form.add_field(key, self.prepare_value(value)) - if request.files: - for key, value in request.files.items(): - form.add_field(key, value, filename=value.filename or key) + form.add_field(key, value) + for key, value in files.items(): + form.add_field( + key, + value.read(bot), + filename=value.filename or key, + ) 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() - request = method.build_request(bot) - url = self.api.api_url(token=bot.token, method=request.method) - form = self.build_form_data(request) + url = self.api.api_url(token=bot.token, method=method.__api_method__) + form = self.build_form_data(bot=bot, method=method) 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}") - response = self.check_response(method=method, status_code=resp.status, content=raw_result) + 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, + ) return cast(TelegramType, response.result) async def stream_content( - self, url: str, timeout: int, chunk_size: int + self, + url: str, + headers: dict[str, Any] | None = None, + timeout: int = 30, + chunk_size: int = 65536, + raise_for_status: bool = True, ) -> AsyncGenerator[bytes, None]: + if headers is None: + headers = {} + session = await self.create_session() - async with session.get(url, timeout=timeout) as resp: + async with session.get( + 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 d5a95622..08c428bd 100644 --- a/aiogram/client/session/base.py +++ b/aiogram/client/session/base.py @@ -3,24 +3,19 @@ from __future__ import annotations import abc import datetime import json -from functools import partial +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, - Awaitable, - Callable, - Final, - List, - Optional, - Type, - Union, - 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, TelegramAPIError, TelegramBadRequest, @@ -33,34 +28,30 @@ 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 UNSET, TelegramObject -from ..telegram import PRODUCTION, TelegramAPIServer -from .middlewares.base import BaseRequestMiddleware +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] -NextRequestMiddlewareType = Callable[ - ["Bot", TelegramMethod[TelegramObject]], Awaitable[Response[TelegramObject]] -] - -RequestMiddlewareType = Union[ - BaseRequestMiddleware, - Callable[ - [NextRequestMiddlewareType, "Bot", TelegramMethod[TelegramType]], - Awaitable[Response[TelegramType]], - ], -] DEFAULT_TIMEOUT: Final[float] = 60.0 class BaseSession(abc.ABC): + """ + This is base class for all HTTP sessions in aiogram. + + If you want to create your own session, you must inherit from this class. + """ + def __init__( self, api: TelegramAPIServer = PRODUCTION, @@ -80,16 +71,34 @@ class BaseSession(abc.ABC): self.json_dumps = json_dumps self.timeout = timeout - self.middlewares: List[RequestMiddlewareType[TelegramObject]] = [] + self.middleware = RequestMiddlewareManager() def check_response( - self, method: TelegramMethod[TelegramType], status_code: int, content: str + self, + bot: Bot, + method: TelegramMethod[TelegramType], + status_code: int, + content: str, ) -> Response[TelegramType]: """ Check response status """ - json_data = self.json_loads(content) - response = method.build_response(json_data) + try: + json_data = self.json_loads(content) + 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 + + 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: + 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 @@ -98,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( @@ -133,11 +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] = UNSET + self, + bot: Bot, + method: TelegramMethod[TelegramType], + timeout: int | None = None, ) -> TelegramType: # pragma: no cover """ Make request to Telegram Bot API @@ -148,64 +161,110 @@ class BaseSession(abc.ABC): :return: :raise TelegramApiError: """ - pass @abc.abstractmethod async def stream_content( - self, url: str, timeout: int, chunk_size: int + self, + url: str, + headers: dict[str, Any] | None = None, + timeout: int = 30, + chunk_size: int = 65536, + raise_for_status: bool = True, ) -> AsyncGenerator[bytes, None]: # pragma: no cover """ Stream reader """ yield b"" - def prepare_value(self, value: Any) -> Union[str, int, bool]: + def prepare_value( + self, + value: Any, + bot: Bot, + files: dict[str, Any], + _dumps_json: bool = True, + ) -> Any: """ Prepare value before send """ + if value is None: + return None if isinstance(value, str): return value - if isinstance(value, (list, dict)): - return self.json_dumps(self.clean_json(value)) + if isinstance(value, Default): + default_value = bot.default[value.name] + return self.prepare_value(default_value, bot=bot, files=files, _dumps_json=_dumps_json) + if isinstance(value, InputFile): + key = secrets.token_urlsafe(10) + files[key] = value + return f"attach://{key}" + if isinstance(value, dict): + value = { + key: prepared_item + for key, item in value.items() + if ( + prepared_item := self.prepare_value( + item, + bot=bot, + files=files, + _dumps_json=False, + ) + ) + is not None + } + if _dumps_json: + return self.json_dumps(value) + return value + if isinstance(value, list): + value = [ + prepared_item + for item in value + if ( + prepared_item := self.prepare_value( + item, + bot=bot, + files=files, + _dumps_json=False, + ) + ) + is not None + ] + if _dumps_json: + 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())) - else: - return str(value) - - def clean_json(self, value: Any) -> Any: - """ - Clean data before send - """ - if isinstance(value, list): - return [self.clean_json(v) for v in value if v is not None] - elif isinstance(value, dict): - return {k: self.clean_json(v) for k, v in value.items() if v is not None} + if isinstance(value, Enum): + return self.prepare_value(value.value, bot=bot, files=files) + if isinstance(value, TelegramObject): + return self.prepare_value( + value.model_dump(warnings=False), + bot=bot, + files=files, + _dumps_json=_dumps_json, + ) + if _dumps_json: + return self.json_dumps(value) return value - def middleware( - self, middleware: RequestMiddlewareType[TelegramObject] - ) -> RequestMiddlewareType[TelegramObject]: - self.middlewares.append(middleware) - return middleware - async def __call__( - self, bot: Bot, method: TelegramMethod[TelegramType], timeout: Optional[int] = UNSET + self, + bot: Bot, + method: TelegramMethod[TelegramType], + timeout: int | None = None, ) -> TelegramType: - middleware = partial(self.make_request, timeout=timeout) - for m in reversed(self.middlewares): - middleware = partial(m, middleware) # type: ignore - return await middleware(bot, method) + 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 5b8d0f2b..a933b600 100644 --- a/aiogram/client/session/middlewares/base.py +++ b/aiogram/client/session/middlewares/base.py @@ -1,16 +1,32 @@ -from abc import ABC, abstractmethod -from typing import TYPE_CHECKING, Awaitable, Callable +from __future__ import annotations -from aiogram.methods import Response, TelegramMethod -from aiogram.types import TelegramObject +from abc import ABC, abstractmethod +from typing import TYPE_CHECKING, Protocol + +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 -NextRequestMiddlewareType = Callable[ - ["Bot", TelegramMethod[TelegramObject]], Awaitable[Response[TelegramObject]] -] +class NextRequestMiddlewareType(Protocol[TelegramType]): # pragma: no cover + async def __call__( + self, + bot: Bot, + method: TelegramMethod[TelegramType], + ) -> Response[TelegramType]: + pass + + +class RequestMiddlewareType(Protocol): # pragma: no cover + async def __call__( + self, + make_request: NextRequestMiddlewareType[TelegramType], + bot: Bot, + method: TelegramMethod[TelegramType], + ) -> Response[TelegramType]: + pass class BaseRequestMiddleware(ABC): @@ -21,10 +37,10 @@ class BaseRequestMiddleware(ABC): @abstractmethod async def __call__( self, - make_request: NextRequestMiddlewareType, - bot: "Bot", - method: TelegramMethod[TelegramObject], - ) -> Response[TelegramObject]: + make_request: NextRequestMiddlewareType[TelegramType], + bot: Bot, + method: TelegramMethod[TelegramType], + ) -> Response[TelegramType]: """ Execute middleware @@ -34,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 new file mode 100644 index 00000000..14906a4f --- /dev/null +++ b/aiogram/client/session/middlewares/manager.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Callable, Sequence +from functools import partial +from typing import Any, cast, overload + +from aiogram.client.session.middlewares.base import ( + NextRequestMiddlewareType, + RequestMiddlewareType, +) +from aiogram.methods.base import TelegramType + + +class RequestMiddlewareManager(Sequence[RequestMiddlewareType]): + def __init__(self) -> None: + self._middlewares: list[RequestMiddlewareType] = [] + + def register( + self, + middleware: RequestMiddlewareType, + ) -> RequestMiddlewareType: + self._middlewares.append(middleware) + return middleware + + def unregister(self, middleware: RequestMiddlewareType) -> None: + self._middlewares.remove(middleware) + + def __call__( + self, + middleware: RequestMiddlewareType | None = None, + ) -> Callable[[RequestMiddlewareType], RequestMiddlewareType] | RequestMiddlewareType: + if middleware is None: + return self.register + return self.register(middleware) + + @overload + def __getitem__(self, item: int) -> RequestMiddlewareType: + pass + + @overload + def __getitem__(self, item: slice) -> Sequence[RequestMiddlewareType]: + pass + + def __getitem__( + self, + item: int | slice, + ) -> RequestMiddlewareType | Sequence[RequestMiddlewareType]: + return self._middlewares[item] + + def __len__(self) -> int: + return len(self._middlewares) + + def wrap_middlewares( + self, + callback: NextRequestMiddlewareType[TelegramType], + **kwargs: Any, + ) -> NextRequestMiddlewareType[TelegramType]: + middleware = partial(callback, **kwargs) + for m in reversed(self._middlewares): + middleware = partial(m, middleware) + return cast(NextRequestMiddlewareType[TelegramType], middleware) diff --git a/aiogram/client/session/middlewares/request_logging.py b/aiogram/client/session/middlewares/request_logging.py index 67df277d..f46631bf 100644 --- a/aiogram/client/session/middlewares/request_logging.py +++ b/aiogram/client/session/middlewares/request_logging.py @@ -1,34 +1,33 @@ 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 -from aiogram.methods.base import Response -from aiogram.types import TelegramObject +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, - make_request: NextRequestMiddlewareType, + make_request: NextRequestMiddlewareType[TelegramType], bot: "Bot", - method: TelegramMethod[TelegramObject], - ) -> Response[TelegramObject]: + method: TelegramMethod[TelegramType], + ) -> Response[TelegramType]: if type(method) not in self.ignore_methods: loggers.middlewares.info( "Make request with method=%r by bot id=%d", diff --git a/aiogram/client/telegram.py b/aiogram/client/telegram.py index 502f950f..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) @@ -52,8 +55,9 @@ class TelegramAPIServer: file: str """Files URL""" is_local: bool = False - """Mark this server is in `local mode `_.""" - wrap_local_file: FilesPathWrapper = BareFilesPathWrapper() + """Mark this server is + in `local mode `_.""" + wrap_local_file: FilesPathWrapper = field(default=BareFilesPathWrapper()) """Callback to wrap files path in local mode""" def api_url(self, token: str, method: str) -> str: @@ -66,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 @@ -92,5 +96,11 @@ class TelegramAPIServer: ) -# Main API server -PRODUCTION = TelegramAPIServer.from_base("https://api.telegram.org") +PRODUCTION = TelegramAPIServer( + base="https://api.telegram.org/bot{token}/{method}", + file="https://api.telegram.org/file/bot{token}/{path}", +) +TEST = TelegramAPIServer( + base="https://api.telegram.org/bot{token}/test/{method}", + file="https://api.telegram.org/file/bot{token}/test/{path}", +) diff --git a/aiogram/dispatcher/dispatcher.py b/aiogram/dispatcher/dispatcher.py index 610053db..5aff6a01 100644 --- a/aiogram/dispatcher/dispatcher.py +++ b/aiogram/dispatcher/dispatcher.py @@ -2,27 +2,36 @@ from __future__ import annotations import asyncio import contextvars +import signal +import sys import warnings -from asyncio import CancelledError, Future, Lock -from typing import Any, AsyncGenerator, Dict, List, Optional, Union +from asyncio import CancelledError, Event, Future, Lock +from collections.abc import AsyncGenerator, Awaitable +from contextlib import suppress +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, TelegramNetworkError, TelegramServerError -from ..methods import GetUpdates, TelegramMethod -from ..types import Update, User -from ..types.update import UpdateTypeLookupError -from ..utils.backoff import Backoff, BackoffConfig from .event.bases import UNHANDLED, SkipHandler from .event.telegram import TelegramEventObserver -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 .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) @@ -33,22 +42,41 @@ class Dispatcher(Router): def __init__( self, - storage: Optional[BaseStorage] = None, + *, # * - Preventing to pass instance of Bot to the FSM storage + 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: str | None = None, **kwargs: Any, ) -> None: - super(Dispatcher, self).__init__(**kwargs) + """ + Root router + + :param storage: Storage for FSM + :param fsm_strategy: FSM strategy + :param events_isolation: Events isolation + :param disable_fsm: Disable FSM, note that if you disable FSM + then you should not use storage and events isolation + :param kwargs: Other arguments, will be passed as keyword arguments to handlers + """ + super().__init__(name=name) + + if storage and not isinstance(storage, BaseStorage): + 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 and etc. + # 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) - # Error handlers should work is out of all other functions and be registered before all others middlewares + # Error handlers should work is out of all other functions + # and should be registered before all others middlewares self.update.outer_middleware(ErrorsMiddleware(self)) # User context middleware makes small optimization for all other builtin @@ -58,17 +86,40 @@ class Dispatcher(Router): # FSM middleware should always be registered after User context middleware # because here is used context from previous step self.fsm = FSMContextMiddleware( - storage=storage if storage else MemoryStorage(), + storage=storage or MemoryStorage(), strategy=fsm_strategy, - events_isolation=events_isolation if events_isolation else DisabledEventIsolation(), + events_isolation=events_isolation or DisabledEventIsolation(), ) - self.update.outer_middleware(self.fsm) + if not disable_fsm: + # Note that when FSM middleware is disabled, the event isolation is also disabled + # Because the isolation mechanism is a part of the FSM + self.update.outer_middleware(self.fsm) self.shutdown.register(self.fsm.close) + self.workflow_data: dict[str, Any] = kwargs self._running_lock = Lock() + 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] + + def __setitem__(self, key: str, value: Any) -> None: + self.workflow_data[key] = value + + def __delitem__(self, key: str) -> None: + del self.workflow_data[key] + + def get(self, key: str, /, default: Any | None = None) -> Any | None: + return self.workflow_data.get(key, default) @property - def parent_router(self) -> None: + def storage(self) -> BaseStorage: + return self.fsm.storage + + @property + def parent_router(self) -> Router | None: """ Dispatcher has no parent router and can't be included to any other routers or dispatchers @@ -84,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: """ @@ -98,10 +150,26 @@ class Dispatcher(Router): handled = False start_time = loop.time() - token = Bot.set_current(bot) + if update.bot != bot: + # Re-mounting update to the current bot instance for making possible to + # use it in shortcuts. + # Here is update is re-created because we need to propagate context to + # all nested objects and attributes of the Update, but it + # is impossible without roundtrip to JSON :( + # The preferred way is that pass already mounted Bot instance to this update + # before call feed_update method + update = Update.model_validate(update.model_dump(), context={"bot": bot}) + try: - kwargs.update(bot=bot) - response = await self.update.wrap_outer_middleware(self.update.trigger, update, kwargs) + response = await self.update.wrap_outer_middleware( + self.update.trigger, + update, + { + **self.workflow_data, + **kwargs, + "bot": bot, + }, + ) handled = response is not UNHANDLED return response finally: @@ -114,9 +182,8 @@ class Dispatcher(Router): duration, bot.id, ) - Bot.reset_current(token) - 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 @@ -124,8 +191,8 @@ class Dispatcher(Router): :param update: :param kwargs: """ - parsed_update = Update(**update) - return await self.feed_update(bot=bot, update=parsed_update, **kwargs) + parsed_update = Update.model_validate(update, context={"bot": bot}) + return await self._feed_webhook_update(bot=bot, update=parsed_update, **kwargs) @classmethod async def _listen_updates( @@ -133,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. @@ -144,15 +211,17 @@ class Dispatcher(Router): get_updates = GetUpdates(timeout=polling_timeout, allowed_updates=allowed_updates) kwargs = {} if bot.session.timeout: - # Request timeout can be lower than session timeout ant that's OK. + # Request timeout can be lower than session timeout and that's OK. # To prevent false-positive TimeoutError we should wait longer than polling timeout kwargs["request_timeout"] = int(bot.session.timeout + polling_timeout) + failed = False while True: try: updates = await bot(get_updates, **kwargs) - except (TelegramNetworkError, TelegramServerError) as e: - # In cases when Telegram Bot API was inaccessible don't need to stop polling process - # because some of developers can't make auto-restarting of the script + 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 loggers.dispatcher.error("Failed to fetch updates - %s: %s", type(e).__name__, e) # And also backoff timeout is best practice to retry any network activity loggers.dispatcher.warning( @@ -166,14 +235,21 @@ class Dispatcher(Router): # In case when network connection was fixed let's reset the backoff # to initial value and then process updates - backoff.reset() + if failed: + loggers.dispatcher.info( + "Connection established (tryings = %d, bot id = %d)", + backoff.counter, + bot.id, + ) + backoff.reset() + failed = False for update in updates: yield update # The getUpdates method returns the earliest 100 unconfirmed updates. # To confirm an update, use the offset parameter when calling getUpdates - # All updates with update_id less than or equal to offset will be marked as confirmed on the server - # and will no longer be returned. + # All updates with update_id less than or equal to offset will be marked + # as confirmed on the server and will no longer be returned. get_updates.offset = update.update_id + 1 async def _listen_update(self, update: Update, **kwargs: Any) -> Any: @@ -191,14 +267,16 @@ class Dispatcher(Router): try: update_type = update.event_type event = update.event - except UpdateTypeLookupError: + except UpdateTypeLookupError as e: warnings.warn( "Detected unknown update type.\n" "Seems like Telegram Bot API was updated and you have " - "installed not latest version of aiogram framework", + "installed not latest version of aiogram framework" + f"\nUpdate: {update.model_dump_json(exclude_unset=True)}", RuntimeWarning, + stacklevel=2, ) - raise SkipHandler() + raise SkipHandler() from e kwargs.update(event_update=update) @@ -223,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 @@ -238,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, @@ -250,33 +331,91 @@ 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: """ - async for update in self._listen_updates( - bot, - polling_timeout=polling_timeout, - backoff_config=backoff_config, - allowed_updates=allowed_updates, - ): - handle_update = self._process_update(bot=bot, update=update, **kwargs) - if handle_as_tasks: - asyncio.create_task(handle_update) - else: - await handle_update + user: User = await bot.me() + loggers.dispatcher.info( + "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, + polling_timeout=polling_timeout, + backoff_config=backoff_config, + allowed_updates=allowed_updates, + ): + handle_update = self._process_update(bot=bot, update=update, **kwargs) + if handle_as_tasks: + 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, + ) async def _feed_webhook_update(self, bot: Bot, update: Update, **kwargs: Any) -> Any: """ @@ -295,23 +434,27 @@ class Dispatcher(Router): raise async def feed_webhook_update( - self, bot: Bot, update: Union[Update, Dict[str, Any]], _timeout: float = 55, **kwargs: Any - ) -> Optional[Dict[str, Any]]: + 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(**update) + update = Update.model_validate(update, context={"bot": bot}) ctx = contextvars.copy_context() loop = asyncio.get_running_loop() waiter = loop.create_future() - def release_waiter(*args: Any) -> None: + def release_waiter(*_: Any) -> None: if not waiter.done(): waiter.set_result(None) 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) @@ -322,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)) @@ -342,8 +483,7 @@ class Dispatcher(Router): # TODO: handle exceptions response: Any = process_updates.result() if isinstance(response, TelegramMethod): - request = response.build_request(bot=bot) - return request.render_webhook_request() + return response else: process_updates.remove_done_callback(release_waiter) @@ -354,88 +494,191 @@ class Dispatcher(Router): return None + async def stop_polling(self) -> None: + """ + Execute this method if you want to stop polling programmatically + + :return: + """ + if not self._running_lock.locked(): + msg = "Polling is not started" + raise RuntimeError(msg) + if not self._stop_signal or not self._stopped_signal: + return + self._stop_signal.set() + await self._stopped_signal.wait() + + def _signal_stop_polling(self, sig: signal.Signals) -> None: + if not self._running_lock.locked(): + return + + loggers.dispatcher.warning("Received %s signal", sig.name) + if not self._stop_signal: + return + self._stop_signal.set() + async def start_polling( self, *bots: Bot, polling_timeout: int = 10, handle_as_tasks: bool = True, backoff_config: BackoffConfig = DEFAULT_BACKOFF_CONFIG, - allowed_updates: Optional[List[str]] = None, + 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: """ Polling runner - :param bots: - :param polling_timeout: - :param handle_as_tasks: - :param kwargs: - :param backoff_config: - :param allowed_updates: + :param bots: Bot instances (one or more) + :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 + 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: + msg = "At least one bot instance is required to start polling" + raise ValueError(msg) + if "bot" in kwargs: + 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 - workflow_data = {"dispatcher": self, "bots": bots, "bot": bots[-1]} - workflow_data.update(kwargs) - await self.emit_startup(**workflow_data) - loggers.dispatcher.info("Start poling") - try: - coro_list = [] - for bot in bots: - user: User = await bot.me() - loggers.dispatcher.info( - "Run polling for bot @%s id=%d - %r", user.username, bot.id, user.full_name + if self._stop_signal is None: + self._stop_signal = Event() + if self._stopped_signal is None: + self._stopped_signal = Event() + + if allowed_updates is UNSET: + allowed_updates = self.resolve_used_update_types() + + self._stop_signal.clear() + self._stopped_signal.clear() + + if handle_signals: + loop = asyncio.get_running_loop() + with suppress(NotImplementedError): # pragma: no cover + # 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, ) - coro_list.append( + loop.add_signal_handler( + signal.SIGINT, + self._signal_stop_polling, + signal.SIGINT, + ) + + workflow_data = { + "dispatcher": self, + "bots": bots, + **self.workflow_data, + **kwargs, + } + if "bot" in workflow_data: + workflow_data.pop("bot") + + await self.emit_startup(bot=bots[-1], **workflow_data) + loggers.dispatcher.info("Start polling") + try: + tasks: list[asyncio.Task[Any]] = [ + asyncio.create_task( self._polling( bot=bot, handle_as_tasks=handle_as_tasks, polling_timeout=polling_timeout, backoff_config=backoff_config, allowed_updates=allowed_updates, - **kwargs, - ) + tasks_concurrency_limit=tasks_concurrency_limit, + **workflow_data, + ), ) - await asyncio.gather(*coro_list) + for bot in bots + ] + tasks.append(asyncio.create_task(self._stop_signal.wait())) + done, pending = await asyncio.wait(tasks, return_when=asyncio.FIRST_COMPLETED) + + for task in pending: + # (mostly) Graceful shutdown unfinished tasks + task.cancel() + with suppress(CancelledError): + await task + # Wait finished tasks to propagate unhandled exceptions + await asyncio.gather(*done) + finally: loggers.dispatcher.info("Polling stopped") try: - await self.emit_shutdown(**workflow_data) + await self.emit_shutdown(bot=bots[-1], **workflow_data) finally: - for bot in bots: # Close sessions - await bot.session.close() + if close_bot_session: + await asyncio.gather(*(bot.session.close() for bot in bots)) + self._stopped_signal.set() def run_polling( self, *bots: Bot, - polling_timeout: int = 30, + polling_timeout: int = 10, handle_as_tasks: bool = True, backoff_config: BackoffConfig = DEFAULT_BACKOFF_CONFIG, - allowed_updates: Optional[List[str]] = None, + 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: """ Run many bots with polling - :param bots: Bot instances - :param polling_timeout: Poling timeout - :param backoff_config: + :param bots: Bot instances (one or more) + :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 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: """ - try: - 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, - ) + with suppress(KeyboardInterrupt): + 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, ) - except (KeyboardInterrupt, SystemExit): # pragma: no cover - # Allow to graceful shutdown - pass + + 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 ef87d329..e9782b0c 100644 --- a/aiogram/dispatcher/event/event.py +++ b/aiogram/dispatcher/event/event.py @@ -1,15 +1,17 @@ from __future__ import annotations -from typing import Any, Callable, List +from collections.abc import Callable +from typing import Any -from .handler import CallbackType, HandlerObject, HandlerType +from .handler import CallbackType, HandlerObject class EventObserver: """ Simple events observer - Is used for managing events is not related with Telegram (For example startup/shutdown processes) + Is used for managing events is not related with Telegram + (For example startup/shutdown processes) Handlers can be registered via decorator or method @@ -24,9 +26,9 @@ class EventObserver: """ def __init__(self) -> None: - self.handlers: List[HandlerObject] = [] + self.handlers: list[HandlerObject] = [] - def register(self, callback: HandlerType) -> None: + def register(self, callback: CallbackType) -> None: """ Register callback with filters """ diff --git a/aiogram/dispatcher/event/handler.py b/aiogram/dispatcher/event/handler.py index 813ddf51..204a548d 100644 --- a/aiogram/dispatcher/event/handler.py +++ b/aiogram/dispatcher/event/handler.py @@ -1,80 +1,117 @@ 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, Awaitable, Callable, Dict, List, Optional, Tuple, Type, Union +from typing import Any -from magic_filter import MagicFilter +from magic_filter.magic import MagicFilter as OriginalMagicFilter -from aiogram.dispatcher.filters.base import BaseFilter -from aiogram.dispatcher.flags.getter import extract_flags_from_object -from aiogram.dispatcher.handler.base import BaseHandler +from aiogram.dispatcher.flags import extract_flags_from_object +from aiogram.filters.base import Filter +from aiogram.handlers import BaseHandler +from aiogram.utils.magic_filter import MagicFilter +from aiogram.utils.warnings import Recommendation -CallbackType = Callable[..., Awaitable[Any]] -SyncFilter = Callable[..., Any] -AsyncFilter = Callable[..., Awaitable[Any]] -FilterType = Union[SyncFilter, AsyncFilter, BaseFilter, MagicFilter] -HandlerType = Union[FilterType, Type[BaseHandler]] +CallbackType = Callable[..., Any] + +_ACCEPTED_PARAM_KINDS = { + inspect.Parameter.POSITIONAL_ONLY, + inspect.Parameter.POSITIONAL_OR_KEYWORD, + inspect.Parameter.KEYWORD_ONLY, +} @dataclass -class CallableMixin: - callback: HandlerType +class CallableObject: + callback: CallbackType awaitable: bool = field(init=False) - spec: inspect.FullArgSpec = 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) - self.spec = inspect.getfullargspec(callback) - def _prepare_kwargs(self, kwargs: Dict[str, Any]) -> Dict[str, Any]: - if self.spec.varkw: + 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 - return { - k: v for k, v in kwargs.items() if k in self.spec.args or k in self.spec.kwonlyargs - } + return {k: kwargs[k] for k in self.params if k in kwargs} async def call(self, *args: Any, **kwargs: Any) -> Any: 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(CallableMixin): - callback: FilterType +class FilterObject(CallableObject): + magic: MagicFilter | None = None def __post_init__(self) -> None: - # TODO: Make possibility to extract and explain magic from filter object. - # Current solution is hard for debugging because the MagicFilter instance can't be extracted - if isinstance(self.callback, MagicFilter): - # MagicFilter instance is callable but generates only "CallOperation" instead of applying the filter + if isinstance(self.callback, OriginalMagicFilter): + # MagicFilter instance is callable but generates + # only "CallOperation" instead of applying the filter + self.magic = self.callback self.callback = self.callback.resolve + if not isinstance(self.magic, MagicFilter): + # Issue: https://github.com/aiogram/aiogram/issues/990 + warnings.warn( + category=Recommendation, + message="You are using F provided by magic_filter package directly, " + "but it lacks `.as_()` extension." + "\n Please change the import statement: from `from magic_filter import F` " + "to `from aiogram import F` to silence this warning.", + stacklevel=6, + ) + super().__post_init__() + if isinstance(self.callback, Filter): + self.awaitable = True + @dataclass -class HandlerObject(CallableMixin): - callback: HandlerType - filters: Optional[List[FilterObject]] = None - flags: Dict[str, Any] = field(default_factory=dict) +class HandlerObject(CallableObject): + 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 a08d7cb1..36b3843e 100644 --- a/aiogram/dispatcher/event/telegram.py +++ b/aiogram/dispatcher/event/telegram.py @@ -1,240 +1,127 @@ from __future__ import annotations -import functools -from itertools import chain -from typing import ( - TYPE_CHECKING, - Any, - Callable, - Dict, - Generator, - List, - Optional, - Tuple, - Type, - Union, -) +from collections.abc import Callable +from typing import TYPE_CHECKING, Any -from pydantic import ValidationError +from aiogram.dispatcher.middlewares.manager import MiddlewareManager +from aiogram.exceptions import UnsupportedKeywordArgument +from aiogram.filters.base import Filter -from ...exceptions import FiltersResolveError -from ...types import TelegramObject -from ..filters.base import BaseFilter -from .bases import ( - REJECTED, - UNHANDLED, - MiddlewareEventType, - MiddlewareType, - NextMiddlewareType, - SkipHandler, -) -from .handler import CallbackType, FilterObject, FilterType, HandlerObject, HandlerType +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: """ Event observer for Telegram events - Here you can register handler with filters or bounded filters which can be used as keyword arguments instead of writing full references when you register new handlers. - This observer will stops event propagation when first handler is pass. + Here you can register handler with filter. + This observer will stop event propagation when first handler is pass. """ def __init__(self, router: Router, event_name: str) -> None: self.router: Router = router self.event_name: str = event_name - self.handlers: List[HandlerObject] = [] - self.filters: List[Type[BaseFilter]] = [] - self.outer_middlewares: List[MiddlewareType[TelegramObject]] = [] - self.middlewares: List[MiddlewareType[TelegramObject]] = [] + self.handlers: list[HandlerObject] = [] + + self.middleware = MiddlewareManager() + self.outer_middleware = MiddlewareManager() # Re-used filters check method from already implemented handler object # with dummy callback which never will be used self._handler = HandlerObject(callback=lambda: True, filters=[]) - def filter(self, *filters: FilterType, **bound_filters: Any) -> None: + def filter(self, *filters: CallbackType) -> None: """ Register filter for all handlers of this event observer :param filters: positional filters - :param bound_filters: keyword filters """ - resolved_filters = self.resolve_filters(filters, bound_filters) if self._handler.filters is None: self._handler.filters = [] - self._handler.filters.extend( - [FilterObject(filter_) for filter_ in chain(resolved_filters, filters)] - ) - - def bind_filter(self, bound_filter: Type[BaseFilter]) -> None: - """ - Register filter class in factory - - :param bound_filter: - """ - if not issubclass(bound_filter, BaseFilter): - raise TypeError( - "bound_filter() argument 'bound_filter' must be subclass of BaseFilter" - ) - self.filters.append(bound_filter) - - def _resolve_filters_chain(self) -> Generator[Type[BaseFilter], None, None]: - """ - Get all bounded filters from current observer and from the parents - with the same event type without duplicates - """ - registry: List[Type[BaseFilter]] = [] + self._handler.filters.extend([FilterObject(filter_) for filter_ in filters]) + def _resolve_middlewares(self) -> list[MiddlewareType[TelegramObject]]: + middlewares: list[MiddlewareType[TelegramObject]] = [] for router in reversed(tuple(self.router.chain_head)): - observer = router.observers[self.event_name] - - for filter_ in observer.filters: - if filter_ in registry: - continue - yield filter_ - registry.append(filter_) - - def _resolve_middlewares(self, *, outer: bool = False) -> List[MiddlewareType[TelegramObject]]: - """ - Get all middlewares in a tree - :param *: - """ - middlewares = [] - if outer: - middlewares.extend(self.outer_middlewares) - else: - for router in reversed(tuple(self.router.chain_head)): - observer = router.observers[self.event_name] - middlewares.extend(observer.middlewares) + observer = router.observers.get(self.event_name) + if observer: + middlewares.extend(observer.middleware) return middlewares - def resolve_filters( - self, - filters: Tuple[FilterType, ...], - full_config: Dict[str, Any], - ignore_default: bool = True, - ) -> List[BaseFilter]: - """ - Resolve keyword filters via filters factory - - :param filters: positional filters - :param full_config: keyword arguments to initialize bounded filters for router/handler - :param ignore_default: ignore to resolving filters with only default arguments that are not in full_config - """ - bound_filters: List[BaseFilter] = [] - - if ignore_default and not full_config: - return bound_filters - - filter_types = set(type(f) for f in filters) - - validation_errors = [] - for bound_filter in self._resolve_filters_chain(): - # skip filter if filter was used as positional filter: - if bound_filter in filter_types: - continue - - # skip filter with no fields in full_config - if ignore_default: - full_config_keys = set(full_config.keys()) - filter_fields = set(bound_filter.__fields__.keys()) - - if not full_config_keys.intersection(filter_fields): - continue - - # Try to initialize filter. - try: - f = bound_filter(**full_config) - except ValidationError as e: - validation_errors.append(e) - continue - - # Clean full config to prevent to re-initialize another filter - # with the same configuration - for key in f.__fields__: - full_config.pop(key, None) - - bound_filters.append(f) - - if full_config: - possible_cases = [] - for error in validation_errors: - for sum_error in error.errors(): - if sum_error["loc"][0] in full_config: - possible_cases.append(error) - break - - raise FiltersResolveError( - unresolved_fields=set(full_config.keys()), possible_cases=possible_cases - ) - - return bound_filters - def register( self, - callback: HandlerType, - *filters: FilterType, - flags: Optional[Dict[str, Any]] = None, - **bound_filters: Any, - ) -> HandlerType: + callback: CallbackType, + *filters: CallbackType, + flags: dict[str, Any] | None = None, + **kwargs: Any, + ) -> CallbackType: """ Register event handler """ + if kwargs: + 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 " + "version of this framework, if it's true just look at correspoding " + "documentation pages.\n" + f"Please remove the {set(kwargs.keys())} arguments from this call.\n" + ) + raise UnsupportedKeywordArgument(msg) + if flags is None: flags = {} - resolved_filters = self.resolve_filters(filters, bound_filters, ignore_default=False) - for resolved_filter in resolved_filters: - resolved_filter.update_handler_flags(flags=flags) + + for item in filters: + if isinstance(item, Filter): + item.update_handler_flags(flags=flags) + self.handlers.append( HandlerObject( callback=callback, - filters=[FilterObject(filter_) for filter_ in chain(resolved_filters, filters)], + filters=[FilterObject(filter_) for filter_ in filters], flags=flags, - ) + ), ) + return callback - @classmethod - def _wrap_middleware( - cls, middlewares: List[MiddlewareType[MiddlewareEventType]], handler: HandlerType - ) -> NextMiddlewareType[MiddlewareEventType]: - @functools.wraps(handler) - def mapper(event: TelegramObject, kwargs: Dict[str, Any]) -> Any: - return handler(event, **kwargs) - - middleware = mapper - for m in reversed(middlewares): - middleware = functools.partial(m, middleware) - return middleware - 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._wrap_middleware(self._resolve_middlewares(outer=True), callback) + wrapped_outer = self.middleware.wrap_middlewares( + self.outer_middleware, + callback, + ) return wrapped_outer(event, data) + def check_root_filters(self, event: TelegramObject, **kwargs: Any) -> Any: + return self._handler.check(event, **kwargs) + async def trigger(self, event: TelegramObject, **kwargs: Any) -> Any: """ Propagate event to handlers and stops propagation on first match. - Handler will be called when all its filters is pass. + Handler will be called when all its filters are pass. """ - # Check globally defined filters before any other handler will be checked - result, data = await self._handler.check(event, **kwargs) - if not result: - return REJECTED - kwargs.update(data) - for handler in self.handlers: + kwargs["handler"] = handler result, data = await handler.check(event, **kwargs) if result: - kwargs.update(data, handler=handler) + kwargs.update(data) try: - wrapped_inner = self._wrap_middleware( - self._resolve_middlewares(), handler.call + wrapped_inner = self.outer_middleware.wrap_middlewares( + self._resolve_middlewares(), + handler.call, ) return await wrapped_inner(event, kwargs) except SkipHandler: @@ -243,82 +130,17 @@ class TelegramEventObserver: return UNHANDLED def __call__( - self, *args: FilterType, flags: Optional[Dict[str, Any]] = None, **bound_filters: Any + self, + *filters: CallbackType, + flags: dict[str, Any] | None = None, + **kwargs: Any, ) -> Callable[[CallbackType], CallbackType]: """ Decorator for registering event handlers """ def wrapper(callback: CallbackType) -> CallbackType: - self.register(callback, *args, flags=flags, **bound_filters) + self.register(callback, *filters, flags=flags, **kwargs) return callback return wrapper - - def middleware( - self, - middleware: Optional[MiddlewareType[TelegramObject]] = None, - ) -> Union[ - Callable[[MiddlewareType[TelegramObject]], MiddlewareType[TelegramObject]], - MiddlewareType[TelegramObject], - ]: - """ - Decorator for registering inner middlewares - - Usage: - - .. code-block:: python - - @.middleware() # via decorator (variant 1) - - .. code-block:: python - - @.middleware # via decorator (variant 2) - - .. code-block:: python - - async def my_middleware(handler, event, data): ... - .middleware(my_middleware) # via method - """ - - def wrapper(m: MiddlewareType[TelegramObject]) -> MiddlewareType[TelegramObject]: - self.middlewares.append(m) - return m - - if middleware is None: - return wrapper - return wrapper(middleware) - - def outer_middleware( - self, - middleware: Optional[MiddlewareType[TelegramObject]] = None, - ) -> Union[ - Callable[[MiddlewareType[TelegramObject]], MiddlewareType[TelegramObject]], - MiddlewareType[TelegramObject], - ]: - """ - Decorator for registering outer middlewares - - Usage: - - .. code-block:: python - - @.outer_middleware() # via decorator (variant 1) - - .. code-block:: python - - @.outer_middleware # via decorator (variant 2) - - .. code-block:: python - - async def my_middleware(handler, event, data): ... - .outer_middleware(my_middleware) # via method - """ - - def wrapper(m: MiddlewareType[TelegramObject]) -> MiddlewareType[TelegramObject]: - self.outer_middlewares.append(m) - return m - - if middleware is None: - return wrapper - return wrapper(middleware) diff --git a/aiogram/dispatcher/filters/__init__.py b/aiogram/dispatcher/filters/__init__.py deleted file mode 100644 index a38b57af..00000000 --- a/aiogram/dispatcher/filters/__init__.py +++ /dev/null @@ -1,131 +0,0 @@ -from typing import Dict, Tuple, Type - -from .base import BaseFilter -from .chat_member_updated import ( - ADMINISTRATOR, - CREATOR, - IS_ADMIN, - IS_MEMBER, - IS_NOT_MEMBER, - JOIN_TRANSITION, - KICKED, - LEAVE_TRANSITION, - LEFT, - MEMBER, - PROMOTED_TRANSITION, - RESTRICTED, - ChatMemberUpdatedFilter, -) -from .command import Command, CommandObject -from .content_types import ContentTypesFilter -from .exception import ExceptionMessageFilter, ExceptionTypeFilter -from .magic_data import MagicData -from .state import StateFilter -from .text import Text - -__all__ = ( - "BUILTIN_FILTERS", - "BaseFilter", - "Text", - "Command", - "CommandObject", - "ContentTypesFilter", - "ExceptionMessageFilter", - "ExceptionTypeFilter", - "StateFilter", - "MagicData", - "ChatMemberUpdatedFilter", - "CREATOR", - "ADMINISTRATOR", - "MEMBER", - "RESTRICTED", - "LEFT", - "KICKED", - "IS_MEMBER", - "IS_ADMIN", - "PROMOTED_TRANSITION", - "IS_NOT_MEMBER", - "JOIN_TRANSITION", - "LEAVE_TRANSITION", -) - -_ALL_EVENTS_FILTERS: Tuple[Type[BaseFilter], ...] = (MagicData,) -_TELEGRAM_EVENTS_FILTERS: Tuple[Type[BaseFilter], ...] = (StateFilter,) - -BUILTIN_FILTERS: Dict[str, Tuple[Type[BaseFilter], ...]] = { - "message": ( - Text, - Command, - ContentTypesFilter, - *_ALL_EVENTS_FILTERS, - *_TELEGRAM_EVENTS_FILTERS, - ), - "edited_message": ( - Text, - Command, - ContentTypesFilter, - *_ALL_EVENTS_FILTERS, - *_TELEGRAM_EVENTS_FILTERS, - ), - "channel_post": ( - Text, - ContentTypesFilter, - *_ALL_EVENTS_FILTERS, - *_TELEGRAM_EVENTS_FILTERS, - ), - "edited_channel_post": ( - Text, - ContentTypesFilter, - *_ALL_EVENTS_FILTERS, - *_TELEGRAM_EVENTS_FILTERS, - ), - "inline_query": ( - Text, - *_ALL_EVENTS_FILTERS, - *_TELEGRAM_EVENTS_FILTERS, - ), - "chosen_inline_result": ( - *_ALL_EVENTS_FILTERS, - *_TELEGRAM_EVENTS_FILTERS, - ), - "callback_query": ( - Text, - *_ALL_EVENTS_FILTERS, - *_TELEGRAM_EVENTS_FILTERS, - ), - "shipping_query": ( - *_ALL_EVENTS_FILTERS, - *_TELEGRAM_EVENTS_FILTERS, - ), - "pre_checkout_query": ( - *_ALL_EVENTS_FILTERS, - *_TELEGRAM_EVENTS_FILTERS, - ), - "poll": ( - *_ALL_EVENTS_FILTERS, - *_TELEGRAM_EVENTS_FILTERS, - ), - "poll_answer": ( - *_ALL_EVENTS_FILTERS, - *_TELEGRAM_EVENTS_FILTERS, - ), - "my_chat_member": ( - *_ALL_EVENTS_FILTERS, - *_TELEGRAM_EVENTS_FILTERS, - ChatMemberUpdatedFilter, - ), - "chat_member": ( - *_ALL_EVENTS_FILTERS, - *_TELEGRAM_EVENTS_FILTERS, - ChatMemberUpdatedFilter, - ), - "chat_join_request": ( - *_ALL_EVENTS_FILTERS, - *_TELEGRAM_EVENTS_FILTERS, - ), - "error": ( - ExceptionMessageFilter, - ExceptionTypeFilter, - *_ALL_EVENTS_FILTERS, - ), -} diff --git a/aiogram/dispatcher/filters/base.py b/aiogram/dispatcher/filters/base.py deleted file mode 100644 index d2bb99cf..00000000 --- a/aiogram/dispatcher/filters/base.py +++ /dev/null @@ -1,40 +0,0 @@ -from abc import ABC, abstractmethod -from typing import TYPE_CHECKING, Any, Awaitable, Callable, Dict, Union - -from pydantic import BaseModel - - -class BaseFilter(ABC, BaseModel): - """ - If you want to register own filters like builtin filters you will need to write subclass - of this class with overriding the :code:`__call__` - method and adding filter attributes. - - BaseFilter is subclass of :class:`pydantic.BaseModel` that's mean all subclasses of BaseFilter has - the validators based on class attributes and custom validator. - """ - - if TYPE_CHECKING: - # 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]]]] - else: # pragma: no cover - - @abstractmethod - async def __call__(self, *args: Any, **kwargs: Any) -> Union[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]` - """ - pass - - def update_handler_flags(self, flags: Dict[str, Any]) -> None: - pass - - def __await__(self): # type: ignore # pragma: no cover - # Is needed only for inspection and this method is never be called - return self.__call__ diff --git a/aiogram/dispatcher/filters/callback_data.py b/aiogram/dispatcher/filters/callback_data.py deleted file mode 100644 index d220da70..00000000 --- a/aiogram/dispatcher/filters/callback_data.py +++ /dev/null @@ -1,113 +0,0 @@ -from __future__ import annotations - -from decimal import Decimal -from enum import Enum -from fractions import Fraction -from typing import TYPE_CHECKING, Any, Dict, Literal, Optional, Type, TypeVar, Union -from uuid import UUID - -from magic_filter import MagicFilter -from pydantic import BaseModel - -from aiogram.dispatcher.filters import BaseFilter -from aiogram.types import CallbackQuery - -T = TypeVar("T", bound="CallbackData") - -MAX_CALLBACK_LENGTH: int = 64 - - -class CallbackDataException(Exception): - pass - - -class CallbackData(BaseModel): - if TYPE_CHECKING: - sep: str - prefix: str - - def __init_subclass__(cls, **kwargs: Any) -> None: - if "prefix" not in kwargs: - raise ValueError( - f"prefix required, usage example: " - f"`class {cls.__name__}(CallbackData, prefix='my_callback'): ...`" - ) - cls.sep = kwargs.pop("sep", ":") - cls.prefix = kwargs.pop("prefix") - if cls.sep in cls.prefix: - raise ValueError( - f"Separator symbol {cls.sep!r} can not be used inside prefix {cls.prefix!r}" - ) - - def _encode_value(self, key: str, value: Any) -> str: - if value is None: - return "" - if isinstance(value, Enum): - return str(value.value) - if isinstance(value, (int, str, float, Decimal, Fraction, UUID)): - return str(value) - raise ValueError( - f"Attribute {key}={value!r} of type {type(value).__name__!r}" - f" can not be packed to callback data" - ) - - def pack(self) -> str: - result = [self.prefix] - for key, value in self.dict().items(): - encoded = self._encode_value(key, value) - if self.sep in encoded: - raise ValueError( - f"Separator symbol {self.sep!r} can not be used in value {key}={encoded!r}" - ) - result.append(encoded) - callback_data = self.sep.join(result) - if len(callback_data.encode()) > MAX_CALLBACK_LENGTH: - raise ValueError( - f"Resulted callback data is too long! len({callback_data!r}.encode()) > {MAX_CALLBACK_LENGTH}" - ) - return callback_data - - @classmethod - def unpack(cls: Type[T], value: str) -> T: - prefix, *parts = value.split(cls.sep) - names = cls.__fields__.keys() - if len(parts) != len(names): - raise TypeError( - f"Callback data {cls.__name__!r} takes {len(names)} arguments but {len(parts)} were given" - ) - if prefix != cls.prefix: - raise ValueError(f"Bad prefix ({prefix!r} != {cls.prefix!r})") - payload = {} - for k, v in zip(names, parts): # type: str, Optional[str] - if field := cls.__fields__.get(k): - if v == "" and not field.required: - v = None - payload[k] = v - return cls(**payload) - - @classmethod - def filter(cls, rule: Optional[MagicFilter] = None) -> CallbackQueryFilter: - return CallbackQueryFilter(callback_data=cls, rule=rule) - - class Config: - use_enum_values = True - - -class CallbackQueryFilter(BaseFilter): - callback_data: Type[CallbackData] - rule: Optional[MagicFilter] = None - - async def __call__(self, query: CallbackQuery) -> Union[Literal[False], Dict[str, Any]]: - if not isinstance(query, CallbackQuery) or not query.data: - return False - try: - callback_data = self.callback_data.unpack(query.data) - except (TypeError, ValueError): - return False - - if self.rule is None or self.rule.resolve(callback_data): - return {"callback_data": callback_data} - return False - - class Config: - arbitrary_types_allowed = True diff --git a/aiogram/dispatcher/filters/command.py b/aiogram/dispatcher/filters/command.py deleted file mode 100644 index 03cb41c7..00000000 --- a/aiogram/dispatcher/filters/command.py +++ /dev/null @@ -1,198 +0,0 @@ -from __future__ import annotations - -import re -from dataclasses import dataclass, field, replace -from typing import Any, Dict, Match, Optional, Pattern, Sequence, Tuple, Union, cast - -from magic_filter import MagicFilter -from pydantic import Field, validator - -from aiogram import Bot -from aiogram.dispatcher.filters import BaseFilter -from aiogram.types import Message -from aiogram.utils.deep_linking import decode_payload - -CommandPatterType = Union[str, re.Pattern] - - -class CommandException(Exception): - pass - - -class Command(BaseFilter): - """ - This filter can be helpful for handling commands from the text messages. - - Works only with :class:`aiogram.types.message.Message` events which have the :code:`text`. - """ - - commands: Union[Sequence[CommandPatterType], CommandPatterType] - """List of commands (string or compiled regexp patterns)""" - commands_prefix: str = "/" - """Prefix for command. Prefix is always is single char but here you can pass all of allowed prefixes, - for example: :code:`"/!"` will work with commands prefixed by :code:`"/"` or :code:`"!"`.""" - commands_ignore_case: bool = False - """Ignore case (Does not work with regexp, use flags instead)""" - commands_ignore_mention: bool = False - """Ignore bot mention. By default bot can not handle commands intended for other bots""" - command_magic: Optional[MagicFilter] = None - """Validate command object via Magic filter after all checks done""" - - def update_handler_flags(self, flags: Dict[str, Any]) -> None: - commands = flags.setdefault("commands", []) - commands.append(self) - - @validator("commands", always=True) - def _validate_commands( - cls, value: Union[Sequence[CommandPatterType], CommandPatterType] - ) -> Sequence[CommandPatterType]: - if isinstance(value, (str, re.Pattern)): - value = [value] - return value - - async def __call__(self, message: Message, bot: Bot) -> Union[bool, Dict[str, Any]]: - text = message.text or message.caption - if not text: - return False - - try: - command = await self.parse_command(text=text, bot=bot) - except CommandException: - return False - return {"command": command} - - def extract_command(self, 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") - - # Separate command into valuable parts - # "/command@mention" -> "/", ("command", "@", "mention") - prefix, (command, _, mention) = full_command[0], full_command[1:].partition("@") - return CommandObject( - prefix=prefix, command=command, mention=mention, args=args[0] if args else None - ) - - def validate_prefix(self, command: CommandObject) -> None: - if command.prefix not in self.commands_prefix: - raise CommandException("Invalid command prefix") - - async def validate_mention(self, bot: Bot, command: CommandObject) -> None: - if command.mention and not self.commands_ignore_mention: - me = await bot.me() - if me.username and command.mention.lower() != me.username.lower(): - raise CommandException("Mention did not match") - - def validate_command(self, command: CommandObject) -> CommandObject: - for allowed_command in cast(Sequence[CommandPatterType], self.commands): - # Command can be presented as regexp pattern or raw string - # then need to validate that in different ways - if isinstance(allowed_command, Pattern): # Regexp - result = allowed_command.match(command.command) - if result: - return replace(command, regexp_match=result) - elif command.command == allowed_command: # String - return command - raise CommandException("Command did not match pattern") - - async def parse_command(self, text: str, bot: Bot) -> CommandObject: - """ - Extract command from the text and validate - - :param text: - :param bot: - :return: - """ - command = self.extract_command(text) - self.validate_prefix(command=command) - await self.validate_mention(bot=bot, command=command) - command = self.validate_command(command) - self.do_magic(command=command) - return command - - def do_magic(self, command: CommandObject) -> None: - if not self.command_magic: - return - if not self.command_magic.resolve(command): - raise CommandException("Rejected via magic filter") - - class Config: - arbitrary_types_allowed = True - - -@dataclass -class CommandObject: - """ - Instance of this object is always has command and it prefix. - Can be passed as keyword argument **command** to the handler - """ - - prefix: str = "/" - """Command prefix""" - command: str = "" - """Command without prefix and mention""" - mention: Optional[str] = None - """Mention (if available)""" - args: Optional[str] = field(repr=False, default=None) - """Command argument""" - regexp_match: Optional[Match[str]] = field(repr=False, default=None) - """Will be presented match result if the command is presented as regexp in filter""" - - @property - def mentioned(self) -> bool: - """ - This command has mention? - """ - return bool(self.mention) - - @property - def text(self) -> str: - """ - Generate original text from object - """ - line = self.prefix + self.command - if self.mention: - line += "@" + self.mention - if self.args: - line += " " + self.args - return line - - -class CommandStart(Command): - commands: Tuple[str] = Field(("start",), const=True) - commands_prefix: str = Field("/", const=True) - deep_link: bool = False - deep_link_encoded: bool = False - - async def parse_command(self, text: str, bot: Bot) -> CommandObject: - """ - Extract command from the text and validate - - :param text: - :param bot: - :return: - """ - command = self.extract_command(text) - self.validate_prefix(command=command) - await self.validate_mention(bot=bot, command=command) - command = self.validate_command(command) - command = self.validate_deeplink(command=command) - self.do_magic(command=command) - return command - - def validate_deeplink(self, command: CommandObject) -> CommandObject: - if not self.deep_link: - return command - if not command.args: - raise CommandException("Deep-link was missing") - 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}") - return replace(command, args=args) - return command diff --git a/aiogram/dispatcher/filters/content_types.py b/aiogram/dispatcher/filters/content_types.py deleted file mode 100644 index dc96ca23..00000000 --- a/aiogram/dispatcher/filters/content_types.py +++ /dev/null @@ -1,34 +0,0 @@ -from typing import Any, Dict, Optional, Sequence, Union - -from pydantic import validator - -from aiogram.types.message import ContentType - -from ...types import Message -from .base import BaseFilter - - -class ContentTypesFilter(BaseFilter): - """ - Is useful for handling specific types of messages (For example separate text and stickers handlers). - """ - - content_types: Union[Sequence[str], str] - """Sequence of allowed content types""" - - @validator("content_types") - def _validate_content_types( - cls, value: Optional[Union[Sequence[str], str]] - ) -> Optional[Sequence[str]]: - if not value: - return value - if isinstance(value, str): - value = [value] - allowed_content_types = set(ContentType.all()) - bad_content_types = set(value) - allowed_content_types - if bad_content_types: - raise ValueError(f"Invalid content types {bad_content_types} is not allowed here") - return value - - async def __call__(self, message: Message) -> Union[bool, Dict[str, Any]]: - return ContentType.ANY in self.content_types or message.content_type in self.content_types diff --git a/aiogram/dispatcher/filters/exception.py b/aiogram/dispatcher/filters/exception.py deleted file mode 100644 index 58f03e8c..00000000 --- a/aiogram/dispatcher/filters/exception.py +++ /dev/null @@ -1,51 +0,0 @@ -import re -from typing import Any, Dict, Pattern, Tuple, Type, Union, cast - -from pydantic import validator - -from aiogram.dispatcher.filters import BaseFilter -from aiogram.types import TelegramObject - - -class ExceptionTypeFilter(BaseFilter): - """ - Allows to match exception by type - """ - - exception: Union[Type[Exception], Tuple[Type[Exception]]] - """Exception type(s)""" - - class Config: - arbitrary_types_allowed = True - - async def __call__( - self, obj: TelegramObject, exception: Exception - ) -> Union[bool, Dict[str, Any]]: - return isinstance(exception, self.exception) - - -class ExceptionMessageFilter(BaseFilter): - """ - Allow to match exception by message - """ - - pattern: Union[str, Pattern[str]] - """Regexp pattern""" - - class Config: - arbitrary_types_allowed = True - - @validator("pattern") - def _validate_match(cls, value: Union[str, Pattern[str]]) -> Union[str, Pattern[str]]: - if isinstance(value, str): - return re.compile(value) - return value - - async def __call__( - self, obj: TelegramObject, exception: Exception - ) -> Union[bool, Dict[str, Any]]: - pattern = cast(Pattern[str], self.pattern) - result = pattern.match(str(exception)) - if not result: - return False - return {"match_exception": result} diff --git a/aiogram/dispatcher/filters/magic_data.py b/aiogram/dispatcher/filters/magic_data.py deleted file mode 100644 index 2fa5f46a..00000000 --- a/aiogram/dispatcher/filters/magic_data.py +++ /dev/null @@ -1,20 +0,0 @@ -from typing import Any - -from magic_filter import AttrDict, MagicFilter - -from aiogram.dispatcher.filters import BaseFilter -from aiogram.types import TelegramObject - - -class MagicData(BaseFilter): - magic_data: MagicFilter - - class Config: - arbitrary_types_allowed = True - - async def __call__(self, event: TelegramObject, *args: Any, **kwargs: Any) -> bool: - return bool( - self.magic_data.resolve( - AttrDict({"event": event, **{k: v for k, v in enumerate(args)}, **kwargs}) - ) - ) diff --git a/aiogram/dispatcher/filters/state.py b/aiogram/dispatcher/filters/state.py deleted file mode 100644 index 316edcf5..00000000 --- a/aiogram/dispatcher/filters/state.py +++ /dev/null @@ -1,48 +0,0 @@ -from inspect import isclass -from typing import Any, Dict, Optional, Sequence, Type, Union, cast, no_type_check - -from pydantic import Field, validator - -from aiogram.dispatcher.filters import BaseFilter -from aiogram.dispatcher.fsm.state import State, StatesGroup -from aiogram.types import TelegramObject - -StateType = Union[str, None, State, StatesGroup, Type[StatesGroup]] - - -class StateFilter(BaseFilter): - """ - State filter - """ - - state: Union[StateType, Sequence[StateType]] = Field(...) - - class Config: - arbitrary_types_allowed = True - - @validator("state") - @no_type_check # issubclass breaks things - def _validate_state(cls, v: Union[StateType, Sequence[StateType]]) -> Sequence[StateType]: - if ( - isinstance(v, (str, State, StatesGroup)) - or (isclass(v) and issubclass(v, StatesGroup)) - or v is None - ): - return [v] - return v - - async def __call__( - self, obj: Union[TelegramObject], raw_state: Optional[str] = None - ) -> Union[bool, Dict[str, Any]]: - allowed_states = cast(Sequence[StateType], self.state) - for allowed_state in allowed_states: - if isinstance(allowed_state, str) or allowed_state is None: - if allowed_state == "*" or raw_state == allowed_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 - return False diff --git a/aiogram/dispatcher/filters/text.py b/aiogram/dispatcher/filters/text.py deleted file mode 100644 index 3dd36fbd..00000000 --- a/aiogram/dispatcher/filters/text.py +++ /dev/null @@ -1,108 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, Optional, Sequence, Union - -from pydantic import root_validator - -from aiogram.dispatcher.filters import BaseFilter -from aiogram.types import CallbackQuery, InlineQuery, Message, Poll - -if TYPE_CHECKING: - from aiogram.utils.i18n.lazy_proxy import LazyProxy - -TextType = Union[str, "LazyProxy"] - - -class Text(BaseFilter): - """ - Is useful for filtering text :class:`aiogram.types.message.Message`, - any :class:`aiogram.types.callback_query.CallbackQuery` with `data`, - :class:`aiogram.types.inline_query.InlineQuery` or :class:`aiogram.types.poll.Poll` question. - - .. warning:: - - Only one of `text`, `text_contains`, `text_startswith` or `text_endswith` argument can be used at once. - Any of that arguments can be string, list, set or tuple of strings. - - .. deprecated:: 3.0 - - use :ref:`magic-filter `. For example do :pycode:`F.text == "text"` instead - """ - - text: Optional[Union[Sequence[TextType], TextType]] = None - """Text equals value or one of values""" - text_contains: Optional[Union[Sequence[TextType], TextType]] = None - """Text contains value or one of values""" - text_startswith: Optional[Union[Sequence[TextType], TextType]] = None - """Text starts with value or one of values""" - text_endswith: Optional[Union[Sequence[TextType], TextType]] = None - """Text ends with value or one of values""" - text_ignore_case: bool = False - """Ignore case when checks""" - - class Config: - arbitrary_types_allowed = True - - @root_validator - def _validate_constraints(cls, values: Dict[str, Any]) -> Dict[str, Any]: - # Validate that only one text filter type is presented - used_args = set( - key for key, value in values.items() if key != "text_ignore_case" and value is not None - ) - if len(used_args) < 1: - raise ValueError( - "Filter should contain one of arguments: {'text', 'text_contains', 'text_startswith', 'text_endswith'}" - ) - if len(used_args) > 1: - raise ValueError(f"Arguments {used_args} cannot be used together") - - # Convert single value to list - for arg in used_args: - if isinstance(values[arg], str): - values[arg] = [values[arg]] - - return values - - async def __call__( - self, obj: Union[Message, CallbackQuery, InlineQuery, Poll] - ) -> Union[bool, Dict[str, Any]]: - if isinstance(obj, Message): - text = obj.text or obj.caption or "" - if not text and obj.poll: - text = obj.poll.question - elif isinstance(obj, CallbackQuery) and obj.data: - text = obj.data - elif isinstance(obj, InlineQuery): - text = obj.query - elif isinstance(obj, Poll): - text = obj.question - else: - return False - - if not text: - return False - if self.text_ignore_case: - text = text.lower() - - if self.text is not None: - equals = list(map(self.prepare_text, self.text)) - return text in equals - - if self.text_contains is not None: - contains = list(map(self.prepare_text, self.text_contains)) - return all(map(text.__contains__, contains)) - - if self.text_startswith is not None: - startswith = list(map(self.prepare_text, self.text_startswith)) - return any(map(text.startswith, startswith)) - - if self.text_endswith is not None: - endswith = list(map(self.prepare_text, self.text_endswith)) - return any(map(text.endswith, endswith)) - - # Impossible because the validator prevents this situation - return False # pragma: no cover - - def prepare_text(self, text: str) -> str: - if self.text_ignore_case: - return str(text).lower() - else: - return str(text) diff --git a/aiogram/dispatcher/flags.py b/aiogram/dispatcher/flags.py new file mode 100644 index 00000000..f96d5213 --- /dev/null +++ b/aiogram/dispatcher/flags.py @@ -0,0 +1,132 @@ +from __future__ import annotations + +from collections.abc import Callable +from dataclasses import dataclass +from typing import TYPE_CHECKING, Any, cast, overload + +from magic_filter import AttrDict, MagicFilter + +if TYPE_CHECKING: + from aiogram.dispatcher.event.handler import HandlerObject + + +@dataclass(frozen=True) +class Flag: + name: str + value: Any + + +@dataclass(frozen=True) +class FlagDecorator: + flag: Flag + + @classmethod + def _with_flag(cls, flag: Flag) -> FlagDecorator: + return cls(flag) + + def _with_value(self, value: Any) -> FlagDecorator: + new_flag = Flag(self.flag.name, value) + return self._with_flag(new_flag) + + @overload + def __call__(self, value: Callable[..., Any], /) -> Callable[..., Any]: # type: ignore + pass + + @overload + def __call__(self, value: Any, /) -> FlagDecorator: + pass + + @overload + def __call__(self, **kwargs: Any) -> FlagDecorator: + pass + + def __call__( + self, + value: Any | None = None, + **kwargs: Any, + ) -> Callable[..., Any] | FlagDecorator: + if value and kwargs: + 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 = { + **extract_flags_from_object(value), + self.flag.name: self.flag.value, + } + return cast(Callable[..., Any], value) + return self._with_value(AttrDict(kwargs) if value is None else value) + + +if TYPE_CHECKING: + + class _ChatActionFlagProtocol(FlagDecorator): + def __call__( # type: ignore[override] + self, + action: str = ..., + interval: float = ..., + initial_sleep: float = ..., + **kwargs: Any, + ) -> FlagDecorator: + pass + + +class FlagGenerator: + def __getattr__(self, name: str) -> FlagDecorator: + if name[0] == "_": + 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]: + if not hasattr(obj, "aiogram_flag"): + return {} + return cast(dict[str, Any], obj.aiogram_flag) + + +def extract_flags(handler: HandlerObject | dict[str, Any]) -> dict[str, Any]: + """ + Extract flags from handler or middleware context data + + :param handler: handler object or data + :return: dictionary with all handler flags + """ + if isinstance(handler, dict) and "handler" in handler: + handler = handler["handler"] + if hasattr(handler, "flags"): + return handler.flags + return {} + + +def get_flag( + handler: HandlerObject | dict[str, Any], + name: str, + *, + default: Any | None = None, +) -> Any: + """ + Get flag by name + + :param handler: handler object or data + :param name: name of the flag + :param default: default value (None) + :return: value of the flag or default + """ + flags = extract_flags(handler) + return flags.get(name, default) + + +def check_flags(handler: HandlerObject | dict[str, Any], magic: MagicFilter) -> Any: + """ + Check flags via magic filter + + :param handler: handler object or data + :param magic: instance of the magic + :return: the result of magic filter check + """ + flags = extract_flags(handler) + return magic.resolve(AttrDict(flags)) diff --git a/aiogram/dispatcher/flags/flag.py b/aiogram/dispatcher/flags/flag.py deleted file mode 100644 index 845b898b..00000000 --- a/aiogram/dispatcher/flags/flag.py +++ /dev/null @@ -1,60 +0,0 @@ -from dataclasses import dataclass -from typing import Any, Callable, Optional, Union, cast, overload - -from magic_filter import AttrDict - -from aiogram.dispatcher.flags.getter import extract_flags_from_object - - -@dataclass(frozen=True) -class Flag: - name: str - value: Any - - -@dataclass(frozen=True) -class FlagDecorator: - flag: Flag - - @classmethod - def _with_flag(cls, flag: Flag) -> "FlagDecorator": - return cls(flag) - - def _with_value(self, value: Any) -> "FlagDecorator": - new_flag = Flag(self.flag.name, value) - return self._with_flag(new_flag) - - @overload - def __call__(self, value: Callable[..., Any]) -> Callable[..., Any]: # type: ignore - pass - - @overload - def __call__(self, value: Any) -> "FlagDecorator": - pass - - @overload - def __call__(self, **kwargs: Any) -> "FlagDecorator": - pass - - def __call__( - self, - value: Optional[Any] = None, - **kwargs: Any, - ) -> Union[Callable[..., Any], "FlagDecorator"]: - if value and kwargs: - raise ValueError("The arguments `value` and **kwargs can not be used together") - - if value is not None and callable(value): - value.aiogram_flag = { - **extract_flags_from_object(value), - self.flag.name: self.flag.value, - } - return cast(Callable[..., Any], value) - return self._with_value(AttrDict(kwargs) if value is None else value) - - -class FlagGenerator: - def __getattr__(self, name: str) -> FlagDecorator: - if name[0] == "_": - raise AttributeError("Flag name must NOT start with underscore") - return FlagDecorator(Flag(name, True)) diff --git a/aiogram/dispatcher/flags/getter.py b/aiogram/dispatcher/flags/getter.py deleted file mode 100644 index 0c2c90dd..00000000 --- a/aiogram/dispatcher/flags/getter.py +++ /dev/null @@ -1,56 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, Optional, Union, cast - -from magic_filter import AttrDict, MagicFilter - -if TYPE_CHECKING: - from aiogram.dispatcher.event.handler import HandlerObject - - -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) - - -def extract_flags(handler: Union["HandlerObject", Dict[str, Any]]) -> Dict[str, Any]: - """ - Extract flags from handler or middleware context data - - :param handler: handler object or data - :return: dictionary with all handler flags - """ - if isinstance(handler, dict) and "handler" in handler: - handler = handler["handler"] - if not hasattr(handler, "flags"): - return {} - return handler.flags # type: ignore - - -def get_flag( - handler: Union["HandlerObject", Dict[str, Any]], - name: str, - *, - default: Optional[Any] = None, -) -> Any: - """ - Get flag by name - - :param handler: handler object or data - :param name: name of the flag - :param default: default value (None) - :return: value of the flag or default - """ - flags = extract_flags(handler) - return flags.get(name, default) - - -def check_flags(handler: Union["HandlerObject", Dict[str, Any]], magic: MagicFilter) -> Any: - """ - Check flags via magic filter - - :param handler: handler object or data - :param magic: instance of the magic - :return: the result of magic filter check - """ - flags = extract_flags(handler) - return magic.resolve(AttrDict(flags)) diff --git a/aiogram/dispatcher/fsm/context.py b/aiogram/dispatcher/fsm/context.py deleted file mode 100644 index 41b68606..00000000 --- a/aiogram/dispatcher/fsm/context.py +++ /dev/null @@ -1,34 +0,0 @@ -from typing import Any, Dict, Optional - -from aiogram import Bot -from aiogram.dispatcher.fsm.storage.base import BaseStorage, StateType, StorageKey - - -class FSMContext: - def __init__(self, bot: Bot, storage: BaseStorage, key: StorageKey) -> None: - self.bot = bot - self.storage = storage - self.key = key - - async def set_state(self, state: StateType = None) -> None: - await self.storage.set_state(bot=self.bot, key=self.key, state=state) - - async def get_state(self) -> Optional[str]: - return await self.storage.get_state(bot=self.bot, key=self.key) - - async def set_data(self, data: Dict[str, Any]) -> None: - await self.storage.set_data(bot=self.bot, key=self.key, data=data) - - async def get_data(self) -> Dict[str, Any]: - return await self.storage.get_data(bot=self.bot, key=self.key) - - async def update_data( - self, data: Optional[Dict[str, Any]] = None, **kwargs: Any - ) -> Dict[str, Any]: - if data: - kwargs.update(data) - return await self.storage.update_data(bot=self.bot, key=self.key, data=kwargs) - - async def clear(self) -> None: - await self.set_state(state=None) - await self.set_data({}) diff --git a/aiogram/dispatcher/fsm/middleware.py b/aiogram/dispatcher/fsm/middleware.py deleted file mode 100644 index 29db32ee..00000000 --- a/aiogram/dispatcher/fsm/middleware.py +++ /dev/null @@ -1,91 +0,0 @@ -from typing import Any, Awaitable, Callable, Dict, Optional, cast - -from aiogram import Bot -from aiogram.dispatcher.fsm.context import FSMContext -from aiogram.dispatcher.fsm.storage.base import ( - DEFAULT_DESTINY, - BaseEventIsolation, - BaseStorage, - StorageKey, -) -from aiogram.dispatcher.fsm.strategy import FSMStrategy, apply_strategy -from aiogram.dispatcher.middlewares.base import BaseMiddleware -from aiogram.types import TelegramObject - - -class FSMContextMiddleware(BaseMiddleware): - def __init__( - self, - storage: BaseStorage, - events_isolation: BaseEventIsolation, - strategy: FSMStrategy = FSMStrategy.USER_IN_CHAT, - ) -> None: - self.storage = storage - self.strategy = strategy - self.events_isolation = events_isolation - - async def __call__( - self, - handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]], - event: TelegramObject, - data: Dict[str, Any], - ) -> Any: - bot: Bot = cast(Bot, data["bot"]) - context = self.resolve_event_context(bot, data) - data["fsm_storage"] = self.storage - if context: - data.update({"state": context, "raw_state": await context.get_state()}) - async with self.events_isolation.lock(bot=bot, key=context.key): - return await handler(event, data) - return await handler(event, data) - - def resolve_event_context( - self, - bot: Bot, - data: Dict[str, Any], - destiny: str = DEFAULT_DESTINY, - ) -> Optional[FSMContext]: - user = data.get("event_from_user") - chat = data.get("event_chat") - chat_id = chat.id if chat else None - user_id = user.id if user else None - return self.resolve_context(bot=bot, chat_id=chat_id, user_id=user_id, destiny=destiny) - - def resolve_context( - self, - bot: Bot, - chat_id: Optional[int], - user_id: Optional[int], - destiny: str = DEFAULT_DESTINY, - ) -> Optional[FSMContext]: - if chat_id is None: - chat_id = user_id - - if chat_id is not None and user_id is not None: - chat_id, user_id = apply_strategy( - chat_id=chat_id, user_id=user_id, strategy=self.strategy - ) - return self.get_context(bot=bot, chat_id=chat_id, user_id=user_id, destiny=destiny) - return None - - def get_context( - self, - bot: Bot, - chat_id: int, - user_id: int, - destiny: str = DEFAULT_DESTINY, - ) -> FSMContext: - return FSMContext( - bot=bot, - storage=self.storage, - key=StorageKey( - user_id=user_id, - chat_id=chat_id, - bot_id=bot.id, - destiny=destiny, - ), - ) - - async def close(self) -> None: - await self.storage.close() - await self.events_isolation.close() diff --git a/aiogram/dispatcher/fsm/state.py b/aiogram/dispatcher/fsm/state.py deleted file mode 100644 index 6b29833b..00000000 --- a/aiogram/dispatcher/fsm/state.py +++ /dev/null @@ -1,140 +0,0 @@ -import inspect -from typing import Any, Iterator, Optional, Tuple, Type, no_type_check - -from ...types import TelegramObject - - -class State: - """ - State object - """ - - def __init__(self, state: Optional[str] = None, group_name: Optional[str] = None) -> None: - self._state = state - self._group_name = group_name - self._group: Optional[Type[StatesGroup]] = None - - @property - def group(self) -> "Type[StatesGroup]": - if not self._group: - raise RuntimeError("This state is not in any group.") - return self._group - - @property - def state(self) -> Optional[str]: - if self._state is None or self._state == "*": - return self._state - - if self._group_name is None and self._group: - group = self._group.__full_group_name__ - elif self._group_name: - group = self._group_name - else: - group = "@" - - return f"{group}:{self._state}" - - def set_parent(self, group: "Type[StatesGroup]") -> None: - if not issubclass(group, StatesGroup): - raise ValueError("Group must be subclass of StatesGroup") - self._group = group - - def __set_name__(self, owner: "Type[StatesGroup]", name: str) -> None: - if self._state is None: - self._state = name - self.set_parent(owner) - - def __str__(self) -> str: - return f"" - - __repr__ = __str__ - - def __call__(self, event: TelegramObject, raw_state: Optional[str] = None) -> bool: - if self.state == "*": - return True - return raw_state == self.state - - -class StatesGroupMeta(type): - __parent__: "Optional[Type[StatesGroup]]" - __childs__: "Tuple[Type[StatesGroup], ...]" - __states__: Tuple[State, ...] - __state_names__: Tuple[str, ...] - - @no_type_check - def __new__(mcs, name, bases, namespace, **kwargs): - cls = super(StatesGroupMeta, mcs).__new__(mcs, name, bases, namespace) - - states = [] - childs = [] - - for name, arg in namespace.items(): - if isinstance(arg, State): - states.append(arg) - elif inspect.isclass(arg) and issubclass(arg, StatesGroup): - childs.append(arg) - arg.__parent__ = cls - - cls.__parent__ = None - cls.__childs__ = tuple(childs) - cls.__states__ = tuple(states) - cls.__state_names__ = tuple(state.state for state in states) - - return cls - - @property - def __full_group_name__(cls) -> str: - if cls.__parent__: - return ".".join((cls.__parent__.__full_group_name__, cls.__name__)) - return cls.__name__ - - @property - def __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, ...]: - result = cls.__states__ - for group in cls.__childs__: - result += group.__all_states__ - return result - - @property - def __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: - if isinstance(item, str): - return item in cls.__all_states_names__ - if isinstance(item, State): - return item in cls.__all_states__ - if isinstance(item, StatesGroupMeta): - return item in cls.__all_childs__ - return False - - def __str__(self) -> str: - return f"" - - def __iter__(self) -> Iterator[State]: - return iter(self.__all_states__) - - -class StatesGroup(metaclass=StatesGroupMeta): - @classmethod - 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: - return raw_state in type(self).__all_states_names__ - - def __str__(self) -> str: - return f"StatesGroup {type(self).__full_group_name__}" - - -default_state = State() -any_state = State(state="*") diff --git a/aiogram/dispatcher/fsm/storage/base.py b/aiogram/dispatcher/fsm/storage/base.py deleted file mode 100644 index 71d6ff16..00000000 --- a/aiogram/dispatcher/fsm/storage/base.py +++ /dev/null @@ -1,109 +0,0 @@ -from abc import ABC, abstractmethod -from contextlib import asynccontextmanager -from dataclasses import dataclass -from typing import Any, AsyncGenerator, Dict, Optional, Union - -from aiogram import Bot -from aiogram.dispatcher.fsm.state import State - -StateType = Optional[Union[str, State]] - -DEFAULT_DESTINY = "default" - - -@dataclass(frozen=True) -class StorageKey: - bot_id: int - chat_id: int - user_id: int - destiny: str = DEFAULT_DESTINY - - -class BaseStorage(ABC): - """ - Base class for all FSM storages - """ - - @abstractmethod - async def set_state(self, bot: Bot, key: StorageKey, state: StateType = None) -> None: - """ - Set state for specified key - - :param bot: instance of the current bot - :param key: storage key - :param state: new state - """ - pass - - @abstractmethod - async def get_state(self, bot: Bot, key: StorageKey) -> Optional[str]: - """ - Get key state - - :param bot: instance of the current bot - :param key: storage key - :return: current state - """ - pass - - @abstractmethod - async def set_data(self, bot: Bot, key: StorageKey, data: Dict[str, Any]) -> None: - """ - Write data (replace) - - :param bot: instance of the current bot - :param key: storage key - :param data: new data - """ - pass - - @abstractmethod - async def get_data(self, bot: Bot, key: StorageKey) -> Dict[str, Any]: - """ - Get current data for key - - :param bot: instance of the current bot - :param key: storage key - :return: current data - """ - pass - - async def update_data(self, bot: Bot, key: StorageKey, data: Dict[str, Any]) -> Dict[str, Any]: - """ - Update date in the storage for key (like dict.update) - - :param bot: instance of the current bot - :param key: storage key - :param data: partial data - :return: new data - """ - current_data = await self.get_data(bot=bot, key=key) - current_data.update(data) - await self.set_data(bot=bot, key=key, data=current_data) - return current_data.copy() - - @abstractmethod - async def close(self) -> None: # pragma: no cover - """ - Close storage (database connection, file or etc.) - """ - pass - - -class BaseEventIsolation(ABC): - @abstractmethod - @asynccontextmanager - async def lock(self, bot: Bot, key: StorageKey) -> AsyncGenerator[None, None]: - """ - Isolate events with lock. - Will be used as context manager - - :param bot: instance of the current bot - :param key: storage key - :return: An async generator - """ - yield None - - @abstractmethod - async def close(self) -> None: - pass diff --git a/aiogram/dispatcher/fsm/storage/memory.py b/aiogram/dispatcher/fsm/storage/memory.py deleted file mode 100644 index b65b5d11..00000000 --- a/aiogram/dispatcher/fsm/storage/memory.py +++ /dev/null @@ -1,75 +0,0 @@ -from asyncio import Lock -from collections import defaultdict -from contextlib import asynccontextmanager -from dataclasses import dataclass, field -from typing import Any, AsyncGenerator, DefaultDict, Dict, Hashable, Optional - -from aiogram import Bot -from aiogram.dispatcher.fsm.state import State -from aiogram.dispatcher.fsm.storage.base import ( - BaseEventIsolation, - BaseStorage, - StateType, - StorageKey, -) - - -@dataclass -class MemoryStorageRecord: - data: Dict[str, Any] = field(default_factory=dict) - state: Optional[str] = None - - -class MemoryStorage(BaseStorage): - """ - Default FSM storage, stores all data in :class:`dict` and loss everything on shutdown - - .. warning:: - - Is not recommended using in production in due to you will lose all data - when your bot restarts - """ - - def __init__(self) -> None: - self.storage: DefaultDict[StorageKey, MemoryStorageRecord] = defaultdict( - MemoryStorageRecord - ) - - async def close(self) -> None: - pass - - async def set_state(self, bot: Bot, key: StorageKey, state: StateType = None) -> None: - self.storage[key].state = state.state if isinstance(state, State) else state - - async def get_state(self, bot: Bot, key: StorageKey) -> Optional[str]: - return self.storage[key].state - - async def set_data(self, bot: Bot, key: StorageKey, data: Dict[str, Any]) -> None: - self.storage[key].data = data.copy() - - async def get_data(self, bot: Bot, key: StorageKey) -> Dict[str, Any]: - return self.storage[key].data.copy() - - -class DisabledEventIsolation(BaseEventIsolation): - @asynccontextmanager - async def lock(self, bot: Bot, key: StorageKey) -> AsyncGenerator[None, None]: - yield - - async def close(self) -> None: - pass - - -class SimpleEventIsolation(BaseEventIsolation): - def __init__(self) -> None: - # TODO: Unused locks cleaner is needed - self._locks: DefaultDict[Hashable, Lock] = defaultdict(Lock) - - @asynccontextmanager - async def lock(self, bot: Bot, key: StorageKey) -> AsyncGenerator[None, None]: - lock = self._locks[key] - async with lock: - yield - - async def close(self) -> None: - self._locks.clear() diff --git a/aiogram/dispatcher/fsm/strategy.py b/aiogram/dispatcher/fsm/strategy.py deleted file mode 100644 index 4f540a4a..00000000 --- a/aiogram/dispatcher/fsm/strategy.py +++ /dev/null @@ -1,16 +0,0 @@ -from enum import Enum, auto -from typing import Tuple - - -class FSMStrategy(Enum): - USER_IN_CHAT = auto() - CHAT = auto() - GLOBAL_USER = auto() - - -def apply_strategy(chat_id: int, user_id: int, strategy: FSMStrategy) -> Tuple[int, int]: - if strategy == FSMStrategy.CHAT: - return chat_id, chat_id - if strategy == FSMStrategy.GLOBAL_USER: - return user_id, user_id - return chat_id, user_id 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 b33de5f9..affd38f7 100644 --- a/aiogram/dispatcher/middlewares/error.py +++ b/aiogram/dispatcher/middlewares/error.py @@ -1,13 +1,16 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Awaitable, Callable, Dict +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 -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): @@ -16,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) @@ -26,7 +29,9 @@ class ErrorsMiddleware(BaseMiddleware): raise except Exception as e: response = await self.router.propagate_event( - update_type="error", event=event, **data, exception=e + update_type="error", + event=ErrorEvent(update=cast(Update, event), exception=e), + **data, ) if response is not UNHANDLED: return response diff --git a/aiogram/dispatcher/middlewares/manager.py b/aiogram/dispatcher/middlewares/manager.py new file mode 100644 index 00000000..e5cf73e7 --- /dev/null +++ b/aiogram/dispatcher/middlewares/manager.py @@ -0,0 +1,68 @@ +import functools +from collections.abc import Callable, Sequence +from typing import Any, overload + +from aiogram.dispatcher.event.bases import ( + MiddlewareEventType, + MiddlewareType, + NextMiddlewareType, +) +from aiogram.dispatcher.event.handler import CallbackType +from aiogram.types import TelegramObject + + +class MiddlewareManager(Sequence[MiddlewareType[TelegramObject]]): + def __init__(self) -> None: + self._middlewares: list[MiddlewareType[TelegramObject]] = [] + + def register( + self, + middleware: MiddlewareType[TelegramObject], + ) -> MiddlewareType[TelegramObject]: + self._middlewares.append(middleware) + return middleware + + def unregister(self, middleware: MiddlewareType[TelegramObject]) -> None: + self._middlewares.remove(middleware) + + def __call__( + self, + middleware: MiddlewareType[TelegramObject] | None = None, + ) -> ( + Callable[[MiddlewareType[TelegramObject]], MiddlewareType[TelegramObject]] + | MiddlewareType[TelegramObject] + ): + if middleware is None: + return self.register + return self.register(middleware) + + @overload + def __getitem__(self, item: int) -> MiddlewareType[TelegramObject]: + pass + + @overload + def __getitem__(self, item: slice) -> Sequence[MiddlewareType[TelegramObject]]: + pass + + def __getitem__( + self, + item: int | slice, + ) -> MiddlewareType[TelegramObject] | Sequence[MiddlewareType[TelegramObject]]: + return self._middlewares[item] + + def __len__(self) -> int: + return len(self._middlewares) + + @staticmethod + def wrap_middlewares( + middlewares: Sequence[MiddlewareType[MiddlewareEventType]], + handler: CallbackType, + ) -> NextMiddlewareType[MiddlewareEventType]: + @functools.wraps(handler) + def handler_wrapper(event: TelegramObject, kwargs: dict[str, Any]) -> Any: + return handler(event, **kwargs) + + middleware = handler_wrapper + for m in reversed(middlewares): + middleware = functools.partial(m, middleware) # type: ignore[assignment] + return middleware diff --git a/aiogram/dispatcher/middlewares/user_context.py b/aiogram/dispatcher/middlewares/user_context.py index 3531beb7..40b407e9 100644 --- a/aiogram/dispatcher/middlewares/user_context.py +++ b/aiogram/dispatcher/middlewares/user_context.py @@ -1,74 +1,188 @@ -from contextlib import contextmanager -from typing import Any, Awaitable, Callable, Dict, Iterator, Optional, Tuple +from collections.abc import Awaitable, Callable +from dataclasses import dataclass +from typing import Any from aiogram.dispatcher.middlewares.base import BaseMiddleware -from aiogram.types import Chat, TelegramObject, Update, User +from aiogram.types import ( + Chat, + ChatBoostSourcePremium, + InaccessibleMessage, + TelegramObject, + Update, + User, +) + +EVENT_CONTEXT_KEY = "event_context" + +EVENT_FROM_USER_KEY = "event_from_user" +EVENT_CHAT_KEY = "event_chat" +EVENT_THREAD_ID_KEY = "event_thread_id" + + +@dataclass(frozen=True) +class EventContext: + chat: Chat | None = None + user: User | None = None + thread_id: int | None = None + business_connection_id: str | None = None + + @property + def user_id(self) -> int | None: + return self.user.id if self.user else None + + @property + 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!") - chat, user = self.resolve_event_context(event=event) - with self.context(chat=chat, user=user): - if user is not None: - data["event_from_user"] = user - if chat is not None: - data["event_chat"] = chat - return await handler(event, data) + msg = "UserContextMiddleware got an unexpected event type!" + raise RuntimeError(msg) + event_context = data[EVENT_CONTEXT_KEY] = self.resolve_event_context(event=event) - @contextmanager - def context(self, chat: Optional[Chat] = None, user: Optional[User] = None) -> Iterator[None]: - chat_token = None - user_token = None - if chat: - chat_token = chat.set_current(chat) - if user: - user_token = user.set_current(user) - try: - yield - finally: - if chat and chat_token: - chat.reset_current(chat_token) - if user and user_token: - user.reset_current(user_token) + # Backward compatibility + if event_context.user is not None: + data[EVENT_FROM_USER_KEY] = event_context.user + if event_context.chat is not None: + data[EVENT_CHAT_KEY] = event_context.chat + if event_context.thread_id is not None: + data[EVENT_THREAD_ID_KEY] = event_context.thread_id + + return await handler(event, data) @classmethod - def resolve_event_context(cls, event: Update) -> Tuple[Optional[Chat], Optional[User]]: + def resolve_event_context(cls, event: Update) -> EventContext: """ Resolve chat and user instance from Update object """ if event.message: - return event.message.chat, event.message.from_user + return EventContext( + chat=event.message.chat, + user=event.message.from_user, + thread_id=( + event.message.message_thread_id if event.message.is_topic_message else None + ), + ) if event.edited_message: - return event.edited_message.chat, event.edited_message.from_user + return EventContext( + chat=event.edited_message.chat, + user=event.edited_message.from_user, + thread_id=( + event.edited_message.message_thread_id + if event.edited_message.is_topic_message + else None + ), + ) if event.channel_post: - return event.channel_post.chat, None + return EventContext(chat=event.channel_post.chat) if event.edited_channel_post: - return event.edited_channel_post.chat, None + return EventContext(chat=event.edited_channel_post.chat) if event.inline_query: - return None, event.inline_query.from_user + return EventContext(user=event.inline_query.from_user) if event.chosen_inline_result: - return None, event.chosen_inline_result.from_user + return EventContext(user=event.chosen_inline_result.from_user) if event.callback_query: - if event.callback_query.message: - return event.callback_query.message.chat, event.callback_query.from_user - return None, event.callback_query.from_user + callback_query_message = event.callback_query.message + if callback_query_message: + return EventContext( + chat=callback_query_message.chat, + user=event.callback_query.from_user, + thread_id=( + callback_query_message.message_thread_id + if not isinstance(callback_query_message, InaccessibleMessage) + and callback_query_message.is_topic_message + else None + ), + business_connection_id=( + callback_query_message.business_connection_id + if not isinstance(callback_query_message, InaccessibleMessage) + else None + ), + ) + return EventContext(user=event.callback_query.from_user) if event.shipping_query: - return None, event.shipping_query.from_user + return EventContext(user=event.shipping_query.from_user) if event.pre_checkout_query: - return None, event.pre_checkout_query.from_user + return EventContext(user=event.pre_checkout_query.from_user) if event.poll_answer: - return None, event.poll_answer.user + return EventContext( + chat=event.poll_answer.voter_chat, + user=event.poll_answer.user, + ) if event.my_chat_member: - return event.my_chat_member.chat, event.my_chat_member.from_user + return EventContext( + chat=event.my_chat_member.chat, + user=event.my_chat_member.from_user, + ) if event.chat_member: - return event.chat_member.chat, event.chat_member.from_user + return EventContext(chat=event.chat_member.chat, user=event.chat_member.from_user) if event.chat_join_request: - return event.chat_join_request.chat, event.chat_join_request.from_user - return None, None + return EventContext( + chat=event.chat_join_request.chat, + user=event.chat_join_request.from_user, + ) + if event.message_reaction: + return EventContext( + chat=event.message_reaction.chat, + user=event.message_reaction.user, + ) + 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) + if event.deleted_business_messages: + return EventContext( + chat=event.deleted_business_messages.chat, + business_connection_id=event.deleted_business_messages.business_connection_id, + ) + if event.business_connection: + return EventContext( + user=event.business_connection.user, + business_connection_id=event.business_connection.id, + ) + if event.business_message: + return EventContext( + chat=event.business_message.chat, + user=event.business_message.from_user, + thread_id=( + event.business_message.message_thread_id + if event.business_message.is_topic_message + else None + ), + business_connection_id=event.business_message.business_connection_id, + ) + if event.edited_business_message: + return EventContext( + chat=event.edited_business_message.chat, + user=event.edited_business_message.from_user, + thread_id=( + event.edited_business_message.message_thread_id + if event.edited_business_message.is_topic_message + else None + ), + 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 c9e7dea9..dde35c3c 100644 --- a/aiogram/dispatcher/router.py +++ b/aiogram/dispatcher/router.py @@ -1,17 +1,16 @@ from __future__ import annotations -import warnings -from typing import Any, Dict, Generator, List, Optional, Set, Union +from collections.abc import Generator +from typing import TYPE_CHECKING, Any, Final -from ..types import TelegramObject -from ..utils.imports import import_module -from ..utils.warnings import CodeHasNoEffect from .event.bases import REJECTED, UNHANDLED from .event.event import EventObserver from .event.telegram import TelegramEventObserver -from .filters import BUILTIN_FILTERS -INTERNAL_UPDATE_TYPES = frozenset({"update", "error"}) +if TYPE_CHECKING: + from aiogram.types import TelegramObject + +INTERNAL_UPDATE_TYPES: Final[frozenset[str]] = frozenset({"update", "error"}) class Router: @@ -25,47 +24,75 @@ class Router: - By decorator - :obj:`@router.()` """ - def __init__(self, use_builtin_filters: bool = True, name: Optional[str] = None) -> None: + def __init__(self, *, name: str | None = None) -> None: """ - - :param use_builtin_filters: `aiogram` has many builtin filters and you can controll automatic registration of this filters in factory :param name: Optional router name, can be useful for debugging """ - self.use_builtin_filters = use_builtin_filters 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") self.my_chat_member = TelegramEventObserver(router=self, event_name="my_chat_member") self.chat_member = TelegramEventObserver(router=self, event_name="chat_member") 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", + ) + self.chat_boost = TelegramEventObserver(router=self, event_name="chat_boost") + self.removed_chat_boost = TelegramEventObserver( + router=self, + event_name="removed_chat_boost", + ) + self.deleted_business_messages = TelegramEventObserver( + router=self, + event_name="deleted_business_messages", + ) + self.business_connection = TelegramEventObserver( + router=self, + event_name="business_connection", + ) + self.edited_business_message = TelegramEventObserver( + 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 = TelegramEventObserver(router=self, event_name="error") + 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, @@ -80,31 +107,35 @@ class Router: "my_chat_member": self.my_chat_member, "chat_member": self.chat_member, "chat_join_request": self.chat_join_request, + "message_reaction": self.message_reaction, + "message_reaction_count": self.message_reaction_count, + "chat_boost": self.chat_boost, + "removed_chat_boost": self.removed_chat_boost, + "deleted_business_messages": self.deleted_business_messages, + "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, } - # Builtin filters - if use_builtin_filters: - for name, observer in self.observers.items(): - for builtin_filter in BUILTIN_FILTERS.get(name, ()): - observer.bind_filter(builtin_filter) - def __str__(self) -> str: return f"{type(self).__name__} {self.name!r}" 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} @@ -114,31 +145,47 @@ class Router: if observer.handlers and update_name not in skip_events: handlers_in_use.add(update_name) - return list(sorted(handlers_in_use)) + return sorted(handlers_in_use) async def propagate_event(self, update_type: str, event: TelegramObject, **kwargs: Any) -> Any: kwargs.update(event_router=self) - observer = self.observers[update_type] + observer = self.observers.get(update_type) 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, ) - return await observer.wrap_outer_middleware(_wrapped, event=event, data=kwargs) + if observer: + return await observer.wrap_outer_middleware(_wrapped, event=event, data=kwargs) + return await _wrapped(event, **kwargs) async def _propagate_event( self, - observer: TelegramEventObserver, + observer: TelegramEventObserver | None, update_type: str, event: TelegramObject, **kwargs: Any, ) -> Any: - response = await observer.trigger(event, **kwargs) - if response is REJECTED: - return UNHANDLED - if response is not UNHANDLED: - return response + response = UNHANDLED + if observer: + # Check globally defined filters before any other handler will be checked. + # This check is placed here instead of `trigger` method to add possibility + # to pass context to handlers from global filters. + result, data = await observer.check_root_filters(event, **kwargs) + if not result: + return UNHANDLED + kwargs.update(data) + + response = await observer.trigger(event, **kwargs) + if response is REJECTED: # pragma: no cover + # Possible only if some handler returns REJECTED + return UNHANDLED + if response is not UNHANDLED: + return response for router in self.sub_routers: response = await router.propagate_event(update_type=update_type, event=event, **kwargs) @@ -149,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 @@ -161,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 @@ -176,46 +223,49 @@ 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") - - if not self.use_builtin_filters and parent.use_builtin_filters: - warnings.warn( - f"{type(self).__name__}(use_builtin_filters=False) has no effect" - f" for router {self} in due to builtin filters is already registered" - f" in parent router", - CodeHasNoEffect, - stacklevel=3, - ) + msg = "Circular referencing of Router is not allowed" + raise RuntimeError(msg) parent = parent.parent_router self._parent_router = router router.sub_routers.append(self) - def include_router(self, router: Union[Router, str]) -> Router: + def include_routers(self, *routers: Router) -> None: + """ + Attach multiple routers. + + :param routers: + :return: + """ + if not routers: + msg = "At least one router must be provided" + raise ValueError(msg) + for router in routers: + self.include_router(router) + + def include_router(self, router: Router) -> Router: """ Attach another router. - Can be attached directly or by import string in format ":" - :param router: :return: """ - if isinstance(router, str): # Resolve import string - router = import_module(router) 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 @@ -244,135 +294,3 @@ class Router: await self.shutdown.trigger(*args, **kwargs) for router in self.sub_routers: await router.emit_shutdown(*args, **kwargs) - - @property - def message_handler(self) -> TelegramEventObserver: - warnings.warn( - "`Router.message_handler(...)` is deprecated and will be removed in version 3.2 " - "use `Router.message(...)`", - DeprecationWarning, - stacklevel=2, - ) - - return self.message - - @property - def edited_message_handler(self) -> TelegramEventObserver: - warnings.warn( - "`Router.edited_message_handler(...)` is deprecated and will be removed in version 3.2 " - "use `Router.edited_message(...)`", - DeprecationWarning, - stacklevel=2, - ) - - return self.edited_message - - @property - def channel_post_handler(self) -> TelegramEventObserver: - warnings.warn( - "`Router.channel_post_handler(...)` is deprecated and will be removed in version 3.2 " - "use `Router.channel_post(...)`", - DeprecationWarning, - stacklevel=2, - ) - - return self.channel_post - - @property - def edited_channel_post_handler(self) -> TelegramEventObserver: - warnings.warn( - "`Router.edited_channel_post_handler(...)` is deprecated and will be removed in version 3.2 " - "use `Router.edited_channel_post(...)`", - DeprecationWarning, - stacklevel=2, - ) - - return self.edited_channel_post - - @property - def inline_query_handler(self) -> TelegramEventObserver: - warnings.warn( - "`Router.inline_query_handler(...)` is deprecated and will be removed in version 3.2 " - "use `Router.inline_query(...)`", - DeprecationWarning, - stacklevel=2, - ) - - return self.inline_query - - @property - def chosen_inline_result_handler(self) -> TelegramEventObserver: - warnings.warn( - "`Router.chosen_inline_result_handler(...)` is deprecated and will be removed in version 3.2 " - "use `Router.chosen_inline_result(...)`", - DeprecationWarning, - stacklevel=2, - ) - - return self.chosen_inline_result - - @property - def callback_query_handler(self) -> TelegramEventObserver: - warnings.warn( - "`Router.callback_query_handler(...)` is deprecated and will be removed in version 3.2 " - "use `Router.callback_query(...)`", - DeprecationWarning, - stacklevel=2, - ) - - return self.callback_query - - @property - def shipping_query_handler(self) -> TelegramEventObserver: - warnings.warn( - "`Router.shipping_query_handler(...)` is deprecated and will be removed in version 3.2 " - "use `Router.shipping_query(...)`", - DeprecationWarning, - stacklevel=2, - ) - - return self.shipping_query - - @property - def pre_checkout_query_handler(self) -> TelegramEventObserver: - warnings.warn( - "`Router.pre_checkout_query_handler(...)` is deprecated and will be removed in version 3.2 " - "use `Router.pre_checkout_query(...)`", - DeprecationWarning, - stacklevel=2, - ) - - return self.pre_checkout_query - - @property - def poll_handler(self) -> TelegramEventObserver: - warnings.warn( - "`Router.poll_handler(...)` is deprecated and will be removed in version 3.2 " - "use `Router.poll(...)`", - DeprecationWarning, - stacklevel=2, - ) - - return self.poll - - @property - def poll_answer_handler(self) -> TelegramEventObserver: - warnings.warn( - "`Router.poll_answer_handler(...)` is deprecated and will be removed in version 3.2 " - "use `Router.poll_answer(...)`", - DeprecationWarning, - stacklevel=2, - ) - - return self.poll_answer - - @property - def errors_handler(self) -> TelegramEventObserver: - warnings.warn( - "`Router.errors_handler(...)` is deprecated and will be removed in version 3.2 " - "use `Router.errors(...)`", - DeprecationWarning, - stacklevel=2, - ) - - return self.errors diff --git a/aiogram/enums/__init__.py b/aiogram/enums/__init__.py new file mode 100644 index 00000000..1a6e5326 --- /dev/null +++ b/aiogram/enums/__init__.py @@ -0,0 +1,73 @@ +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 +from .chat_type import ChatType +from .content_type import ContentType +from .currency import Currency +from .dice_emoji import DiceEmoji +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 +from .poll_type import PollType +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", + "ChatType", + "ContentType", + "Currency", + "DiceEmoji", + "EncryptedPassportElement", + "InlineQueryResultType", + "InputMediaType", + "InputPaidMediaType", + "InputProfilePhotoType", + "InputStoryContentType", + "KeyboardButtonPollTypeType", + "MaskPositionPoint", + "MenuButtonType", + "MessageEntityType", + "MessageOriginType", + "OwnedGiftType", + "PaidMediaType", + "ParseMode", + "PassportElementErrorType", + "PollType", + "ReactionTypeType", + "RevenueWithdrawalStateType", + "StickerFormat", + "StickerType", + "StoryAreaTypeType", + "TopicIconColor", + "TransactionPartnerType", + "TransactionPartnerUserTransactionTypeEnum", + "UpdateType", +) diff --git a/aiogram/enums/bot_command_scope_type.py b/aiogram/enums/bot_command_scope_type.py new file mode 100644 index 00000000..f0994316 --- /dev/null +++ b/aiogram/enums/bot_command_scope_type.py @@ -0,0 +1,17 @@ +from enum import Enum + + +class BotCommandScopeType(str, Enum): + """ + This object represents the scope to which bot commands are applied. + + Source: https://core.telegram.org/bots/api#botcommandscope + """ + + DEFAULT = "default" + ALL_PRIVATE_CHATS = "all_private_chats" + ALL_GROUP_CHATS = "all_group_chats" + ALL_CHAT_ADMINISTRATORS = "all_chat_administrators" + CHAT = "chat" + CHAT_ADMINISTRATORS = "chat_administrators" + CHAT_MEMBER = "chat_member" 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/chat_action.py b/aiogram/enums/chat_action.py new file mode 100644 index 00000000..4402b5b4 --- /dev/null +++ b/aiogram/enums/chat_action.py @@ -0,0 +1,32 @@ +from enum import Enum + + +class ChatAction(str, Enum): + """ + This object represents bot actions. + + 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. + + Source: https://core.telegram.org/bots/api#sendchataction + """ + + TYPING = "typing" + UPLOAD_PHOTO = "upload_photo" + RECORD_VIDEO = "record_video" + UPLOAD_VIDEO = "upload_video" + RECORD_VOICE = "record_voice" + UPLOAD_VOICE = "upload_voice" + UPLOAD_DOCUMENT = "upload_document" + CHOOSE_STICKER = "choose_sticker" + FIND_LOCATION = "find_location" + RECORD_VIDEO_NOTE = "record_video_note" + UPLOAD_VIDEO_NOTE = "upload_video_note" diff --git a/aiogram/enums/chat_boost_source_type.py b/aiogram/enums/chat_boost_source_type.py new file mode 100644 index 00000000..c95c31dc --- /dev/null +++ b/aiogram/enums/chat_boost_source_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class ChatBoostSourceType(str, Enum): + """ + This object represents a type of chat boost source. + + Source: https://core.telegram.org/bots/api#chatboostsource + """ + + PREMIUM = "premium" + GIFT_CODE = "gift_code" + GIVEAWAY = "giveaway" diff --git a/aiogram/enums/chat_member_status.py b/aiogram/enums/chat_member_status.py new file mode 100644 index 00000000..db6f9213 --- /dev/null +++ b/aiogram/enums/chat_member_status.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class ChatMemberStatus(str, Enum): + """ + This object represents chat member status. + + Source: https://core.telegram.org/bots/api#chatmember + """ + + CREATOR = "creator" + ADMINISTRATOR = "administrator" + MEMBER = "member" + RESTRICTED = "restricted" + LEFT = "left" + KICKED = "kicked" diff --git a/aiogram/enums/chat_type.py b/aiogram/enums/chat_type.py new file mode 100644 index 00000000..10dccc85 --- /dev/null +++ b/aiogram/enums/chat_type.py @@ -0,0 +1,15 @@ +from enum import Enum + + +class ChatType(str, Enum): + """ + This object represents a chat type + + Source: https://core.telegram.org/bots/api#chat + """ + + SENDER = "sender" + PRIVATE = "private" + GROUP = "group" + SUPERGROUP = "supergroup" + CHANNEL = "channel" diff --git a/aiogram/enums/content_type.py b/aiogram/enums/content_type.py new file mode 100644 index 00000000..0c099661 --- /dev/null +++ b/aiogram/enums/content_type.py @@ -0,0 +1,84 @@ +from enum import Enum + + +class ContentType(str, Enum): + """ + This object represents a type of content in message + """ + + UNKNOWN = "unknown" + ANY = "any" + TEXT = "text" + ANIMATION = "animation" + AUDIO = "audio" + DOCUMENT = "document" + PAID_MEDIA = "paid_media" + PHOTO = "photo" + STICKER = "sticker" + STORY = "story" + VIDEO = "video" + VIDEO_NOTE = "video_note" + VOICE = "voice" + CHECKLIST = "checklist" + CONTACT = "contact" + DICE = "dice" + GAME = "game" + POLL = "poll" + VENUE = "venue" + 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" + GROUP_CHAT_CREATED = "group_chat_created" + SUPERGROUP_CHAT_CREATED = "supergroup_chat_created" + CHANNEL_CHAT_CREATED = "channel_chat_created" + MESSAGE_AUTO_DELETE_TIMER_CHANGED = "message_auto_delete_timer_changed" + MIGRATE_TO_CHAT_ID = "migrate_to_chat_id" + MIGRATE_FROM_CHAT_ID = "migrate_from_chat_id" + 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" + FORUM_TOPIC_REOPENED = "forum_topic_reopened" + GENERAL_FORUM_TOPIC_HIDDEN = "general_forum_topic_hidden" + GENERAL_FORUM_TOPIC_UNHIDDEN = "general_forum_topic_unhidden" + GIVEAWAY_CREATED = "giveaway_created" + 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" + VIDEO_CHAT_PARTICIPANTS_INVITED = "video_chat_participants_invited" + WEB_APP_DATA = "web_app_data" + USER_SHARED = "user_shared" diff --git a/aiogram/enums/currency.py b/aiogram/enums/currency.py new file mode 100644 index 00000000..563651b7 --- /dev/null +++ b/aiogram/enums/currency.py @@ -0,0 +1,96 @@ +from enum import Enum + + +class Currency(str, Enum): + """ + Currencies supported by Telegram Bot API + + Source: https://core.telegram.org/bots/payments#supported-currencies + """ + + AED = "AED" + AFN = "AFN" + ALL = "ALL" + AMD = "AMD" + ARS = "ARS" + AUD = "AUD" + AZN = "AZN" + BAM = "BAM" + BDT = "BDT" + BGN = "BGN" + BND = "BND" + BOB = "BOB" + BRL = "BRL" + BYN = "BYN" + CAD = "CAD" + CHF = "CHF" + CLP = "CLP" + CNY = "CNY" + COP = "COP" + CRC = "CRC" + CZK = "CZK" + DKK = "DKK" + DOP = "DOP" + DZD = "DZD" + EGP = "EGP" + ETB = "ETB" + EUR = "EUR" + GBP = "GBP" + GEL = "GEL" + GTQ = "GTQ" + HKD = "HKD" + HNL = "HNL" + HRK = "HRK" + HUF = "HUF" + IDR = "IDR" + ILS = "ILS" + INR = "INR" + ISK = "ISK" + JMD = "JMD" + JPY = "JPY" + KES = "KES" + KGS = "KGS" + KRW = "KRW" + KZT = "KZT" + LBP = "LBP" + LKR = "LKR" + MAD = "MAD" + MDL = "MDL" + MNT = "MNT" + MUR = "MUR" + MVR = "MVR" + MXN = "MXN" + MYR = "MYR" + MZN = "MZN" + NGN = "NGN" + NIO = "NIO" + NOK = "NOK" + NPR = "NPR" + NZD = "NZD" + PAB = "PAB" + PEN = "PEN" + PHP = "PHP" + PKR = "PKR" + PLN = "PLN" + PYG = "PYG" + QAR = "QAR" + RON = "RON" + RSD = "RSD" + RUB = "RUB" + SAR = "SAR" + SEK = "SEK" + SGD = "SGD" + THB = "THB" + TJS = "TJS" + TRY = "TRY" + TTD = "TTD" + TWD = "TWD" + TZS = "TZS" + UAH = "UAH" + UGX = "UGX" + USD = "USD" + UYU = "UYU" + UZS = "UZS" + VND = "VND" + YER = "YER" + ZAR = "ZAR" diff --git a/aiogram/enums/dice_emoji.py b/aiogram/enums/dice_emoji.py new file mode 100644 index 00000000..68519324 --- /dev/null +++ b/aiogram/enums/dice_emoji.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class DiceEmoji(str, Enum): + """ + Emoji on which the dice throw animation is based + + Source: https://core.telegram.org/bots/api#dice + """ + + DICE = "🎲" + DART = "🎯" + BASKETBALL = "🏀" + FOOTBALL = "⚽" + SLOT_MACHINE = "🎰" + BOWLING = "🎳" diff --git a/aiogram/enums/encrypted_passport_element.py b/aiogram/enums/encrypted_passport_element.py new file mode 100644 index 00000000..ebb4b2e6 --- /dev/null +++ b/aiogram/enums/encrypted_passport_element.py @@ -0,0 +1,23 @@ +from enum import Enum + + +class EncryptedPassportElement(str, Enum): + """ + This object represents type of encrypted passport element. + + Source: https://core.telegram.org/bots/api#encryptedpassportelement + """ + + PERSONAL_DETAILS = "personal_details" + PASSPORT = "passport" + DRIVER_LICENSE = "driver_license" + IDENTITY_CARD = "identity_card" + INTERNAL_PASSPORT = "internal_passport" + ADDRESS = "address" + UTILITY_BILL = "utility_bill" + BANK_STATEMENT = "bank_statement" + RENTAL_AGREEMENT = "rental_agreement" + PASSPORT_REGISTRATION = "passport_registration" + TEMPORARY_REGISTRATION = "temporary_registration" + PHONE_NUMBER = "phone_number" + EMAIL = "email" diff --git a/aiogram/enums/inline_query_result_type.py b/aiogram/enums/inline_query_result_type.py new file mode 100644 index 00000000..ae20045a --- /dev/null +++ b/aiogram/enums/inline_query_result_type.py @@ -0,0 +1,23 @@ +from enum import Enum + + +class InlineQueryResultType(str, Enum): + """ + Type of inline query result + + Source: https://core.telegram.org/bots/api#inlinequeryresult + """ + + AUDIO = "audio" + DOCUMENT = "document" + GIF = "gif" + MPEG4_GIF = "mpeg4_gif" + PHOTO = "photo" + STICKER = "sticker" + VIDEO = "video" + VOICE = "voice" + ARTICLE = "article" + CONTACT = "contact" + GAME = "game" + LOCATION = "location" + VENUE = "venue" diff --git a/aiogram/enums/input_media_type.py b/aiogram/enums/input_media_type.py new file mode 100644 index 00000000..30741dd4 --- /dev/null +++ b/aiogram/enums/input_media_type.py @@ -0,0 +1,15 @@ +from enum import Enum + + +class InputMediaType(str, Enum): + """ + This object represents input media type + + Source: https://core.telegram.org/bots/api#inputmedia + """ + + ANIMATION = "animation" + AUDIO = "audio" + DOCUMENT = "document" + PHOTO = "photo" + VIDEO = "video" diff --git a/aiogram/enums/input_paid_media_type.py b/aiogram/enums/input_paid_media_type.py new file mode 100644 index 00000000..fc132e22 --- /dev/null +++ b/aiogram/enums/input_paid_media_type.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class InputPaidMediaType(str, Enum): + """ + This object represents the type of a media in a paid message. + + Source: https://core.telegram.org/bots/api#inputpaidmedia + """ + + PHOTO = "photo" + VIDEO = "video" 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/keyboard_button_poll_type_type.py b/aiogram/enums/keyboard_button_poll_type_type.py new file mode 100644 index 00000000..b6b692fb --- /dev/null +++ b/aiogram/enums/keyboard_button_poll_type_type.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class KeyboardButtonPollTypeType(str, Enum): + """ + This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. + + Source: https://core.telegram.org/bots/api#keyboardbuttonpolltype + """ + + QUIZ = "quiz" + REGULAR = "regular" diff --git a/aiogram/enums/mask_position_point.py b/aiogram/enums/mask_position_point.py new file mode 100644 index 00000000..348ae007 --- /dev/null +++ b/aiogram/enums/mask_position_point.py @@ -0,0 +1,14 @@ +from enum import Enum + + +class MaskPositionPoint(str, Enum): + """ + The part of the face relative to which the mask should be placed. + + Source: https://core.telegram.org/bots/api#maskposition + """ + + FOREHEAD = "forehead" + EYES = "eyes" + MOUTH = "mouth" + CHIN = "chin" diff --git a/aiogram/enums/menu_button_type.py b/aiogram/enums/menu_button_type.py new file mode 100644 index 00000000..4c1015b9 --- /dev/null +++ b/aiogram/enums/menu_button_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class MenuButtonType(str, Enum): + """ + This object represents an type of Menu button + + Source: https://core.telegram.org/bots/api#menubuttondefault + """ + + DEFAULT = "default" + COMMANDS = "commands" + WEB_APP = "web_app" diff --git a/aiogram/enums/message_entity_type.py b/aiogram/enums/message_entity_type.py new file mode 100644 index 00000000..e1dba489 --- /dev/null +++ b/aiogram/enums/message_entity_type.py @@ -0,0 +1,30 @@ +from enum import Enum + + +class MessageEntityType(str, Enum): + """ + This object represents type of message entity + + Source: https://core.telegram.org/bots/api#messageentity + """ + + MENTION = "mention" + HASHTAG = "hashtag" + CASHTAG = "cashtag" + BOT_COMMAND = "bot_command" + URL = "url" + EMAIL = "email" + PHONE_NUMBER = "phone_number" + BOLD = "bold" + ITALIC = "italic" + UNDERLINE = "underline" + STRIKETHROUGH = "strikethrough" + SPOILER = "spoiler" + BLOCKQUOTE = "blockquote" + EXPANDABLE_BLOCKQUOTE = "expandable_blockquote" + CODE = "code" + PRE = "pre" + TEXT_LINK = "text_link" + TEXT_MENTION = "text_mention" + CUSTOM_EMOJI = "custom_emoji" + DATE_TIME = "date_time" diff --git a/aiogram/enums/message_origin_type.py b/aiogram/enums/message_origin_type.py new file mode 100644 index 00000000..95436651 --- /dev/null +++ b/aiogram/enums/message_origin_type.py @@ -0,0 +1,14 @@ +from enum import Enum + + +class MessageOriginType(str, Enum): + """ + This object represents origin of a message. + + Source: https://core.telegram.org/bots/api#messageorigin + """ + + USER = "user" + HIDDEN_USER = "hidden_user" + CHAT = "chat" + CHANNEL = "channel" 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/paid_media_type.py b/aiogram/enums/paid_media_type.py new file mode 100644 index 00000000..930028f1 --- /dev/null +++ b/aiogram/enums/paid_media_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class PaidMediaType(str, Enum): + """ + This object represents the type of a media in a paid message. + + Source: https://core.telegram.org/bots/api#paidmedia + """ + + PHOTO = "photo" + PREVIEW = "preview" + VIDEO = "video" diff --git a/aiogram/enums/parse_mode.py b/aiogram/enums/parse_mode.py new file mode 100644 index 00000000..f17dd984 --- /dev/null +++ b/aiogram/enums/parse_mode.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class ParseMode(str, Enum): + """ + Formatting options + + Source: https://core.telegram.org/bots/api#formatting-options + """ + + MARKDOWN_V2 = "MarkdownV2" + MARKDOWN = "Markdown" + HTML = "HTML" diff --git a/aiogram/enums/passport_element_error_type.py b/aiogram/enums/passport_element_error_type.py new file mode 100644 index 00000000..cdcb4806 --- /dev/null +++ b/aiogram/enums/passport_element_error_type.py @@ -0,0 +1,19 @@ +from enum import Enum + + +class PassportElementErrorType(str, Enum): + """ + This object represents a passport element error type. + + Source: https://core.telegram.org/bots/api#passportelementerror + """ + + DATA = "data" + FRONT_SIDE = "front_side" + REVERSE_SIDE = "reverse_side" + SELFIE = "selfie" + FILE = "file" + FILES = "files" + TRANSLATION_FILE = "translation_file" + TRANSLATION_FILES = "translation_files" + UNSPECIFIED = "unspecified" diff --git a/aiogram/enums/poll_type.py b/aiogram/enums/poll_type.py new file mode 100644 index 00000000..039d600d --- /dev/null +++ b/aiogram/enums/poll_type.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class PollType(str, Enum): + """ + This object represents poll type + + Source: https://core.telegram.org/bots/api#poll + """ + + REGULAR = "regular" + QUIZ = "quiz" diff --git a/aiogram/enums/reaction_type_type.py b/aiogram/enums/reaction_type_type.py new file mode 100644 index 00000000..f4b7c345 --- /dev/null +++ b/aiogram/enums/reaction_type_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class ReactionTypeType(str, Enum): + """ + This object represents reaction type. + + Source: https://core.telegram.org/bots/api#reactiontype + """ + + EMOJI = "emoji" + CUSTOM_EMOJI = "custom_emoji" + PAID = "paid" diff --git a/aiogram/enums/revenue_withdrawal_state_type.py b/aiogram/enums/revenue_withdrawal_state_type.py new file mode 100644 index 00000000..89a9a043 --- /dev/null +++ b/aiogram/enums/revenue_withdrawal_state_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class RevenueWithdrawalStateType(str, Enum): + """ + This object represents a revenue withdrawal state type + + Source: https://core.telegram.org/bots/api#revenuewithdrawalstate + """ + + FAILED = "failed" + PENDING = "pending" + SUCCEEDED = "succeeded" diff --git a/aiogram/enums/sticker_format.py b/aiogram/enums/sticker_format.py new file mode 100644 index 00000000..6c9441d9 --- /dev/null +++ b/aiogram/enums/sticker_format.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class StickerFormat(str, Enum): + """ + Format of the sticker + + Source: https://core.telegram.org/bots/api#createnewstickerset + """ + + STATIC = "static" + ANIMATED = "animated" + VIDEO = "video" diff --git a/aiogram/enums/sticker_type.py b/aiogram/enums/sticker_type.py new file mode 100644 index 00000000..748f85e6 --- /dev/null +++ b/aiogram/enums/sticker_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class StickerType(str, Enum): + """ + The part of the face relative to which the mask should be placed. + + Source: https://core.telegram.org/bots/api#maskposition + """ + + REGULAR = "regular" + MASK = "mask" + CUSTOM_EMOJI = "custom_emoji" 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/topic_icon_color.py b/aiogram/enums/topic_icon_color.py new file mode 100644 index 00000000..f40ee71f --- /dev/null +++ b/aiogram/enums/topic_icon_color.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class TopicIconColor(int, Enum): + """ + Color of the topic icon in RGB format. + + Source: https://github.com/telegramdesktop/tdesktop/blob/991fe491c5ae62705d77aa8fdd44a79caf639c45/Telegram/SourceFiles/data/data_forum_topic.cpp#L51-L56 + """ + + BLUE = 0x6FB9F0 + YELLOW = 0xFFD67E + VIOLET = 0xCB86DB + GREEN = 0x8EEE98 + ROSE = 0xFF93B2 + RED = 0xFB6F5F diff --git a/aiogram/enums/transaction_partner_type.py b/aiogram/enums/transaction_partner_type.py new file mode 100644 index 00000000..4f683e2e --- /dev/null +++ b/aiogram/enums/transaction_partner_type.py @@ -0,0 +1,17 @@ +from enum import Enum + + +class TransactionPartnerType(str, Enum): + """ + This object represents a type of transaction partner. + + Source: https://core.telegram.org/bots/api#transactionpartner + """ + + FRAGMENT = "fragment" + 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 new file mode 100644 index 00000000..0534a664 --- /dev/null +++ b/aiogram/enums/update_type.py @@ -0,0 +1,34 @@ +from enum import Enum + + +class UpdateType(str, Enum): + """ + This object represents the complete list of allowed update types + + Source: https://core.telegram.org/bots/api#update + """ + + MESSAGE = "message" + EDITED_MESSAGE = "edited_message" + CHANNEL_POST = "channel_post" + EDITED_CHANNEL_POST = "edited_channel_post" + BUSINESS_CONNECTION = "business_connection" + BUSINESS_MESSAGE = "business_message" + EDITED_BUSINESS_MESSAGE = "edited_business_message" + DELETED_BUSINESS_MESSAGES = "deleted_business_messages" + MESSAGE_REACTION = "message_reaction" + MESSAGE_REACTION_COUNT = "message_reaction_count" + INLINE_QUERY = "inline_query" + CHOSEN_INLINE_RESULT = "chosen_inline_result" + 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" + CHAT_MEMBER = "chat_member" + 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 514d7382..47feea5f 100644 --- a/aiogram/exceptions.py +++ b/aiogram/exceptions.py @@ -1,18 +1,22 @@ -from textwrap import indent -from typing import List, Optional, Set - -from pydantic import ValidationError +from typing import Any from aiogram.methods import TelegramMethod from aiogram.methods.base import TelegramType +from aiogram.utils.link import docs_url class AiogramError(Exception): - pass + """ + Base exception for all aiogram errors. + """ class DetailedAiogramError(AiogramError): - url: Optional[str] = None + """ + Base exception for all aiogram errors with detailed message. + """ + + url: str | None = None def __init__(self, message: str) -> None: self.message = message @@ -23,8 +27,37 @@ class DetailedAiogramError(AiogramError): message += f"\n(background on this error at: {self.url})" return message + def __repr__(self) -> str: + return f"{type(self).__name__}('{self}')" + + +class CallbackAnswerException(AiogramError): + """ + Exception for callback answer. + """ + + +class SceneException(AiogramError): + """ + Exception for scenes. + """ + + +class UnsupportedKeywordArgument(DetailedAiogramError): + """ + Exception raised when a keyword argument is passed as filter. + """ + + url = docs_url("migration_2_to_3.html", fragment_="filtering-events") + class TelegramAPIError(DetailedAiogramError): + """ + Base exception for all Telegram API errors. + """ + + label: str = "Telegram server says" + def __init__( self, method: TelegramMethod[TelegramType], @@ -33,12 +66,24 @@ class TelegramAPIError(DetailedAiogramError): super().__init__(message=message) self.method = method + def __str__(self) -> str: + original_message = super().__str__() + return f"{self.label} - {original_message}" + class TelegramNetworkError(TelegramAPIError): - pass + """ + Base exception for all Telegram network errors. + """ + + label = "HTTP Client says" class TelegramRetryAfter(TelegramAPIError): + """ + Exception raised when flood control exceeds. + """ + url = "https://core.telegram.org/bots/faq#my-bot-is-hitting-limits-how-do-i-avoid-this" def __init__( @@ -58,6 +103,10 @@ class TelegramRetryAfter(TelegramAPIError): class TelegramMigrateToChat(TelegramAPIError): + """ + Exception raised when chat has been migrated to a supergroup. + """ + url = "https://core.telegram.org/bots/api#responseparameters" def __init__( @@ -70,51 +119,87 @@ 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 class TelegramBadRequest(TelegramAPIError): - pass + """ + Exception raised when request is malformed. + """ class TelegramNotFound(TelegramAPIError): - pass + """ + Exception raised when chat, message, user, etc. not found. + """ class TelegramConflictError(TelegramAPIError): - pass + """ + Exception raised when bot token is already used by another application in polling mode. + """ class TelegramUnauthorizedError(TelegramAPIError): - pass + """ + Exception raised when bot token is invalid. + """ class TelegramForbiddenError(TelegramAPIError): - pass + """ + Exception raised when bot is kicked from chat or etc. + """ class TelegramServerError(TelegramAPIError): - pass + """ + Exception raised when Telegram server returns 5xx error. + """ class RestartingTelegram(TelegramServerError): - pass + """ + Exception raised when Telegram server is restarting. + + It seems like this error is not used by Telegram anymore, + but it's still here for backward compatibility. + + Currently, you should expect that Telegram can raise RetryAfter (with timeout 5 seconds) + error instead of this one. + """ class TelegramEntityTooLarge(TelegramNetworkError): + """ + Exception raised when you are trying to send a file that is too large. + """ + url = "https://core.telegram.org/bots/api#sending-files" -class FiltersResolveError(DetailedAiogramError): - def __init__(self, unresolved_fields: Set[str], possible_cases: List[ValidationError]) -> None: - possible_cases_str = "\n".join( - " - " + indent(str(e), " " * 4).lstrip() for e in possible_cases - ) - message = f"Unknown keyword filters: {unresolved_fields}" - if possible_cases_str: - message += f"\n Possible cases:\n{possible_cases_str}" +class ClientDecodeError(AiogramError): + """ + Exception raised when client can't decode response. (Malformed response, etc.) + """ - super().__init__(message=message) - self.unresolved_fields = unresolved_fields - self.possible_cases = possible_cases + def __init__(self, message: str, original: Exception, data: Any) -> None: + self.message = message + self.original = original + self.data = data + + def __str__(self) -> str: + original_type = type(self.original) + return ( + f"{self.message}\n" + f"Caused from error: " + 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 new file mode 100644 index 00000000..e2668830 --- /dev/null +++ b/aiogram/filters/__init__.py @@ -0,0 +1,51 @@ +from .base import Filter +from .chat_member_updated import ( + ADMINISTRATOR, + CREATOR, + IS_ADMIN, + IS_MEMBER, + IS_NOT_MEMBER, + JOIN_TRANSITION, + KICKED, + LEAVE_TRANSITION, + LEFT, + MEMBER, + PROMOTED_TRANSITION, + RESTRICTED, + ChatMemberUpdatedFilter, +) +from .command import Command, CommandObject, CommandStart +from .exception import ExceptionMessageFilter, ExceptionTypeFilter +from .logic import and_f, invert_f, or_f +from .magic_data import MagicData +from .state import StateFilter + +BaseFilter = Filter + +__all__ = ( + "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", + "Filter", + "MagicData", + "StateFilter", + "and_f", + "invert_f", + "or_f", +) diff --git a/aiogram/filters/base.py b/aiogram/filters/base.py new file mode 100644 index 00000000..e0445cb4 --- /dev/null +++ b/aiogram/filters/base.py @@ -0,0 +1,54 @@ +from abc import ABC, abstractmethod +from collections.abc import Awaitable, Callable +from typing import TYPE_CHECKING, Any + +if TYPE_CHECKING: + from aiogram.filters.logic import _InvertFilter + + +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__` + method and adding filter attributes. + """ + + if TYPE_CHECKING: + # 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[bool | dict[str, Any]]] + else: # pragma: no cover + + @abstractmethod + 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]` + """ + + 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: # 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 + """ + + def _signature_to_string(self, *args: Any, **kwargs: Any) -> str: + items = [repr(arg) for arg in args] + items.extend([f"{k}={v!r}" for k, v in kwargs.items() if v is not None]) + + return f"{type(self).__name__}({', '.join(items)})" + + def __await__(self): # type: ignore # pragma: no cover + # Is needed only for inspection and this method is never be called + return self.__call__ diff --git a/aiogram/filters/callback_data.py b/aiogram/filters/callback_data.py new file mode 100644 index 00000000..fc08994f --- /dev/null +++ b/aiogram/filters/callback_data.py @@ -0,0 +1,209 @@ +from __future__ import annotations + +import types +import typing +from decimal import Decimal +from enum import Enum +from fractions import Fraction +from typing import TYPE_CHECKING, Any, ClassVar, Literal, TypeVar +from uuid import UUID + +from pydantic import BaseModel +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, types.UnionType} + + +class CallbackDataException(Exception): + pass + + +class CallbackData(BaseModel): + """ + Base class for callback data wrapper + + This class should be used as super-class of user-defined callbacks. + + The class-keyword :code:`prefix` is required to define prefix + and also the argument :code:`sep` can be passed to define separator (default is :code:`:`). + """ + + if TYPE_CHECKING: + __separator__: ClassVar[str] + """Data separator (default is :code:`:`)""" + __prefix__: ClassVar[str] + """Callback prefix""" + + def __init_subclass__(cls, **kwargs: Any) -> None: + if "prefix" not in kwargs: + 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__: + 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: + if value is None: + return "" + if isinstance(value, Enum): + return str(value.value) + if isinstance(value, UUID): + return value.hex + if isinstance(value, bool): + return str(int(value)) + if isinstance(value, (int, str, float, Decimal, Fraction)): + return str(value) + 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: + """ + Generate callback data string + + :return: valid callback data for Telegram Bot API + """ + result = [self.__prefix__] + for key, value in self.model_dump(mode="python").items(): + encoded = self._encode_value(key, value) + if self.__separator__ in encoded: + 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: + 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, value: str) -> Self: + """ + Parse callback data string + + :param value: value from Telegram + :return: instance of CallbackData + """ + prefix, *parts = value.split(cls.__separator__) + names = cls.model_fields.keys() + if len(parts) != len(names): + msg = ( + f"Callback data {cls.__name__!r} takes {len(names)} arguments " + f"but {len(parts)} were given" + ) + raise TypeError(msg) + if prefix != cls.__prefix__: + msg = f"Bad prefix ({prefix!r} != {cls.__prefix__!r})" + raise ValueError(msg) + payload = {} + 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: MagicFilter | None = None) -> CallbackQueryFilter: + """ + Generates a filter for callback query with rule + + :param rule: magic rule + :return: instance of filter + """ + return CallbackQueryFilter(callback_data=cls, rule=rule) + + +class CallbackQueryFilter(Filter): + """ + This filter helps to handle callback query. + + Should not be used directly, you should create the instance of this filter + via callback data instance + """ + + __slots__ = ( + "callback_data", + "rule", + ) + + def __init__( + self, + *, + callback_data: type[CallbackData], + rule: MagicFilter | None = None, + ): + """ + :param callback_data: Expected type of callback data + :param rule: Magic rule + """ + self.callback_data = callback_data + self.rule = rule + + def __str__(self) -> str: + return self._signature_to_string( + callback_data=self.callback_data, + rule=self.rule, + ) + + async def __call__(self, query: CallbackQuery) -> Literal[False] | dict[str, Any]: + if not isinstance(query, CallbackQuery) or not query.data: + return False + try: + callback_data = self.callback_data.unpack(query.data) + except (TypeError, ValueError): + return False + + if self.rule is None or self.rule.resolve(callback_data): + return {"callback_data": callback_data} + return False + + +def _check_field_is_nullable(field: FieldInfo) -> bool: + """ + Check if the given field is nullable. + + :param field: The FieldInfo object representing the field to check. + :return: True if the field is nullable, False otherwise. + + """ + if not field.is_required(): + return True + + return typing.get_origin(field.annotation) in _UNION_TYPES and type(None) in typing.get_args( + field.annotation, + ) diff --git a/aiogram/dispatcher/filters/chat_member_updated.py b/aiogram/filters/chat_member_updated.py similarity index 58% rename from aiogram/dispatcher/filters/chat_member_updated.py rename to aiogram/filters/chat_member_updated.py index 3f520cb4..c9f18ea3 100644 --- a/aiogram/dispatcher/filters/chat_member_updated.py +++ b/aiogram/filters/chat_member_updated.py @@ -1,6 +1,10 @@ -from typing import Any, Dict, Optional, TypeVar, Union +from __future__ import annotations -from aiogram.dispatcher.filters import BaseFilter +from typing import Any, TypeVar + +from typing_extensions import Self + +from aiogram.filters.base import Filter from aiogram.types import ChatMember, ChatMemberUpdated MarkerT = TypeVar("MarkerT", bound="_MemberStatusMarker") @@ -9,7 +13,12 @@ TransitionT = TypeVar("TransitionT", bound="_MemberStatusTransition") class _MemberStatusMarker: - def __init__(self, name: str, *, is_member: Optional[bool] = None) -> None: + __slots__ = ( + "is_member", + "name", + ) + + def __init__(self, name: str, *, is_member: bool | None = None) -> None: self.name = name self.is_member = is_member @@ -19,96 +28,120 @@ class _MemberStatusMarker: result = ("+" if self.is_member else "-") + result 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( - f"unsupported operand type(s) for |: {type(self).__name__!r} and {type(other).__name__!r}" + 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( - f"unsupported operand type(s) for >>: {type(self).__name__!r} and {type(other).__name__!r}" + 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( - f"unsupported operand type(s) for <<: {type(self).__name__!r} and {type(other).__name__!r}" + 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)) def check(self, *, member: ChatMember) -> bool: - if self.is_member is not None and member.is_member != self.is_member: + # Not all member types have `is_member` attribute + is_member = getattr(member, "is_member", None) + status = getattr(member, "status", None) + if self.is_member is not None and is_member != self.is_member: return False - return self.name == member.status + return self.name == status class _MemberStatusGroupMarker: + __slots__ = ("statuses",) + 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) - elif isinstance(other, _MemberStatusGroupMarker): + if isinstance(other, _MemberStatusGroupMarker): return type(self)(*self.statuses, *other.statuses) - raise TypeError( - f"unsupported operand type(s) for |: {type(self).__name__!r} and {type(other).__name__!r}" + 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( - f"unsupported operand type(s) for >>: {type(self).__name__!r} and {type(other).__name__!r}" + 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( - f"unsupported operand type(s) for <<: {type(self).__name__!r} and {type(other).__name__!r}" + 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))) @@ -117,13 +150,15 @@ class _MemberStatusGroupMarker: return result def check(self, *, member: ChatMember) -> bool: - for status in self.statuses: - if status.check(member=member): - return True - return False + return any(status.check(member=member) for status in self.statuses) class _MemberStatusTransition: + __slots__ = ( + "new", + "old", + ) + def __init__(self, *, old: _MemberStatusGroupMarker, new: _MemberStatusGroupMarker) -> None: self.old = old self.new = new @@ -131,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: @@ -154,18 +189,23 @@ LEAVE_TRANSITION = ~JOIN_TRANSITION PROMOTED_TRANSITION = (MEMBER | RESTRICTED | LEFT | KICKED) >> ADMINISTRATOR -class ChatMemberUpdatedFilter(BaseFilter): - member_status_changed: Union[ - _MemberStatusMarker, - _MemberStatusGroupMarker, - _MemberStatusTransition, - ] - """Accepts the status transition or new status of the member (see usage in docs)""" +class ChatMemberUpdatedFilter(Filter): + __slots__ = ("member_status_changed",) - class Config: - arbitrary_types_allowed = True + def __init__( + self, + member_status_changed: ( + _MemberStatusMarker | _MemberStatusGroupMarker | _MemberStatusTransition + ), + ): + self.member_status_changed = member_status_changed - async def __call__(self, member_updated: ChatMemberUpdated) -> Union[bool, Dict[str, Any]]: + def __str__(self) -> str: + return self._signature_to_string( + member_status_changed=self.member_status_changed, + ) + + 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 new file mode 100644 index 00000000..ecb03c48 --- /dev/null +++ b/aiogram/filters/command.py @@ -0,0 +1,303 @@ +from __future__ import annotations + +import re +from collections.abc import Iterable, Sequence +from dataclasses import dataclass, field, replace +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 + +CommandPatternType = str | re.Pattern[str] | BotCommand + + +class CommandException(Exception): + pass + + +class Command(Filter): + """ + This filter can be helpful for handling commands from the text messages. + + Works only with :class:`aiogram.types.message.Message` events which have the :code:`text`. + """ + + __slots__ = ( + "commands", + "ignore_case", + "ignore_mention", + "magic", + "prefix", + ) + + def __init__( + self, + *values: CommandPatternType, + commands: Sequence[CommandPatternType] | CommandPatternType | None = None, + prefix: str = "/", + ignore_case: bool = False, + ignore_mention: bool = False, + magic: MagicFilter | None = None, + ): + """ + List of commands (string or compiled regexp patterns) + + :param prefix: 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:`"!"`. + :param ignore_case: Ignore case (Does not work with regexp, use flags instead) + :param ignore_mention: Ignore bot mention. By default, + bot can not handle commands intended for other bots + :param magic: Validate command object via Magic filter after all checks done + """ + if commands is None: + commands = [] + if isinstance(commands, (str, re.Pattern, BotCommand)): + commands = [commands] + + if not isinstance(commands, 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)): + 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: + msg = "At least one command should be specified" + raise ValueError(msg) + + self.commands = tuple(items) + self.prefix = prefix + self.ignore_case = ignore_case + self.ignore_mention = ignore_mention + self.magic = magic + + def __str__(self) -> str: + return self._signature_to_string( + *self.commands, + prefix=self.prefix, + ignore_case=self.ignore_case, + ignore_mention=self.ignore_mention, + magic=self.magic, + ) + + 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) -> bool | dict[str, Any]: + if not isinstance(message, Message): + return False + + text = message.text or message.caption + if not text: + return False + + try: + command = await self.parse_command(text=text, bot=bot) + except CommandException: + return False + result = {"command": command} + if command.magic_result and isinstance(command.magic_result, dict): + result.update(command.magic_result) + return result + + @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 as e: + msg = "not enough values to unpack" + raise CommandException(msg) from e + + # Separate command into valuable parts + # "/command@mention" -> "/", ("command", "@", "mention") + prefix, (command, _, mention) = full_command[0], full_command[1:].partition("@") + return CommandObject( + prefix=prefix, + command=command, + mention=mention or None, + args=args[0] if args else None, + ) + + def validate_prefix(self, command: CommandObject) -> None: + if command.prefix not in self.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(): + msg = "Mention did not match" + raise CommandException(msg) + + def validate_command(self, command: CommandObject) -> CommandObject: + for allowed_command in cast(Sequence[CommandPatternType], self.commands): + # Command can be presented as regexp pattern or raw string + # then need to validate that in different ways + if isinstance(allowed_command, Pattern): # Regexp + result = allowed_command.match(command.command) + if result: + return replace(command, regexp_match=result) + + command_name = command.command + if self.ignore_case: + command_name = command_name.casefold() + + if command_name == allowed_command: # String + return command + msg = "Command did not match pattern" + raise CommandException(msg) + + async def parse_command(self, text: str, bot: Bot) -> CommandObject: + """ + Extract command from the text and validate + + :param text: + :param bot: + :return: + """ + command = self.extract_command(text) + self.validate_prefix(command=command) + await self.validate_mention(bot=bot, command=command) + command = self.validate_command(command) + command = self.do_magic(command=command) + return command # noqa: RET504 + + def do_magic(self, command: CommandObject) -> Any: + if self.magic is None: + return command + result = self.magic.resolve(command) + if not result: + msg = "Rejected via magic filter" + raise CommandException(msg) + return replace(command, magic_result=result) + + +@dataclass(frozen=True) +class CommandObject: + """ + Instance of this object is always has command and it prefix. + Can be passed as keyword argument **command** to the handler + """ + + prefix: str = "/" + """Command prefix""" + command: str = "" + """Command without prefix and mention""" + mention: str | None = None + """Mention (if available)""" + args: str | None = field(repr=False, default=None) + """Command argument""" + 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: Any | None = field(repr=False, default=None) + + @property + def mentioned(self) -> bool: + """ + This command has mention? + """ + return bool(self.mention) + + @property + def text(self) -> str: + """ + Generate original text from object + """ + line = self.prefix + self.command + if self.mention: + line += "@" + self.mention + if self.args: + line += " " + self.args + return line + + +class CommandStart(Command): + def __init__( + self, + deep_link: bool | None = None, + deep_link_encoded: bool = False, + ignore_case: bool = False, + ignore_mention: bool = False, + magic: MagicFilter | None = None, + ): + super().__init__( + "start", + prefix="/", + ignore_case=ignore_case, + ignore_mention=ignore_mention, + magic=magic, + ) + self.deep_link = deep_link + self.deep_link_encoded = deep_link_encoded + + def __str__(self) -> str: + return self._signature_to_string( + ignore_case=self.ignore_case, + ignore_mention=self.ignore_mention, + magic=self.magic, + deep_link=self.deep_link, + deep_link_encoded=self.deep_link_encoded, + ) + + async def parse_command(self, text: str, bot: Bot) -> CommandObject: + """ + Extract command from the text and validate + + :param text: + :param bot: + :return: + """ + command = self.extract_command(text) + self.validate_prefix(command=command) + await self.validate_mention(bot=bot, command=command) + command = self.validate_command(command) + command = self.validate_deeplink(command=command) + command = self.do_magic(command=command) + return command # noqa: RET504 + + def validate_deeplink(self, command: CommandObject) -> CommandObject: + 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: + 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: + 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 new file mode 100644 index 00000000..a5109fe1 --- /dev/null +++ b/aiogram/filters/exception.py @@ -0,0 +1,57 @@ +import re +from re import Pattern +from typing import Any, cast + +from aiogram.filters.base import Filter +from aiogram.types import TelegramObject +from aiogram.types.error_event import ErrorEvent + + +class ExceptionTypeFilter(Filter): + """ + Allows to match exception by type + """ + + __slots__ = ("exceptions",) + + def __init__(self, *exceptions: type[Exception]): + """ + :param exceptions: Exception type(s) + """ + if not exceptions: + msg = "At least one exception type is required" + raise ValueError(msg) + self.exceptions = exceptions + + async def __call__(self, obj: TelegramObject) -> bool | dict[str, Any]: + return isinstance(cast(ErrorEvent, obj).exception, self.exceptions) + + +class ExceptionMessageFilter(Filter): + """ + Allow to match exception by message + """ + + __slots__ = ("pattern",) + + def __init__(self, pattern: str | Pattern[str]): + """ + :param pattern: Regexp pattern + """ + if isinstance(pattern, str): + pattern = re.compile(pattern) + self.pattern = pattern + + def __str__(self) -> str: + return self._signature_to_string( + pattern=self.pattern, + ) + + async def __call__( + self, + obj: TelegramObject, + ) -> bool | dict[str, Any]: + result = self.pattern.match(str(cast(ErrorEvent, obj).exception)) + if not result: + return False + return {"match_exception": result} diff --git a/aiogram/filters/logic.py b/aiogram/filters/logic.py new file mode 100644 index 00000000..b85617f5 --- /dev/null +++ b/aiogram/filters/logic.py @@ -0,0 +1,77 @@ +from abc import ABC +from typing import TYPE_CHECKING, Any + +from aiogram.filters import Filter + +if TYPE_CHECKING: + from aiogram.dispatcher.event.handler import CallbackType, FilterObject + + +class _LogicFilter(Filter, ABC): + pass + + +class _InvertFilter(_LogicFilter): + __slots__ = ("target",) + + def __init__(self, target: "FilterObject") -> None: + self.target = target + + async def __call__(self, *args: Any, **kwargs: Any) -> bool | dict[str, Any]: + return not bool(await self.target.call(*args, **kwargs)) + + +class _AndFilter(_LogicFilter): + __slots__ = ("targets",) + + def __init__(self, *targets: "FilterObject") -> None: + self.targets = targets + + async def __call__(self, *args: Any, **kwargs: Any) -> bool | dict[str, Any]: + final_result = {} + + for target in self.targets: + result = await target.call(*args, **kwargs) + if not result: + return False + if isinstance(result, dict): + final_result.update(result) + + if final_result: + return final_result + return True + + +class _OrFilter(_LogicFilter): + __slots__ = ("targets",) + + def __init__(self, *targets: "FilterObject") -> None: + self.targets = targets + + 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: + continue + if isinstance(result, dict): + return result + return bool(result) + return False + + +def and_f(*targets: "CallbackType") -> _AndFilter: + from aiogram.dispatcher.event.handler import FilterObject + + return _AndFilter(*(FilterObject(target) for target in targets)) + + +def or_f(*targets: "CallbackType") -> _OrFilter: + from aiogram.dispatcher.event.handler import FilterObject + + return _OrFilter(*(FilterObject(target) for target in targets)) + + +def invert_f(target: "CallbackType") -> _InvertFilter: + from aiogram.dispatcher.event.handler import FilterObject + + return _InvertFilter(FilterObject(target)) diff --git a/aiogram/filters/magic_data.py b/aiogram/filters/magic_data.py new file mode 100644 index 00000000..0059bf8c --- /dev/null +++ b/aiogram/filters/magic_data.py @@ -0,0 +1,27 @@ +from typing import Any + +from magic_filter import AttrDict, MagicFilter + +from aiogram.filters.base import Filter +from aiogram.types import TelegramObject + + +class MagicData(Filter): + """ + This filter helps to filter event with contextual data + """ + + __slots__ = ("magic_data",) + + def __init__(self, magic_data: MagicFilter) -> None: + self.magic_data = magic_data + + async def __call__(self, event: TelegramObject, *args: Any, **kwargs: Any) -> Any: + return self.magic_data.resolve( + AttrDict({"event": event, **dict(enumerate(args)), **kwargs}), + ) + + def __str__(self) -> str: + return self._signature_to_string( + magic_data=self.magic_data, + ) diff --git a/aiogram/filters/state.py b/aiogram/filters/state.py new file mode 100644 index 00000000..5ea4cd0a --- /dev/null +++ b/aiogram/filters/state.py @@ -0,0 +1,50 @@ +from collections.abc import Sequence +from inspect import isclass +from typing import Any, cast + +from aiogram.filters.base import Filter +from aiogram.fsm.state import State, StatesGroup +from aiogram.types import TelegramObject + +StateType = str | State | StatesGroup | type[StatesGroup] | None + + +class StateFilter(Filter): + """ + State filter + """ + + __slots__ = ("states",) + + def __init__(self, *states: StateType) -> None: + if not states: + msg = "At least one state is required" + raise ValueError(msg) + + self.states = states + + def __str__(self) -> str: + return self._signature_to_string( + *self.states, + ) + + async def __call__( + 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 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) + and allowed_state()(event=obj, raw_state=raw_state) + ): + return True + return False diff --git a/aiogram/dispatcher/flags/__init__.py b/aiogram/fsm/__init__.py similarity index 100% rename from aiogram/dispatcher/flags/__init__.py rename to aiogram/fsm/__init__.py diff --git a/aiogram/fsm/context.py b/aiogram/fsm/context.py new file mode 100644 index 00000000..b5dd1cc3 --- /dev/null +++ b/aiogram/fsm/context.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, overload + +from aiogram.fsm.storage.base import BaseStorage, StateType, StorageKey + + +class FSMContext: + def __init__(self, storage: BaseStorage, key: StorageKey) -> None: + self.storage = storage + self.key = key + + async def set_state(self, state: StateType = None) -> None: + await self.storage.set_state(key=self.key, state=state) + + async def get_state(self) -> str | None: + return await self.storage.get_state(key=self.key) + + 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]: + 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: 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) + + async def clear(self) -> None: + await self.set_state(state=None) + await self.set_data({}) diff --git a/aiogram/fsm/middleware.py b/aiogram/fsm/middleware.py new file mode 100644 index 00000000..effa3f02 --- /dev/null +++ b/aiogram/fsm/middleware.py @@ -0,0 +1,117 @@ +from collections.abc import Awaitable, Callable +from typing import Any, cast + +from aiogram import Bot +from aiogram.dispatcher.middlewares.base import BaseMiddleware +from aiogram.dispatcher.middlewares.user_context import EVENT_CONTEXT_KEY, EventContext +from aiogram.fsm.context import FSMContext +from aiogram.fsm.storage.base import ( + DEFAULT_DESTINY, + BaseEventIsolation, + BaseStorage, + StorageKey, +) +from aiogram.fsm.strategy import FSMStrategy, apply_strategy +from aiogram.types import TelegramObject + + +class FSMContextMiddleware(BaseMiddleware): + def __init__( + self, + storage: BaseStorage, + events_isolation: BaseEventIsolation, + strategy: FSMStrategy = FSMStrategy.USER_IN_CHAT, + ) -> None: + self.storage = storage + self.strategy = strategy + self.events_isolation = events_isolation + + async def __call__( + self, + handler: Callable[[TelegramObject, dict[str, Any]], Awaitable[Any]], + event: TelegramObject, + data: dict[str, Any], + ) -> Any: + bot: Bot = cast(Bot, data["bot"]) + context = self.resolve_event_context(bot, data) + data["fsm_storage"] = self.storage + if context: + # Bugfix: https://github.com/aiogram/aiogram/issues/1317 + # State should be loaded after lock is acquired + async with self.events_isolation.lock(key=context.key): + data.update({"state": context, "raw_state": await context.get_state()}) + return await handler(event, data) + return await handler(event, data) + + def resolve_event_context( + self, + bot: Bot, + data: dict[str, Any], + destiny: str = DEFAULT_DESTINY, + ) -> FSMContext | None: + event_context: EventContext = cast(EventContext, data.get(EVENT_CONTEXT_KEY)) + return self.resolve_context( + bot=bot, + chat_id=event_context.chat_id, + user_id=event_context.user_id, + thread_id=event_context.thread_id, + business_connection_id=event_context.business_connection_id, + destiny=destiny, + ) + + def resolve_context( + self, + bot: Bot, + chat_id: int | None, + user_id: int | None, + thread_id: int | None = None, + business_connection_id: str | None = None, + destiny: str = DEFAULT_DESTINY, + ) -> 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( + chat_id=chat_id, + user_id=user_id, + thread_id=thread_id, + strategy=self.strategy, + ) + return self.get_context( + bot=bot, + chat_id=chat_id, + user_id=user_id, + thread_id=thread_id, + business_connection_id=business_connection_id, + destiny=destiny, + ) + return None + + def get_context( + self, + bot: Bot, + chat_id: int, + user_id: int, + thread_id: int | None = None, + business_connection_id: str | None = None, + destiny: str = DEFAULT_DESTINY, + ) -> FSMContext: + return FSMContext( + storage=self.storage, + key=StorageKey( + user_id=user_id, + chat_id=chat_id, + bot_id=bot.id, + thread_id=thread_id, + business_connection_id=business_connection_id, + destiny=destiny, + ), + ) + + async def close(self) -> None: + await self.storage.close() + await self.events_isolation.close() diff --git a/aiogram/fsm/scene.py b/aiogram/fsm/scene.py new file mode 100644 index 00000000..4c7fa72c --- /dev/null +++ b/aiogram/fsm/scene.py @@ -0,0 +1,980 @@ +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 TYPE_CHECKING, Any, ClassVar, overload + +from typing_extensions import Self + +from aiogram import loggers +from aiogram.dispatcher.dispatcher import Dispatcher +from aiogram.dispatcher.event.handler import CallableObject, CallbackType +from aiogram.dispatcher.flags import extract_flags_from_object +from aiogram.dispatcher.router import Router +from aiogram.exceptions import SceneException +from aiogram.filters import StateFilter +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: + def __init__(self, state: FSMContext, destiny: str = "scenes_history", size: int = 10): + self._size = size + self._state = state + self._history_state = FSMContext( + storage=state.storage, + key=replace(state.key, destiny=destiny), + ) + + 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}) + if len(history) > self._size: + history = history[-self._size :] + loggers.scene.debug("Push state=%s data=%s to history", state, data) + + await self._history_state.update_data(history=history) + + async def pop(self) -> MemoryStorageRecord | None: + history_data = await self._history_state.get_data() + history = history_data.setdefault("history", []) + if not history: + return None + record = history.pop() + state = record["state"] + data = record["data"] + if not history: + await self._history_state.set_data({}) + else: + await self._history_state.update_data(history=history) + loggers.scene.debug("Pop state=%s data=%s from history", state, data) + return MemoryStorageRecord(state=state, data=data) + + 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]: + history_data = await self._history_state.get_data() + history = history_data.setdefault("history", []) + return [MemoryStorageRecord(**item) for item in history] + + async def clear(self) -> None: + loggers.scene.debug("Clear history") + await self._history_state.set_data({}) + + async def snapshot(self) -> None: + state = await self._state.get_state() + data = await self._state.get_data() + await self.push(state, data) + + 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) -> str | None: + previous_state = await self.pop() + if not previous_state: + await self._set_state(None, {}) + return None + + loggers.scene.debug( + "Rollback to state=%s data=%s", + previous_state.state, + previous_state.data, + ) + await self._set_state(previous_state.state, previous_state.data) + return previous_state.state + + +class ObserverDecorator: + def __init__( + self, + name: str, + filters: tuple[CallbackType, ...], + action: SceneAction | None = 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: + handlers = getattr(target, "__aiogram_handler__", None) + if not handlers: + handlers = [] + target.__aiogram_handler__ = handlers # type: ignore[union-attr] + + handlers.append( + HandlerContainer( + name=self.name, + handler=target, + filters=self.filters, + after=self.after, + ), + ) + + def _wrap_action(self, target: CallbackType) -> None: + assert self.action is not None, "Scene action is not specified" + + action = getattr(target, "__aiogram_action__", None) + if action is None: + action = defaultdict(dict) + target.__aiogram_action__ = action # type: ignore[attr-defined] + action[self.action][self.name] = CallableObject(target) + + def __call__(self, target: CallbackType) -> CallbackType: + if inspect.isfunction(target): + if self.action is None: + self._wrap_filter(target) + else: + self._wrap_action(target) + else: + 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: + return ActionContainer(self.name, self.filters, SceneAction.enter, target) + + def exit(self) -> ActionContainer: + return ActionContainer(self.name, self.filters, SceneAction.exit) + + def back(self) -> ActionContainer: + return ActionContainer(self.name, self.filters, SceneAction.back) + + +class SceneAction(Enum): + enter = auto() + leave = auto() + exit = auto() + back = auto() + + +class ActionContainer: + def __init__( + self, + name: str, + filters: tuple[CallbackType, ...], + action: SceneAction, + target: type[Scene] | State | str | None = None, + ) -> None: + self.name = name + self.filters = filters + self.action = action + self.target = target + + async def execute(self, wizard: SceneWizard) -> None: + if self.action == SceneAction.enter and self.target is not None: + await wizard.goto(self.target) + elif self.action == SceneAction.leave: + await wizard.leave() + elif self.action == SceneAction.exit: + await wizard.exit() + elif self.action == SceneAction.back: + await wizard.back() + + +@dataclass(slots=True) +class HandlerContainer: + name: str + handler: CallbackType + filters: tuple[CallbackType, ...] + after: After | None = None + + +@dataclass +class SceneConfig: + state: str | None + """Scene state""" + handlers: list[HandlerContainer] + """Scene handlers""" + actions: dict[SceneAction, dict[str, CallableObject]] + """Scene actions""" + reset_data_on_enter: bool | None = None + """Reset scene data on enter""" + reset_history_on_enter: bool | None = None + """Reset scene history on enter""" + 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: + pass + + +class SceneHandlerWrapper: + def __init__( + self, + scene: type[Scene], + handler: CallbackType, + after: After | None = None, + ) -> None: + self.scene = scene + self.handler = CallableObject(handler) + self.after = after + + async def __call__( + self, + event: TelegramObject, + **kwargs: Any, + ) -> Any: + 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__, + manager=scenes, + state=state, + update_type=event_update.event_type, + event=event, + data=kwargs, + ), + ) + + result = await self.handler.call(scene, event, **kwargs) + + if self.after: + action_container = ActionContainer( + "after", + (), + self.after.action, + self.after.scene, + ) + await action_container.execute(scene.wizard) + return result + + def __await__(self) -> Self: + return self + + def __str__(self) -> str: + result = f"SceneHandlerWrapper({self.scene}, {self.handler.callback}" + if self.after: + result += f", after={self.after}" + result += ")" + return result + + +class Scene: + """ + Represents a scene in a conversation flow. + + A scene is a specific state in a conversation where certain actions can take place. + + Each scene has a set of filters that determine when it should be triggered, + and a set of handlers that define the actions to be executed when the scene is active. + + .. note:: + This class is not meant to be used directly. Instead, it should be subclassed + to define custom scenes. + """ + + __scene_config__: ClassVar[SceneConfig] + """Scene configuration.""" + + def __init__( + self, + wizard: SceneWizard, + ) -> None: + self.wizard = wizard + self.wizard.scene = self + + def __init_subclass__(cls, **kwargs: Any) -> None: + state_name = kwargs.pop("state", None) + 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) + + for base in cls.__bases__: + if not issubclass(base, Scene): + continue + + parent_scene_config = getattr(base, "__scene_config__", None) + if not parent_scene_config: + continue + + 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 + + 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): + handlers.append( + HandlerContainer( + value.name, + _empty_handler, + value.filters, + after=value.after, + ), + ) + if hasattr(value, "__aiogram_action__"): + for action, action_handlers in value.__aiogram_action__.items(): + actions[action].update(action_handlers) + + cls.__scene_config__ = SceneConfig( + state=state_name, + handlers=handlers, + actions=dict(actions), + 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 + def add_to_router(cls, router: Router) -> None: + """ + Adds the scene to the given router. + + :param router: + :return: + """ + scene_config = cls.__scene_config__ + used_observers = set() + + for handler in scene_config.handlers: + router.observers[handler.name].register( + SceneHandlerWrapper( + cls, + handler.handler, + after=handler.after, + ), + *handler.filters, + flags=extract_flags_from_object(handler.handler), + ) + used_observers.add(handler.name) + + for observer_name in used_observers: + if scene_config.callback_query_without_state and observer_name == "callback_query": + continue + router.observers[observer_name].filter(StateFilter(scene_config.state)) + + @classmethod + def as_router(cls, name: str | None = None) -> Router: + """ + Returns the scene as a router. + + :return: new router + """ + if name is None: + name = ( + f"Scene '{cls.__module__}.{cls.__qualname__}' " + f"for state {cls.__scene_config__.state!r}" + ) + router = Router(name=name) + cls.add_to_router(router) + return router + + @classmethod + 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. + + >>> router.message.register(MyScene.as_handler(), Command("start")) + """ + + 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 + + +class SceneWizard: + """ + A class that represents a wizard for managing scenes in a Telegram bot. + + Instance of this class is passed to each scene as a parameter. + So, you can use it to transition between scenes, get and set data, etc. + + .. note:: + + This class is not meant to be used directly. Instead, it should be used + as a parameter in the scene constructor. + + """ + + def __init__( + self, + scene_config: SceneConfig, + manager: ScenesManager, + state: FSMContext, + update_type: str, + event: TelegramObject, + data: dict[str, Any], + ): + """ + A class that represents a wizard for managing scenes in a Telegram bot. + + :param scene_config: The configuration of the scene. + :param manager: The scene manager. + :param state: The FSMContext object for storing the state of the scene. + :param update_type: The type of the update event. + :param event: The TelegramObject represents the event. + :param data: Additional data for the scene. + """ + self.scene_config = scene_config + self.manager = manager + self.state = state + self.update_type = update_type + self.event = event + self.data = data + + self.scene: Scene | None = None + + async def enter(self, **kwargs: Any) -> None: + """ + Enter method is used to transition into a scene in the SceneWizard class. + It sets the state, clears data and history if specified, + and triggers entering event of the scene. + + :param kwargs: Additional keyword arguments. + :return: None + """ + loggers.scene.debug("Entering scene %r", self.scene_config.state) + if self.scene_config.reset_data_on_enter: + await self.state.set_data({}) + if self.scene_config.reset_history_on_enter: + await self.manager.history.clear() + await self.state.set_state(self.scene_config.state) + await self._on_action(SceneAction.enter, **kwargs) + + async def leave(self, _with_history: bool = True, **kwargs: Any) -> None: + """ + Leaves the current scene. + This method is used to exit a scene and transition to the next scene. + + :param _with_history: Whether to include history in the snapshot. Defaults to True. + :param kwargs: Additional keyword arguments. + :return: None + + """ + loggers.scene.debug("Leaving scene %r", self.scene_config.state) + if _with_history: + await self.manager.history.snapshot() + await self._on_action(SceneAction.leave, **kwargs) + + async def exit(self, **kwargs: Any) -> None: + """ + Exit the current scene and enter the default scene/state. + + :param kwargs: Additional keyword arguments. + :return: None + """ + loggers.scene.debug("Exiting scene %r", self.scene_config.state) + await self.manager.history.clear() + await self._on_action(SceneAction.exit, **kwargs) + await self.manager.enter(None, _check_active=False, **kwargs) + + async def back(self, **kwargs: Any) -> None: + """ + This method is used to go back to the previous scene. + + :param kwargs: Keyword arguments that can be passed to the method. + :return: None + """ + loggers.scene.debug("Back to previous scene from scene %s", self.scene_config.state) + await self.leave(_with_history=False, **kwargs) + new_scene = await self.manager.history.rollback() + await self.manager.enter(new_scene, _check_active=False, **kwargs) + + async def retake(self, **kwargs: Any) -> None: + """ + This method allows to re-enter the current scene. + + :param kwargs: Additional keyword arguments to pass to the scene. + :return: None + """ + 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: 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 + `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 + """ + await self.leave(**kwargs) + await self.manager.enter(scene, _check_active=False, **kwargs) + + async def _on_action(self, action: SceneAction, **kwargs: Any) -> bool: + if not self.scene: + 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, + ) + return False + + event_type = self.update_type + if event_type not in action_config: + loggers.scene.debug( + "Action %r for event %r not found in scene %r", + action.name, + event_type, + self.scene_config.state, + ) + return False + + await action_config[event_type].call(self.scene, self.event, **{**self.data, **kwargs}) + return True + + async def set_data(self, data: Mapping[str, Any]) -> None: + """ + Sets custom data 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]: + """ + This method returns the data stored in the current state. + + :return: A dictionary containing the data stored in the scene state. + """ + 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: Mapping[str, Any] | None = None, + **kwargs: Any, + ) -> dict[str, Any]: + """ + This method updates the data stored in the current state + + :param data: Optional mapping of data to update. + :param kwargs: Additional key-value pairs of data to update. + :return: Dictionary of updated data + """ + if data: + kwargs.update(data) + return await self.state.update_data(data=kwargs) + + async def clear_data(self) -> None: + """ + Clears the data. + + :return: None + """ + await self.set_data({}) + + +class ScenesManager: + """ + The ScenesManager class is responsible for managing scenes in an application. + It provides methods for entering and exiting scenes, as well as retrieving the active scene. + """ + + def __init__( + self, + registry: SceneRegistry, + update_type: str, + event: TelegramObject, + state: FSMContext, + data: dict[str, Any], + ) -> None: + self.registry = registry + self.update_type = update_type + self.event = event + self.state = state + self.data = data + + self.history = HistoryManager(self.state) + + 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( + scene_config=scene_type.__scene_config__, + manager=self, + state=self.state, + update_type=self.update_type, + event=self.event, + data=self.data, + ), + ) + + async def _get_active_scene(self) -> Scene | None: + state = await self.state.get_state() + try: + return await self._get_scene(state) + except SceneException: + return None + + async def enter( + self, + scene_type: type[Scene] | State | str | None, + _check_active: bool = True, + **kwargs: Any, + ) -> None: + """ + Enters the specified scene. + + :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: + await active_scene.wizard.exit(**kwargs) + + try: + scene = await self._get_scene(scene_type) + except SceneException: + if scene_type is not None: + raise + await self.state.set_state(None) + else: + await scene.wizard.enter(**kwargs) + + async def close(self, **kwargs: Any) -> None: + """ + Close method is used to exit the currently active scene in the ScenesManager. + + :param kwargs: Additional keyword arguments passed to the scene's exit method. + :return: None + """ + scene = await self._get_active_scene() + if not scene: + return + await scene.wizard.exit(**kwargs) + + +class SceneRegistry: + """ + A class that represents a registry for scenes in a Telegram bot. + """ + + def __init__(self, router: Router, register_on_add: bool = True) -> None: + """ + Initialize a new instance of the SceneRegistry class. + + :param router: The router instance used for scene registration. + :param register_on_add: Whether to register the scenes to the router when they are added. + """ + self.router = router + self.register_on_add = register_on_add + + self._scenes: dict[str | None, type[Scene]] = {} + self._setup_middleware(router) + + def _setup_middleware(self, router: Router) -> None: + if isinstance(router, Dispatcher): + # Small optimization for Dispatcher + # - we don't need to set up middleware for all observers + router.update.outer_middleware(self._update_middleware) + return + + for observer in router.observers.values(): + if observer.event_name in {"update", "error"}: + continue + observer.outer_middleware(self._middleware) + + async def _update_middleware( + self, + handler: NextMiddlewareType[TelegramObject], + event: TelegramObject, + 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=state, + data=data, + ) + return await handler(event, data) + + async def _middleware( + self, + handler: NextMiddlewareType[TelegramObject], + event: TelegramObject, + 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=state, + data=data, + ) + return await handler(event, data) + + 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. + + If a scene with the same state already exists in the registry, a SceneException is raised. + + .. warning:: + + If the router is not specified, the scenes will not be registered to the router. + You will need to include the scenes manually to the router or use the register method. + + :param scenes: A variable length parameter that accepts one or more types of scenes. + These scenes are instances of the Scene class. + :param router: An optional parameter that specifies the router + to which the scenes should be added. + :return: None + """ + if not scenes: + msg = "At least one scene must be specified" + raise ValueError(msg) + + for scene in scenes: + if scene.__scene_config__.state in self._scenes: + msg = f"Scene with state {scene.__scene_config__.state!r} already exists" + raise SceneException(msg) + + self._scenes[scene.__scene_config__.state] = scene + + if router: + router.include_router(scene.as_router()) + elif self.register_on_add: + self.router.include_router(scene.as_router()) + + def register(self, *scenes: type[Scene]) -> None: + """ + Registers one or more scenes to the SceneRegistry. + + :param scenes: One or more scene classes to register. + :return: None + """ + self.add(*scenes, router=self.router) + + 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, 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 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, State object or a string representing the name of the scene. + :return: The registered Scene object corresponding to the given scene parameter. + + """ + if inspect.isclass(scene) and issubclass(scene, Scene): + scene = scene.__scene_config__.state + if isinstance(scene, State): + scene = scene.state + if scene is not None and not isinstance(scene, str): + msg = "Scene must be a subclass of Scene, State or a string" + raise SceneException(msg) + + try: + return self._scenes[scene] + except KeyError: + msg = f"Scene {scene!r} is not registered" + raise SceneException(msg) from None + + +@dataclass +class After: + action: SceneAction + scene: type[Scene] | State | str | None = None + + @classmethod + def exit(cls) -> After: + return cls(action=SceneAction.exit) + + @classmethod + def back(cls) -> After: + return cls(action=SceneAction.back) + + @classmethod + def goto(cls, scene: type[Scene] | State | str | None) -> After: + return cls(action=SceneAction.enter, scene=scene) + + +class ObserverMarker: + def __init__(self, name: str) -> None: + self.name = name + + def __call__( + self, + *filters: CallbackType, + after: After | None = None, + ) -> ObserverDecorator: + return ObserverDecorator( + self.name, + filters, + after=after, + ) + + def enter(self, *filters: CallbackType) -> ObserverDecorator: + return ObserverDecorator(self.name, filters, action=SceneAction.enter) + + def leave(self) -> ObserverDecorator: + return ObserverDecorator(self.name, (), action=SceneAction.leave) + + def exit(self) -> ObserverDecorator: + return ObserverDecorator(self.name, (), action=SceneAction.exit) + + def back(self) -> ObserverDecorator: + return ObserverDecorator(self.name, (), action=SceneAction.back) + + +class OnMarker: + """ + The `OnMarker` class is used as a marker class to define different + types of events in the Scenes. + + Attributes: + + - :code:`message`: Event marker for handling `Message` events. + - :code:`edited_message`: Event marker for handling edited `Message` events. + - :code:`channel_post`: Event marker for handling channel `Post` events. + - :code:`edited_channel_post`: Event marker for handling edited channel `Post` events. + - :code:`inline_query`: Event marker for handling `InlineQuery` events. + - :code:`chosen_inline_result`: Event marker for handling chosen `InlineResult` events. + - :code:`callback_query`: Event marker for handling `CallbackQuery` events. + - :code:`shipping_query`: Event marker for handling `ShippingQuery` events. + - :code:`pre_checkout_query`: Event marker for handling `PreCheckoutQuery` events. + - :code:`poll`: Event marker for handling `Poll` events. + - :code:`poll_answer`: Event marker for handling `PollAnswer` events. + - :code:`my_chat_member`: Event marker for handling my chat `Member` events. + - :code:`chat_member`: Event marker for handling chat `Member` events. + - :code:`chat_join_request`: Event marker for handling chat `JoinRequest` events. + - :code:`error`: Event marker for handling `Error` events. + + .. note:: + + This is a marker class and does not contain any methods or implementation logic. + """ + + message = ObserverMarker("message") + edited_message = ObserverMarker("edited_message") + channel_post = ObserverMarker("channel_post") + edited_channel_post = ObserverMarker("edited_channel_post") + inline_query = ObserverMarker("inline_query") + chosen_inline_result = ObserverMarker("chosen_inline_result") + callback_query = ObserverMarker("callback_query") + shipping_query = ObserverMarker("shipping_query") + pre_checkout_query = ObserverMarker("pre_checkout_query") + poll = ObserverMarker("poll") + poll_answer = ObserverMarker("poll_answer") + my_chat_member = ObserverMarker("my_chat_member") + chat_member = ObserverMarker("chat_member") + chat_join_request = ObserverMarker("chat_join_request") + + +on = OnMarker() diff --git a/aiogram/fsm/state.py b/aiogram/fsm/state.py new file mode 100644 index 00000000..89dbf73b --- /dev/null +++ b/aiogram/fsm/state.py @@ -0,0 +1,175 @@ +import inspect +from collections.abc import Iterator +from typing import Any, no_type_check + +from aiogram.types import TelegramObject + + +class State: + """ + State object + """ + + def __init__(self, state: str | None = None, group_name: str | None = None) -> None: + self._state = state + self._group_name = group_name + self._group: type[StatesGroup] | None = None + + @property + def group(self) -> "type[StatesGroup]": + if not self._group: + msg = "This state is not in any group." + raise RuntimeError(msg) + return self._group + + @property + def state(self) -> str | None: + if self._state is None or self._state == "*": + return self._state + + if self._group_name is None and self._group: + group = self._group.__full_group_name__ + elif self._group_name: + group = self._group_name + else: + group = "@" + + return f"{group}:{self._state}" + + def set_parent(self, group: "type[StatesGroup]") -> None: + if not issubclass(group, StatesGroup): + msg = "Group must be subclass of StatesGroup" + raise ValueError(msg) + self._group = group + + def __set_name__(self, owner: "type[StatesGroup]", name: str) -> None: + if self._state is None: + self._state = name + self.set_parent(owner) + + def __str__(self) -> str: + return f"" + + __repr__ = __str__ + + 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: object) -> bool: + if isinstance(other, self.__class__): + return self.state == other.state + if isinstance(other, str): + return self.state == other + return NotImplemented + + def __hash__(self) -> int: + return hash(self.state) + + +class StatesGroupMeta(type): + __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().__new__(mcs, name, bases, namespace) + + states = [] + childs = [] + + for arg in namespace.values(): + if isinstance(arg, State): + states.append(arg) + elif inspect.isclass(arg) and issubclass(arg, StatesGroup): + 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 f"{cls.__parent__.__full_group_name__}.{cls.__name__}" + return cls.__name__ + + 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 + + def _get_all_states(cls) -> tuple[State, ...]: + result = cls.__states__ + for group in cls.__childs__: + result += group.__all_states__ + return result + + 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: + if isinstance(item, str): + return item in cls.__all_states_names__ + if isinstance(item, State): + return item in cls.__all_states__ + if isinstance(item, StatesGroupMeta): + return item in cls.__all_childs__ + return False + + def __str__(self) -> str: + return f"" + + def __iter__(self) -> Iterator[State]: + return iter(self.__all_states__) + + +class StatesGroup(metaclass=StatesGroupMeta): + @classmethod + 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: str | None = None) -> bool: + return raw_state in type(self).__all_states_names__ + + def __str__(self) -> str: + return f"StatesGroup {type(self).__full_group_name__}" + + +default_state = State() +any_state = State(state="*") diff --git a/aiogram/dispatcher/fsm/__init__.py b/aiogram/fsm/storage/__init__.py similarity index 100% rename from aiogram/dispatcher/fsm/__init__.py rename to aiogram/fsm/storage/__init__.py diff --git a/aiogram/fsm/storage/base.py b/aiogram/fsm/storage/base.py new file mode 100644 index 00000000..4b2f0258 --- /dev/null +++ b/aiogram/fsm/storage/base.py @@ -0,0 +1,208 @@ +from abc import ABC, abstractmethod +from collections.abc import AsyncGenerator, Mapping +from contextlib import asynccontextmanager +from dataclasses import dataclass +from typing import Any, Literal, overload + +from aiogram.fsm.state import State + +StateType = str | State | None + +DEFAULT_DESTINY = "default" + + +@dataclass(frozen=True) +class StorageKey: + bot_id: int + chat_id: int + user_id: int + thread_id: int | None = None + business_connection_id: str | None = None + destiny: str = DEFAULT_DESTINY + + +class KeyBuilder(ABC): + """Base class for key builder.""" + + @abstractmethod + def build( + self, + key: StorageKey, + part: Literal["data", "state", "lock"] | None = None, + ) -> str: + """ + Build key to be used in storage's db queries + + :param key: contextual key + :param part: part of the record + :return: key to be used in storage's db queries + """ + + +class DefaultKeyBuilder(KeyBuilder): + """ + Simple key builder with default prefix. + + Generates a colon-joined string with prefix, chat_id, user_id, + optional bot_id, business_connection_id, destiny and field. + + Format: + :code:`::::::` + """ + + def __init__( + self, + *, + prefix: str = "fsm", + separator: str = ":", + with_bot_id: bool = False, + with_business_connection_id: bool = False, + with_destiny: bool = False, + ) -> None: + """ + :param prefix: prefix for all records + :param separator: separator + :param with_bot_id: include Bot id in the key + :param with_business_connection_id: include business connection id + :param with_destiny: include destiny key + """ + self.prefix = prefix + self.separator = separator + self.with_bot_id = with_bot_id + self.with_business_connection_id = with_business_connection_id + self.with_destiny = with_destiny + + def build( + self, + key: StorageKey, + part: Literal["data", "state", "lock"] | None = None, + ) -> str: + parts = [self.prefix] + if self.with_bot_id: + parts.append(str(key.bot_id)) + if self.with_business_connection_id and key.business_connection_id: + parts.append(str(key.business_connection_id)) + parts.append(str(key.chat_id)) + if key.thread_id: + parts.append(str(key.thread_id)) + parts.append(str(key.user_id)) + if self.with_destiny: + parts.append(key.destiny) + elif key.destiny != DEFAULT_DESTINY: + error_message = ( + "Default key builder is not configured to use key destiny other than the default." + "\n\nProbably, you should set `with_destiny=True` in for DefaultKeyBuilder." + ) + raise ValueError(error_message) + if part: + parts.append(part) + return self.separator.join(parts) + + +class BaseStorage(ABC): + """ + Base class for all FSM storages + """ + + @abstractmethod + async def set_state(self, key: StorageKey, state: StateType = None) -> None: + """ + Set state for specified key + + :param key: storage key + :param state: new state + """ + + @abstractmethod + async def get_state(self, key: StorageKey) -> str | None: + """ + Get key state + + :param key: storage key + :return: current state + """ + + @abstractmethod + async def set_data(self, key: StorageKey, data: Mapping[str, Any]) -> None: + """ + Write data (replace) + + :param key: storage key + :param data: new data + """ + + @abstractmethod + async def get_data(self, key: StorageKey) -> dict[str, Any]: + """ + Get current data for key + + :param key: storage key + :return: current data + """ + + @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) + + :param key: storage key + :param data: partial data + :return: new data + """ + current_data = await self.get_data(key=key) + current_data.update(data) + await self.set_data(key=key, data=current_data) + return current_data.copy() + + @abstractmethod + async def close(self) -> None: # pragma: no cover + """ + Close storage (database connection, file or etc.) + """ + + +class BaseEventIsolation(ABC): + @abstractmethod + @asynccontextmanager + async def lock(self, key: StorageKey) -> AsyncGenerator[None, None]: + """ + Isolate events with lock. + Will be used as context manager + + :param key: storage key + :return: An async generator + """ + yield None + + @abstractmethod + async def close(self) -> None: + pass diff --git a/aiogram/fsm/storage/memory.py b/aiogram/fsm/storage/memory.py new file mode 100644 index 00000000..7f6df34e --- /dev/null +++ b/aiogram/fsm/storage/memory.py @@ -0,0 +1,95 @@ +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, overload + +from aiogram.exceptions import DataNotDictLikeError +from aiogram.fsm.state import State +from aiogram.fsm.storage.base import ( + BaseEventIsolation, + BaseStorage, + StateType, + StorageKey, +) + + +@dataclass +class MemoryStorageRecord: + data: dict[str, Any] = field(default_factory=dict) + state: str | None = None + + +class MemoryStorage(BaseStorage): + """ + Default FSM storage, stores all data in :class:`dict` and loss everything on shutdown + + .. warning:: + + Is not recommended using in production in due to you will lose all data + when your bot restarts + """ + + def __init__(self) -> None: + self.storage: defaultdict[StorageKey, MemoryStorageRecord] = defaultdict( + MemoryStorageRecord, + ) + + async def close(self) -> None: + pass + + 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) -> str | None: + return self.storage[key].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) + self.storage[key].data = data.copy() + + 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 + async def lock(self, key: StorageKey) -> AsyncGenerator[None, None]: + yield + + async def close(self) -> None: + pass + + +class SimpleEventIsolation(BaseEventIsolation): + def __init__(self) -> None: + # TODO: Unused locks cleaner is needed + self._locks: defaultdict[Hashable, Lock] = defaultdict(Lock) + + @asynccontextmanager + async def lock(self, key: StorageKey) -> AsyncGenerator[None, None]: + lock = self._locks[key] + async with lock: + yield + + async def close(self) -> None: + self._locks.clear() diff --git a/aiogram/fsm/storage/mongo.py b/aiogram/fsm/storage/mongo.py new file mode 100644 index 00000000..531996cb --- /dev/null +++ b/aiogram/fsm/storage/mongo.py @@ -0,0 +1,145 @@ +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, + DefaultKeyBuilder, + KeyBuilder, + StateType, + StorageKey, +) + + +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: KeyBuilder | None = None, + db_name: str = "aiogram_fsm", + collection_name: str = "states_and_data", + ) -> None: + """ + :param client: Instance of AsyncIOMotorClient + :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, + ) -> "MongoStorage": + """ + Create an instance of :class:`MongoStorage` with specifying the connection string + + :param url: for example :code:`mongodb://user:password@host:port` + :param connection_kwargs: see :code:`motor` docs + :param kwargs: arguments to be passed to :class:`MongoStorage` + :return: an instance of :class:`MongoStorage` + """ + if connection_kwargs is None: + connection_kwargs = {} + client = AsyncIOMotorClient(url, **connection_kwargs) + return cls(client=client, **kwargs) + + async def close(self) -> None: + """Cleanup client resources and disconnect from MongoDB.""" + 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 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 update_result.get("data", {}) 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/dispatcher/fsm/storage/redis.py b/aiogram/fsm/storage/redis.py similarity index 54% rename from aiogram/dispatcher/fsm/storage/redis.py rename to aiogram/fsm/storage/redis.py index 5ab880de..1647ab3c 100644 --- a/aiogram/dispatcher/fsm/storage/redis.py +++ b/aiogram/fsm/storage/redis.py @@ -1,123 +1,70 @@ -from abc import ABC, abstractmethod +import json +from collections.abc import AsyncGenerator, Callable, Mapping from contextlib import asynccontextmanager -from typing import Any, AsyncGenerator, Dict, Literal, Optional, cast +from typing import Any, cast -from aioredis import ConnectionPool, Redis +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 import Bot -from aiogram.dispatcher.fsm.state import State -from aiogram.dispatcher.fsm.storage.base import ( - DEFAULT_DESTINY, +from aiogram.exceptions import DataNotDictLikeError +from aiogram.fsm.state import State +from aiogram.fsm.storage.base import ( BaseEventIsolation, BaseStorage, + DefaultKeyBuilder, + KeyBuilder, StateType, StorageKey, ) DEFAULT_REDIS_LOCK_KWARGS = {"timeout": 60} - - -class KeyBuilder(ABC): - """ - Base class for Redis key builder - """ - - @abstractmethod - def build(self, key: StorageKey, part: Literal["data", "state", "lock"]) -> str: - """ - This method should be implemented in subclasses - - :param key: contextual key - :param part: part of the record - :return: key to be used in Redis queries - """ - pass - - -class DefaultKeyBuilder(KeyBuilder): - """ - Simple Redis key builder with default prefix. - - Generates a colon-joined string with prefix, chat_id, user_id, - optional bot_id and optional destiny. - """ - - def __init__( - self, - *, - prefix: str = "fsm", - separator: str = ":", - with_bot_id: bool = False, - with_destiny: bool = False, - ) -> None: - """ - :param prefix: prefix for all records - :param separator: separator - :param with_bot_id: include Bot id in the key - :param with_destiny: include destiny key - """ - self.prefix = prefix - self.separator = separator - self.with_bot_id = with_bot_id - self.with_destiny = with_destiny - - def build(self, key: StorageKey, part: Literal["data", "state", "lock"]) -> str: - parts = [self.prefix] - if self.with_bot_id: - parts.append(str(key.bot_id)) - parts.extend([str(key.chat_id), str(key.user_id)]) - if self.with_destiny: - parts.append(key.destiny) - elif key.destiny != DEFAULT_DESTINY: - raise ValueError( - "Redis key builder is not configured to use key destiny other the default.\n" - "\n" - "Probably, you should set `with_destiny=True` in for DefaultKeyBuilder.\n" - "E.g: `RedisStorage(redis, key_builder=DefaultKeyBuilder(with_destiny=True))`" - ) - parts.append(part) - return self.separator.join(parts) +_JsonLoads = Callable[..., Any] +_JsonDumps = Callable[..., str] class RedisStorage(BaseStorage): """ - Redis storage required :code:`aioredis` package installed (:code:`pip install aioredis`) + Redis storage required :code:`redis` package installed (:code:`pip install redis`) """ def __init__( self, redis: Redis, - key_builder: Optional[KeyBuilder] = None, - state_ttl: Optional[int] = None, - data_ttl: Optional[int] = None, - lock_kwargs: Optional[Dict[str, Any]] = 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: """ :param redis: Instance of Redis connection :param key_builder: builder that helps to convert contextual key to string :param state_ttl: TTL for state records :param data_ttl: TTL for data records - :param lock_kwargs: Custom arguments for Redis lock """ if key_builder is None: key_builder = DefaultKeyBuilder() - if lock_kwargs is None: - lock_kwargs = DEFAULT_REDIS_LOCK_KWARGS self.redis = redis self.key_builder = key_builder self.state_ttl = state_ttl self.data_ttl = data_ttl - self.lock_kwargs = lock_kwargs + self.json_loads = json_loads + self.json_dumps = json_dumps @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 :param url: for example :code:`redis://user:password@host:port/db` - :param connection_kwargs: see :code:`aioredis` docs + :param connection_kwargs: see :code:`redis` docs :param kwargs: arguments to be passed to :class:`RedisStorage` :return: an instance of :class:`RedisStorage` """ @@ -131,11 +78,10 @@ class RedisStorage(BaseStorage): return RedisEventIsolation(redis=self.redis, key_builder=self.key_builder, **kwargs) async def close(self) -> None: - await self.redis.close() # type: ignore + await self.redis.aclose(close_connection_pool=True) async def set_state( self, - bot: Bot, key: StorageKey, state: StateType = None, ) -> None: @@ -151,63 +97,66 @@ class RedisStorage(BaseStorage): async def get_state( self, - bot: Bot, 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, - bot: Bot, 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) return await self.redis.set( redis_key, - bot.session.json_dumps(data), + self.json_dumps(data), ex=self.data_ttl, ) async def get_data( self, - bot: Bot, 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], bot.session.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() + if lock_kwargs is None: + lock_kwargs = DEFAULT_REDIS_LOCK_KWARGS self.redis = redis self.key_builder = key_builder - self.lock_kwargs = lock_kwargs or {} + self.lock_kwargs = lock_kwargs @classmethod 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: @@ -219,11 +168,10 @@ class RedisEventIsolation(BaseEventIsolation): @asynccontextmanager async def lock( self, - bot: Bot, key: StorageKey, ) -> AsyncGenerator[None, None]: redis_key = self.key_builder.build(key, "lock") - async with self.redis.lock(name=redis_key, **self.lock_kwargs): + async with self.redis.lock(name=redis_key, **self.lock_kwargs, lock_class=Lock): yield None async def close(self) -> None: diff --git a/aiogram/fsm/strategy.py b/aiogram/fsm/strategy.py new file mode 100644 index 00000000..6f3559e2 --- /dev/null +++ b/aiogram/fsm/strategy.py @@ -0,0 +1,36 @@ +from enum import Enum, auto + + +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: int | None = None, +) -> tuple[int, int, int | None]: + if strategy == FSMStrategy.CHAT: + return chat_id, chat_id, None + if strategy == FSMStrategy.GLOBAL_USER: + return user_id, user_id, None + if strategy == FSMStrategy.USER_IN_TOPIC: + return chat_id, user_id, thread_id + if strategy == FSMStrategy.CHAT_TOPIC: + return chat_id, chat_id, thread_id + + return chat_id, user_id, None diff --git a/aiogram/dispatcher/handler/__init__.py b/aiogram/handlers/__init__.py similarity index 100% rename from aiogram/dispatcher/handler/__init__.py rename to aiogram/handlers/__init__.py diff --git a/aiogram/dispatcher/handler/base.py b/aiogram/handlers/base.py similarity index 69% rename from aiogram/dispatcher/handler/base.py rename to aiogram/handlers/base.py index a2da355d..afc7cd06 100644 --- a/aiogram/dispatcher/handler/base.py +++ b/aiogram/handlers/base.py @@ -1,16 +1,20 @@ -from abc import ABC, abstractmethod -from typing import TYPE_CHECKING, Any, Dict, Generic, TypeVar, cast +from __future__ import annotations + +from abc import ABC, abstractmethod +from typing import TYPE_CHECKING, Any, Generic, TypeVar, cast -from aiogram import Bot from aiogram.types import Update +if TYPE_CHECKING: + from aiogram import Bot + 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): @@ -20,13 +24,16 @@ 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: + from aiogram import Bot + if "bot" in self.data: return cast(Bot, self.data["bot"]) - return Bot.get_current(no_error=False) + msg = "Bot instance not found in the context" + raise RuntimeError(msg) @property def update(self) -> Update: diff --git a/aiogram/dispatcher/handler/callback_query.py b/aiogram/handlers/callback_query.py similarity index 77% rename from aiogram/dispatcher/handler/callback_query.py rename to aiogram/handlers/callback_query.py index 690cdfea..a4be9ff3 100644 --- a/aiogram/dispatcher/handler/callback_query.py +++ b/aiogram/handlers/callback_query.py @@ -1,8 +1,7 @@ from abc import ABC -from typing import Optional -from aiogram.dispatcher.handler import BaseHandler -from aiogram.types import CallbackQuery, Message, User +from aiogram.handlers import BaseHandler +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[Message]: + 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/dispatcher/handler/chat_member.py b/aiogram/handlers/chat_member.py similarity index 84% rename from aiogram/dispatcher/handler/chat_member.py rename to aiogram/handlers/chat_member.py index 92793c98..bf668ac5 100644 --- a/aiogram/dispatcher/handler/chat_member.py +++ b/aiogram/handlers/chat_member.py @@ -1,6 +1,6 @@ from abc import ABC -from aiogram.dispatcher.handler import BaseHandler +from aiogram.handlers import BaseHandler from aiogram.types import ChatMemberUpdated, User diff --git a/aiogram/dispatcher/handler/chosen_inline_result.py b/aiogram/handlers/chosen_inline_result.py similarity index 87% rename from aiogram/dispatcher/handler/chosen_inline_result.py rename to aiogram/handlers/chosen_inline_result.py index 58b75a32..d6b66c54 100644 --- a/aiogram/dispatcher/handler/chosen_inline_result.py +++ b/aiogram/handlers/chosen_inline_result.py @@ -1,6 +1,6 @@ from abc import ABC -from aiogram.dispatcher.handler import BaseHandler +from aiogram.handlers import BaseHandler from aiogram.types import ChosenInlineResult, User diff --git a/aiogram/dispatcher/handler/error.py b/aiogram/handlers/error.py similarity index 84% rename from aiogram/dispatcher/handler/error.py rename to aiogram/handlers/error.py index bc4ecdce..51ccf079 100644 --- a/aiogram/dispatcher/handler/error.py +++ b/aiogram/handlers/error.py @@ -1,6 +1,6 @@ from abc import ABC -from aiogram.dispatcher.handler.base import BaseHandler +from aiogram.handlers.base import BaseHandler class ErrorHandler(BaseHandler[Exception], ABC): diff --git a/aiogram/dispatcher/handler/inline_query.py b/aiogram/handlers/inline_query.py similarity index 86% rename from aiogram/dispatcher/handler/inline_query.py rename to aiogram/handlers/inline_query.py index 13800523..022d8f28 100644 --- a/aiogram/dispatcher/handler/inline_query.py +++ b/aiogram/handlers/inline_query.py @@ -1,6 +1,6 @@ from abc import ABC -from aiogram.dispatcher.handler import BaseHandler +from aiogram.handlers import BaseHandler from aiogram.types import InlineQuery, User diff --git a/aiogram/dispatcher/handler/message.py b/aiogram/handlers/message.py similarity index 65% rename from aiogram/dispatcher/handler/message.py rename to aiogram/handlers/message.py index 91f39cff..b726b908 100644 --- a/aiogram/dispatcher/handler/message.py +++ b/aiogram/handlers/message.py @@ -1,8 +1,8 @@ from abc import ABC -from typing import Optional, cast +from typing import cast -from aiogram.dispatcher.filters import CommandObject -from aiogram.dispatcher.handler.base import BaseHandler, BaseHandlerMixin +from aiogram.filters import CommandObject +from aiogram.handlers.base import BaseHandler, BaseHandlerMixin from aiogram.types import Chat, Message, User @@ -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/dispatcher/handler/poll.py b/aiogram/handlers/poll.py similarity index 70% rename from aiogram/dispatcher/handler/poll.py rename to aiogram/handlers/poll.py index de0e29a4..273254b7 100644 --- a/aiogram/dispatcher/handler/poll.py +++ b/aiogram/handlers/poll.py @@ -1,7 +1,6 @@ from abc import ABC -from typing import List -from aiogram.dispatcher.handler import BaseHandler +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/dispatcher/handler/pre_checkout_query.py b/aiogram/handlers/pre_checkout_query.py similarity index 84% rename from aiogram/dispatcher/handler/pre_checkout_query.py rename to aiogram/handlers/pre_checkout_query.py index 92486257..34290f20 100644 --- a/aiogram/dispatcher/handler/pre_checkout_query.py +++ b/aiogram/handlers/pre_checkout_query.py @@ -1,6 +1,6 @@ from abc import ABC -from aiogram.dispatcher.handler import BaseHandler +from aiogram.handlers import BaseHandler from aiogram.types import PreCheckoutQuery, User diff --git a/aiogram/dispatcher/handler/shipping_query.py b/aiogram/handlers/shipping_query.py similarity index 84% rename from aiogram/dispatcher/handler/shipping_query.py rename to aiogram/handlers/shipping_query.py index 4abb9b9f..64a56450 100644 --- a/aiogram/dispatcher/handler/shipping_query.py +++ b/aiogram/handlers/shipping_query.py @@ -1,6 +1,6 @@ from abc import ABC -from aiogram.dispatcher.handler import BaseHandler +from aiogram.handlers import BaseHandler from aiogram.types import ShippingQuery, User diff --git a/aiogram/loggers.py b/aiogram/loggers.py index ae871eaf..942c124d 100644 --- a/aiogram/loggers.py +++ b/aiogram/loggers.py @@ -4,3 +4,4 @@ dispatcher = logging.getLogger("aiogram.dispatcher") event = logging.getLogger("aiogram.event") middlewares = logging.getLogger("aiogram.middlewares") webhook = logging.getLogger("aiogram.webhook") +scene = logging.getLogger("aiogram.scene") diff --git a/aiogram/methods/__init__.py b/aiogram/methods/__init__.py index 085044ae..5a0a66f0 100644 --- a/aiogram/methods/__init__.py +++ b/aiogram/methods/__init__.py @@ -3,60 +3,118 @@ from .answer_callback_query import AnswerCallbackQuery from .answer_inline_query import AnswerInlineQuery 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 from .delete_message import DeleteMessage +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_members_count import GetChatMembersCount +from .get_chat_menu_button import GetChatMenuButton +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 .kick_chat_member import KickChatMember +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 from .send_sticker import SendSticker @@ -64,112 +122,224 @@ 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 from .set_chat_sticker_set import SetChatStickerSet from .set_chat_title import SetChatTitle +from .set_custom_emoji_sticker_set_thumbnail import SetCustomEmojiStickerSetThumbnail from .set_game_score import SetGameScore +from .set_message_reaction import SetMessageReaction 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 +from .set_sticker_keywords import SetStickerKeywords +from .set_sticker_mask_position import SetStickerMaskPosition from .set_sticker_position_in_set import SetStickerPositionInSet -from .set_sticker_set_thumb import SetStickerSetThumb +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 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__ = ( - "TelegramMethod", - "Request", - "Response", - "GetUpdates", - "SetWebhook", - "DeleteWebhook", - "GetWebhookInfo", - "GetMe", - "LogOut", - "Close", - "SendMessage", - "ForwardMessage", - "CopyMessage", - "SendPhoto", - "SendAudio", - "SendDocument", - "SendVideo", - "SendAnimation", - "SendVoice", - "SendVideoNote", - "SendMediaGroup", - "SendLocation", - "EditMessageLiveLocation", - "StopMessageLiveLocation", - "SendVenue", - "SendContact", - "SendPoll", - "SendDice", - "SendChatAction", - "GetUserProfilePhotos", - "GetFile", - "BanChatMember", - "KickChatMember", - "UnbanChatMember", - "RestrictChatMember", - "PromoteChatMember", - "SetChatAdministratorCustomTitle", - "BanChatSenderChat", - "UnbanChatSenderChat", - "SetChatPermissions", - "ExportChatInviteLink", - "CreateChatInviteLink", - "EditChatInviteLink", - "RevokeChatInviteLink", - "ApproveChatJoinRequest", - "DeclineChatJoinRequest", - "SetChatPhoto", - "DeleteChatPhoto", - "SetChatTitle", - "SetChatDescription", - "PinChatMessage", - "UnpinChatMessage", - "UnpinAllChatMessages", - "LeaveChat", - "GetChat", - "GetChatAdministrators", - "GetChatMemberCount", - "GetChatMembersCount", - "GetChatMember", - "SetChatStickerSet", - "DeleteChatStickerSet", + "AddStickerToSet", "AnswerCallbackQuery", - "SetMyCommands", + "AnswerInlineQuery", + "AnswerPreCheckoutQuery", + "AnswerShippingQuery", + "AnswerWebAppQuery", + "ApproveChatJoinRequest", + "ApproveSuggestedPost", + "BanChatMember", + "BanChatSenderChat", + "Close", + "CloseForumTopic", + "CloseGeneralForumTopic", + "ConvertGiftToStars", + "CopyMessage", + "CopyMessages", + "CreateChatInviteLink", + "CreateChatSubscriptionInviteLink", + "CreateForumTopic", + "CreateInvoiceLink", + "CreateNewStickerSet", + "DeclineChatJoinRequest", + "DeclineSuggestedPost", + "DeleteBusinessMessages", + "DeleteChatPhoto", + "DeleteChatStickerSet", + "DeleteForumTopic", + "DeleteMessage", + "DeleteMessages", "DeleteMyCommands", - "GetMyCommands", - "EditMessageText", + "DeleteStickerFromSet", + "DeleteStickerSet", + "DeleteStory", + "DeleteWebhook", + "EditChatInviteLink", + "EditChatSubscriptionInviteLink", + "EditForumTopic", + "EditGeneralForumTopic", "EditMessageCaption", + "EditMessageChecklist", + "EditMessageLiveLocation", "EditMessageMedia", "EditMessageReplyMarkup", - "StopPoll", - "DeleteMessage", - "SendSticker", - "GetStickerSet", - "UploadStickerFile", - "CreateNewStickerSet", - "AddStickerToSet", - "SetStickerPositionInSet", - "DeleteStickerFromSet", - "SetStickerSetThumb", - "AnswerInlineQuery", - "SendInvoice", - "AnswerShippingQuery", - "AnswerPreCheckoutQuery", - "SetPassportDataErrors", - "SendGame", - "SetGameScore", + "EditMessageText", + "EditStory", + "EditUserStarSubscription", + "ExportChatInviteLink", + "ForwardMessage", + "ForwardMessages", + "GetAvailableGifts", + "GetBusinessAccountGifts", + "GetBusinessAccountStarBalance", + "GetBusinessConnection", + "GetChat", + "GetChatAdministrators", + "GetChatGifts", + "GetChatMember", + "GetChatMemberCount", + "GetChatMenuButton", + "GetCustomEmojiStickers", + "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", + "SendSticker", + "SendVenue", + "SendVideo", + "SendVideoNote", + "SendVoice", + "SetBusinessAccountBio", + "SetBusinessAccountGiftSettings", + "SetBusinessAccountName", + "SetBusinessAccountProfilePhoto", + "SetBusinessAccountUsername", + "SetChatAdministratorCustomTitle", + "SetChatDescription", + "SetChatMemberTag", + "SetChatMenuButton", + "SetChatPermissions", + "SetChatPhoto", + "SetChatStickerSet", + "SetChatTitle", + "SetCustomEmojiStickerSetThumbnail", + "SetGameScore", + "SetMessageReaction", + "SetMyCommands", + "SetMyDefaultAdministratorRights", + "SetMyDescription", + "SetMyName", + "SetMyProfilePhoto", + "SetMyShortDescription", + "SetPassportDataErrors", + "SetStickerEmojiList", + "SetStickerKeywords", + "SetStickerMaskPosition", + "SetStickerPositionInSet", + "SetStickerSetThumbnail", + "SetStickerSetTitle", + "SetUserEmojiStatus", + "SetWebhook", + "StopMessageLiveLocation", + "StopPoll", + "TelegramMethod", + "TransferBusinessAccountStars", + "TransferGift", + "UnbanChatMember", + "UnbanChatSenderChat", + "UnhideGeneralForumTopic", + "UnpinAllChatMessages", + "UnpinAllForumTopicMessages", + "UnpinAllGeneralForumTopicMessages", + "UnpinChatMessage", + "UpgradeGift", + "UploadStickerFile", + "VerifyChat", + "VerifyUser", ) diff --git a/aiogram/methods/add_sticker_to_set.py b/aiogram/methods/add_sticker_to_set.py index 7b676674..cc2e31d2 100644 --- a/aiogram/methods/add_sticker_to_set.py +++ b/aiogram/methods/add_sticker_to_set.py @@ -1,44 +1,42 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import InputFile, MaskPosition -from .base import Request, TelegramMethod, prepare_file - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import InputSticker +from .base import TelegramMethod class AddStickerToSet(TelegramMethod[bool]): """ - Use this method to add a new sticker to a set created by the bot. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Animated stickers can be added to animated sticker sets and only to them. Animated 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. Source: https://core.telegram.org/bots/api#addstickertoset """ __returning__ = bool + __api_method__ = "addStickerToSet" user_id: int """User identifier of sticker set owner""" name: str """Sticker set name""" - emojis: str - """One or more emoji corresponding to the sticker""" - png_sticker: Optional[Union[InputFile, str]] = None - """**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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 info on Sending Files » `""" - tgs_sticker: Optional[InputFile] = None - """**TGS** animation with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for technical requirements""" - webm_sticker: Optional[InputFile] = None - """**WEBM** video with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for technical requirements""" - mask_position: Optional[MaskPosition] = None - """A JSON-serialized object for position where the mask should be placed on faces""" + sticker: InputSticker + """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 isn't changed.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"png_sticker", "tgs_sticker", "webm_sticker"}) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="png_sticker", value=self.png_sticker) - prepare_file(data=data, files=files, name="tgs_sticker", value=self.tgs_sticker) - prepare_file(data=data, files=files, name="webm_sticker", value=self.webm_sticker) + def __init__( + __pydantic__self__, + *, + user_id: int, + name: str, + sticker: InputSticker, + **__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 - return Request(method="addStickerToSet", data=data, files=files) + super().__init__(user_id=user_id, name=name, sticker=sticker, **__pydantic_kwargs) diff --git a/aiogram/methods/answer_callback_query.py b/aiogram/methods/answer_callback_query.py index 04f8282c..822354ec 100644 --- a/aiogram/methods/answer_callback_query.py +++ b/aiogram/methods/answer_callback_query.py @@ -1,36 +1,56 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class AnswerCallbackQuery(TelegramMethod[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. + 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. - Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@Botfather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. + Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@BotFather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. Source: https://core.telegram.org/bots/api#answercallbackquery """ __returning__ = bool + __api_method__ = "answerCallbackQuery" 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 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 + 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: 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.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="answerCallbackQuery", data=data) + def __init__( + __pydantic__self__, + *, + callback_query_id: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + callback_query_id=callback_query_id, + text=text, + show_alert=show_alert, + url=url, + cache_time=cache_time, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/answer_inline_query.py b/aiogram/methods/answer_inline_query.py index 2e76bba3..7e4f7191 100644 --- a/aiogram/methods/answer_inline_query.py +++ b/aiogram/methods/answer_inline_query.py @@ -1,12 +1,11 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, Any -from ..types import InlineQueryResult -from .base import Request, TelegramMethod, prepare_parse_mode +from pydantic import Field -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import InlineQueryResultsButton, InlineQueryResultUnion +from .base import TelegramMethod class AnswerInlineQuery(TelegramMethod[bool]): @@ -19,30 +18,60 @@ class AnswerInlineQuery(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "answerInlineQuery" inline_query_id: str """Unique identifier for the answered query""" - results: List[InlineQueryResult] + 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 - """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 + 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: 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.""" - switch_pm_text: Optional[str] = None - """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*""" - switch_pm_parameter: Optional[str] = None - """`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.""" + button: InlineQueryResultsButton | None = None + """A JSON-serialized object describing a button to be shown above inline query results""" + 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. - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() +.. deprecated:: API:6.7 + https://core.telegram.org/bots/api-changelog#april-21-2023""" + 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* - input_message_contents = [] - for result in data["results"]: - input_message_content = result.get("input_message_content", None) - if input_message_content is not None: - input_message_contents.append(input_message_content) +.. deprecated:: API:6.7 + https://core.telegram.org/bots/api-changelog#april-21-2023""" - prepare_parse_mode(bot, data["results"] + input_message_contents) - return Request(method="answerInlineQuery", data=data) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + inline_query_id: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + inline_query_id=inline_query_id, + results=results, + cache_time=cache_time, + is_personal=is_personal, + next_offset=next_offset, + button=button, + switch_pm_parameter=switch_pm_parameter, + switch_pm_text=switch_pm_text, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/answer_pre_checkout_query.py b/aiogram/methods/answer_pre_checkout_query.py index 507f8158..f014be3e 100644 --- a/aiogram/methods/answer_pre_checkout_query.py +++ b/aiogram/methods/answer_pre_checkout_query.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class AnswerPreCheckoutQuery(TelegramMethod[bool]): @@ -16,15 +13,34 @@ class AnswerPreCheckoutQuery(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "answerPreCheckoutQuery" pre_checkout_query_id: str """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.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="answerPreCheckoutQuery", data=data) + def __init__( + __pydantic__self__, + *, + pre_checkout_query_id: str, + ok: bool, + error_message: 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__( + pre_checkout_query_id=pre_checkout_query_id, + ok=ok, + error_message=error_message, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/answer_shipping_query.py b/aiogram/methods/answer_shipping_query.py index 60da57c7..2f5601dc 100644 --- a/aiogram/methods/answer_shipping_query.py +++ b/aiogram/methods/answer_shipping_query.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, Any from ..types import ShippingOption -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class AnswerShippingQuery(TelegramMethod[bool]): @@ -17,17 +14,38 @@ class AnswerShippingQuery(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "answerShippingQuery" shipping_query_id: str """Unique identifier for the query to be answered""" ok: bool - """Specify :code:`True` if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)""" - shipping_options: Optional[List[ShippingOption]] = None + """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: 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 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.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="answerShippingQuery", data=data) + def __init__( + __pydantic__self__, + *, + shipping_query_id: str, + ok: bool, + shipping_options: list[ShippingOption] | None = None, + error_message: 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__( + shipping_query_id=shipping_query_id, + ok=ok, + shipping_options=shipping_options, + error_message=error_message, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/answer_web_app_query.py b/aiogram/methods/answer_web_app_query.py new file mode 100644 index 00000000..edcbf7de --- /dev/null +++ b/aiogram/methods/answer_web_app_query.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import InlineQueryResultUnion, SentWebAppMessage +from .base import TelegramMethod + + +class AnswerWebAppQuery(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#answerwebappquery + """ + + __returning__ = SentWebAppMessage + __api_method__ = "answerWebAppQuery" + + web_app_query_id: str + """Unique identifier for the query to be answered""" + result: InlineQueryResultUnion + """A JSON-serialized object describing the message to be sent""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + web_app_query_id: str, + result: InlineQueryResultUnion, + **__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__(web_app_query_id=web_app_query_id, result=result, **__pydantic_kwargs) diff --git a/aiogram/methods/approve_chat_join_request.py b/aiogram/methods/approve_chat_join_request.py index 5c4008af..1142cd82 100644 --- a/aiogram/methods/approve_chat_join_request.py +++ b/aiogram/methods/approve_chat_join_request.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class ApproveChatJoinRequest(TelegramMethod[bool]): @@ -16,13 +14,22 @@ 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="approveChatJoinRequest", data=data) + def __init__( + __pydantic__self__, *, chat_id: ChatIdUnion, 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__(chat_id=chat_id, user_id=user_id, **__pydantic_kwargs) 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 3252af1b..ee728ad6 100644 --- a/aiogram/methods/ban_chat_member.py +++ b/aiogram/methods/ban_chat_member.py @@ -1,12 +1,9 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion, DateTimeUnion +from .base import TelegramMethod class BanChatMember(TelegramMethod[bool]): @@ -17,17 +14,38 @@ 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 - """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 + 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: 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.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="banChatMember", data=data) + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + user_id: int, + until_date: DateTimeUnion | None = None, + revoke_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__( + chat_id=chat_id, + user_id=user_id, + until_date=until_date, + revoke_messages=revoke_messages, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/ban_chat_sender_chat.py b/aiogram/methods/ban_chat_sender_chat.py index c68d8f29..72173cc5 100644 --- a/aiogram/methods/ban_chat_sender_chat.py +++ b/aiogram/methods/ban_chat_sender_chat.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class BanChatSenderChat(TelegramMethod[bool]): @@ -16,13 +14,26 @@ 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="banChatSenderChat", data=data) + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + sender_chat_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__(chat_id=chat_id, sender_chat_id=sender_chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/base.py b/aiogram/methods/base.py index 6b1d9619..fdc1e3f0 100644 --- a/aiogram/methods/base.py +++ b/aiogram/methods/base.py @@ -1,13 +1,22 @@ from __future__ import annotations -import abc -import secrets -from typing import TYPE_CHECKING, Any, Dict, Generator, Generic, Optional, TypeVar, Union +from abc import ABC, abstractmethod +from collections.abc import Generator +from typing import ( + TYPE_CHECKING, + Any, + ClassVar, + Generic, + TypeVar, +) -from pydantic import BaseConfig, BaseModel, Extra, root_validator -from pydantic.generics import GenericModel +from pydantic import BaseModel, ConfigDict +from pydantic.functional_validators import model_validator -from ..types import UNSET, InputFile, ResponseParameters +from aiogram.client.context_controller import BotContextController + +from ..types import InputFile, ResponseParameters +from ..types.base import UNSET_TYPE if TYPE_CHECKING: from ..client.bot import Bot @@ -16,141 +25,69 @@ TelegramType = TypeVar("TelegramType", bound=Any) class Request(BaseModel): + model_config = ConfigDict(arbitrary_types_allowed=True) + method: str - data: Dict[str, Optional[Any]] - files: Optional[Dict[str, InputFile]] - - class Config(BaseConfig): - arbitrary_types_allowed = True - - def render_webhook_request(self) -> Dict[str, Any]: - return { - "method": self.method, - **{key: value for key, value in self.data.items() if value is not None}, - } + data: dict[str, Any | None] + files: dict[str, InputFile] | None -class Response(GenericModel, Generic[TelegramType]): +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(abc.ABC, BaseModel, Generic[TelegramType]): - class Config(BaseConfig): - # use_enum_values = True - extra = Extra.allow - allow_population_by_field_name = True - arbitrary_types_allowed = True - orm_mode = True +class TelegramMethod(BotContextController, BaseModel, Generic[TelegramType], ABC): + model_config = ConfigDict( + extra="allow", + populate_by_name=True, + arbitrary_types_allowed=True, + ) - @root_validator(pre=True) - def remove_unset(cls, values: Dict[str, Any]) -> Dict[str, Any]: + @model_validator(mode="before") + @classmethod + def remove_unset(cls, values: dict[str, Any]) -> dict[str, Any]: """ - Remove UNSET from `parse_mode` before fields validation. + Remove UNSET before fields validation. We use UNSET as a sentinel value for `parse_mode` and replace it to real value later. - It isn't a problem when it's just default value for a model field, but UNSET might be passing to - a model initialization from `Bot.method_name`, so we must take care of it and - remove it before fields validation. + It isn't a problem when it's just default value for a model field, + but UNSET might be passing to a model initialization from `Bot.method_name`, + so we must take care of it and remove it before fields validation. """ - for parse_mode_attribute in {"parse_mode", "explanation_parse_mode"}: - if parse_mode_attribute in values and values[parse_mode_attribute] is UNSET: - values.pop(parse_mode_attribute) - return values + if not isinstance(values, dict): + return values + return {k: v for k, v in values.items() if not isinstance(v, UNSET_TYPE)} - @property - @abc.abstractmethod - def __returning__(self) -> type: # pragma: no cover - pass + if TYPE_CHECKING: + __returning__: ClassVar[Any] + __api_method__: ClassVar[str] + else: - @abc.abstractmethod - def build_request(self, bot: Bot) -> Request: # pragma: no cover - pass + @property + @abstractmethod + def __returning__(self) -> type: + pass - def dict(self, **kwargs: Any) -> Any: - # override dict of pydantic.BaseModel to overcome exporting request_timeout field - exclude = kwargs.pop("exclude", set()) - - return super().dict(exclude=exclude, **kwargs) - - def build_response(self, data: Dict[str, Any]) -> Response[TelegramType]: - # noinspection PyTypeChecker - return Response[self.__returning__](**data) # type: ignore + @property + @abstractmethod + def __api_method__(self) -> str: + pass async def emit(self, bot: Bot) -> TelegramType: return await bot(self) def __await__(self) -> Generator[Any, None, TelegramType]: - from aiogram.client.bot import Bot - - bot = Bot.get_current(no_error=False) - return self.emit(bot).__await__() - - -def prepare_file(name: str, value: Any, data: Dict[str, Any], files: Dict[str, Any]) -> None: - if not value: - return - if name == "thumb": - tag = secrets.token_urlsafe(10) - files[tag] = value - data["thumb"] = f"attach://{tag}" - elif isinstance(value, InputFile): - files[name] = value - else: - data[name] = value - - -def prepare_input_media(data: Dict[str, Any], files: Dict[str, InputFile]) -> None: - for input_media in data.get("media", []): # type: Dict[str, Union[str, InputFile]] - if ( - "media" in input_media - and input_media["media"] - and isinstance(input_media["media"], InputFile) - ): - tag = secrets.token_urlsafe(10) - files[tag] = input_media.pop("media") # type: ignore - input_media["media"] = f"attach://{tag}" - - -def prepare_media_file(data: Dict[str, Any], files: Dict[str, InputFile]) -> None: - if ( - data["media"] - and "media" in data["media"] - and isinstance(data["media"]["media"], InputFile) - ): - tag = secrets.token_urlsafe(10) - files[tag] = data["media"].pop("media") - data["media"]["media"] = f"attach://{tag}" - - -def prepare_parse_mode( - bot: Bot, - root: Any, - parse_mode_property: str = "parse_mode", - entities_property: str = "entities", -) -> None: - """ - Find and set parse_mode with highest priority. - - Developer can manually set parse_mode for each message (or message-like) object, - but if parse_mode was unset we should use value from Bot object. - - We can't use None for "unset state", because None itself is the parse_mode option. - """ - if isinstance(root, list): - for item in root: - prepare_parse_mode( - bot=bot, - root=item, - parse_mode_property=parse_mode_property, - entities_property=entities_property, + bot = self._bot + if not bot: + raise RuntimeError( + "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`" ) - elif root.get(parse_mode_property, UNSET) is UNSET: - if bot.parse_mode and root.get(entities_property, None) is None: - root[parse_mode_property] = bot.parse_mode - else: - root[parse_mode_property] = None + return self.emit(bot).__await__() diff --git a/aiogram/methods/close.py b/aiogram/methods/close.py index 78e8f07d..7c33eca3 100644 --- a/aiogram/methods/close.py +++ b/aiogram/methods/close.py @@ -1,11 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict - -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class Close(TelegramMethod[bool]): @@ -16,8 +11,4 @@ class Close(TelegramMethod[bool]): """ __returning__ = bool - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="close", data=data) + __api_method__ = "close" diff --git a/aiogram/methods/close_forum_topic.py b/aiogram/methods/close_forum_topic.py new file mode 100644 index 00000000..ec990399 --- /dev/null +++ b/aiogram/methods/close_forum_topic.py @@ -0,0 +1,41 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion +from .base import TelegramMethod + + +class CloseForumTopic(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#closeforumtopic + """ + + __returning__ = bool + __api_method__ = "closeForumTopic" + + 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""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + message_thread_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__( + chat_id=chat_id, message_thread_id=message_thread_id, **__pydantic_kwargs + ) diff --git a/aiogram/methods/close_general_forum_topic.py b/aiogram/methods/close_general_forum_topic.py new file mode 100644 index 00000000..bf7a914c --- /dev/null +++ b/aiogram/methods/close_general_forum_topic.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion +from .base import TelegramMethod + + +class CloseGeneralForumTopic(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#closegeneralforumtopic + """ + + __returning__ = bool + __api_method__ = "closeGeneralForumTopic" + + chat_id: ChatIdUnion + """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + 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/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 9a5cddae..6d840851 100644 --- a/aiogram/methods/copy_message.py +++ b/aiogram/methods/copy_message.py @@ -1,61 +1,128 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Any +from pydantic import Field + +from ..client.default import Default from ..types import ( - UNSET, - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, + DateTimeUnion, MessageEntity, MessageId, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, + ReplyParameters, + SuggestedPostParameters, ) -from .base import Request, TelegramMethod, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class CopyMessage(TelegramMethod[MessageId]): """ - Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. 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. + 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. Source: https://core.telegram.org/bots/api#copymessage """ __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*""" - 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[str] = UNSET + 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*""" - disable_notification: Optional[bool] = None + 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: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """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.""" + 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: 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the message is a reply, ID of the original message - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="caption_entities" - ) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" - return Request(method="copyMessage", data=data) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + from_chat_id: ChatIdUnion, + message_id: int, + 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!!! + # 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, + 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, + reply_to_message_id=reply_to_message_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/copy_messages.py b/aiogram/methods/copy_messages.py new file mode 100644 index 00000000..02afd270 --- /dev/null +++ b/aiogram/methods/copy_messages.py @@ -0,0 +1,65 @@ +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion, MessageId +from .base import TelegramMethod + + +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] + __api_method__ = "copyMessages" + + chat_id: ChatIdUnion + """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" + 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] + """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: 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: bool | None = None + """Protects the contents of the sent messages from forwarding and saving""" + remove_caption: bool | None = None + """Pass :code:`True` to copy the messages without their captions""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + 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!!! + # 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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/create_chat_invite_link.py b/aiogram/methods/create_chat_invite_link.py index 965844d9..e42572ae 100644 --- a/aiogram/methods/create_chat_invite_link.py +++ b/aiogram/methods/create_chat_invite_link.py @@ -1,13 +1,9 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import ChatInviteLink -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion, ChatInviteLink, DateTimeUnion +from .base import TelegramMethod class CreateChatInviteLink(TelegramMethod[ChatInviteLink]): @@ -18,19 +14,42 @@ 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 - """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 + 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: 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="createChatInviteLink", data=data) + def __init__( + __pydantic__self__, + *, + 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!!! + # 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, + name=name, + expire_date=expire_date, + member_limit=member_limit, + creates_join_request=creates_join_request, + **__pydantic_kwargs, + ) 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 new file mode 100644 index 00000000..242b67cb --- /dev/null +++ b/aiogram/methods/create_forum_topic.py @@ -0,0 +1,51 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +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 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 + """ + + __returning__ = ForumTopic + __api_method__ = "createForumTopic" + + 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: 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + name: str, + icon_color: int | None = None, + icon_custom_emoji_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__( + chat_id=chat_id, + name=name, + icon_color=icon_color, + icon_custom_emoji_id=icon_custom_emoji_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/create_invoice_link.py b/aiogram/methods/create_invoice_link.py new file mode 100644 index 00000000..d4eb3115 --- /dev/null +++ b/aiogram/methods/create_invoice_link.py @@ -0,0 +1,123 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import LabeledPrice +from .base import TelegramMethod + + +class CreateInvoiceLink(TelegramMethod[str]): + """ + Use this method to create a link for an invoice. Returns the created invoice link as *String* on success. + + Source: https://core.telegram.org/bots/api#createinvoicelink + """ + + __returning__ = str + __api_method__ = "createInvoiceLink" + + 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 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] + """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 `_.""" + 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 `_.""" + 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: 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: 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: 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: int | None = None + """Photo size in bytes""" + photo_width: int | None = None + """Photo width""" + photo_height: int | None = None + """Photo height""" + 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: 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: 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: 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: 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: 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: bool | None = None + """Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + title: str, + description: str, + payload: str, + currency: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + title=title, + description=description, + 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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/create_new_sticker_set.py b/aiogram/methods/create_new_sticker_set.py index 5c807963..258c7ce8 100644 --- a/aiogram/methods/create_new_sticker_set.py +++ b/aiogram/methods/create_new_sticker_set.py @@ -1,48 +1,68 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import InputFile, MaskPosition -from .base import Request, TelegramMethod, prepare_file +from pydantic import Field -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import InputSticker +from .base import TelegramMethod class CreateNewStickerSet(TelegramMethod[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. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Returns :code:`True` on success. + 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. Source: https://core.telegram.org/bots/api#createnewstickerset """ __returning__ = bool + __api_method__ = "createNewStickerSet" user_id: int """User identifier of created sticker set owner""" name: str - """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 *'_by_'*. ** is case insensitive. 1-64 characters.""" + """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""" - emojis: str - """One or more emoji corresponding to the sticker""" - png_sticker: Optional[Union[InputFile, str]] = None - """**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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 info on Sending Files » `""" - tgs_sticker: Optional[InputFile] = None - """**TGS** animation with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for technical requirements""" - webm_sticker: Optional[InputFile] = None - """**WEBM** video with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for technical requirements""" - contains_masks: Optional[bool] = None - """Pass :code:`True`, if a set of mask stickers should be created""" - mask_position: Optional[MaskPosition] = None - """A JSON-serialized object for position where the mask should be placed on faces""" + stickers: list[InputSticker] + """A JSON-serialized list of 1-50 initial stickers to be added to the sticker set""" + 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: 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: str | None = Field(None, json_schema_extra={"deprecated": True}) + """Format of stickers in the set, must be one of 'static', 'animated', 'video' - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"png_sticker", "tgs_sticker", "webm_sticker"}) +.. deprecated:: API:7.2 + https://core.telegram.org/bots/api-changelog#march-31-2024""" - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="png_sticker", value=self.png_sticker) - prepare_file(data=data, files=files, name="tgs_sticker", value=self.tgs_sticker) - prepare_file(data=data, files=files, name="webm_sticker", value=self.webm_sticker) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="createNewStickerSet", data=data, files=files) + def __init__( + __pydantic__self__, + *, + user_id: int, + name: str, + title: str, + 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!!! + # 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, + name=name, + title=title, + stickers=stickers, + sticker_type=sticker_type, + needs_repainting=needs_repainting, + sticker_format=sticker_format, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/decline_chat_join_request.py b/aiogram/methods/decline_chat_join_request.py index 6bc03c9e..6259c550 100644 --- a/aiogram/methods/decline_chat_join_request.py +++ b/aiogram/methods/decline_chat_join_request.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class DeclineChatJoinRequest(TelegramMethod[bool]): @@ -16,13 +14,22 @@ 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="declineChatJoinRequest", data=data) + def __init__( + __pydantic__self__, *, chat_id: ChatIdUnion, 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__(chat_id=chat_id, user_id=user_id, **__pydantic_kwargs) 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 9fe12a65..0cdf2eca 100644 --- a/aiogram/methods/delete_chat_photo.py +++ b/aiogram/methods/delete_chat_photo.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class DeleteChatPhoto(TelegramMethod[bool]): @@ -16,11 +14,20 @@ 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`)""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="deleteChatPhoto", data=data) + 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/delete_chat_sticker_set.py b/aiogram/methods/delete_chat_sticker_set.py index 18fbaf82..c1a2feab 100644 --- a/aiogram/methods/delete_chat_sticker_set.py +++ b/aiogram/methods/delete_chat_sticker_set.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class DeleteChatStickerSet(TelegramMethod[bool]): @@ -16,11 +14,20 @@ 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`)""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="deleteChatStickerSet", data=data) + 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/delete_forum_topic.py b/aiogram/methods/delete_forum_topic.py new file mode 100644 index 00000000..f168c74e --- /dev/null +++ b/aiogram/methods/delete_forum_topic.py @@ -0,0 +1,41 @@ +from __future__ import annotations + +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 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 + """ + + __returning__ = bool + __api_method__ = "deleteForumTopic" + + 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""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + message_thread_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__( + chat_id=chat_id, message_thread_id=message_thread_id, **__pydantic_kwargs + ) diff --git a/aiogram/methods/delete_message.py b/aiogram/methods/delete_message.py index 2e01cca4..b564f34d 100644 --- a/aiogram/methods/delete_message.py +++ b/aiogram/methods/delete_message.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class DeleteMessage(TelegramMethod[bool]): @@ -14,6 +12,8 @@ class DeleteMessage(TelegramMethod[bool]): - A message can only be deleted if it was sent less than 48 hours ago. + - Service messages about a supergroup, channel, or forum topic creation can't be deleted. + - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. - Bots can delete outgoing messages in private chats, groups, and supergroups. @@ -24,7 +24,9 @@ class DeleteMessage(TelegramMethod[bool]): - If the bot is an administrator of a group, it can delete any message there. - - If the bot has *can_delete_messages* permission in a supergroup or a channel, it can delete any message there. + - If the bot has *can_delete_messages* administrator right in a supergroup or a channel, it can delete any message there. + + - If the bot has *can_manage_direct_messages* administrator right in a channel, it can delete any message in the corresponding direct messages chat. Returns :code:`True` on success. @@ -32,13 +34,22 @@ 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="deleteMessage", data=data) + def __init__( + __pydantic__self__, *, chat_id: ChatIdUnion, 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__(chat_id=chat_id, message_id=message_id, **__pydantic_kwargs) diff --git a/aiogram/methods/delete_messages.py b/aiogram/methods/delete_messages.py new file mode 100644 index 00000000..63d90a6f --- /dev/null +++ b/aiogram/methods/delete_messages.py @@ -0,0 +1,37 @@ +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion +from .base import TelegramMethod + + +class DeleteMessages(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#deletemessages + """ + + __returning__ = bool + __api_method__ = "deleteMessages" + + chat_id: ChatIdUnion + """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + 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__(chat_id=chat_id, message_ids=message_ids, **__pydantic_kwargs) diff --git a/aiogram/methods/delete_my_commands.py b/aiogram/methods/delete_my_commands.py index 0e475625..067cca85 100644 --- a/aiogram/methods/delete_my_commands.py +++ b/aiogram/methods/delete_my_commands.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Any -from ..types import BotCommandScope -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import BotCommandScopeUnion +from .base import TelegramMethod class DeleteMyCommands(TelegramMethod[bool]): @@ -17,13 +14,26 @@ class DeleteMyCommands(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "deleteMyCommands" - scope: Optional[BotCommandScope] = 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="deleteMyCommands", data=data) + def __init__( + __pydantic__self__, + *, + scope: BotCommandScopeUnion | None = None, + language_code: 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__(scope=scope, language_code=language_code, **__pydantic_kwargs) diff --git a/aiogram/methods/delete_sticker_from_set.py b/aiogram/methods/delete_sticker_from_set.py index cb40c366..6aae72b7 100644 --- a/aiogram/methods/delete_sticker_from_set.py +++ b/aiogram/methods/delete_sticker_from_set.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class DeleteStickerFromSet(TelegramMethod[bool]): @@ -16,11 +13,18 @@ class DeleteStickerFromSet(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "deleteStickerFromSet" sticker: str """File identifier of the sticker""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="deleteStickerFromSet", data=data) + def __init__(__pydantic__self__, *, sticker: 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__(sticker=sticker, **__pydantic_kwargs) diff --git a/aiogram/methods/delete_sticker_set.py b/aiogram/methods/delete_sticker_set.py new file mode 100644 index 00000000..519c5db1 --- /dev/null +++ b/aiogram/methods/delete_sticker_set.py @@ -0,0 +1,30 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class DeleteStickerSet(TelegramMethod[bool]): + """ + Use this method to delete a sticker set that was created by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#deletestickerset + """ + + __returning__ = bool + __api_method__ = "deleteStickerSet" + + name: str + """Sticker set name""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, 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__(name=name, **__pydantic_kwargs) 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 a68bf78d..a42100f1 100644 --- a/aiogram/methods/delete_webhook.py +++ b/aiogram/methods/delete_webhook.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class DeleteWebhook(TelegramMethod[bool]): @@ -16,11 +13,23 @@ 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="deleteWebhook", data=data) + def __init__( + __pydantic__self__, + *, + drop_pending_updates: 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__(drop_pending_updates=drop_pending_updates, **__pydantic_kwargs) diff --git a/aiogram/methods/edit_chat_invite_link.py b/aiogram/methods/edit_chat_invite_link.py index 67354688..cc71252f 100644 --- a/aiogram/methods/edit_chat_invite_link.py +++ b/aiogram/methods/edit_chat_invite_link.py @@ -1,13 +1,9 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import ChatInviteLink -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion, ChatInviteLink, DateTimeUnion +from .base import TelegramMethod class EditChatInviteLink(TelegramMethod[ChatInviteLink]): @@ -18,21 +14,46 @@ 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 - """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 + 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: 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="editChatInviteLink", data=data) + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + invite_link: str, + 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!!! + # 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, + expire_date=expire_date, + member_limit=member_limit, + creates_join_request=creates_join_request, + **__pydantic_kwargs, + ) 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 new file mode 100644 index 00000000..169e9829 --- /dev/null +++ b/aiogram/methods/edit_forum_topic.py @@ -0,0 +1,51 @@ +from __future__ import annotations + +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 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 + """ + + __returning__ = bool + __api_method__ = "editForumTopic" + + 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: 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + message_thread_id: int, + name: str | None = None, + icon_custom_emoji_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__( + chat_id=chat_id, + message_thread_id=message_thread_id, + name=name, + icon_custom_emoji_id=icon_custom_emoji_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/edit_general_forum_topic.py b/aiogram/methods/edit_general_forum_topic.py new file mode 100644 index 00000000..5e29766c --- /dev/null +++ b/aiogram/methods/edit_general_forum_topic.py @@ -0,0 +1,35 @@ +from __future__ import annotations + +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 the *can_manage_topics* administrator rights. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#editgeneralforumtopic + """ + + __returning__ = bool + __api_method__ = "editGeneralForumTopic" + + 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""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: ChatIdUnion, 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__(chat_id=chat_id, name=name, **__pydantic_kwargs) diff --git a/aiogram/methods/edit_message_caption.py b/aiogram/methods/edit_message_caption.py index 40e4459b..f790f9e2 100644 --- a/aiogram/methods/edit_message_caption.py +++ b/aiogram/methods/edit_message_caption.py @@ -1,43 +1,72 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import UNSET, InlineKeyboardMarkup, Message, MessageEntity -from .base import Request, TelegramMethod, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..client.default import Default +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. + 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" - chat_id: Optional[Union[int, 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: 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[str] = UNSET + 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*""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """A JSON-serialized object for an `inline keyboard `_.""" + 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: InlineKeyboardMarkup | None = None + """A JSON-serialized object for an `inline keyboard `_.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="caption_entities" - ) + def __init__( + __pydantic__self__, + *, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins - return Request(method="editMessageCaption", data=data) + super().__init__( + business_connection_id=business_connection_id, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) 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 e8a34f19..82471ad3 100644 --- a/aiogram/methods/edit_message_live_location.py +++ b/aiogram/methods/edit_message_live_location.py @@ -1,43 +1,79 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import InlineKeyboardMarkup, Message -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +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""" - chat_id: Optional[Union[int, 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: 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""" - horizontal_accuracy: Optional[float] = 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: 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 - """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 - """A JSON-serialized object for a new `inline keyboard `_.""" + 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: InlineKeyboardMarkup | None = None + """A JSON-serialized object for a new `inline keyboard `_.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="editMessageLiveLocation", data=data) + def __init__( + __pydantic__self__, + *, + latitude: float, + longitude: float, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + latitude=latitude, + longitude=longitude, + business_connection_id=business_connection_id, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + live_period=live_period, + horizontal_accuracy=horizontal_accuracy, + heading=heading, + proximity_alert_radius=proximity_alert_radius, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/edit_message_media.py b/aiogram/methods/edit_message_media.py index 10882e81..d0bdb776 100644 --- a/aiogram/methods/edit_message_media.py +++ b/aiogram/methods/edit_message_media.py @@ -1,38 +1,59 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import InlineKeyboardMarkup, InputFile, InputMedia, Message -from .base import Request, TelegramMethod, prepare_media_file, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +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. + 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: InputMedia + media: InputMediaUnion """A JSON-serialized object for a new media content of the message""" - chat_id: Optional[Union[int, 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: 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 - """A JSON-serialized object for a new `inline keyboard `_.""" + reply_markup: InlineKeyboardMarkup | None = None + """A JSON-serialized object for a new `inline keyboard `_.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - prepare_parse_mode(bot, data["media"]) - files: Dict[str, InputFile] = {} - prepare_media_file(data=data, files=files) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="editMessageMedia", data=data, files=files) + def __init__( + __pydantic__self__, + *, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + media=media, + business_connection_id=business_connection_id, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/edit_message_reply_markup.py b/aiogram/methods/edit_message_reply_markup.py index 0304012c..e5bd47b6 100644 --- a/aiogram/methods/edit_message_reply_markup.py +++ b/aiogram/methods/edit_message_reply_markup.py @@ -1,33 +1,55 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import InlineKeyboardMarkup, Message -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +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. + 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" - chat_id: Optional[Union[int, 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: 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 - """A JSON-serialized object for an `inline keyboard `_.""" + reply_markup: InlineKeyboardMarkup | None = None + """A JSON-serialized object for an `inline keyboard `_.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="editMessageReplyMarkup", data=data) + def __init__( + __pydantic__self__, + *, + 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!!! + # 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, + inline_message_id=inline_message_id, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/edit_message_text.py b/aiogram/methods/edit_message_text.py index 92184b90..3622d293 100644 --- a/aiogram/methods/edit_message_text.py +++ b/aiogram/methods/edit_message_text.py @@ -1,45 +1,89 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import UNSET, InlineKeyboardMarkup, Message, MessageEntity -from .base import Request, TelegramMethod, prepare_parse_mode +from pydantic import Field -if TYPE_CHECKING: - from ..client.bot import Bot +from ..client.default import Default +from ..types import ( + ChatIdUnion, + InlineKeyboardMarkup, + LinkPreviewOptions, + Message, + MessageEntity, +) +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. + 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""" - chat_id: Optional[Union[int, 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: 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[str] = UNSET + 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*""" - disable_web_page_preview: Optional[bool] = None - """Disables link previews for links in this message""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """A JSON-serialized object for an `inline keyboard `_.""" + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview") + """Link preview generation options for the message""" + reply_markup: InlineKeyboardMarkup | None = None + """A JSON-serialized object for an `inline keyboard `_.""" + 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="entities" - ) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="editMessageText", data=data) + def __init__( + __pydantic__self__, + *, + text: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + text=text, + business_connection_id=business_connection_id, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + parse_mode=parse_mode, + entities=entities, + link_preview_options=link_preview_options, + reply_markup=reply_markup, + disable_web_page_preview=disable_web_page_preview, + **__pydantic_kwargs, + ) 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 d4b72e34..70da95a0 100644 --- a/aiogram/methods/export_chat_invite_link.py +++ b/aiogram/methods/export_chat_invite_link.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class ExportChatInviteLink(TelegramMethod[str]): @@ -18,11 +16,20 @@ 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`)""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="exportChatInviteLink", data=data) + 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/forward_message.py b/aiogram/methods/forward_message.py index ec4e7623..c52d4de0 100644 --- a/aiogram/methods/forward_message.py +++ b/aiogram/methods/forward_message.py @@ -1,35 +1,76 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import Message -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..client.default import Default +from ..types import ChatIdUnion, DateTimeUnion, Message, SuggestedPostParameters +from .base import TelegramMethod class ForwardMessage(TelegramMethod[Message]): """ - Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent :class:`aiogram.types.message.Message` is returned. + 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. Source: https://core.telegram.org/bots/api#forwardmessage """ __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*""" - 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[bool] = None + 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="forwardMessage", data=data) + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + from_chat_id: ChatIdUnion, + message_id: int, + 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!!! + # 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, + 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 new file mode 100644 index 00000000..0a70b3c9 --- /dev/null +++ b/aiogram/methods/forward_messages.py @@ -0,0 +1,61 @@ +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion, MessageId +from .base import TelegramMethod + + +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] + __api_method__ = "forwardMessages" + + chat_id: ChatIdUnion + """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" + 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] + """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: 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: bool | None = None + """Protects the contents of the forwarded messages from forwarding and saving""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + 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!!! + # 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, + 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_business_connection.py b/aiogram/methods/get_business_connection.py new file mode 100644 index 00000000..97cb9ca8 --- /dev/null +++ b/aiogram/methods/get_business_connection.py @@ -0,0 +1,34 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from aiogram.types import BusinessConnection + +from .base import TelegramMethod + + +class GetBusinessConnection(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#getbusinessconnection + """ + + __returning__ = BusinessConnection + __api_method__ = "getBusinessConnection" + + 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 925e2638..41609377 100644 --- a/aiogram/methods/get_chat.py +++ b/aiogram/methods/get_chat.py @@ -1,27 +1,33 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from ..types import Chat -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatFullInfo, ChatIdUnion +from .base import TelegramMethod -class GetChat(TelegramMethod[Chat]): +class GetChat(TelegramMethod[ChatFullInfo]): """ - Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). 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. Source: https://core.telegram.org/bots/api#getchat """ - __returning__ = Chat + __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`)""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="getChat", data=data) + 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/get_chat_administrators.py b/aiogram/methods/get_chat_administrators.py index adc7ed6e..6185116e 100644 --- a/aiogram/methods/get_chat_administrators.py +++ b/aiogram/methods/get_chat_administrators.py @@ -1,56 +1,33 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Union +from typing import TYPE_CHECKING, Any -from ..types import ( - ChatMemberAdministrator, - ChatMemberBanned, - ChatMemberLeft, - ChatMemberMember, - ChatMemberOwner, - ChatMemberRestricted, -) -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +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. On success, returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned. + 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`)""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="getChatAdministrators", data=data) + 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/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 faf5dece..a2550af8 100644 --- a/aiogram/methods/get_chat_member.py +++ b/aiogram/methods/get_chat_member.py @@ -1,54 +1,35 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from ..types import ( - ChatMemberAdministrator, - ChatMemberBanned, - ChatMemberLeft, - ChatMemberMember, - ChatMemberOwner, - ChatMemberRestricted, -) -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +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. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. + 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="getChatMember", data=data) + def __init__( + __pydantic__self__, *, chat_id: ChatIdUnion, 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__(chat_id=chat_id, user_id=user_id, **__pydantic_kwargs) diff --git a/aiogram/methods/get_chat_member_count.py b/aiogram/methods/get_chat_member_count.py index 7b492998..0b3476fb 100644 --- a/aiogram/methods/get_chat_member_count.py +++ b/aiogram/methods/get_chat_member_count.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class GetChatMemberCount(TelegramMethod[int]): @@ -16,11 +14,20 @@ 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`)""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="getChatMemberCount", data=data) + 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/get_chat_members_count.py b/aiogram/methods/get_chat_members_count.py deleted file mode 100644 index 2eeadff8..00000000 --- a/aiogram/methods/get_chat_members_count.py +++ /dev/null @@ -1,30 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Dict, Union - -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot - - -class GetChatMembersCount(TelegramMethod[int]): - """ - .. warning: - - Renamed from :code:`getChatMembersCount` in 5.3 bot API version and can be removed in near future - - Use this method to get the number of members in a chat. Returns *Int* on success. - - Source: https://core.telegram.org/bots/api#getchatmembercount - """ - - __returning__ = int - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getChatMembersCount", data=data) diff --git a/aiogram/methods/get_chat_menu_button.py b/aiogram/methods/get_chat_menu_button.py new file mode 100644 index 00000000..dbb84124 --- /dev/null +++ b/aiogram/methods/get_chat_menu_button.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import ResultMenuButtonUnion +from .base import TelegramMethod + + +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__ = ResultMenuButtonUnion + __api_method__ = "getChatMenuButton" + + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_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, **__pydantic_kwargs) diff --git a/aiogram/methods/get_custom_emoji_stickers.py b/aiogram/methods/get_custom_emoji_stickers.py new file mode 100644 index 00000000..06c684eb --- /dev/null +++ b/aiogram/methods/get_custom_emoji_stickers.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import Sticker +from .base import TelegramMethod + + +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] + __api_method__ = "getCustomEmojiStickers" + + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, custom_emoji_ids: list[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__(custom_emoji_ids=custom_emoji_ids, **__pydantic_kwargs) diff --git a/aiogram/methods/get_file.py b/aiogram/methods/get_file.py index 163d484d..c96ff311 100644 --- a/aiogram/methods/get_file.py +++ b/aiogram/methods/get_file.py @@ -1,28 +1,32 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING, Any from ..types import File -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetFile(TelegramMethod[File]): """ - Use this method to get basic info 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. + 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. **Note:** This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received. Source: https://core.telegram.org/bots/api#getfile """ __returning__ = File + __api_method__ = "getFile" file_id: str - """File identifier to get info about""" + """File identifier to get information about""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="getFile", data=data) + def __init__(__pydantic__self__, *, file_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__(file_id=file_id, **__pydantic_kwargs) diff --git a/aiogram/methods/get_forum_topic_icon_stickers.py b/aiogram/methods/get_forum_topic_icon_stickers.py new file mode 100644 index 00000000..6b49dd8a --- /dev/null +++ b/aiogram/methods/get_forum_topic_icon_stickers.py @@ -0,0 +1,15 @@ +from __future__ import annotations + +from ..types import Sticker +from .base import TelegramMethod + + +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] + __api_method__ = "getForumTopicIconStickers" diff --git a/aiogram/methods/get_game_high_scores.py b/aiogram/methods/get_game_high_scores.py index 18a4eb2d..de2a26e9 100644 --- a/aiogram/methods/get_game_high_scores.py +++ b/aiogram/methods/get_game_high_scores.py @@ -1,35 +1,53 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, Any from ..types import GameHighScore -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +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. On success, returns an *Array* of :class:`aiogram.types.game_high_score.GameHighScore` objects. + 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. - This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and his neighbors are not among them. Please note that this behavior is subject to change. + This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change. 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="getGameHighScores", data=data) + def __init__( + __pydantic__self__, + *, + user_id: int, + chat_id: int | None = None, + message_id: int | None = None, + inline_message_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__( + user_id=user_id, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + **__pydantic_kwargs, + ) 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_me.py b/aiogram/methods/get_me.py index 63f901a8..c2cc52f9 100644 --- a/aiogram/methods/get_me.py +++ b/aiogram/methods/get_me.py @@ -1,12 +1,7 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict - from ..types import User -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetMe(TelegramMethod[User]): @@ -17,8 +12,4 @@ class GetMe(TelegramMethod[User]): """ __returning__ = User - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getMe", data=data) + __api_method__ = "getMe" diff --git a/aiogram/methods/get_my_commands.py b/aiogram/methods/get_my_commands.py index 61481a86..dc519186 100644 --- a/aiogram/methods/get_my_commands.py +++ b/aiogram/methods/get_my_commands.py @@ -1,29 +1,39 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, Any -from ..types import BotCommand, BotCommandScope -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +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 Array of :class:`aiogram.types.bot_command.BotCommand` on success. If commands aren't set, an empty list is returned. + 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[BotCommandScope] = 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="getMyCommands", data=data) + def __init__( + __pydantic__self__, + *, + scope: BotCommandScopeUnion | None = None, + language_code: 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__(scope=scope, language_code=language_code, **__pydantic_kwargs) diff --git a/aiogram/methods/get_my_default_administrator_rights.py b/aiogram/methods/get_my_default_administrator_rights.py new file mode 100644 index 00000000..c439f0ca --- /dev/null +++ b/aiogram/methods/get_my_default_administrator_rights.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import ChatAdministratorRights +from .base import TelegramMethod + + +class GetMyDefaultAdministratorRights(TelegramMethod[ChatAdministratorRights]): + """ + Use this method to get the current default administrator rights of the bot. Returns :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` on success. + + Source: https://core.telegram.org/bots/api#getmydefaultadministratorrights + """ + + __returning__ = ChatAdministratorRights + __api_method__ = "getMyDefaultAdministratorRights" + + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, for_channels: 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__(for_channels=for_channels, **__pydantic_kwargs) diff --git a/aiogram/methods/get_my_description.py b/aiogram/methods/get_my_description.py new file mode 100644 index 00000000..773241e2 --- /dev/null +++ b/aiogram/methods/get_my_description.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import BotDescription +from .base import TelegramMethod + + +class GetMyDescription(TelegramMethod[BotDescription]): + """ + Use this method to get the current bot description for the given user language. Returns :class:`aiogram.types.bot_description.BotDescription` on success. + + Source: https://core.telegram.org/bots/api#getmydescription + """ + + __returning__ = BotDescription + __api_method__ = "getMyDescription" + + language_code: str | None = None + """A two-letter ISO 639-1 language code or an empty string""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, language_code: 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__(language_code=language_code, **__pydantic_kwargs) diff --git a/aiogram/methods/get_my_name.py b/aiogram/methods/get_my_name.py new file mode 100644 index 00000000..68f0d8e8 --- /dev/null +++ b/aiogram/methods/get_my_name.py @@ -0,0 +1,31 @@ +from typing import TYPE_CHECKING, Any + +from ..types import BotName +from .base import TelegramMethod + + +class GetMyName(TelegramMethod[BotName]): + """ + Use this method to get the current bot name for the given user language. Returns :class:`aiogram.types.bot_name.BotName` on success. + + Source: https://core.telegram.org/bots/api#getmyname + """ + + __returning__ = BotName + __api_method__ = "getMyName" + + language_code: str | None = None + """A two-letter ISO 639-1 language code or an empty string""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, language_code: 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__(language_code=language_code, **__pydantic_kwargs) diff --git a/aiogram/methods/get_my_short_description.py b/aiogram/methods/get_my_short_description.py new file mode 100644 index 00000000..f94c2bb7 --- /dev/null +++ b/aiogram/methods/get_my_short_description.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import BotShortDescription +from .base import TelegramMethod + + +class GetMyShortDescription(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#getmyshortdescription + """ + + __returning__ = BotShortDescription + __api_method__ = "getMyShortDescription" + + language_code: str | None = None + """A two-letter ISO 639-1 language code or an empty string""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, language_code: 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__(language_code=language_code, **__pydantic_kwargs) 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 new file mode 100644 index 00000000..ac8dfdeb --- /dev/null +++ b/aiogram/methods/get_star_transactions.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import StarTransactions +from .base import TelegramMethod + + +class GetStarTransactions(TelegramMethod[StarTransactions]): + """ + Returns the bot's Telegram Star transactions in chronological order. On success, returns a :class:`aiogram.types.star_transactions.StarTransactions` object. + + Source: https://core.telegram.org/bots/api#getstartransactions + """ + + __returning__ = StarTransactions + __api_method__ = "getStarTransactions" + + offset: int | None = None + """Number of transactions to skip in the response""" + limit: int | None = None + """The maximum number of transactions 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__, + *, + 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__(offset=offset, limit=limit, **__pydantic_kwargs) diff --git a/aiogram/methods/get_sticker_set.py b/aiogram/methods/get_sticker_set.py index 35af44bf..2700e172 100644 --- a/aiogram/methods/get_sticker_set.py +++ b/aiogram/methods/get_sticker_set.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING, Any from ..types import StickerSet -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetStickerSet(TelegramMethod[StickerSet]): @@ -17,11 +14,18 @@ class GetStickerSet(TelegramMethod[StickerSet]): """ __returning__ = StickerSet + __api_method__ = "getStickerSet" name: str """Name of the sticker set""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="getStickerSet", data=data) + def __init__(__pydantic__self__, *, 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__(name=name, **__pydantic_kwargs) diff --git a/aiogram/methods/get_updates.py b/aiogram/methods/get_updates.py index ebed1d7a..30cab2af 100644 --- a/aiogram/methods/get_updates.py +++ b/aiogram/methods/get_updates.py @@ -1,17 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, Any from ..types import Update -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +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 `_). An Array of :class:`aiogram.types.update.Update` objects is returned. + Use this method to receive incoming updates using long polling (`wiki `_). Returns an Array of :class:`aiogram.types.update.Update` objects. **Notes** @@ -22,18 +19,39 @@ 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 - """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 forgotten.""" - limit: 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: 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 - """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 :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* (default). If not specified, the previous setting will be used.""" + 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.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="getUpdates", data=data) + def __init__( + __pydantic__self__, + *, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + offset=offset, + limit=limit, + timeout=timeout, + allowed_updates=allowed_updates, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/get_user_chat_boosts.py b/aiogram/methods/get_user_chat_boosts.py new file mode 100644 index 00000000..04313643 --- /dev/null +++ b/aiogram/methods/get_user_chat_boosts.py @@ -0,0 +1,33 @@ +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion, UserChatBoosts +from .base import TelegramMethod + + +class GetUserChatBoosts(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#getuserchatboosts + """ + + __returning__ = UserChatBoosts + __api_method__ = "getUserChatBoosts" + + 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""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: ChatIdUnion, 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__(chat_id=chat_id, user_id=user_id, **__pydantic_kwargs) 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 2bcc881a..0b314366 100644 --- a/aiogram/methods/get_user_profile_photos.py +++ b/aiogram/methods/get_user_profile_photos.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Any from ..types import UserProfilePhotos -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetUserProfilePhotos(TelegramMethod[UserProfilePhotos]): @@ -17,15 +14,29 @@ class GetUserProfilePhotos(TelegramMethod[UserProfilePhotos]): """ __returning__ = UserProfilePhotos + __api_method__ = "getUserProfilePhotos" 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.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="getUserProfilePhotos", data=data) + 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_webhook_info.py b/aiogram/methods/get_webhook_info.py index 6544cf83..c9f0e46f 100644 --- a/aiogram/methods/get_webhook_info.py +++ b/aiogram/methods/get_webhook_info.py @@ -1,12 +1,7 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict - from ..types import WebhookInfo -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetWebhookInfo(TelegramMethod[WebhookInfo]): @@ -17,8 +12,4 @@ class GetWebhookInfo(TelegramMethod[WebhookInfo]): """ __returning__ = WebhookInfo - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getWebhookInfo", data=data) + __api_method__ = "getWebhookInfo" 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 new file mode 100644 index 00000000..e2a1cd26 --- /dev/null +++ b/aiogram/methods/hide_general_forum_topic.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion +from .base import TelegramMethod + + +class HideGeneralForumTopic(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#hidegeneralforumtopic + """ + + __returning__ = bool + __api_method__ = "hideGeneralForumTopic" + + chat_id: ChatIdUnion + """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + 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/kick_chat_member.py b/aiogram/methods/kick_chat_member.py deleted file mode 100644 index 13ab1931..00000000 --- a/aiogram/methods/kick_chat_member.py +++ /dev/null @@ -1,37 +0,0 @@ -from __future__ import annotations - -import datetime -from typing import TYPE_CHECKING, Any, Dict, Optional, Union - -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot - - -class KickChatMember(TelegramMethod[bool]): - """ - .. warning: - - Renamed from :code:`kickChatMember` in 5.3 bot API version and can be removed in near future - - 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. - - Source: https://core.telegram.org/bots/api#banchatmember - """ - - __returning__ = bool - - chat_id: Union[int, str] - """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 - """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 - """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="kickChatMember", data=data) diff --git a/aiogram/methods/leave_chat.py b/aiogram/methods/leave_chat.py index 748c25c6..7ee0a3c2 100644 --- a/aiogram/methods/leave_chat.py +++ b/aiogram/methods/leave_chat.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class LeaveChat(TelegramMethod[bool]): @@ -16,11 +14,20 @@ 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.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="leaveChat", data=data) + 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/log_out.py b/aiogram/methods/log_out.py index 02c76ed2..2a626535 100644 --- a/aiogram/methods/log_out.py +++ b/aiogram/methods/log_out.py @@ -1,11 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict - -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class LogOut(TelegramMethod[bool]): @@ -16,8 +11,4 @@ class LogOut(TelegramMethod[bool]): """ __returning__ = bool - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="logOut", data=data) + __api_method__ = "logOut" diff --git a/aiogram/methods/pin_chat_message.py b/aiogram/methods/pin_chat_message.py index 7c1ac735..ad113322 100644 --- a/aiogram/methods/pin_chat_message.py +++ b/aiogram/methods/pin_chat_message.py @@ -1,30 +1,51 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +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 """ __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 - """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.""" + 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.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="pinChatMessage", data=data) + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + message_id: int, + business_connection_id: str | None = None, + disable_notification: 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__( + 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 f2d8374f..6f8d4dbf 100644 --- a/aiogram/methods/promote_chat_member.py +++ b/aiogram/methods/promote_chat_member.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class PromoteChatMember(TelegramMethod[bool]): @@ -16,35 +14,98 @@ 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 - """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, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege""" - can_post_messages: Optional[bool] = None - """Pass :code:`True`, if the administrator can create channel posts, channels only""" - can_edit_messages: Optional[bool] = None - """Pass :code:`True`, if the administrator can edit messages of other users and can pin messages, channels only""" - can_delete_messages: Optional[bool] = None - """Pass :code:`True`, if the administrator can delete messages of other users""" - can_manage_voice_chats: Optional[bool] = None - """Pass :code:`True`, if the administrator can manage voice chats""" - can_restrict_members: Optional[bool] = None - """Pass :code:`True`, if the administrator can restrict, ban or unban chat members""" - can_promote_members: Optional[bool] = None - """Pass :code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)""" - can_change_info: Optional[bool] = None - """Pass :code:`True`, if the administrator can change chat title, photo and other settings""" - can_invite_users: Optional[bool] = None - """Pass :code:`True`, if the administrator can invite new users to the chat""" - can_pin_messages: Optional[bool] = None - """Pass :code:`True`, if the administrator can pin messages, supergroups only""" + is_anonymous: bool | None = None + """Pass :code:`True` if the administrator's presence in the chat is hidden""" + 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: bool | None = None + """Pass :code:`True` if the administrator can manage video chats""" + 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: bool | None = None + """Pass :code:`True` if the administrator can change chat title, photo and other settings""" + can_invite_users: bool | None = None + """Pass :code:`True` if the administrator can invite new users to the chat""" + can_post_stories: bool | None = None + """Pass :code:`True` if the administrator can post stories to the chat""" + 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: bool | None = None + """Pass :code:`True` if the administrator can delete stories posted by other users""" + 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: bool | None = None + """Pass :code:`True` if the administrator can pin messages; for supergroups only""" + 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="promoteChatMember", data=data) + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + user_id: int, + 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!!! + # 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, + is_anonymous=is_anonymous, + can_manage_chat=can_manage_chat, + can_delete_messages=can_delete_messages, + can_manage_video_chats=can_manage_video_chats, + can_restrict_members=can_restrict_members, + can_promote_members=can_promote_members, + can_change_info=can_change_info, + can_invite_users=can_invite_users, + can_post_stories=can_post_stories, + can_edit_stories=can_edit_stories, + can_delete_stories=can_delete_stories, + can_post_messages=can_post_messages, + 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/refund_star_payment.py b/aiogram/methods/refund_star_payment.py new file mode 100644 index 00000000..495cc9e0 --- /dev/null +++ b/aiogram/methods/refund_star_payment.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class RefundStarPayment(TelegramMethod[bool]): + """ + Refunds a successful payment in `Telegram Stars `_. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#refundstarpayment + """ + + __returning__ = bool + __api_method__ = "refundStarPayment" + + user_id: int + """Identifier of the user whose payment will be refunded""" + telegram_payment_charge_id: str + """Telegram payment identifier""" + + 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, + **__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, + **__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 new file mode 100644 index 00000000..b67adfaa --- /dev/null +++ b/aiogram/methods/reopen_forum_topic.py @@ -0,0 +1,41 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion +from .base import TelegramMethod + + +class ReopenForumTopic(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#reopenforumtopic + """ + + __returning__ = bool + __api_method__ = "reopenForumTopic" + + 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""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + message_thread_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__( + chat_id=chat_id, message_thread_id=message_thread_id, **__pydantic_kwargs + ) diff --git a/aiogram/methods/reopen_general_forum_topic.py b/aiogram/methods/reopen_general_forum_topic.py new file mode 100644 index 00000000..670ab3bc --- /dev/null +++ b/aiogram/methods/reopen_general_forum_topic.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion +from .base import TelegramMethod + + +class ReopenGeneralForumTopic(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#reopengeneralforumtopic + """ + + __returning__ = bool + __api_method__ = "reopenGeneralForumTopic" + + chat_id: ChatIdUnion + """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + 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/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/replace_sticker_in_set.py b/aiogram/methods/replace_sticker_in_set.py new file mode 100644 index 00000000..f46eef2f --- /dev/null +++ b/aiogram/methods/replace_sticker_in_set.py @@ -0,0 +1,51 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import InputSticker +from .base import TelegramMethod + + +class ReplaceStickerInSet(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#replacestickerinset + """ + + __returning__ = bool + __api_method__ = "replaceStickerInSet" + + user_id: int + """User identifier of the sticker set owner""" + name: str + """Sticker set name""" + old_sticker: str + """File identifier of the replaced sticker""" + sticker: InputSticker + """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.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + user_id: int, + name: str, + old_sticker: str, + sticker: InputSticker, + **__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, + name=name, + old_sticker=old_sticker, + sticker=sticker, + **__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 e7ad4a75..88e9b957 100644 --- a/aiogram/methods/restrict_chat_member.py +++ b/aiogram/methods/restrict_chat_member.py @@ -1,13 +1,9 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import ChatPermissions -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion, ChatPermissions, DateTimeUnion +from .base import TelegramMethod class RestrictChatMember(TelegramMethod[bool]): @@ -18,17 +14,42 @@ 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""" - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = 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""" + 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: 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="restrictChatMember", data=data) + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + user_id: int, + permissions: ChatPermissions, + use_independent_chat_permissions: bool | None = None, + until_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, + user_id=user_id, + permissions=permissions, + use_independent_chat_permissions=use_independent_chat_permissions, + until_date=until_date, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/revoke_chat_invite_link.py b/aiogram/methods/revoke_chat_invite_link.py index c644d8a4..402750f1 100644 --- a/aiogram/methods/revoke_chat_invite_link.py +++ b/aiogram/methods/revoke_chat_invite_link.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from ..types import ChatInviteLink -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion, ChatInviteLink +from .base import TelegramMethod class RevokeChatInviteLink(TelegramMethod[ChatInviteLink]): @@ -17,13 +14,22 @@ 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="revokeChatInviteLink", data=data) + def __init__( + __pydantic__self__, *, chat_id: ChatIdUnion, invite_link: 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__(chat_id=chat_id, invite_link=invite_link, **__pydantic_kwargs) 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 97b483a4..931e88c7 100644 --- a/aiogram/methods/send_animation.py +++ b/aiogram/methods/send_animation.py @@ -1,21 +1,21 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Any +from pydantic import Field + +from ..client.default import Default from ..types import ( - UNSET, - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, InputFile, + InputFileUnion, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, + ReplyParameters, + SuggestedPostParameters, ) -from .base import Request, TelegramMethod, prepare_file, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SendAnimation(TelegramMethod[Message]): @@ -26,47 +26,120 @@ 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 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 info on Sending Files » `""" - duration: Optional[int] = None + 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: 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""" + 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""" - thumb: Optional[Union[InputFile, str]] = 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 info on Sending Files » `""" - caption: Optional[str] = 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: str | None = None """Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + 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*""" - disable_notification: Optional[bool] = None + 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: bool | None = None + """Pass :code:`True` if the animation needs to be covered with a spoiler animation""" + 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 | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """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.""" + 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""" + 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: 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"animation", "thumb"}) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the message is a reply, ID of the original message - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="caption_entities" - ) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="animation", value=self.animation) - prepare_file(data=data, files=files, name="thumb", value=self.thumb) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="sendAnimation", data=data, files=files) + def __init__( + __pydantic__self__, + *, + 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!!! + # 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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_audio.py b/aiogram/methods/send_audio.py index 16b24723..687d8389 100644 --- a/aiogram/methods/send_audio.py +++ b/aiogram/methods/send_audio.py @@ -1,21 +1,21 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Any +from pydantic import Field + +from ..client.default import Default from ..types import ( - UNSET, - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, InputFile, + InputFileUnion, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, + ReplyParameters, + SuggestedPostParameters, ) -from .base import Request, TelegramMethod, prepare_file, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SendAudio(TelegramMethod[Message]): @@ -27,47 +27,112 @@ 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 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 info on Sending Files » `""" - caption: Optional[str] = None + 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: 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""" + caption: str | None = None """Audio caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + 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""" - thumb: Optional[Union[InputFile, str]] = 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 info on Sending Files » `""" - disable_notification: Optional[bool] = 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: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """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.""" + 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""" + 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: 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"audio", "thumb"}) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the message is a reply, ID of the original message - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="caption_entities" - ) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="audio", value=self.audio) - prepare_file(data=data, files=files, name="thumb", value=self.thumb) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="sendAudio", data=data, files=files) + def __init__( + __pydantic__self__, + *, + 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!!! + # 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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_chat_action.py b/aiogram/methods/send_chat_action.py index 9eb22413..4cc22ad3 100644 --- a/aiogram/methods/send_chat_action.py +++ b/aiogram/methods/send_chat_action.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class SendChatAction(TelegramMethod[bool]): @@ -20,13 +18,38 @@ 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: str | None = None + """Unique identifier of the business connection on behalf of which the action will be sent""" + 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="sendChatAction", data=data) + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + action: str, + business_connection_id: str | None = None, + message_thread_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, + action=action, + business_connection_id=business_connection_id, + message_thread_id=message_thread_id, + **__pydantic_kwargs, + ) 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 d0cb4ccb..1d61b52e 100644 --- a/aiogram/methods/send_contact.py +++ b/aiogram/methods/send_contact.py @@ -1,18 +1,18 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, 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 Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SendContact(TelegramMethod[Message]): @@ -23,31 +23,96 @@ 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""" - last_name: 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""" + 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[bool] = None + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove keyboard or to force a reply from the user.""" + 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""" + 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: 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the message is a reply, ID of the original message - return Request(method="sendContact", data=data) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + 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, + **__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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_dice.py b/aiogram/methods/send_dice.py index dd844534..7abecceb 100644 --- a/aiogram/methods/send_dice.py +++ b/aiogram/methods/send_dice.py @@ -1,18 +1,18 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, 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 Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SendDice(TelegramMethod[Message]): @@ -23,25 +23,84 @@ 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`)""" - emoji: 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""" + 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[bool] = None + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """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.""" + 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""" + 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: 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the message is a reply, ID of the original message - return Request(method="sendDice", data=data) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + 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!!! + # 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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_document.py b/aiogram/methods/send_document.py index 17f38dfb..bd03df8b 100644 --- a/aiogram/methods/send_document.py +++ b/aiogram/methods/send_document.py @@ -1,21 +1,21 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Any +from pydantic import Field + +from ..client.default import Default from ..types import ( - UNSET, - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, InputFile, + InputFileUnion, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, + ReplyParameters, + SuggestedPostParameters, ) -from .base import Request, TelegramMethod, prepare_file, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SendDocument(TelegramMethod[Message]): @@ -26,43 +26,104 @@ 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] - """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 info on Sending Files » `""" - thumb: Optional[Union[InputFile, str]] = 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 info on Sending Files » `""" - caption: Optional[str] = None + 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: 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""" + 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: str | None = None """Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + 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[bool] = None + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """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.""" + 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""" + 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: 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"document", "thumb"}) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the message is a reply, ID of the original message - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="caption_entities" - ) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="document", value=self.document) - prepare_file(data=data, files=files, name="thumb", value=self.thumb) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="sendDocument", data=data, files=files) + def __init__( + __pydantic__self__, + *, + 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!!! + # 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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_game.py b/aiogram/methods/send_game.py index ba430845..dfea029c 100644 --- a/aiogram/methods/send_game.py +++ b/aiogram/methods/send_game.py @@ -1,12 +1,12 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Any -from ..types import InlineKeyboardMarkup, Message -from .base import Request, TelegramMethod +from pydantic import Field -if TYPE_CHECKING: - from ..client.bot import Bot +from ..client.default import Default +from ..types import InlineKeyboardMarkup, Message, ReplyParameters +from .base import TelegramMethod class SendGame(TelegramMethod[Message]): @@ -17,23 +17,76 @@ class SendGame(TelegramMethod[Message]): """ __returning__ = 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 `_.""" - disable_notification: Optional[bool] = None + """Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_.""" + 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""" + 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 | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[InlineKeyboardMarkup] = 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_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: ReplyParameters | None = None + """Description of the message to reply to""" + 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the message is a reply, ID of the original message - return Request(method="sendGame", data=data) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: int, + 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, + **__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, + 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, + **__pydantic_kwargs, + ) 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 95c61ef6..0c1d6bea 100644 --- a/aiogram/methods/send_invoice.py +++ b/aiogram/methods/send_invoice.py @@ -1,12 +1,19 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import InlineKeyboardMarkup, LabeledPrice, Message -from .base import Request, TelegramMethod +from pydantic import Field -if TYPE_CHECKING: - from ..client.bot import Bot +from ..client.default import Default +from ..types import ( + ChatIdUnion, + InlineKeyboardMarkup, + LabeledPrice, + Message, + ReplyParameters, + SuggestedPostParameters, +) +from .base import TelegramMethod class SendInvoice(TelegramMethod[Message]): @@ -17,63 +24,160 @@ 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.""" - provider_token: str - """Payments 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.""" currency: str - """Three-letter ISO 4217 currency code, see `more on currencies `_""" - prices: List[LabeledPrice] - """Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)""" - max_tip_amount: Optional[int] = 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""" - suggested_tip_amounts: Optional[List[int]] = None + """Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.""" + 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: 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: 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: 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 - """A 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 + 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: 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""" - photo_width: Optional[int] = None + photo_size: int | None = None + """Photo size in bytes""" + photo_width: int | None = None """Photo width""" - photo_height: Optional[int] = None + photo_height: int | None = None """Photo height""" - need_name: Optional[bool] = None - """Pass :code:`True`, if you require the user's full name to complete the order""" - need_phone_number: Optional[bool] = None - """Pass :code:`True`, if you require the user's phone number to complete the order""" - need_email: Optional[bool] = None - """Pass :code:`True`, if you require the user's email address to complete the order""" - need_shipping_address: Optional[bool] = None - """Pass :code:`True`, if you require the user's shipping address to complete the order""" - send_phone_number_to_provider: Optional[bool] = None - """Pass :code:`True`, if user's phone number should be sent to provider""" - send_email_to_provider: Optional[bool] = None - """Pass :code:`True`, if user's email address should be sent to provider""" - is_flexible: Optional[bool] = None - """Pass :code:`True`, if the final price depends on the shipping method""" - disable_notification: 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: 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: 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: 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: 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: 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: bool | None = None + """Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_.""" + 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 | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[InlineKeyboardMarkup] = 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_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""" + 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: 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the message is a reply, ID of the original message - return Request(method="sendInvoice", data=data) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + 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, + **__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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_location.py b/aiogram/methods/send_location.py index 225f23eb..4a8ee223 100644 --- a/aiogram/methods/send_location.py +++ b/aiogram/methods/send_location.py @@ -1,18 +1,18 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, 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 Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SendLocation(TelegramMethod[Message]): @@ -23,35 +23,104 @@ 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""" - horizontal_accuracy: Optional[float] = 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""" + horizontal_accuracy: float | None = None """The radius of uncertainty for the location, measured in meters; 0-1500""" - live_period: Optional[int] = None - """Period in seconds for which the location will be updated (see `Live Locations `_, should be between 60 and 86400.""" - heading: 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: 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[bool] = None + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """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.""" + 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""" + 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: 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the message is a reply, ID of the original message - return Request(method="sendLocation", data=data) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + 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, + **__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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_media_group.py b/aiogram/methods/send_media_group.py index 7d5b4502..d5d57749 100644 --- a/aiogram/methods/send_media_group.py +++ b/aiogram/methods/send_media_group.py @@ -1,48 +1,92 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import ( - InputFile, - InputMediaAudio, - InputMediaDocument, - InputMediaPhoto, - InputMediaVideo, - Message, -) -from .base import Request, TelegramMethod, prepare_input_media, prepare_parse_mode +from pydantic import Field -if TYPE_CHECKING: - from ..client.bot import Bot +from ..client.default import Default +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""" - 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 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 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[bool] = None + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent messages from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the messages are a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" + 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: ReplyParameters | None = None + """Description of the message to reply to""" + 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - prepare_parse_mode(bot, data["media"]) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the messages are a reply, ID of the original message - files: Dict[str, InputFile] = {} - prepare_input_media(data, files) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" - return Request(method="sendMediaGroup", data=data, files=files) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + 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!!! + # 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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_message.py b/aiogram/methods/send_message.py index d0269317..0997803e 100644 --- a/aiogram/methods/send_message.py +++ b/aiogram/methods/send_message.py @@ -1,20 +1,20 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Any +from pydantic import Field + +from ..client.default import Default from ..types import ( - UNSET, - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, + LinkPreviewOptions, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, + ReplyParameters, + SuggestedPostParameters, ) -from .base import Request, TelegramMethod, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SendMessage(TelegramMethod[Message]): @@ -25,35 +25,105 @@ 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""" - parse_mode: Optional[str] = UNSET + 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""" + 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*""" - disable_web_page_preview: Optional[bool] = None - """Disables link previews for links in this message""" - disable_notification: Optional[bool] = None + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview") + """Link preview generation options for the message""" + 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 | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """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.""" + 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""" + 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: 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + 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 - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="entities" - ) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the message is a reply, ID of the original message - return Request(method="sendMessage", data=data) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + 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, + **__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, + 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, + **__pydantic_kwargs, + ) 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 new file mode 100644 index 00000000..3d9cfec6 --- /dev/null +++ b/aiogram/methods/send_paid_media.py @@ -0,0 +1,111 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import ( + ChatIdUnion, + InputPaidMediaUnion, + Message, + MessageEntity, + ReplyMarkupUnion, + ReplyParameters, + SuggestedPostParameters, +) +from .base import TelegramMethod + + +class SendPaidMedia(TelegramMethod[Message]): + """ + 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 + """ + + __returning__ = Message + __api_method__ = "sendPaidMedia" + + chat_id: ChatIdUnion + """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance.""" + star_count: int + """The number of Telegram Stars that must be paid to buy access to the media; 1-25000""" + media: list[InputPaidMediaUnion] + """A JSON-serialized array describing the media to be sent; up to 10 items""" + 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: str | None = None + """Mode for parsing entities in the media 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*""" + show_caption_above_media: bool | None = None + """Pass :code:`True`, if the caption must be shown above the message media""" + 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""" + 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + 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, + **__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, + 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 faf9353f..83480f6a 100644 --- a/aiogram/methods/send_photo.py +++ b/aiogram/methods/send_photo.py @@ -1,21 +1,20 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Any +from pydantic import Field + +from ..client.default import Default from ..types import ( - UNSET, - ForceReply, - InlineKeyboardMarkup, - InputFile, + ChatIdUnion, + InputFileUnion, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, + ReplyParameters, + SuggestedPostParameters, ) -from .base import Request, TelegramMethod, prepare_file, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SendPhoto(TelegramMethod[Message]): @@ -26,38 +25,104 @@ 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 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 info on Sending Files » `""" - caption: Optional[str] = None + 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: 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""" + 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[str] = UNSET + 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*""" - disable_notification: Optional[bool] = None + 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: bool | None = None + """Pass :code:`True` if the photo needs to be covered with a spoiler animation""" + 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 | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """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.""" + 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""" + 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: 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"photo"}) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the message is a reply, ID of the original message - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="caption_entities" - ) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="photo", value=self.photo) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="sendPhoto", data=data, files=files) + def __init__( + __pydantic__self__, + *, + 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!!! + # 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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_poll.py b/aiogram/methods/send_poll.py index 85455b0d..b089b181 100644 --- a/aiogram/methods/send_poll.py +++ b/aiogram/methods/send_poll.py @@ -1,21 +1,20 @@ 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 + +from ..client.default import Default from ..types import ( - UNSET, - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, + DateTimeUnion, + InputPollOptionUnion, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, + ReplyParameters, ) -from .base import Request, TelegramMethod, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SendPoll(TelegramMethod[Message]): @@ -26,54 +25,163 @@ 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[str] - """A JSON-serialized list of answer options, 2-10 strings 1-100 characters each""" - is_anonymous: Optional[bool] = 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: 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: 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: 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[str] = UNSET + 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 - """A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of *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 - """Pass :code:`True`, if the poll needs to be immediately closed. This can be useful for poll preview.""" - disable_notification: Optional[bool] = 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: 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.""" + 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[bool] = None + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """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.""" + 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: ReplyParameters | None = None + """Description of the message to reply to""" + 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + 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 - prepare_parse_mode( - bot, - data, - parse_mode_property="explanation_parse_mode", - entities_property="explanation_entities", - ) +.. 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 - return Request(method="sendPoll", data=data) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + 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, + **__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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_sticker.py b/aiogram/methods/send_sticker.py index 573040e1..683b3970 100644 --- a/aiogram/methods/send_sticker.py +++ b/aiogram/methods/send_sticker.py @@ -1,19 +1,19 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, 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 Request, TelegramMethod, prepare_file - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SendSticker(TelegramMethod[Message]): @@ -24,28 +24,88 @@ 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 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 file from the Internet, or upload a new one using multipart/form-data. :ref:`More info on Sending Files » `""" - disable_notification: Optional[bool] = None + 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: 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""" + emoji: str | None = None + """Emoji associated with the sticker; only for just uploaded stickers""" + 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 | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """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.""" + 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""" + 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: 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"sticker"}) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the message is a reply, ID of the original message - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="sticker", value=self.sticker) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" - return Request(method="sendSticker", data=data, files=files) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + 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!!! + # 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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_venue.py b/aiogram/methods/send_venue.py index df708ff8..677516f9 100644 --- a/aiogram/methods/send_venue.py +++ b/aiogram/methods/send_venue.py @@ -1,18 +1,18 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, 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 Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SendVenue(TelegramMethod[Message]): @@ -23,8 +23,9 @@ 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""" @@ -34,28 +35,100 @@ class SendVenue(TelegramMethod[Message]): """Name of the venue""" address: str """Address of the venue""" - foursquare_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: 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[bool] = None + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """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.""" + 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""" + 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: 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the message is a reply, ID of the original message - return Request(method="sendVenue", data=data) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + 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, + **__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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_video.py b/aiogram/methods/send_video.py index 4ed09cf1..c8112e21 100644 --- a/aiogram/methods/send_video.py +++ b/aiogram/methods/send_video.py @@ -1,74 +1,158 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Any +from pydantic import Field + +from ..client.default import Default from ..types import ( - UNSET, - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, + DateTimeUnion, InputFile, + InputFileUnion, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, + ReplyParameters, + SuggestedPostParameters, ) -from .base import Request, TelegramMethod, prepare_file, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SendVideo(TelegramMethod[Message]): """ - Use this method to send video files, Telegram clients support mp4 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. + 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 """ __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 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 info on Sending Files » `""" - duration: Optional[int] = None + 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: 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""" + 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""" - thumb: Optional[Union[InputFile, str]] = 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 info on Sending Files » `""" - caption: Optional[str] = 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 » `""" + 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[str] = UNSET + 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*""" - supports_streaming: Optional[bool] = None - """Pass :code:`True`, if the uploaded video is suitable for streaming""" - disable_notification: Optional[bool] = None + 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: bool | None = None + """Pass :code:`True` if the video needs to be covered with a spoiler animation""" + supports_streaming: bool | None = None + """Pass :code:`True` if the uploaded video is suitable for streaming""" + 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 | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """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.""" + 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""" + 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: 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"video", "thumb"}) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the message is a reply, ID of the original message - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="caption_entities" - ) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="video", value=self.video) - prepare_file(data=data, files=files, name="thumb", value=self.thumb) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="sendVideo", data=data, files=files) + def __init__( + __pydantic__self__, + *, + 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!!! + # 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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_video_note.py b/aiogram/methods/send_video_note.py index 7431d582..2f5195e7 100644 --- a/aiogram/methods/send_video_note.py +++ b/aiogram/methods/send_video_note.py @@ -1,58 +1,120 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, 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 Request, TelegramMethod, prepare_file - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SendVideoNote(TelegramMethod[Message]): """ - As of `v.4.0 `_, Telegram clients support rounded square mp4 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. + 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 """ __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 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 info on Sending Files » `. Sending video notes by a URL is currently unsupported""" - duration: Optional[int] = None + 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: 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""" + 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""" - thumb: Optional[Union[InputFile, str]] = 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 info on Sending Files » `""" - disable_notification: Optional[bool] = 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: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """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.""" + 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""" + 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: 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"video_note", "thumb"}) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the message is a reply, ID of the original message - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="video_note", value=self.video_note) - prepare_file(data=data, files=files, name="thumb", value=self.thumb) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" - return Request(method="sendVideoNote", data=data, files=files) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + 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!!! + # 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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_voice.py b/aiogram/methods/send_voice.py index e753e9e1..c1ddd298 100644 --- a/aiogram/methods/send_voice.py +++ b/aiogram/methods/send_voice.py @@ -1,65 +1,124 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Any +from pydantic import Field + +from ..client.default import Default from ..types import ( - UNSET, - ForceReply, - InlineKeyboardMarkup, - InputFile, + ChatIdUnion, + InputFileUnion, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, + ReplyParameters, + SuggestedPostParameters, ) -from .base import Request, TelegramMethod, prepare_file, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SendVoice(TelegramMethod[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 (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. + 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 """ __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] - """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 info on Sending Files » `""" - caption: Optional[str] = None + 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: 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""" + caption: str | None = None """Voice message caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + 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[bool] = None + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_to_message_id: Optional[int] = None - """If the message is a reply, ID of the original message""" - allow_sending_without_reply: Optional[bool] = None - """Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """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.""" + 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""" + 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: 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: 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 - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"voice"}) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """If the message is a reply, ID of the original message - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="caption_entities" - ) +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="voice", value=self.voice) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="sendVoice", data=data, files=files) + def __init__( + __pydantic__self__, + *, + 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!!! + # 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, + 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, + **__pydantic_kwargs, + ) 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 7522a237..d18a41d9 100644 --- a/aiogram/methods/set_chat_administrator_custom_title.py +++ b/aiogram/methods/set_chat_administrator_custom_title.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class SetChatAdministratorCustomTitle(TelegramMethod[bool]): @@ -16,15 +14,31 @@ 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""" custom_title: str """New custom title for the administrator; 0-16 characters, emoji are not allowed""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="setChatAdministratorCustomTitle", data=data) + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + user_id: int, + custom_title: 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__( + chat_id=chat_id, user_id=user_id, custom_title=custom_title, **__pydantic_kwargs + ) diff --git a/aiogram/methods/set_chat_description.py b/aiogram/methods/set_chat_description.py index a4014f79..f877e653 100644 --- a/aiogram/methods/set_chat_description.py +++ b/aiogram/methods/set_chat_description.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class SetChatDescription(TelegramMethod[bool]): @@ -16,13 +14,26 @@ 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="setChatDescription", data=data) + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + 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, description=description, **__pydantic_kwargs) 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 new file mode 100644 index 00000000..ced4e56f --- /dev/null +++ b/aiogram/methods/set_chat_menu_button.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import MenuButtonUnion +from .base import TelegramMethod + + +class SetChatMenuButton(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#setchatmenubutton + """ + + __returning__ = bool + __api_method__ = "setChatMenuButton" + + 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: int | None = None, + menu_button: MenuButtonUnion | 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, menu_button=menu_button, **__pydantic_kwargs) diff --git a/aiogram/methods/set_chat_permissions.py b/aiogram/methods/set_chat_permissions.py index 9ca0267f..fdc58352 100644 --- a/aiogram/methods/set_chat_permissions.py +++ b/aiogram/methods/set_chat_permissions.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from ..types import ChatPermissions -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion, ChatPermissions +from .base import TelegramMethod class SetChatPermissions(TelegramMethod[bool]): @@ -17,13 +14,34 @@ 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: 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.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="setChatPermissions", data=data) + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + permissions: ChatPermissions, + use_independent_chat_permissions: 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__( + chat_id=chat_id, + permissions=permissions, + use_independent_chat_permissions=use_independent_chat_permissions, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/set_chat_photo.py b/aiogram/methods/set_chat_photo.py index dc9aef57..7d6a4b79 100644 --- a/aiogram/methods/set_chat_photo.py +++ b/aiogram/methods/set_chat_photo.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from ..types import InputFile -from .base import Request, TelegramMethod, prepare_file - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion, InputFile +from .base import TelegramMethod class SetChatPhoto(TelegramMethod[bool]): @@ -17,16 +14,22 @@ 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"photo"}) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="photo", value=self.photo) + def __init__( + __pydantic__self__, *, chat_id: ChatIdUnion, photo: InputFile, **__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 - return Request(method="setChatPhoto", data=data, files=files) + super().__init__(chat_id=chat_id, photo=photo, **__pydantic_kwargs) diff --git a/aiogram/methods/set_chat_sticker_set.py b/aiogram/methods/set_chat_sticker_set.py index 089083f6..d453ddc5 100644 --- a/aiogram/methods/set_chat_sticker_set.py +++ b/aiogram/methods/set_chat_sticker_set.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class SetChatStickerSet(TelegramMethod[bool]): @@ -16,13 +14,28 @@ 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="setChatStickerSet", data=data) + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + sticker_set_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__( + chat_id=chat_id, sticker_set_name=sticker_set_name, **__pydantic_kwargs + ) diff --git a/aiogram/methods/set_chat_title.py b/aiogram/methods/set_chat_title.py index c4793233..5cf29ea9 100644 --- a/aiogram/methods/set_chat_title.py +++ b/aiogram/methods/set_chat_title.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class SetChatTitle(TelegramMethod[bool]): @@ -16,13 +14,22 @@ 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-255 characters""" + """New chat title, 1-128 characters""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="setChatTitle", data=data) + def __init__( + __pydantic__self__, *, chat_id: ChatIdUnion, title: 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__(chat_id=chat_id, title=title, **__pydantic_kwargs) diff --git a/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py b/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py new file mode 100644 index 00000000..0259052d --- /dev/null +++ b/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py @@ -0,0 +1,38 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class SetCustomEmojiStickerSetThumbnail(TelegramMethod[bool]): + """ + Use this method to set the thumbnail of a custom emoji sticker set. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail + """ + + __returning__ = bool + __api_method__ = "setCustomEmojiStickerSetThumbnail" + + name: str + """Sticker set name""" + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + name: str, + custom_emoji_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__(name=name, custom_emoji_id=custom_emoji_id, **__pydantic_kwargs) diff --git a/aiogram/methods/set_game_score.py b/aiogram/methods/set_game_score.py index f1fe949b..86ba9d52 100644 --- a/aiogram/methods/set_game_score.py +++ b/aiogram/methods/set_game_score.py @@ -1,39 +1,63 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any from ..types import Message -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +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 - """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 - """Pass :code:`True`, if the game message should not be automatically edited to include the current scoreboard""" - chat_id: Optional[int] = 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: bool | None = None + """Pass :code:`True` if the game message should not be automatically edited to include the current scoreboard""" + 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="setGameScore", data=data) + def __init__( + __pydantic__self__, + *, + user_id: int, + score: int, + 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!!! + # 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, + score=score, + force=force, + disable_edit_message=disable_edit_message, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/set_message_reaction.py b/aiogram/methods/set_message_reaction.py new file mode 100644 index 00000000..f8a3c47e --- /dev/null +++ b/aiogram/methods/set_message_reaction.py @@ -0,0 +1,49 @@ +from typing import TYPE_CHECKING, Any + +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 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 + """ + + __returning__ = bool + __api_method__ = "setMessageReaction" + + 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + message_id: int, + reaction: list[ReactionTypeUnion] | None = None, + is_big: 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__( + chat_id=chat_id, + message_id=message_id, + reaction=reaction, + is_big=is_big, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/set_my_commands.py b/aiogram/methods/set_my_commands.py index 3dcebbb3..8f687e3f 100644 --- a/aiogram/methods/set_my_commands.py +++ b/aiogram/methods/set_my_commands.py @@ -1,31 +1,44 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, Any -from ..types import BotCommand, BotCommandScope -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import BotCommand, BotCommandScopeUnion +from .base import TelegramMethod class SetMyCommands(TelegramMethod[bool]): """ - Use this method to change the list of the bot's commands. See `https://core.telegram.org/bots#commands `_`https://core.telegram.org/bots#commands `_ for more details about bot commands. Returns :code:`True` on success. + 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. Source: https://core.telegram.org/bots/api#setmycommands """ __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[BotCommandScope] = 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="setMyCommands", data=data) + def __init__( + __pydantic__self__, + *, + commands: list[BotCommand], + scope: BotCommandScopeUnion | None = None, + language_code: 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__( + commands=commands, scope=scope, language_code=language_code, **__pydantic_kwargs + ) diff --git a/aiogram/methods/set_my_default_administrator_rights.py b/aiogram/methods/set_my_default_administrator_rights.py new file mode 100644 index 00000000..e2f46633 --- /dev/null +++ b/aiogram/methods/set_my_default_administrator_rights.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import ChatAdministratorRights +from .base import TelegramMethod + + +class SetMyDefaultAdministratorRights(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#setmydefaultadministratorrights + """ + + __returning__ = bool + __api_method__ = "setMyDefaultAdministratorRights" + + 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + rights: ChatAdministratorRights | None = None, + for_channels: 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__(rights=rights, for_channels=for_channels, **__pydantic_kwargs) diff --git a/aiogram/methods/set_my_description.py b/aiogram/methods/set_my_description.py new file mode 100644 index 00000000..457f8711 --- /dev/null +++ b/aiogram/methods/set_my_description.py @@ -0,0 +1,40 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class SetMyDescription(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#setmydescription + """ + + __returning__ = bool + __api_method__ = "setMyDescription" + + 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + description: str | None = None, + language_code: 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__( + description=description, language_code=language_code, **__pydantic_kwargs + ) diff --git a/aiogram/methods/set_my_name.py b/aiogram/methods/set_my_name.py new file mode 100644 index 00000000..86bcdbab --- /dev/null +++ b/aiogram/methods/set_my_name.py @@ -0,0 +1,36 @@ +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class SetMyName(TelegramMethod[bool]): + """ + Use this method to change the bot's name. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setmyname + """ + + __returning__ = bool + __api_method__ = "setMyName" + + 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + name: str | None = None, + language_code: 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, language_code=language_code, **__pydantic_kwargs) 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 new file mode 100644 index 00000000..0b0006cc --- /dev/null +++ b/aiogram/methods/set_my_short_description.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class SetMyShortDescription(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#setmyshortdescription + """ + + __returning__ = bool + __api_method__ = "setMyShortDescription" + + 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + short_description: str | None = None, + language_code: 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__( + short_description=short_description, + language_code=language_code, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/set_passport_data_errors.py b/aiogram/methods/set_passport_data_errors.py index 1f781b08..73f2b92d 100644 --- a/aiogram/methods/set_passport_data_errors.py +++ b/aiogram/methods/set_passport_data_errors.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List +from typing import TYPE_CHECKING, Any -from ..types import PassportElementError -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import PassportElementErrorUnion +from .base import TelegramMethod class SetPassportDataErrors(TelegramMethod[bool]): @@ -18,13 +15,26 @@ class SetPassportDataErrors(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setPassportDataErrors" user_id: int """User identifier""" - errors: List[PassportElementError] + errors: list[PassportElementErrorUnion] """A JSON-serialized array describing the errors""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="setPassportDataErrors", data=data) + def __init__( + __pydantic__self__, + *, + user_id: int, + errors: list[PassportElementErrorUnion], + **__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, errors=errors, **__pydantic_kwargs) diff --git a/aiogram/methods/set_sticker_emoji_list.py b/aiogram/methods/set_sticker_emoji_list.py new file mode 100644 index 00000000..64313cd3 --- /dev/null +++ b/aiogram/methods/set_sticker_emoji_list.py @@ -0,0 +1,34 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class SetStickerEmojiList(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#setstickeremojilist + """ + + __returning__ = bool + __api_method__ = "setStickerEmojiList" + + sticker: str + """File identifier of the sticker""" + emoji_list: list[str] + """A JSON-serialized list of 1-20 emoji associated with the sticker""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, sticker: str, emoji_list: list[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__(sticker=sticker, emoji_list=emoji_list, **__pydantic_kwargs) diff --git a/aiogram/methods/set_sticker_keywords.py b/aiogram/methods/set_sticker_keywords.py new file mode 100644 index 00000000..38516cd1 --- /dev/null +++ b/aiogram/methods/set_sticker_keywords.py @@ -0,0 +1,38 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class SetStickerKeywords(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#setstickerkeywords + """ + + __returning__ = bool + __api_method__ = "setStickerKeywords" + + sticker: str + """File identifier of the sticker""" + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + sticker: str, + keywords: list[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__(sticker=sticker, keywords=keywords, **__pydantic_kwargs) diff --git a/aiogram/methods/set_sticker_mask_position.py b/aiogram/methods/set_sticker_mask_position.py new file mode 100644 index 00000000..5ad0b4a7 --- /dev/null +++ b/aiogram/methods/set_sticker_mask_position.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import MaskPosition +from .base import TelegramMethod + + +class SetStickerMaskPosition(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#setstickermaskposition + """ + + __returning__ = bool + __api_method__ = "setStickerMaskPosition" + + sticker: str + """File identifier of the sticker""" + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + sticker: str, + mask_position: MaskPosition | 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__(sticker=sticker, mask_position=mask_position, **__pydantic_kwargs) diff --git a/aiogram/methods/set_sticker_position_in_set.py b/aiogram/methods/set_sticker_position_in_set.py index c607c0d5..8d30eab1 100644 --- a/aiogram/methods/set_sticker_position_in_set.py +++ b/aiogram/methods/set_sticker_position_in_set.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetStickerPositionInSet(TelegramMethod[bool]): @@ -16,13 +13,22 @@ class SetStickerPositionInSet(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setStickerPositionInSet" sticker: str """File identifier of the sticker""" position: int """New sticker position in the set, zero-based""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="setStickerPositionInSet", data=data) + def __init__( + __pydantic__self__, *, sticker: str, position: 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__(sticker=sticker, position=position, **__pydantic_kwargs) diff --git a/aiogram/methods/set_sticker_set_thumb.py b/aiogram/methods/set_sticker_set_thumb.py deleted file mode 100644 index 49ef7971..00000000 --- a/aiogram/methods/set_sticker_set_thumb.py +++ /dev/null @@ -1,34 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Dict, Optional, Union - -from ..types import InputFile -from .base import Request, TelegramMethod, prepare_file - -if TYPE_CHECKING: - from ..client.bot import Bot - - -class SetStickerSetThumb(TelegramMethod[bool]): - """ - Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickersetthumb - """ - - __returning__ = bool - - name: str - """Sticker set name""" - user_id: int - """User identifier of the sticker set owner""" - thumb: Optional[Union[InputFile, str]] = None - """A **PNG** image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a **TGS** animation with the 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 info on Sending Files » `. Animated sticker set thumbnails can't be uploaded via HTTP URL.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"thumb"}) - - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="thumb", value=self.thumb) - - return Request(method="setStickerSetThumb", data=data, files=files) diff --git a/aiogram/methods/set_sticker_set_thumbnail.py b/aiogram/methods/set_sticker_set_thumbnail.py new file mode 100644 index 00000000..40160baa --- /dev/null +++ b/aiogram/methods/set_sticker_set_thumbnail.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import InputFileUnion +from .base import TelegramMethod + + +class SetStickerSetThumbnail(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#setstickersetthumbnail + """ + + __returning__ = bool + __api_method__ = "setStickerSetThumbnail" + + name: str + """Sticker set name""" + 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: 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + name: str, + user_id: int, + format: str, + thumbnail: InputFileUnion | 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, user_id=user_id, format=format, thumbnail=thumbnail, **__pydantic_kwargs + ) diff --git a/aiogram/methods/set_sticker_set_title.py b/aiogram/methods/set_sticker_set_title.py new file mode 100644 index 00000000..ec25473a --- /dev/null +++ b/aiogram/methods/set_sticker_set_title.py @@ -0,0 +1,34 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class SetStickerSetTitle(TelegramMethod[bool]): + """ + Use this method to set the title of a created sticker set. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setstickersettitle + """ + + __returning__ = bool + __api_method__ = "setStickerSetTitle" + + name: str + """Sticker set name""" + title: str + """Sticker set title, 1-64 characters""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, name: str, title: 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__(name=name, title=title, **__pydantic_kwargs) 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 2b80dd17..566103a3 100644 --- a/aiogram/methods/set_webhook.py +++ b/aiogram/methods/set_webhook.py @@ -1,18 +1,15 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, Any from ..types import InputFile -from .base import Request, TelegramMethod, prepare_file - -if TYPE_CHECKING: - from ..client.bot import Bot +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. - If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. :code:`https://www.example.com/`. Since nobody else knows your bot's token, you can be pretty sure it's us. + 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** @@ -20,31 +17,57 @@ class SetWebhook(TelegramMethod[bool]): **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. - **3.** Ports currently supported *for Webhooks*: **443, 80, 88, 8443**. - **NEW!** If you're having any trouble setting up webhooks, please check out this `amazing guide to Webhooks `_. + **3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**. + If you're having any trouble setting up webhooks, please check out this `amazing guide to webhooks `_. Source: https://core.telegram.org/bots/api#setwebhook """ __returning__ = bool + __api_method__ = "setWebhook" url: str - """HTTPS url to send updates to. Use an empty string to remove webhook integration""" - certificate: Optional[InputFile] = None + """HTTPS URL to send updates to. Use an empty string to remove webhook integration""" + 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 - """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 - """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 :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* (default). If not specified, the previous setting will be used.""" - drop_pending_updates: Optional[bool] = 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: 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: bool | None = None """Pass :code:`True` to drop all pending updates""" + 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.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"certificate"}) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="certificate", value=self.certificate) + def __init__( + __pydantic__self__, + *, + url: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins - return Request(method="setWebhook", data=data, files=files) + super().__init__( + url=url, + certificate=certificate, + ip_address=ip_address, + max_connections=max_connections, + allowed_updates=allowed_updates, + drop_pending_updates=drop_pending_updates, + secret_token=secret_token, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/stop_message_live_location.py b/aiogram/methods/stop_message_live_location.py index 7b2ddca4..2d6bd2cd 100644 --- a/aiogram/methods/stop_message_live_location.py +++ b/aiogram/methods/stop_message_live_location.py @@ -1,33 +1,55 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import InlineKeyboardMarkup, Message -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +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" - chat_id: Optional[Union[int, 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: 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 - """A JSON-serialized object for a new `inline keyboard `_.""" + reply_markup: InlineKeyboardMarkup | None = None + """A JSON-serialized object for a new `inline keyboard `_.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="stopMessageLiveLocation", data=data) + def __init__( + __pydantic__self__, + *, + 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!!! + # 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, + inline_message_id=inline_message_id, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/stop_poll.py b/aiogram/methods/stop_poll.py index fa90766a..925dd0e9 100644 --- a/aiogram/methods/stop_poll.py +++ b/aiogram/methods/stop_poll.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import InlineKeyboardMarkup, Poll -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion, InlineKeyboardMarkup, Poll +from .base import TelegramMethod class StopPoll(TelegramMethod[Poll]): @@ -17,15 +14,38 @@ 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""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """A JSON-serialized object for a new message `inline keyboard `_.""" + 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: InlineKeyboardMarkup | None = None + """A JSON-serialized object for a new message `inline keyboard `_.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="stopPoll", data=data) + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + message_id: int, + business_connection_id: str | 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__( + chat_id=chat_id, + message_id=message_id, + business_connection_id=business_connection_id, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) 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 3fce083b..e7719845 100644 --- a/aiogram/methods/unban_chat_member.py +++ b/aiogram/methods/unban_chat_member.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class UnbanChatMember(TelegramMethod[bool]): @@ -16,15 +14,34 @@ 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="unbanChatMember", data=data) + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + user_id: int, + only_if_banned: 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__( + chat_id=chat_id, + user_id=user_id, + only_if_banned=only_if_banned, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/unban_chat_sender_chat.py b/aiogram/methods/unban_chat_sender_chat.py index 9da79e1f..b4f8343d 100644 --- a/aiogram/methods/unban_chat_sender_chat.py +++ b/aiogram/methods/unban_chat_sender_chat.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import ChatIdUnion +from .base import TelegramMethod class UnbanChatSenderChat(TelegramMethod[bool]): @@ -16,13 +14,26 @@ 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""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="unbanChatSenderChat", data=data) + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + sender_chat_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__(chat_id=chat_id, sender_chat_id=sender_chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/unhide_general_forum_topic.py b/aiogram/methods/unhide_general_forum_topic.py new file mode 100644 index 00000000..b0e1b58d --- /dev/null +++ b/aiogram/methods/unhide_general_forum_topic.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion +from .base import TelegramMethod + + +class UnhideGeneralForumTopic(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#unhidegeneralforumtopic + """ + + __returning__ = bool + __api_method__ = "unhideGeneralForumTopic" + + chat_id: ChatIdUnion + """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + 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/unpin_all_chat_messages.py b/aiogram/methods/unpin_all_chat_messages.py index 99a3a1f2..558ff2b5 100644 --- a/aiogram/methods/unpin_all_chat_messages.py +++ b/aiogram/methods/unpin_all_chat_messages.py @@ -1,26 +1,33 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +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 """ __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`)""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="unpinAllChatMessages", data=data) + 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/unpin_all_forum_topic_messages.py b/aiogram/methods/unpin_all_forum_topic_messages.py new file mode 100644 index 00000000..e3fba5aa --- /dev/null +++ b/aiogram/methods/unpin_all_forum_topic_messages.py @@ -0,0 +1,41 @@ +from __future__ import annotations + +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 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 + """ + + __returning__ = bool + __api_method__ = "unpinAllForumTopicMessages" + + 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""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + message_thread_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__( + chat_id=chat_id, message_thread_id=message_thread_id, **__pydantic_kwargs + ) diff --git a/aiogram/methods/unpin_all_general_forum_topic_messages.py b/aiogram/methods/unpin_all_general_forum_topic_messages.py new file mode 100644 index 00000000..1341832d --- /dev/null +++ b/aiogram/methods/unpin_all_general_forum_topic_messages.py @@ -0,0 +1,32 @@ +from typing import TYPE_CHECKING, Any + +from aiogram.methods import TelegramMethod + +from ..types import ChatIdUnion + + +class UnpinAllGeneralForumTopicMessages(TelegramMethod[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. + + Source: https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages + """ + + __returning__ = bool + __api_method__ = "unpinAllGeneralForumTopicMessages" + + chat_id: ChatIdUnion + """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + 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/unpin_chat_message.py b/aiogram/methods/unpin_chat_message.py index 098dba48..b7056367 100644 --- a/aiogram/methods/unpin_chat_message.py +++ b/aiogram/methods/unpin_chat_message.py @@ -1,28 +1,47 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +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 """ __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.""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - return Request(method="unpinChatMessage", data=data) + def __init__( + __pydantic__self__, + *, + 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, + 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/upload_sticker_file.py b/aiogram/methods/upload_sticker_file.py index 3d887abb..600f83ac 100644 --- a/aiogram/methods/upload_sticker_file.py +++ b/aiogram/methods/upload_sticker_file.py @@ -1,32 +1,47 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING, Any from ..types import File, InputFile -from .base import Request, TelegramMethod, prepare_file - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class UploadStickerFile(TelegramMethod[File]): """ - Use this method to upload a .PNG file with a sticker for later use in *createNewStickerSet* and *addStickerToSet* methods (can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success. + 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. Source: https://core.telegram.org/bots/api#uploadstickerfile """ __returning__ = File + __api_method__ = "uploadStickerFile" user_id: int """User identifier of sticker file owner""" - png_sticker: InputFile - """**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. :ref:`More info on Sending Files » `""" + sticker: InputFile + """A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See `https://core.telegram.org/stickers `_`https://core.telegram.org/stickers `_ for technical requirements. :ref:`More information on Sending Files » `""" + sticker_format: str + """Format of the sticker, must be one of 'static', 'animated', 'video'""" - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"png_sticker"}) + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="png_sticker", value=self.png_sticker) + def __init__( + __pydantic__self__, + *, + user_id: int, + sticker: InputFile, + sticker_format: 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 - return Request(method="uploadStickerFile", data=data, files=files) + super().__init__( + user_id=user_id, + sticker=sticker, + sticker_format=sticker_format, + **__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 ebf4c839..bfe0365a 100644 --- a/aiogram/types/__init__.py +++ b/aiogram/types/__init__.py @@ -1,18 +1,60 @@ +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 .base import UNSET, TelegramObject +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 from .bot_command import BotCommand from .bot_command_scope import BotCommandScope -from .bot_command_scope_all_chat_administrators import BotCommandScopeAllChatAdministrators +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 +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 +from .business_messages_deleted import BusinessMessagesDeleted +from .business_opening_hours import BusinessOpeningHours +from .business_opening_hours_interval import BusinessOpeningHoursInterval from .callback_game import CallbackGame from .callback_query import CallbackQuery from .chat import Chat +from .chat_administrator_rights import ChatAdministratorRights +from .chat_background import ChatBackground +from .chat_boost import ChatBoost +from .chat_boost_added import ChatBoostAdded +from .chat_boost_removed import ChatBoostRemoved +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 @@ -23,20 +65,49 @@ 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 from .encrypted_passport_element import EncryptedPassportElement +from .error_event import ErrorEvent +from .external_reply_info import ExternalReplyInfo from .file import File from .force_reply import ForceReply +from .forum_topic import ForumTopic +from .forum_topic_closed import ForumTopicClosed +from .forum_topic_created import ForumTopicCreated +from .forum_topic_edited import ForumTopicEdited +from .forum_topic_reopened import ForumTopicReopened 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 +from .giveaway_winners import GiveawayWinners +from .inaccessible_message import InaccessibleMessage from .inline_keyboard_button import InlineKeyboardButton from .inline_keyboard_markup import InlineKeyboardMarkup from .inline_query import InlineQuery @@ -58,11 +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 @@ -70,22 +146,73 @@ 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 from .keyboard_button import KeyboardButton from .keyboard_button_poll_type import KeyboardButtonPollType +from .keyboard_button_request_chat import KeyboardButtonRequestChat +from .keyboard_button_request_user import KeyboardButtonRequestUser +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 from .message_entity import MessageEntity from .message_id import MessageId +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 @@ -95,7 +222,10 @@ 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_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 @@ -103,170 +233,455 @@ 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 from .video import Video +from .video_chat_ended import VideoChatEnded +from .video_chat_participants_invited import VideoChatParticipantsInvited +from .video_chat_scheduled import VideoChatScheduled +from .video_chat_started import VideoChatStarted from .video_note import VideoNote from .voice import Voice -from .voice_chat_ended import VoiceChatEnded -from .voice_chat_participants_invited import VoiceChatParticipantsInvited -from .voice_chat_scheduled import VoiceChatScheduled -from .voice_chat_started import VoiceChatStarted +from .web_app_data import WebAppData +from .web_app_info import WebAppInfo from .webhook_info import WebhookInfo +from .write_access_allowed import WriteAccessAllowed __all__ = ( - "TelegramObject", - "Downloadable", - "UNSET", - "BufferedInputFile", - "FSInputFile", - "URLInputFile", - "Update", - "WebhookInfo", - "User", - "Chat", - "Message", - "ContentType", - "MessageId", - "MessageEntity", - "PhotoSize", + "AcceptedGiftTypes", + "AffiliateInfo", "Animation", "Audio", - "Document", - "Video", - "VideoNote", - "Voice", - "Contact", - "Dice", - "PollOption", - "PollAnswer", - "Poll", - "Location", - "Venue", - "ProximityAlertTriggered", - "MessageAutoDeleteTimerChanged", - "VoiceChatScheduled", - "VoiceChatStarted", - "VoiceChatEnded", - "VoiceChatParticipantsInvited", - "UserProfilePhotos", - "File", - "ReplyKeyboardMarkup", - "KeyboardButton", - "KeyboardButtonPollType", - "ReplyKeyboardRemove", - "InlineKeyboardMarkup", - "InlineKeyboardButton", - "LoginUrl", - "CallbackQuery", - "ForceReply", - "ChatPhoto", - "ChatInviteLink", - "ChatMember", - "ChatMemberOwner", - "ChatMemberAdministrator", - "ChatMemberMember", - "ChatMemberRestricted", - "ChatMemberLeft", - "ChatMemberBanned", - "ChatMemberUpdated", - "ChatJoinRequest", - "ChatPermissions", - "ChatLocation", + "BackgroundFill", + "BackgroundFillFreeformGradient", + "BackgroundFillGradient", + "BackgroundFillSolid", + "BackgroundFillUnion", + "BackgroundType", + "BackgroundTypeChatTheme", + "BackgroundTypeFill", + "BackgroundTypePattern", + "BackgroundTypeUnion", + "BackgroundTypeWallpaper", + "Birthdate", "BotCommand", "BotCommandScope", - "BotCommandScopeDefault", - "BotCommandScopeAllPrivateChats", - "BotCommandScopeAllGroupChats", "BotCommandScopeAllChatAdministrators", + "BotCommandScopeAllGroupChats", + "BotCommandScopeAllPrivateChats", "BotCommandScopeChat", "BotCommandScopeChatAdministrators", "BotCommandScopeChatMember", - "ResponseParameters", - "InputMedia", - "InputMediaPhoto", - "InputMediaVideo", - "InputMediaAnimation", - "InputMediaAudio", - "InputMediaDocument", - "InputFile", - "Sticker", - "StickerSet", - "MaskPosition", + "BotCommandScopeDefault", + "BotCommandScopeUnion", + "BotDescription", + "BotName", + "BotShortDescription", + "BufferedInputFile", + "BusinessBotRights", + "BusinessConnection", + "BusinessIntro", + "BusinessLocation", + "BusinessMessagesDeleted", + "BusinessOpeningHours", + "BusinessOpeningHoursInterval", + "CallbackGame", + "CallbackQuery", + "Chat", + "ChatAdministratorRights", + "ChatBackground", + "ChatBoost", + "ChatBoostAdded", + "ChatBoostRemoved", + "ChatBoostSource", + "ChatBoostSourceGiftCode", + "ChatBoostSourceGiveaway", + "ChatBoostSourcePremium", + "ChatBoostSourceUnion", + "ChatBoostUpdated", + "ChatFullInfo", + "ChatIdUnion", + "ChatInviteLink", + "ChatJoinRequest", + "ChatLocation", + "ChatMember", + "ChatMemberAdministrator", + "ChatMemberBanned", + "ChatMemberLeft", + "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", + "EncryptedPassportElement", + "ErrorEvent", + "ExternalReplyInfo", + "FSInputFile", + "File", + "ForceReply", + "ForumTopic", + "ForumTopicClosed", + "ForumTopicCreated", + "ForumTopicEdited", + "ForumTopicReopened", + "Game", + "GameHighScore", + "GeneralForumTopicHidden", + "GeneralForumTopicUnhidden", + "Gift", + "GiftBackground", + "GiftInfo", + "Gifts", + "Giveaway", + "GiveawayCompleted", + "GiveawayCreated", + "GiveawayWinners", + "InaccessibleMessage", + "InlineKeyboardButton", + "InlineKeyboardMarkup", "InlineQuery", "InlineQueryResult", "InlineQueryResultArticle", - "InlineQueryResultPhoto", - "InlineQueryResultGif", - "InlineQueryResultMpeg4Gif", - "InlineQueryResultVideo", "InlineQueryResultAudio", - "InlineQueryResultVoice", - "InlineQueryResultDocument", - "InlineQueryResultLocation", - "InlineQueryResultVenue", - "InlineQueryResultContact", - "InlineQueryResultGame", - "InlineQueryResultCachedPhoto", + "InlineQueryResultCachedAudio", + "InlineQueryResultCachedDocument", "InlineQueryResultCachedGif", "InlineQueryResultCachedMpeg4Gif", + "InlineQueryResultCachedPhoto", "InlineQueryResultCachedSticker", - "InlineQueryResultCachedDocument", "InlineQueryResultCachedVideo", "InlineQueryResultCachedVoice", - "InlineQueryResultCachedAudio", - "InputMessageContent", - "InputTextMessageContent", - "InputLocationMessageContent", - "InputVenueMessageContent", + "InlineQueryResultContact", + "InlineQueryResultDocument", + "InlineQueryResultGame", + "InlineQueryResultGif", + "InlineQueryResultLocation", + "InlineQueryResultMpeg4Gif", + "InlineQueryResultPhoto", + "InlineQueryResultUnion", + "InlineQueryResultVenue", + "InlineQueryResultVideo", + "InlineQueryResultVoice", + "InlineQueryResultsButton", + "InputChecklist", + "InputChecklistTask", "InputContactMessageContent", + "InputFile", + "InputFileUnion", "InputInvoiceMessageContent", - "ChosenInlineResult", - "LabeledPrice", + "InputLocationMessageContent", + "InputMedia", + "InputMediaAnimation", + "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", - "ShippingAddress", + "KeyboardButton", + "KeyboardButtonPollType", + "KeyboardButtonRequestChat", + "KeyboardButtonRequestManagedBot", + "KeyboardButtonRequestUser", + "KeyboardButtonRequestUsers", + "LabeledPrice", + "LinkPreviewOptions", + "Location", + "LocationAddress", + "LoginUrl", + "ManagedBotCreated", + "ManagedBotUpdated", + "MaskPosition", + "MaybeInaccessibleMessage", + "MaybeInaccessibleMessageUnion", + "MediaUnion", + "MenuButton", + "MenuButtonCommands", + "MenuButtonDefault", + "MenuButtonUnion", + "MenuButtonWebApp", + "Message", + "MessageAutoDeleteTimerChanged", + "MessageEntity", + "MessageId", + "MessageOrigin", + "MessageOriginChannel", + "MessageOriginChat", + "MessageOriginHiddenUser", + "MessageOriginUnion", + "MessageOriginUser", + "MessageReactionCountUpdated", + "MessageReactionUpdated", "OrderInfo", - "ShippingOption", - "SuccessfulPayment", - "ShippingQuery", - "PreCheckoutQuery", + "OwnedGift", + "OwnedGiftRegular", + "OwnedGiftUnion", + "OwnedGiftUnique", + "OwnedGifts", + "PaidMedia", + "PaidMediaInfo", + "PaidMediaPhoto", + "PaidMediaPreview", + "PaidMediaPurchased", + "PaidMediaUnion", + "PaidMediaVideo", + "PaidMessagePriceChanged", "PassportData", - "PassportFile", - "EncryptedPassportElement", - "EncryptedCredentials", "PassportElementError", "PassportElementErrorDataField", + "PassportElementErrorFile", + "PassportElementErrorFiles", "PassportElementErrorFrontSide", "PassportElementErrorReverseSide", "PassportElementErrorSelfie", - "PassportElementErrorFile", - "PassportElementErrorFiles", "PassportElementErrorTranslationFile", "PassportElementErrorTranslationFiles", + "PassportElementErrorUnion", "PassportElementErrorUnspecified", - "Game", - "CallbackGame", - "GameHighScore", + "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", + "Video", + "VideoChatEnded", + "VideoChatParticipantsInvited", + "VideoChatScheduled", + "VideoChatStarted", + "VideoNote", + "VideoQuality", + "Voice", + "WebAppData", + "WebAppInfo", + "WebhookInfo", + "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] - if not hasattr(_entity, "update_forward_refs"): + if not hasattr(_entity, "model_rebuild"): continue - _entity.update_forward_refs(**globals()) + _entity.model_rebuild( + _types_namespace={ + "List": list, + "Optional": Optional, + "Union": Union, + "Literal": Literal, + "Default": _Default, + **{k: v for k, v in globals().items() if k in __all__}, + } + ) del _entity del _entity_name 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 54c8f4d2..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, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -20,16 +20,51 @@ class Animation(TelegramObject): 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 as defined by sender""" + """Video width as defined by the sender""" height: int - """Video height as defined by sender""" + """Video height as defined by the sender""" duration: int - """Duration of the video in seconds as defined by sender""" - thumb: Optional[PhotoSize] = None - """*Optional*. Animation thumbnail as defined by sender""" - file_name: Optional[str] = None - """*Optional*. Original animation filename as defined by sender""" - mime_type: Optional[str] = None - """*Optional*. MIME type of the file as defined by sender""" - file_size: Optional[int] = None - """*Optional*. File size in bytes""" + """Duration of the video in seconds as defined by the sender""" + thumbnail: PhotoSize | None = None + """*Optional*. Animation thumbnail as defined by the sender""" + file_name: str | None = None + """*Optional*. Original animation filename as defined by the sender""" + mime_type: str | None = None + """*Optional*. MIME type of the file as defined by the sender""" + 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, + duration: int, + 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!!! + # 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, + duration=duration, + thumbnail=thumbnail, + file_name=file_name, + mime_type=mime_type, + file_size=file_size, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/audio.py b/aiogram/types/audio.py index 8d436f3e..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, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -20,16 +20,51 @@ class Audio(TelegramObject): 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.""" duration: int - """Duration of the audio in seconds as defined by sender""" - performer: Optional[str] = None - """*Optional*. Performer of the audio as defined by sender or by audio tags""" - title: Optional[str] = None - """*Optional*. Title of the audio as defined by sender or by audio tags""" - file_name: Optional[str] = None - """*Optional*. Original filename as defined by sender""" - mime_type: Optional[str] = None - """*Optional*. MIME type of the file as defined by sender""" - file_size: Optional[int] = None - """*Optional*. File size in bytes""" - thumb: Optional[PhotoSize] = None + """Duration of the audio in seconds as defined by the sender""" + performer: str | None = None + """*Optional*. Performer of the audio as defined by the sender or by audio tags""" + title: str | None = None + """*Optional*. Title of the audio as defined by the sender or by audio tags""" + file_name: str | None = None + """*Optional*. Original filename as defined by the sender""" + mime_type: str | None = None + """*Optional*. MIME type of the file as defined by the sender""" + 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: PhotoSize | None = None """*Optional*. Thumbnail of the album cover to which the music file belongs""" + + 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, + duration: int, + 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!!! + # 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, + duration=duration, + performer=performer, + title=title, + file_name=file_name, + mime_type=mime_type, + file_size=file_size, + thumbnail=thumbnail, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/background_fill.py b/aiogram/types/background_fill.py new file mode 100644 index 00000000..dbeda468 --- /dev/null +++ b/aiogram/types/background_fill.py @@ -0,0 +1,13 @@ +from .base import TelegramObject + + +class BackgroundFill(TelegramObject): + """ + This object describes the way a background is filled based on the selected colors. Currently, it can be one of + + - :class:`aiogram.types.background_fill_solid.BackgroundFillSolid` + - :class:`aiogram.types.background_fill_gradient.BackgroundFillGradient` + - :class:`aiogram.types.background_fill_freeform_gradient.BackgroundFillFreeformGradient` + + Source: https://core.telegram.org/bots/api#backgroundfill + """ diff --git a/aiogram/types/background_fill_freeform_gradient.py b/aiogram/types/background_fill_freeform_gradient.py new file mode 100644 index 00000000..5e281a5c --- /dev/null +++ b/aiogram/types/background_fill_freeform_gradient.py @@ -0,0 +1,33 @@ +from typing import TYPE_CHECKING, Any, Literal + +from .background_fill import BackgroundFill + + +class BackgroundFillFreeformGradient(BackgroundFill): + """ + The background is a freeform gradient that rotates after every message in the chat. + + Source: https://core.telegram.org/bots/api#backgroundfillfreeformgradient + """ + + type: Literal["freeform_gradient"] = "freeform_gradient" + """Type of the background fill, always 'freeform_gradient'""" + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal["freeform_gradient"] = "freeform_gradient", + 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__(type=type, colors=colors, **__pydantic_kwargs) diff --git a/aiogram/types/background_fill_gradient.py b/aiogram/types/background_fill_gradient.py new file mode 100644 index 00000000..abc485c1 --- /dev/null +++ b/aiogram/types/background_fill_gradient.py @@ -0,0 +1,45 @@ +from typing import TYPE_CHECKING, Any, Literal + +from .background_fill import BackgroundFill + + +class BackgroundFillGradient(BackgroundFill): + """ + The background is a gradient fill. + + Source: https://core.telegram.org/bots/api#backgroundfillgradient + """ + + type: Literal["gradient"] = "gradient" + """Type of the background fill, always 'gradient'""" + top_color: int + """Top color of the gradient in the RGB24 format""" + bottom_color: int + """Bottom color of the gradient in the RGB24 format""" + rotation_angle: int + """Clockwise rotation angle of the background fill in degrees; 0-359""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal["gradient"] = "gradient", + top_color: int, + bottom_color: int, + rotation_angle: 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, + top_color=top_color, + bottom_color=bottom_color, + rotation_angle=rotation_angle, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/background_fill_solid.py b/aiogram/types/background_fill_solid.py new file mode 100644 index 00000000..f9fe22f0 --- /dev/null +++ b/aiogram/types/background_fill_solid.py @@ -0,0 +1,33 @@ +from typing import TYPE_CHECKING, Any, Literal + +from .background_fill import BackgroundFill + + +class BackgroundFillSolid(BackgroundFill): + """ + The background is filled using the selected color. + + Source: https://core.telegram.org/bots/api#backgroundfillsolid + """ + + type: Literal["solid"] = "solid" + """Type of the background fill, always 'solid'""" + color: int + """The color of the background fill in the RGB24 format""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal["solid"] = "solid", + 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, color=color, **__pydantic_kwargs) 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.py b/aiogram/types/background_type.py new file mode 100644 index 00000000..6abccef3 --- /dev/null +++ b/aiogram/types/background_type.py @@ -0,0 +1,14 @@ +from .base import TelegramObject + + +class BackgroundType(TelegramObject): + """ + This object describes the type of a background. Currently, it can be one of + + - :class:`aiogram.types.background_type_fill.BackgroundTypeFill` + - :class:`aiogram.types.background_type_wallpaper.BackgroundTypeWallpaper` + - :class:`aiogram.types.background_type_pattern.BackgroundTypePattern` + - :class:`aiogram.types.background_type_chat_theme.BackgroundTypeChatTheme` + + Source: https://core.telegram.org/bots/api#backgroundtype + """ diff --git a/aiogram/types/background_type_chat_theme.py b/aiogram/types/background_type_chat_theme.py new file mode 100644 index 00000000..ac93534d --- /dev/null +++ b/aiogram/types/background_type_chat_theme.py @@ -0,0 +1,33 @@ +from typing import TYPE_CHECKING, Any, Literal + +from .background_type import BackgroundType + + +class BackgroundTypeChatTheme(BackgroundType): + """ + The background is taken directly from a built-in chat theme. + + Source: https://core.telegram.org/bots/api#backgroundtypechattheme + """ + + type: Literal["chat_theme"] = "chat_theme" + """Type of the background, always 'chat_theme'""" + theme_name: str + """Name of the chat theme, which is usually an emoji""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal["chat_theme"] = "chat_theme", + theme_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, theme_name=theme_name, **__pydantic_kwargs) diff --git a/aiogram/types/background_type_fill.py b/aiogram/types/background_type_fill.py new file mode 100644 index 00000000..49f2767d --- /dev/null +++ b/aiogram/types/background_type_fill.py @@ -0,0 +1,43 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from .background_type import BackgroundType + +if TYPE_CHECKING: + from .background_fill_union import BackgroundFillUnion + + +class BackgroundTypeFill(BackgroundType): + """ + The background is automatically filled based on the selected colors. + + Source: https://core.telegram.org/bots/api#backgroundtypefill + """ + + type: Literal["fill"] = "fill" + """Type of the background, always 'fill'""" + fill: BackgroundFillUnion + """The background fill""" + dark_theme_dimming: int + """Dimming of the background in dark themes, as a percentage; 0-100""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal["fill"] = "fill", + fill: BackgroundFillUnion, + dark_theme_dimming: 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, fill=fill, dark_theme_dimming=dark_theme_dimming, **__pydantic_kwargs + ) diff --git a/aiogram/types/background_type_pattern.py b/aiogram/types/background_type_pattern.py new file mode 100644 index 00000000..1988fb98 --- /dev/null +++ b/aiogram/types/background_type_pattern.py @@ -0,0 +1,59 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from .background_type import BackgroundType + +if TYPE_CHECKING: + 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. + + Source: https://core.telegram.org/bots/api#backgroundtypepattern + """ + + type: Literal["pattern"] = "pattern" + """Type of the background, always 'pattern'""" + document: Document + """Document with the pattern""" + 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: 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: bool | None = None + """*Optional*. :code:`True`, if the background moves slightly when the device is tilted""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal["pattern"] = "pattern", + document: Document, + fill: BackgroundFillUnion, + intensity: int, + is_inverted: bool | None = None, + is_moving: 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, + document=document, + fill=fill, + intensity=intensity, + is_inverted=is_inverted, + is_moving=is_moving, + **__pydantic_kwargs, + ) 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 new file mode 100644 index 00000000..a4a2ac70 --- /dev/null +++ b/aiogram/types/background_type_wallpaper.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from .background_type import BackgroundType + +if TYPE_CHECKING: + from .document import Document + + +class BackgroundTypeWallpaper(BackgroundType): + """ + The background is a wallpaper in the JPEG format. + + Source: https://core.telegram.org/bots/api#backgroundtypewallpaper + """ + + type: Literal["wallpaper"] = "wallpaper" + """Type of the background, always 'wallpaper'""" + document: Document + """Document with the wallpaper""" + dark_theme_dimming: int + """Dimming of the background in dark themes, as a percentage; 0-100""" + 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: bool | None = None + """*Optional*. :code:`True`, if the background moves slightly when the device is tilted""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal["wallpaper"] = "wallpaper", + document: Document, + dark_theme_dimming: int, + is_blurred: bool | None = None, + is_moving: 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, + document=document, + dark_theme_dimming=dark_theme_dimming, + is_blurred=is_blurred, + is_moving=is_moving, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/base.py b/aiogram/types/base.py index 0b5d08ad..4ba749d8 100644 --- a/aiogram/types/base.py +++ b/aiogram/types/base.py @@ -1,28 +1,52 @@ -import datetime from typing import Any from unittest.mock import sentinel -from pydantic import BaseModel, Extra +from pydantic import BaseModel, ConfigDict, model_validator -from aiogram.utils.mixins import ContextInstanceMixin +from aiogram.client.context_controller import BotContextController +from aiogram.client.default import Default -class TelegramObject(ContextInstanceMixin["TelegramObject"], BaseModel): - class Config: - use_enum_values = True - orm_mode = True - extra = Extra.allow - validate_assignment = True - allow_mutation = False - allow_population_by_field_name = True - json_encoders = {datetime.datetime: lambda dt: int(dt.timestamp())} +class TelegramObject(BotContextController, BaseModel): + model_config = ConfigDict( + use_enum_values=True, + extra="allow", + validate_assignment=True, + frozen=True, + 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]: + """ + Remove UNSET before fields validation. + + We use UNSET as a sentinel value for `parse_mode` and replace it to real value later. + It isn't a problem when it's just default value for a model field, + but UNSET might be passed to a model initialization from `Bot.method_name`, + so we must take care of it and remove it before fields validation. + """ + if not isinstance(values, dict): + return values + return {k: v for k, v in values.items() if not isinstance(v, UNSET_TYPE)} class MutableTelegramObject(TelegramObject): - class Config: - allow_mutation = True + model_config = ConfigDict( + frozen=False, + ) -UNSET: Any = ( - sentinel.UNSET -) # special sentinel object which used in sutuation when None might be a useful value +# special sentinel object which used in a situation when None might be a useful value +UNSET: Any = sentinel.UNSET +UNSET_TYPE: Any = type(UNSET) + +# Unused constants are needed only for backward compatibility with external +# libraries that a working with framework internals +UNSET_PARSE_MODE: Any = Default("parse_mode") +UNSET_DISABLE_WEB_PAGE_PREVIEW: Any = Default("link_preview_is_disabled") +UNSET_PROTECT_CONTENT: Any = Default("protect_content") diff --git a/aiogram/types/birthdate.py b/aiogram/types/birthdate.py new file mode 100644 index 00000000..6bada73d --- /dev/null +++ b/aiogram/types/birthdate.py @@ -0,0 +1,38 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class Birthdate(TelegramObject): + """ + Describes the birthdate of a user. + + Source: https://core.telegram.org/bots/api#birthdate + """ + + day: int + """Day of the user's birth; 1-31""" + month: int + """Month of the user's birth; 1-12""" + year: int | None = None + """*Optional*. Year of the user's birth""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + day: int, + month: int, + year: 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__(day=day, month=month, year=year, **__pydantic_kwargs) diff --git a/aiogram/types/bot_command.py b/aiogram/types/bot_command.py index 1bf65eba..e4e91759 100644 --- a/aiogram/types/bot_command.py +++ b/aiogram/types/bot_command.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import MutableTelegramObject @@ -14,3 +16,16 @@ class BotCommand(MutableTelegramObject): """Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.""" description: str """Description of the command; 1-256 characters.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, command: str, description: 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__(command=command, description=description, **__pydantic_kwargs) diff --git a/aiogram/types/bot_command_scope_all_chat_administrators.py b/aiogram/types/bot_command_scope_all_chat_administrators.py index 25a35cbf..44173636 100644 --- a/aiogram/types/bot_command_scope_all_chat_administrators.py +++ b/aiogram/types/bot_command_scope_all_chat_administrators.py @@ -1,7 +1,8 @@ from __future__ import annotations -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import BotCommandScopeType from .bot_command_scope import BotCommandScope @@ -12,5 +13,25 @@ class BotCommandScopeAllChatAdministrators(BotCommandScope): Source: https://core.telegram.org/bots/api#botcommandscopeallchatadministrators """ - type: str = Field("all_chat_administrators", const=True) + type: Literal[BotCommandScopeType.ALL_CHAT_ADMINISTRATORS] = ( + BotCommandScopeType.ALL_CHAT_ADMINISTRATORS + ) """Scope type, must be *all_chat_administrators*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[ + BotCommandScopeType.ALL_CHAT_ADMINISTRATORS + ] = BotCommandScopeType.ALL_CHAT_ADMINISTRATORS, + **__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/bot_command_scope_all_group_chats.py b/aiogram/types/bot_command_scope_all_group_chats.py index 00e2984e..a17a51da 100644 --- a/aiogram/types/bot_command_scope_all_group_chats.py +++ b/aiogram/types/bot_command_scope_all_group_chats.py @@ -1,7 +1,8 @@ from __future__ import annotations -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import BotCommandScopeType from .bot_command_scope import BotCommandScope @@ -12,5 +13,23 @@ class BotCommandScopeAllGroupChats(BotCommandScope): Source: https://core.telegram.org/bots/api#botcommandscopeallgroupchats """ - type: str = Field("all_group_chats", const=True) + type: Literal[BotCommandScopeType.ALL_GROUP_CHATS] = BotCommandScopeType.ALL_GROUP_CHATS """Scope type, must be *all_group_chats*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[ + BotCommandScopeType.ALL_GROUP_CHATS + ] = BotCommandScopeType.ALL_GROUP_CHATS, + **__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/bot_command_scope_all_private_chats.py b/aiogram/types/bot_command_scope_all_private_chats.py index debc3baf..54d406ff 100644 --- a/aiogram/types/bot_command_scope_all_private_chats.py +++ b/aiogram/types/bot_command_scope_all_private_chats.py @@ -1,7 +1,8 @@ from __future__ import annotations -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import BotCommandScopeType from .bot_command_scope import BotCommandScope @@ -12,5 +13,23 @@ class BotCommandScopeAllPrivateChats(BotCommandScope): Source: https://core.telegram.org/bots/api#botcommandscopeallprivatechats """ - type: str = Field("all_private_chats", const=True) + type: Literal[BotCommandScopeType.ALL_PRIVATE_CHATS] = BotCommandScopeType.ALL_PRIVATE_CHATS """Scope type, must be *all_private_chats*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[ + BotCommandScopeType.ALL_PRIVATE_CHATS + ] = BotCommandScopeType.ALL_PRIVATE_CHATS, + **__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/bot_command_scope_chat.py b/aiogram/types/bot_command_scope_chat.py index 5d89c046..9ea26e67 100644 --- a/aiogram/types/bot_command_scope_chat.py +++ b/aiogram/types/bot_command_scope_chat.py @@ -1,11 +1,13 @@ from __future__ import annotations -from typing import Union - -from pydantic import Field +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): """ @@ -14,7 +16,24 @@ class BotCommandScopeChat(BotCommandScope): Source: https://core.telegram.org/bots/api#botcommandscopechat """ - type: str = Field("chat", const=True) + 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[BotCommandScopeType.CHAT] = BotCommandScopeType.CHAT, + 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__(type=type, chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/types/bot_command_scope_chat_administrators.py b/aiogram/types/bot_command_scope_chat_administrators.py index 152eab13..8a7ff631 100644 --- a/aiogram/types/bot_command_scope_chat_administrators.py +++ b/aiogram/types/bot_command_scope_chat_administrators.py @@ -1,11 +1,13 @@ from __future__ import annotations -from typing import Union - -from pydantic import Field +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): """ @@ -14,7 +16,28 @@ class BotCommandScopeChatAdministrators(BotCommandScope): Source: https://core.telegram.org/bots/api#botcommandscopechatadministrators """ - type: str = Field("chat_administrators", const=True) + type: Literal[BotCommandScopeType.CHAT_ADMINISTRATORS] = ( + 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[ + BotCommandScopeType.CHAT_ADMINISTRATORS + ] = BotCommandScopeType.CHAT_ADMINISTRATORS, + 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__(type=type, chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/types/bot_command_scope_chat_member.py b/aiogram/types/bot_command_scope_chat_member.py index e69ff642..4dd096cf 100644 --- a/aiogram/types/bot_command_scope_chat_member.py +++ b/aiogram/types/bot_command_scope_chat_member.py @@ -1,11 +1,13 @@ from __future__ import annotations -from typing import Union - -from pydantic import Field +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): """ @@ -14,9 +16,27 @@ class BotCommandScopeChatMember(BotCommandScope): Source: https://core.telegram.org/bots/api#botcommandscopechatmember """ - type: str = Field("chat_member", const=True) + 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""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[BotCommandScopeType.CHAT_MEMBER] = BotCommandScopeType.CHAT_MEMBER, + chat_id: ChatIdUnion, + 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__(type=type, chat_id=chat_id, user_id=user_id, **__pydantic_kwargs) diff --git a/aiogram/types/bot_command_scope_default.py b/aiogram/types/bot_command_scope_default.py index 8cf1a1d5..33b7a0ca 100644 --- a/aiogram/types/bot_command_scope_default.py +++ b/aiogram/types/bot_command_scope_default.py @@ -1,7 +1,8 @@ from __future__ import annotations -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import BotCommandScopeType from .bot_command_scope import BotCommandScope @@ -12,5 +13,21 @@ class BotCommandScopeDefault(BotCommandScope): Source: https://core.telegram.org/bots/api#botcommandscopedefault """ - type: str = Field("default", const=True) + type: Literal[BotCommandScopeType.DEFAULT] = BotCommandScopeType.DEFAULT """Scope type, must be *default*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[BotCommandScopeType.DEFAULT] = BotCommandScopeType.DEFAULT, + **__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/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/bot_description.py b/aiogram/types/bot_description.py new file mode 100644 index 00000000..5d8646dd --- /dev/null +++ b/aiogram/types/bot_description.py @@ -0,0 +1,25 @@ +from typing import TYPE_CHECKING, Any + +from aiogram.types import TelegramObject + + +class BotDescription(TelegramObject): + """ + This object represents the bot's description. + + Source: https://core.telegram.org/bots/api#botdescription + """ + + description: str + """The bot's description""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, description: 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__(description=description, **__pydantic_kwargs) diff --git a/aiogram/types/bot_name.py b/aiogram/types/bot_name.py new file mode 100644 index 00000000..f2dc0745 --- /dev/null +++ b/aiogram/types/bot_name.py @@ -0,0 +1,25 @@ +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class BotName(TelegramObject): + """ + This object represents the bot's name. + + Source: https://core.telegram.org/bots/api#botname + """ + + name: str + """The bot's name""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, 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__(name=name, **__pydantic_kwargs) diff --git a/aiogram/types/bot_short_description.py b/aiogram/types/bot_short_description.py new file mode 100644 index 00000000..86b11cf4 --- /dev/null +++ b/aiogram/types/bot_short_description.py @@ -0,0 +1,27 @@ +from typing import TYPE_CHECKING, Any + +from aiogram.types import TelegramObject + + +class BotShortDescription(TelegramObject): + """ + This object represents the bot's short description. + + Source: https://core.telegram.org/bots/api#botshortdescription + """ + + short_description: str + """The bot's short description""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, short_description: 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__(short_description=short_description, **__pydantic_kwargs) 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 new file mode 100644 index 00000000..65597f4b --- /dev/null +++ b/aiogram/types/business_connection.py @@ -0,0 +1,69 @@ +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 + + +class BusinessConnection(TelegramObject): + """ + Describes the connection of the bot with a business account. + + Source: https://core.telegram.org/bots/api#businessconnection + """ + + id: str + """Unique identifier of the business connection""" + user: User + """Business account user that created the business connection""" + user_chat_id: int + """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""" + is_enabled: bool + """: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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: str, + user: User, + user_chat_id: int, + date: DateTime, + is_enabled: bool, + rights: BusinessBotRights | None = None, + can_reply: 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__( + id=id, + user=user, + user_chat_id=user_chat_id, + date=date, + 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 new file mode 100644 index 00000000..80b40204 --- /dev/null +++ b/aiogram/types/business_intro.py @@ -0,0 +1,41 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .sticker import Sticker + + +class BusinessIntro(TelegramObject): + """ + Contains information about the start page settings of a Telegram Business account. + + Source: https://core.telegram.org/bots/api#businessintro + """ + + title: str | None = None + """*Optional*. Title text of the business intro""" + message: str | None = None + """*Optional*. Message text of the business intro""" + sticker: Sticker | None = None + """*Optional*. Sticker of the business intro""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + title: str | None = None, + message: str | None = None, + sticker: Sticker | 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, message=message, sticker=sticker, **__pydantic_kwargs) diff --git a/aiogram/types/business_location.py b/aiogram/types/business_location.py new file mode 100644 index 00000000..421259db --- /dev/null +++ b/aiogram/types/business_location.py @@ -0,0 +1,38 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .location import Location + + +class BusinessLocation(TelegramObject): + """ + Contains information about the location of a Telegram Business account. + + Source: https://core.telegram.org/bots/api#businesslocation + """ + + address: str + """Address of the business""" + location: Location | None = None + """*Optional*. Location of the business""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + address: str, + location: Location | 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__(address=address, location=location, **__pydantic_kwargs) diff --git a/aiogram/types/business_messages_deleted.py b/aiogram/types/business_messages_deleted.py new file mode 100644 index 00000000..3263f667 --- /dev/null +++ b/aiogram/types/business_messages_deleted.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .chat import Chat + + +class BusinessMessagesDeleted(TelegramObject): + """ + This object is received when messages are deleted from a connected business account. + + Source: https://core.telegram.org/bots/api#businessmessagesdeleted + """ + + business_connection_id: str + """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] + """The list of identifiers of deleted messages in the chat of 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, + chat: Chat, + 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, + chat=chat, + message_ids=message_ids, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/business_opening_hours.py b/aiogram/types/business_opening_hours.py new file mode 100644 index 00000000..8c12409d --- /dev/null +++ b/aiogram/types/business_opening_hours.py @@ -0,0 +1,40 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .business_opening_hours_interval import BusinessOpeningHoursInterval + + +class BusinessOpeningHours(TelegramObject): + """ + Describes the opening hours of a business. + + Source: https://core.telegram.org/bots/api#businessopeninghours + """ + + time_zone_name: str + """Unique name of the time zone for which the opening hours are defined""" + opening_hours: list[BusinessOpeningHoursInterval] + """List of time intervals describing business opening hours""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + time_zone_name: str, + opening_hours: list[BusinessOpeningHoursInterval], + **__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__( + time_zone_name=time_zone_name, opening_hours=opening_hours, **__pydantic_kwargs + ) diff --git a/aiogram/types/business_opening_hours_interval.py b/aiogram/types/business_opening_hours_interval.py new file mode 100644 index 00000000..52efd2c2 --- /dev/null +++ b/aiogram/types/business_opening_hours_interval.py @@ -0,0 +1,37 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class BusinessOpeningHoursInterval(TelegramObject): + """ + Describes an interval of time during which a business is open. + + Source: https://core.telegram.org/bots/api#businessopeninghoursinterval + """ + + opening_minute: int + """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""" + closing_minute: int + """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""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + opening_minute: int, + closing_minute: 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__( + opening_minute=opening_minute, closing_minute=closing_minute, **__pydantic_kwargs + ) diff --git a/aiogram/types/callback_query.py b/aiogram/types/callback_query.py index 08fddc8a..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, Optional +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -8,13 +8,13 @@ from .base import TelegramObject if TYPE_CHECKING: from ..methods import AnswerCallbackQuery - from .message import Message + from .maybe_inaccessible_message_union import MaybeInaccessibleMessageUnion from .user import User class CallbackQuery(TelegramObject): """ - This object represents an incoming callback query from a callback button in an `inline keyboard `_. If the button that originated the query was attached to a message sent by the bot, the field *message* will be present. If the button was attached to a message sent via the bot (in `inline mode `_), the field *inline_message_id* will be present. Exactly one of the fields *data* or *game_short_name* will be present. + This object represents an incoming callback query from a callback button in an `inline keyboard `_. If the button that originated the query was attached to a message sent by the bot, the field *message* will be present. If the button was attached to a message sent via the bot (in `inline mode `_), the field *inline_message_id* will be present. Exactly one of the fields *data* or *game_short_name* will be present. **NOTE:** After the user presses a callback button, Telegram clients will display a progress bar until you call :class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery`. It is, therefore, necessary to react by calling :class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery` even if no notification to the user is needed (e.g., without specifying any of the optional parameters). @@ -27,32 +27,76 @@ 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[Message] = None - """*Optional*. Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old""" - inline_message_id: Optional[str] = None + message: MaybeInaccessibleMessageUnion | None = None + """*Optional*. Message sent by the bot with the callback button that originated the query""" + 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 - """*Optional*. Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.""" - game_short_name: 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: str | None = None """*Optional*. Short name of a `Game `_ to be returned, serves as the unique identifier for the game""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: str, + from_user: User, + chat_instance: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + id=id, + from_user=from_user, + chat_instance=chat_instance, + message=message, + inline_message_id=inline_message_id, + data=data, + game_short_name=game_short_name, + **__pydantic_kwargs, + ) + 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: """ - Answer to callback query + Shortcut for method :class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery` + will automatically fill method attributes: - :param text: - :param show_alert: - :param url: - :param cache_time: - :return: + - :code:`callback_query_id` + + 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. + + Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@BotFather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. + + Source: https://core.telegram.org/bots/api#answercallbackquery + + :param text: Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters + :param show_alert: 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*. + :param url: 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. + :param cache_time: 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. + :return: instance of method :class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery` """ - from ..methods import AnswerCallbackQuery + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import AnswerCallbackQuery return AnswerCallbackQuery( callback_query_id=self.id, @@ -60,4 +104,5 @@ class CallbackQuery(TelegramObject): show_alert=show_alert, url=url, cache_time=cache_time, - ) + **kwargs, + ).as_(self._bot) diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py index c2df6f6b..cde24548 100644 --- a/aiogram/types/chat.py +++ b/aiogram/types/chat.py @@ -1,15 +1,55 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any + +from pydantic import Field from .base import TelegramObject +from .custom import DateTime if TYPE_CHECKING: - from ..methods import BanChatSenderChat, UnbanChatSenderChat + from ..methods import ( + BanChatMember, + BanChatSenderChat, + CreateChatInviteLink, + DeleteChatPhoto, + DeleteChatStickerSet, + DeleteMessage, + EditChatInviteLink, + ExportChatInviteLink, + GetChatAdministrators, + GetChatMember, + GetChatMemberCount, + LeaveChat, + PinChatMessage, + PromoteChatMember, + RestrictChatMember, + RevokeChatInviteLink, + SendChatAction, + SetChatAdministratorCustomTitle, + SetChatDescription, + SetChatMemberTag, + SetChatPermissions, + SetChatPhoto, + SetChatStickerSet, + SetChatTitle, + UnbanChatMember, + UnbanChatSenderChat, + UnpinAllChatMessages, + UnpinAllGeneralForumTopicMessages, + UnpinChatMessage, + ) + from .birthdate import Birthdate + from .business_intro import BusinessIntro + from .business_location import BusinessLocation + from .business_opening_hours import BusinessOpeningHours 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_union import ReactionTypeUnion class Chat(TelegramObject): @@ -22,43 +62,311 @@ class Chat(TelegramObject): id: int """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 chat, can be either 'private', 'group', 'supergroup' or 'channel'""" - title: Optional[str] = None + """Type of the chat, can be either 'private', 'group', 'supergroup' or 'channel'""" + 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""" - photo: Optional[ChatPhoto] = None - """*Optional*. Chat photo. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - bio: Optional[str] = None - """*Optional*. Bio of the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - has_private_forwards: Optional[bool] = None - """*Optional*. 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`.""" - description: Optional[str] = None - """*Optional*. Description, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - invite_link: Optional[str] = None - """*Optional*. Primary invite link, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - pinned_message: Optional[Message] = None - """*Optional*. The most recent pinned message (by sending date). Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - permissions: Optional[ChatPermissions] = None - """*Optional*. Default chat member permissions, for groups and supergroups. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - slow_mode_delay: Optional[int] = None - """*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`.""" - message_auto_delete_time: Optional[int] = None - """*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`.""" - has_protected_content: Optional[bool] = None - """*Optional*. True, if messages from the chat can't be forwarded to other chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - sticker_set_name: Optional[str] = None - """*Optional*. For supergroups, name of group sticker set. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - can_set_sticker_set: Optional[bool] = None - """*Optional*. :code:`True`, if the bot can change the group sticker set. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - linked_chat_id: Optional[int] = 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. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - location: Optional[ChatLocation] = None - """*Optional*. For supergroups, the location to which the supergroup is connected. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" + is_forum: bool | None = None + """*Optional*. :code:`True`, if the supergroup chat is a forum (has `topics `_ enabled)""" + 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: int, + type: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + id=id, + type=type, + title=title, + username=username, + 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, + background_custom_emoji_id=background_custom_emoji_id, + bio=bio, + birthdate=birthdate, + business_intro=business_intro, + business_location=business_location, + business_opening_hours=business_opening_hours, + can_set_sticker_set=can_set_sticker_set, + custom_emoji_sticker_set_name=custom_emoji_sticker_set_name, + description=description, + emoji_status_custom_emoji_id=emoji_status_custom_emoji_id, + emoji_status_expiration_date=emoji_status_expiration_date, + has_aggressive_anti_spam_enabled=has_aggressive_anti_spam_enabled, + has_hidden_members=has_hidden_members, + has_private_forwards=has_private_forwards, + has_protected_content=has_protected_content, + has_restricted_voice_and_video_messages=has_restricted_voice_and_video_messages, + has_visible_history=has_visible_history, + invite_link=invite_link, + join_by_request=join_by_request, + join_to_send_messages=join_to_send_messages, + linked_chat_id=linked_chat_id, + location=location, + message_auto_delete_time=message_auto_delete_time, + permissions=permissions, + personal_chat=personal_chat, + photo=photo, + pinned_message=pinned_message, + profile_accent_color_id=profile_accent_color_id, + profile_background_custom_emoji_id=profile_background_custom_emoji_id, + slow_mode_delay=slow_mode_delay, + sticker_set_name=sticker_set_name, + unrestrict_boost_count=unrestrict_boost_count, + **__pydantic_kwargs, + ) @property def shifted_id(self) -> int: @@ -76,18 +384,974 @@ class Chat(TelegramObject): shift = int(-1 * pow(10, len(short_id) + 2)) return shift - self.id - def ban_sender_chat(self, sender_chat_id: int) -> BanChatSenderChat: - from ..methods import BanChatSenderChat + @property + def full_name(self) -> str: + """Get full name of the Chat. + + For private chat it is first_name + last_name. + For other chat types it is title. + """ + if self.title is not None: + return self.title + + if self.last_name is not None: + return f"{self.first_name} {self.last_name}" + + return f"{self.first_name}" + + def ban_sender_chat( + self, + sender_chat_id: int, + **kwargs: Any, + ) -> BanChatSenderChat: + """ + Shortcut for method :class:`aiogram.methods.ban_chat_sender_chat.BanChatSenderChat` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#banchatsenderchat + + :param sender_chat_id: Unique identifier of the target sender chat + :return: instance of method :class:`aiogram.methods.ban_chat_sender_chat.BanChatSenderChat` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import BanChatSenderChat return BanChatSenderChat( chat_id=self.id, sender_chat_id=sender_chat_id, - ) + **kwargs, + ).as_(self._bot) - def unban_sender_chat(self, sender_chat_id: int) -> UnbanChatSenderChat: - from ..methods import UnbanChatSenderChat + def unban_sender_chat( + self, + sender_chat_id: int, + **kwargs: Any, + ) -> UnbanChatSenderChat: + """ + Shortcut for method :class:`aiogram.methods.unban_chat_sender_chat.UnbanChatSenderChat` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#unbanchatsenderchat + + :param sender_chat_id: Unique identifier of the target sender chat + :return: instance of method :class:`aiogram.methods.unban_chat_sender_chat.UnbanChatSenderChat` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import UnbanChatSenderChat return UnbanChatSenderChat( chat_id=self.id, sender_chat_id=sender_chat_id, - ) + **kwargs, + ).as_(self._bot) + + def get_administrators( + self, + **kwargs: Any, + ) -> GetChatAdministrators: + """ + Shortcut for method :class:`aiogram.methods.get_chat_administrators.GetChatAdministrators` + will automatically fill method attributes: + + - :code:`chat_id` + + 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 + + :return: instance of method :class:`aiogram.methods.get_chat_administrators.GetChatAdministrators` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import GetChatAdministrators + + return GetChatAdministrators( + chat_id=self.id, + **kwargs, + ).as_(self._bot) + + def delete_message( + self, + message_id: int, + **kwargs: Any, + ) -> DeleteMessage: + """ + Shortcut for method :class:`aiogram.methods.delete_message.DeleteMessage` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to delete a message, including service messages, with the following limitations: + + - A message can only be deleted if it was sent less than 48 hours ago. + + - Service messages about a supergroup, channel, or forum topic creation can't be deleted. + + - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. + + - Bots can delete outgoing messages in private chats, groups, and supergroups. + + - Bots can delete incoming messages in private chats. + + - Bots granted *can_post_messages* permissions can delete outgoing messages in channels. + + - If the bot is an administrator of a group, 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. + + Source: https://core.telegram.org/bots/api#deletemessage + + :param message_id: Identifier of the message to delete + :return: instance of method :class:`aiogram.methods.delete_message.DeleteMessage` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import DeleteMessage + + return DeleteMessage( + chat_id=self.id, + message_id=message_id, + **kwargs, + ).as_(self._bot) + + def revoke_invite_link( + self, + invite_link: str, + **kwargs: Any, + ) -> RevokeChatInviteLink: + """ + Shortcut for method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#revokechatinvitelink + + :param invite_link: The invite link to revoke + :return: instance of method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import RevokeChatInviteLink + + return RevokeChatInviteLink( + chat_id=self.id, + invite_link=invite_link, + **kwargs, + ).as_(self._bot) + + def edit_invite_link( + self, + invite_link: str, + name: str | None = None, + expire_date: DateTimeUnion | None = None, + member_limit: int | None = None, + creates_join_request: bool | None = None, + **kwargs: Any, + ) -> EditChatInviteLink: + """ + Shortcut for method :class:`aiogram.methods.edit_chat_invite_link.EditChatInviteLink` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#editchatinvitelink + + :param invite_link: The invite link to edit + :param name: Invite link name; 0-32 characters + :param expire_date: Point in time (Unix timestamp) when the link will expire + :param member_limit: The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 + :param creates_join_request: :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 + :return: instance of method :class:`aiogram.methods.edit_chat_invite_link.EditChatInviteLink` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import EditChatInviteLink + + return EditChatInviteLink( + chat_id=self.id, + invite_link=invite_link, + name=name, + expire_date=expire_date, + member_limit=member_limit, + creates_join_request=creates_join_request, + **kwargs, + ).as_(self._bot) + + def create_invite_link( + self, + name: str | None = None, + expire_date: DateTimeUnion | None = None, + member_limit: int | None = None, + creates_join_request: bool | None = None, + **kwargs: Any, + ) -> CreateChatInviteLink: + """ + Shortcut for method :class:`aiogram.methods.create_chat_invite_link.CreateChatInviteLink` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#createchatinvitelink + + :param name: Invite link name; 0-32 characters + :param expire_date: Point in time (Unix timestamp) when the link will expire + :param member_limit: The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 + :param creates_join_request: :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 + :return: instance of method :class:`aiogram.methods.create_chat_invite_link.CreateChatInviteLink` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import CreateChatInviteLink + + return CreateChatInviteLink( + chat_id=self.id, + name=name, + expire_date=expire_date, + member_limit=member_limit, + creates_join_request=creates_join_request, + **kwargs, + ).as_(self._bot) + + def export_invite_link( + self, + **kwargs: Any, + ) -> ExportChatInviteLink: + """ + Shortcut for method :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again. + + Source: https://core.telegram.org/bots/api#exportchatinvitelink + + :return: instance of method :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import ExportChatInviteLink + + return ExportChatInviteLink( + chat_id=self.id, + **kwargs, + ).as_(self._bot) + + def do( + self, + action: str, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + **kwargs: Any, + ) -> SendChatAction: + """ + Shortcut for method :class:`aiogram.methods.send_chat_action.SendChatAction` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Example: The `ImageBot `_ needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please wait…', the bot may use :class:`aiogram.methods.send_chat_action.SendChatAction` with *action* = *upload_photo*. The user will see a 'sending photo' status for the bot. + + We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive. + + Source: https://core.telegram.org/bots/api#sendchataction + + :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 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!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendChatAction + + return SendChatAction( + chat_id=self.id, + action=action, + business_connection_id=business_connection_id, + message_thread_id=message_thread_id, + **kwargs, + ).as_(self._bot) + + def delete_sticker_set( + self, + **kwargs: Any, + ) -> DeleteChatStickerSet: + """ + Shortcut for method :class:`aiogram.methods.delete_chat_sticker_set.DeleteChatStickerSet` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#deletechatstickerset + + :return: instance of method :class:`aiogram.methods.delete_chat_sticker_set.DeleteChatStickerSet` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import DeleteChatStickerSet + + return DeleteChatStickerSet( + chat_id=self.id, + **kwargs, + ).as_(self._bot) + + def set_sticker_set( + self, + sticker_set_name: str, + **kwargs: Any, + ) -> SetChatStickerSet: + """ + Shortcut for method :class:`aiogram.methods.set_chat_sticker_set.SetChatStickerSet` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#setchatstickerset + + :param sticker_set_name: Name of the sticker set to be set as the group sticker set + :return: instance of method :class:`aiogram.methods.set_chat_sticker_set.SetChatStickerSet` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SetChatStickerSet + + return SetChatStickerSet( + chat_id=self.id, + sticker_set_name=sticker_set_name, + **kwargs, + ).as_(self._bot) + + def get_member( + self, + user_id: int, + **kwargs: Any, + ) -> GetChatMember: + """ + Shortcut for method :class:`aiogram.methods.get_chat_member.GetChatMember` + will automatically fill method attributes: + + - :code:`chat_id` + + 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 + + :param user_id: Unique identifier of the target user + :return: instance of method :class:`aiogram.methods.get_chat_member.GetChatMember` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import GetChatMember + + return GetChatMember( + chat_id=self.id, + user_id=user_id, + **kwargs, + ).as_(self._bot) + + def get_member_count( + self, + **kwargs: Any, + ) -> GetChatMemberCount: + """ + Shortcut for method :class:`aiogram.methods.get_chat_member_count.GetChatMemberCount` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to get the number of members in a chat. Returns *Int* on success. + + Source: https://core.telegram.org/bots/api#getchatmembercount + + :return: instance of method :class:`aiogram.methods.get_chat_member_count.GetChatMemberCount` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import GetChatMemberCount + + return GetChatMemberCount( + chat_id=self.id, + **kwargs, + ).as_(self._bot) + + def leave( + self, + **kwargs: Any, + ) -> LeaveChat: + """ + Shortcut for method :class:`aiogram.methods.leave_chat.LeaveChat` + will automatically fill method attributes: + + - :code:`chat_id` + + 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 + + :return: instance of method :class:`aiogram.methods.leave_chat.LeaveChat` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import LeaveChat + + return LeaveChat( + chat_id=self.id, + **kwargs, + ).as_(self._bot) + + def unpin_all_messages( + self, + **kwargs: Any, + ) -> UnpinAllChatMessages: + """ + Shortcut for method :class:`aiogram.methods.unpin_all_chat_messages.UnpinAllChatMessages` + will automatically fill method attributes: + + - :code:`chat_id` + + 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 + + :return: instance of method :class:`aiogram.methods.unpin_all_chat_messages.UnpinAllChatMessages` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import UnpinAllChatMessages + + return UnpinAllChatMessages( + chat_id=self.id, + **kwargs, + ).as_(self._bot) + + def unpin_message( + self, + business_connection_id: str | None = None, + message_id: int | None = None, + **kwargs: Any, + ) -> UnpinChatMessage: + """ + Shortcut for method :class:`aiogram.methods.unpin_chat_message.UnpinChatMessage` + will automatically fill method attributes: + + - :code:`chat_id` + + 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 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!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import UnpinChatMessage + + return UnpinChatMessage( + chat_id=self.id, + business_connection_id=business_connection_id, + message_id=message_id, + **kwargs, + ).as_(self._bot) + + def pin_message( + self, + message_id: int, + business_connection_id: str | None = None, + disable_notification: bool | None = None, + **kwargs: Any, + ) -> PinChatMessage: + """ + Shortcut for method :class:`aiogram.methods.pin_chat_message.PinChatMessage` + will automatically fill method attributes: + + - :code:`chat_id` + + 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` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import PinChatMessage + + return PinChatMessage( + chat_id=self.id, + message_id=message_id, + business_connection_id=business_connection_id, + disable_notification=disable_notification, + **kwargs, + ).as_(self._bot) + + def set_administrator_custom_title( + self, + user_id: int, + custom_title: str, + **kwargs: Any, + ) -> SetChatAdministratorCustomTitle: + """ + Shortcut for method :class:`aiogram.methods.set_chat_administrator_custom_title.SetChatAdministratorCustomTitle` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setchatadministratorcustomtitle + + :param user_id: Unique identifier of the target user + :param custom_title: New custom title for the administrator; 0-16 characters, emoji are not allowed + :return: instance of method :class:`aiogram.methods.set_chat_administrator_custom_title.SetChatAdministratorCustomTitle` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SetChatAdministratorCustomTitle + + return SetChatAdministratorCustomTitle( + chat_id=self.id, + user_id=user_id, + custom_title=custom_title, + **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: bool | None = None, + **kwargs: Any, + ) -> SetChatPermissions: + """ + Shortcut for method :class:`aiogram.methods.set_chat_permissions.SetChatPermissions` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#setchatpermissions + + :param permissions: A JSON-serialized object for new default chat permissions + :param use_independent_chat_permissions: 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. + :return: instance of method :class:`aiogram.methods.set_chat_permissions.SetChatPermissions` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SetChatPermissions + + return SetChatPermissions( + chat_id=self.id, + permissions=permissions, + use_independent_chat_permissions=use_independent_chat_permissions, + **kwargs, + ).as_(self._bot) + + def promote( + self, + user_id: int, + 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: + """ + Shortcut for method :class:`aiogram.methods.promote_chat_member.PromoteChatMember` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#promotechatmember + + :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, 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. 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, 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!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import PromoteChatMember + + return PromoteChatMember( + chat_id=self.id, + user_id=user_id, + is_anonymous=is_anonymous, + can_manage_chat=can_manage_chat, + can_delete_messages=can_delete_messages, + can_manage_video_chats=can_manage_video_chats, + can_restrict_members=can_restrict_members, + can_promote_members=can_promote_members, + can_change_info=can_change_info, + can_invite_users=can_invite_users, + can_post_stories=can_post_stories, + can_edit_stories=can_edit_stories, + can_delete_stories=can_delete_stories, + can_post_messages=can_post_messages, + 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) + + def restrict( + self, + user_id: int, + permissions: ChatPermissions, + use_independent_chat_permissions: bool | None = None, + until_date: DateTimeUnion | None = None, + **kwargs: Any, + ) -> RestrictChatMember: + """ + Shortcut for method :class:`aiogram.methods.restrict_chat_member.RestrictChatMember` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#restrictchatmember + + :param user_id: Unique identifier of the target user + :param permissions: A JSON-serialized object for new user permissions + :param use_independent_chat_permissions: 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. + :param until_date: 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 + :return: instance of method :class:`aiogram.methods.restrict_chat_member.RestrictChatMember` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import RestrictChatMember + + return RestrictChatMember( + chat_id=self.id, + user_id=user_id, + permissions=permissions, + use_independent_chat_permissions=use_independent_chat_permissions, + until_date=until_date, + **kwargs, + ).as_(self._bot) + + def unban( + self, + user_id: int, + only_if_banned: bool | None = None, + **kwargs: Any, + ) -> UnbanChatMember: + """ + Shortcut for method :class:`aiogram.methods.unban_chat_member.UnbanChatMember` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#unbanchatmember + + :param user_id: Unique identifier of the target user + :param only_if_banned: Do nothing if the user is not banned + :return: instance of method :class:`aiogram.methods.unban_chat_member.UnbanChatMember` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import UnbanChatMember + + return UnbanChatMember( + chat_id=self.id, + user_id=user_id, + only_if_banned=only_if_banned, + **kwargs, + ).as_(self._bot) + + def ban( + self, + user_id: int, + until_date: DateTimeUnion | None = None, + revoke_messages: bool | None = None, + **kwargs: Any, + ) -> BanChatMember: + """ + Shortcut for method :class:`aiogram.methods.ban_chat_member.BanChatMember` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#banchatmember + + :param user_id: Unique identifier of the target user + :param until_date: 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. + :param revoke_messages: 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. + :return: instance of method :class:`aiogram.methods.ban_chat_member.BanChatMember` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import BanChatMember + + return BanChatMember( + chat_id=self.id, + user_id=user_id, + until_date=until_date, + revoke_messages=revoke_messages, + **kwargs, + ).as_(self._bot) + + def set_description( + self, + description: str | None = None, + **kwargs: Any, + ) -> SetChatDescription: + """ + Shortcut for method :class:`aiogram.methods.set_chat_description.SetChatDescription` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#setchatdescription + + :param description: New chat description, 0-255 characters + :return: instance of method :class:`aiogram.methods.set_chat_description.SetChatDescription` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SetChatDescription + + return SetChatDescription( + chat_id=self.id, + description=description, + **kwargs, + ).as_(self._bot) + + def set_title( + self, + title: str, + **kwargs: Any, + ) -> SetChatTitle: + """ + Shortcut for method :class:`aiogram.methods.set_chat_title.SetChatTitle` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#setchattitle + + :param title: New chat title, 1-128 characters + :return: instance of method :class:`aiogram.methods.set_chat_title.SetChatTitle` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SetChatTitle + + return SetChatTitle( + chat_id=self.id, + title=title, + **kwargs, + ).as_(self._bot) + + def delete_photo( + self, + **kwargs: Any, + ) -> DeleteChatPhoto: + """ + Shortcut for method :class:`aiogram.methods.delete_chat_photo.DeleteChatPhoto` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#deletechatphoto + + :return: instance of method :class:`aiogram.methods.delete_chat_photo.DeleteChatPhoto` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import DeleteChatPhoto + + return DeleteChatPhoto( + chat_id=self.id, + **kwargs, + ).as_(self._bot) + + def set_photo( + self, + photo: InputFile, + **kwargs: Any, + ) -> SetChatPhoto: + """ + Shortcut for method :class:`aiogram.methods.set_chat_photo.SetChatPhoto` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#setchatphoto + + :param photo: New chat photo, uploaded using multipart/form-data + :return: instance of method :class:`aiogram.methods.set_chat_photo.SetChatPhoto` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SetChatPhoto + + return SetChatPhoto( + chat_id=self.id, + photo=photo, + **kwargs, + ).as_(self._bot) + + def unpin_all_general_forum_topic_messages( + self, + **kwargs: Any, + ) -> UnpinAllGeneralForumTopicMessages: + """ + Shortcut for method :class:`aiogram.methods.unpin_all_general_forum_topic_messages.UnpinAllGeneralForumTopicMessages` + will automatically fill method attributes: + + - :code:`chat_id` + + 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. + + Source: https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages + + :return: instance of method :class:`aiogram.methods.unpin_all_general_forum_topic_messages.UnpinAllGeneralForumTopicMessages` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import UnpinAllGeneralForumTopicMessages + + return UnpinAllGeneralForumTopicMessages( + chat_id=self.id, + **kwargs, + ).as_(self._bot) diff --git a/aiogram/types/chat_administrator_rights.py b/aiogram/types/chat_administrator_rights.py new file mode 100644 index 00000000..4c0811b9 --- /dev/null +++ b/aiogram/types/chat_administrator_rights.py @@ -0,0 +1,102 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + pass + + +class ChatAdministratorRights(TelegramObject): + """ + Represents the rights of an administrator in a chat. + + Source: https://core.telegram.org/bots/api#chatadministratorrights + """ + + 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, 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 + """:code:`True`, if the administrator can manage video chats""" + can_restrict_members: bool + """:code:`True`, if the administrator can restrict, ban or unban chat members, or access supergroup statistics""" + can_promote_members: bool + """: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 the user)""" + can_change_info: bool + """:code:`True`, if the user is allowed to change the chat title, photo and other settings""" + can_invite_users: bool + """:code:`True`, if the user is allowed to invite new users to the chat""" + can_post_stories: bool + """:code:`True`, if the administrator can post stories to the chat""" + can_edit_stories: bool + """: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: 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: bool | None = None + """*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only""" + 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + is_anonymous: bool, + can_manage_chat: bool, + can_delete_messages: bool, + can_manage_video_chats: bool, + can_restrict_members: bool, + can_promote_members: bool, + can_change_info: bool, + can_invite_users: bool, + can_post_stories: bool, + can_edit_stories: bool, + can_delete_stories: bool, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + is_anonymous=is_anonymous, + can_manage_chat=can_manage_chat, + can_delete_messages=can_delete_messages, + can_manage_video_chats=can_manage_video_chats, + can_restrict_members=can_restrict_members, + can_promote_members=can_promote_members, + can_change_info=can_change_info, + can_invite_users=can_invite_users, + can_post_stories=can_post_stories, + can_edit_stories=can_edit_stories, + can_delete_stories=can_delete_stories, + can_post_messages=can_post_messages, + 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 new file mode 100644 index 00000000..c234c8e6 --- /dev/null +++ b/aiogram/types/chat_background.py @@ -0,0 +1,32 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .background_type_union import BackgroundTypeUnion + + +class ChatBackground(TelegramObject): + """ + This object represents a chat background. + + Source: https://core.telegram.org/bots/api#chatbackground + """ + + type: BackgroundTypeUnion + """Type of the background""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, type: BackgroundTypeUnion, **__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/chat_boost.py b/aiogram/types/chat_boost.py new file mode 100644 index 00000000..a4d2dc28 --- /dev/null +++ b/aiogram/types/chat_boost.py @@ -0,0 +1,51 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject +from .custom import DateTime + +if TYPE_CHECKING: + from .chat_boost_source_union import ChatBoostSourceUnion + + +class ChatBoost(TelegramObject): + """ + This object contains information about a chat boost. + + Source: https://core.telegram.org/bots/api#chatboost + """ + + boost_id: str + """Unique identifier of the boost""" + add_date: DateTime + """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: ChatBoostSourceUnion + """Source of the added boost""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + boost_id: str, + add_date: DateTime, + expiration_date: DateTime, + source: ChatBoostSourceUnion, + **__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__( + boost_id=boost_id, + add_date=add_date, + expiration_date=expiration_date, + source=source, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/chat_boost_added.py b/aiogram/types/chat_boost_added.py new file mode 100644 index 00000000..4473eae7 --- /dev/null +++ b/aiogram/types/chat_boost_added.py @@ -0,0 +1,25 @@ +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class ChatBoostAdded(TelegramObject): + """ + This object represents a service message about a user boosting a chat. + + Source: https://core.telegram.org/bots/api#chatboostadded + """ + + boost_count: int + """Number of boosts added by the user""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, boost_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__(boost_count=boost_count, **__pydantic_kwargs) diff --git a/aiogram/types/chat_boost_removed.py b/aiogram/types/chat_boost_removed.py new file mode 100644 index 00000000..8ce7dee1 --- /dev/null +++ b/aiogram/types/chat_boost_removed.py @@ -0,0 +1,52 @@ +from __future__ import annotations + +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_union import ChatBoostSourceUnion + + +class ChatBoostRemoved(TelegramObject): + """ + This object represents a boost removed from a chat. + + Source: https://core.telegram.org/bots/api#chatboostremoved + """ + + chat: Chat + """Chat which was boosted""" + boost_id: str + """Unique identifier of the boost""" + remove_date: DateTime + """Point in time (Unix timestamp) when the boost was removed""" + source: ChatBoostSourceUnion + """Source of the removed boost""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat: Chat, + boost_id: str, + remove_date: DateTime, + source: ChatBoostSourceUnion, + **__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=chat, + boost_id=boost_id, + remove_date=remove_date, + source=source, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/chat_boost_source.py b/aiogram/types/chat_boost_source.py new file mode 100644 index 00000000..3d2c262e --- /dev/null +++ b/aiogram/types/chat_boost_source.py @@ -0,0 +1,13 @@ +from aiogram.types import TelegramObject + + +class ChatBoostSource(TelegramObject): + """ + This object describes the source of a chat boost. It can be one of + + - :class:`aiogram.types.chat_boost_source_premium.ChatBoostSourcePremium` + - :class:`aiogram.types.chat_boost_source_gift_code.ChatBoostSourceGiftCode` + - :class:`aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway` + + Source: https://core.telegram.org/bots/api#chatboostsource + """ diff --git a/aiogram/types/chat_boost_source_gift_code.py b/aiogram/types/chat_boost_source_gift_code.py new file mode 100644 index 00000000..554e58fe --- /dev/null +++ b/aiogram/types/chat_boost_source_gift_code.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import ChatBoostSourceType +from .chat_boost_source import ChatBoostSource + +if TYPE_CHECKING: + from .user import User + + +class ChatBoostSourceGiftCode(ChatBoostSource): + """ + The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription. + + Source: https://core.telegram.org/bots/api#chatboostsourcegiftcode + """ + + source: Literal[ChatBoostSourceType.GIFT_CODE] = ChatBoostSourceType.GIFT_CODE + """Source of the boost, always 'gift_code'""" + user: User + """User for which the gift code was created""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[ChatBoostSourceType.GIFT_CODE] = ChatBoostSourceType.GIFT_CODE, + 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__(source=source, user=user, **__pydantic_kwargs) diff --git a/aiogram/types/chat_boost_source_giveaway.py b/aiogram/types/chat_boost_source_giveaway.py new file mode 100644 index 00000000..89b1d675 --- /dev/null +++ b/aiogram/types/chat_boost_source_giveaway.py @@ -0,0 +1,55 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import ChatBoostSourceType +from .chat_boost_source import ChatBoostSource + +if TYPE_CHECKING: + from .user import User + + +class ChatBoostSourceGiveaway(ChatBoostSource): + """ + 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 + """ + + source: Literal[ChatBoostSourceType.GIVEAWAY] = ChatBoostSourceType.GIVEAWAY + """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: 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[ChatBoostSourceType.GIVEAWAY] = ChatBoostSourceType.GIVEAWAY, + giveaway_message_id: int, + user: User | None = None, + prize_star_count: int | None = None, + is_unclaimed: 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__( + 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_premium.py b/aiogram/types/chat_boost_source_premium.py new file mode 100644 index 00000000..97b47e65 --- /dev/null +++ b/aiogram/types/chat_boost_source_premium.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import ChatBoostSourceType +from .chat_boost_source import ChatBoostSource + +if TYPE_CHECKING: + from .user import User + + +class ChatBoostSourcePremium(ChatBoostSource): + """ + The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user. + + Source: https://core.telegram.org/bots/api#chatboostsourcepremium + """ + + source: Literal[ChatBoostSourceType.PREMIUM] = ChatBoostSourceType.PREMIUM + """Source of the boost, always 'premium'""" + user: User + """User that boosted the chat""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[ChatBoostSourceType.PREMIUM] = ChatBoostSourceType.PREMIUM, + 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__(source=source, user=user, **__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_boost_updated.py b/aiogram/types/chat_boost_updated.py new file mode 100644 index 00000000..0921c961 --- /dev/null +++ b/aiogram/types/chat_boost_updated.py @@ -0,0 +1,35 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .chat import Chat + from .chat_boost import ChatBoost + + +class ChatBoostUpdated(TelegramObject): + """ + This object represents a boost added to a chat or changed. + + Source: https://core.telegram.org/bots/api#chatboostupdated + """ + + chat: Chat + """Chat which was boosted""" + boost: ChatBoost + """Information about the chat boost""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat: Chat, boost: ChatBoost, **__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=chat, boost=boost, **__pydantic_kwargs) diff --git a/aiogram/types/chat_full_info.py b/aiogram/types/chat_full_info.py new file mode 100644 index 00000000..93fb0a00 --- /dev/null +++ b/aiogram/types/chat_full_info.py @@ -0,0 +1,260 @@ +from __future__ import annotations + +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 + from .business_opening_hours import BusinessOpeningHours + from .chat_location import ChatLocation + from .chat_permissions import ChatPermissions + from .chat_photo import ChatPhoto + from .message import Message + from .reaction_type_union import ReactionTypeUnion + from .unique_gift_colors import UniqueGiftColors + from .user_rating import UserRating + + +class ChatFullInfo(Chat): + """ + This object contains full information about a chat. + + Source: https://core.telegram.org/bots/api#chatfullinfo + """ + + id: int + """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'""" + accent_color_id: int + """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""" + 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: str | None = None + """*Optional*. Username, for private chats, supergroups and channels if available""" + first_name: str | None = None + """*Optional*. First name of the other party in a private chat""" + last_name: str | None = None + """*Optional*. Last name of the other party in a private chat""" + is_forum: bool | None = None + """*Optional*. :code:`True`, if the supergroup chat is a forum (has `topics `_ enabled)""" + 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: list[str] | None = None + """*Optional*. If non-empty, the list of all `active chat usernames `_; for private chats, supergroups and channels""" + birthdate: Birthdate | None = None + """*Optional*. For private chats, the date of birth of the user""" + business_intro: BusinessIntro | None = None + """*Optional*. For private chats with business accounts, the intro of the business""" + business_location: BusinessLocation | None = None + """*Optional*. For private chats with business accounts, the location of the business""" + business_opening_hours: BusinessOpeningHours | None = None + """*Optional*. For private chats with business accounts, the opening hours of the business""" + personal_chat: Chat | None = None + """*Optional*. For private chats, the personal channel of the user""" + 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: 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: 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: str | None = None + """*Optional*. Custom emoji identifier of the emoji chosen by the chat for its profile background""" + 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: 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: str | None = None + """*Optional*. Bio of the other party in a private chat""" + 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: 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: bool | None = None + """*Optional*. :code:`True`, if users need to join the supergroup before they can send messages""" + 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: str | None = None + """*Optional*. Description, for groups, supergroups and channel chats""" + invite_link: str | None = None + """*Optional*. Primary invite link, for groups, supergroups and channel chats""" + pinned_message: Message | None = None + """*Optional*. The most recent pinned message (by sending date)""" + permissions: ChatPermissions | None = None + """*Optional*. Default chat member permissions, for groups and supergroups""" + 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: int | None = None + """*Optional*. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds""" + 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: 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: 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: bool | None = None + """*Optional*. :code:`True`, if non-administrators can only get the list of bots and administrators in the chat""" + has_protected_content: bool | None = None + """*Optional*. :code:`True`, if messages from the chat can't be forwarded to other chats""" + 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: str | None = None + """*Optional*. For supergroups, name of the group sticker set""" + can_set_sticker_set: bool | None = None + """*Optional*. :code:`True`, if the bot can change the group sticker set""" + 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: 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: 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: int, + type: str, + accent_color_id: int, + max_reaction_count: int, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + id=id, + 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, + business_intro=business_intro, + 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, + profile_background_custom_emoji_id=profile_background_custom_emoji_id, + emoji_status_custom_emoji_id=emoji_status_custom_emoji_id, + emoji_status_expiration_date=emoji_status_expiration_date, + bio=bio, + has_private_forwards=has_private_forwards, + has_restricted_voice_and_video_messages=has_restricted_voice_and_video_messages, + join_to_send_messages=join_to_send_messages, + join_by_request=join_by_request, + description=description, + invite_link=invite_link, + pinned_message=pinned_message, + permissions=permissions, + can_send_paid_media=can_send_paid_media, + slow_mode_delay=slow_mode_delay, + unrestrict_boost_count=unrestrict_boost_count, + message_auto_delete_time=message_auto_delete_time, + has_aggressive_anti_spam_enabled=has_aggressive_anti_spam_enabled, + has_hidden_members=has_hidden_members, + has_protected_content=has_protected_content, + has_visible_history=has_visible_history, + sticker_set_name=sticker_set_name, + can_set_sticker_set=can_set_sticker_set, + 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 1654079d..3761e464 100644 --- a/aiogram/types/chat_invite_link.py +++ b/aiogram/types/chat_invite_link.py @@ -1,9 +1,9 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Optional, Union +from typing import TYPE_CHECKING, Any from .base import TelegramObject +from .custom import DateTime if TYPE_CHECKING: from .user import User @@ -26,11 +26,54 @@ 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[Union[datetime.datetime, datetime.timedelta, int]] = 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 - """*Optional*. 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 + 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: 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + invite_link: str, + creator: User, + creates_join_request: bool, + is_primary: bool, + is_revoked: bool, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + invite_link=invite_link, + creator=creator, + creates_join_request=creates_join_request, + is_primary=is_primary, + is_revoked=is_revoked, + name=name, + 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 b9c862ee..46f14d32 100644 --- a/aiogram/types/chat_join_request.py +++ b/aiogram/types/chat_join_request.py @@ -1,18 +1,49 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any from pydantic import Field +from ..client.default import Default from .base import TelegramObject +from .custom import DateTime if TYPE_CHECKING: - from ..methods import ApproveChatJoinRequest, DeclineChatJoinRequest - -if TYPE_CHECKING: + from ..methods import ( + ApproveChatJoinRequest, + DeclineChatJoinRequest, + SendAnimation, + SendAudio, + SendContact, + SendDice, + SendDocument, + SendGame, + SendInvoice, + SendLocation, + SendMediaGroup, + SendMessage, + SendPhoto, + SendPoll, + SendSticker, + SendVenue, + SendVideo, + SendVideoNote, + SendVoice, + ) from .chat import Chat from .chat_invite_link import ChatInviteLink + 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_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 .reply_parameters import ReplyParameters + from .suggested_post_parameters import SuggestedPostParameters from .user import User @@ -27,31 +58,2902 @@ class ChatJoinRequest(TelegramObject): """Chat to which the request was sent""" from_user: User = Field(..., alias="from") """User that sent the join request""" - date: datetime.datetime + user_chat_id: int + """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""" - def approve(self) -> ApproveChatJoinRequest: + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat: Chat, + from_user: User, + user_chat_id: int, + date: DateTime, + bio: str | None = None, + invite_link: ChatInviteLink | 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=chat, + from_user=from_user, + user_chat_id=user_chat_id, + date=date, + bio=bio, + invite_link=invite_link, + **__pydantic_kwargs, + ) + + def approve( + self, + **kwargs: Any, + ) -> ApproveChatJoinRequest: """ - Use this method to approve a chat join request. + Shortcut for method :class:`aiogram.methods.approve_chat_join_request.ApproveChatJoinRequest` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`user_id` + + 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. + + Source: https://core.telegram.org/bots/api#approvechatjoinrequest + + :return: instance of method :class:`aiogram.methods.approve_chat_join_request.ApproveChatJoinRequest` """ - from ..methods import ApproveChatJoinRequest + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import ApproveChatJoinRequest return ApproveChatJoinRequest( chat_id=self.chat.id, user_id=self.from_user.id, - ) + **kwargs, + ).as_(self._bot) - def decline(self) -> DeclineChatJoinRequest: + def decline( + self, + **kwargs: Any, + ) -> DeclineChatJoinRequest: """ - Use this method to decline a chat join request. + Shortcut for method :class:`aiogram.methods.decline_chat_join_request.DeclineChatJoinRequest` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`user_id` + + 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. + + Source: https://core.telegram.org/bots/api#declinechatjoinrequest + + :return: instance of method :class:`aiogram.methods.decline_chat_join_request.DeclineChatJoinRequest` """ - from ..methods import DeclineChatJoinRequest + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import DeclineChatJoinRequest return DeclineChatJoinRequest( chat_id=self.chat.id, user_id=self.from_user.id, - ) + **kwargs, + ).as_(self._bot) + + 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 + + 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 answer_pm( + 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 + + return SendMessage( + chat_id=self.user_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 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 + + 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 answer_animation_pm( + 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 + + return SendAnimation( + chat_id=self.user_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 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 + + 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 answer_audio_pm( + 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 + + return SendAudio( + chat_id=self.user_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 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 + + 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 answer_contact_pm( + 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 + + return SendContact( + chat_id=self.user_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 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 + + 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 answer_document_pm( + 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 + + return SendDocument( + chat_id=self.user_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 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 + + 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 answer_game_pm( + 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 + + return SendGame( + chat_id=self.user_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 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 + + 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 answer_invoice_pm( + 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 + + return SendInvoice( + chat_id=self.user_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 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 + + 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 answer_location_pm( + 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 + + return SendLocation( + chat_id=self.user_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 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 + + 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 answer_media_group_pm( + 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 + + return SendMediaGroup( + chat_id=self.user_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 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 + + 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 answer_photo_pm( + 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 + + return SendPhoto( + chat_id=self.user_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 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 + + 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 answer_poll_pm( + 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 + + return SendPoll( + chat_id=self.user_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 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 + + 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 answer_dice_pm( + 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 + + return SendDice( + 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, + reply_to_message_id=reply_to_message_id, + **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 + + 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 answer_sticker_pm( + 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 + + return SendSticker( + chat_id=self.user_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 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 + + 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 answer_venue_pm( + 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 + + return SendVenue( + chat_id=self.user_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 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 + + 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 answer_video_pm( + 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 + + return SendVideo( + chat_id=self.user_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 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 + + 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 answer_video_note_pm( + 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 + + return SendVideoNote( + chat_id=self.user_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 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 + + 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 answer_voice_pm( + 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 + + return SendVoice( + chat_id=self.user_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) diff --git a/aiogram/types/chat_location.py b/aiogram/types/chat_location.py index 89b28d7c..ad64a3c3 100644 --- a/aiogram/types/chat_location.py +++ b/aiogram/types/chat_location.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -19,3 +19,16 @@ class ChatLocation(TelegramObject): """The location to which the supergroup is connected. Can't be a live location.""" address: str """Location address; 1-64 characters, as defined by the chat owner""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, location: Location, address: 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__(location=location, address=address, **__pydantic_kwargs) diff --git a/aiogram/types/chat_member.py b/aiogram/types/chat_member.py index b3d1419c..018bebda 100644 --- a/aiogram/types/chat_member.py +++ b/aiogram/types/chat_member.py @@ -1,13 +1,7 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Optional, Union - from .base import TelegramObject -if TYPE_CHECKING: - from .user import User - class ChatMember(TelegramObject): """ @@ -22,48 +16,3 @@ class ChatMember(TelegramObject): Source: https://core.telegram.org/bots/api#chatmember """ - - status: str - """...""" - user: Optional[User] = None - """*Optional*. Information about the user""" - is_anonymous: Optional[bool] = None - """*Optional*. :code:`True`, if the user's presence in the chat is hidden""" - custom_title: Optional[str] = None - """*Optional*. Custom title for this user""" - can_be_edited: Optional[bool] = None - """*Optional*. :code:`True`, if the bot is allowed to edit administrator privileges of that user""" - can_manage_chat: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege""" - can_delete_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can delete messages of other users""" - can_manage_voice_chats: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can manage voice chats""" - can_restrict_members: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can restrict, ban or unban chat members""" - can_promote_members: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)""" - can_change_info: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to change the chat title, photo and other settings""" - can_invite_users: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to invite new users to the chat""" - can_post_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can post in the channel; channels only""" - can_edit_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only""" - can_pin_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to pin messages; groups and supergroups only""" - is_member: Optional[bool] = None - """*Optional*. :code:`True`, if the user is a member of the chat at the moment of the request""" - can_send_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, locations and venues""" - can_send_media_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and 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 - """*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 - """*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages""" - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None - """*Optional*. Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever""" diff --git a/aiogram/types/chat_member_administrator.py b/aiogram/types/chat_member_administrator.py index a27156f9..1d8915bc 100644 --- a/aiogram/types/chat_member_administrator.py +++ b/aiogram/types/chat_member_administrator.py @@ -1,9 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional - -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import ChatMemberStatus from .chat_member import ChatMember if TYPE_CHECKING: @@ -17,7 +16,7 @@ class ChatMemberAdministrator(ChatMember): Source: https://core.telegram.org/bots/api#chatmemberadministrator """ - status: str = Field("administrator", const=True) + status: Literal[ChatMemberStatus.ADMINISTRATOR] = ChatMemberStatus.ADMINISTRATOR """The member's status in the chat, always 'administrator'""" user: User """Information about the user""" @@ -26,24 +25,95 @@ 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, chat statistics, message statistics in channels, see channel members, 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, 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_voice_chats: bool - """:code:`True`, if the administrator can manage voice chats""" + can_manage_video_chats: bool + """:code:`True`, if the administrator can manage video chats""" can_restrict_members: bool - """:code:`True`, if the administrator can restrict, ban or unban chat members""" + """:code:`True`, if the administrator can restrict, ban or unban chat members, or access supergroup statistics""" can_promote_members: bool - """:code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)""" + """: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 the user)""" can_change_info: bool """:code:`True`, if the user is allowed to change the chat title, photo and other settings""" can_invite_users: bool """:code:`True`, if the user is allowed to invite new users to the chat""" - can_post_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can post in the channel; channels only""" - can_edit_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only""" - can_pin_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to pin messages; groups and supergroups only""" - custom_title: Optional[str] = None + can_post_stories: bool + """:code:`True`, if the administrator can post stories to the chat""" + can_edit_stories: bool + """: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: 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: bool | None = None + """*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only""" + 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.""" + custom_title: str | None = None """*Optional*. Custom title for this user""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + status: Literal[ChatMemberStatus.ADMINISTRATOR] = ChatMemberStatus.ADMINISTRATOR, + user: User, + can_be_edited: bool, + is_anonymous: bool, + can_manage_chat: bool, + can_delete_messages: bool, + can_manage_video_chats: bool, + can_restrict_members: bool, + can_promote_members: bool, + can_change_info: bool, + can_invite_users: bool, + can_post_stories: bool, + can_edit_stories: bool, + can_delete_stories: bool, + 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!!! + # 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, + can_be_edited=can_be_edited, + is_anonymous=is_anonymous, + can_manage_chat=can_manage_chat, + can_delete_messages=can_delete_messages, + can_manage_video_chats=can_manage_video_chats, + can_restrict_members=can_restrict_members, + can_promote_members=can_promote_members, + can_change_info=can_change_info, + can_invite_users=can_invite_users, + can_post_stories=can_post_stories, + can_edit_stories=can_edit_stories, + can_delete_stories=can_delete_stories, + can_post_messages=can_post_messages, + 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_banned.py b/aiogram/types/chat_member_banned.py index 21b725e8..65776c52 100644 --- a/aiogram/types/chat_member_banned.py +++ b/aiogram/types/chat_member_banned.py @@ -1,11 +1,10 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Union - -from pydantic import Field +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 @@ -18,9 +17,27 @@ class ChatMemberBanned(ChatMember): Source: https://core.telegram.org/bots/api#chatmemberbanned """ - status: str = Field("kicked", const=True) + status: Literal[ChatMemberStatus.KICKED] = ChatMemberStatus.KICKED """The member's status in the chat, always 'kicked'""" user: User """Information about the user""" - until_date: Union[datetime.datetime, datetime.timedelta, int] - """Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever""" + until_date: DateTime + """Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + status: Literal[ChatMemberStatus.KICKED] = ChatMemberStatus.KICKED, + user: User, + until_date: DateTime, + **__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, until_date=until_date, **__pydantic_kwargs) diff --git a/aiogram/types/chat_member_left.py b/aiogram/types/chat_member_left.py index 02df05de..3870d17f 100644 --- a/aiogram/types/chat_member_left.py +++ b/aiogram/types/chat_member_left.py @@ -1,9 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING - -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import ChatMemberStatus from .chat_member import ChatMember if TYPE_CHECKING: @@ -17,7 +16,24 @@ class ChatMemberLeft(ChatMember): Source: https://core.telegram.org/bots/api#chatmemberleft """ - status: str = Field("left", const=True) + status: Literal[ChatMemberStatus.LEFT] = ChatMemberStatus.LEFT """The member's status in the chat, always 'left'""" user: User """Information about the user""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + status: Literal[ChatMemberStatus.LEFT] = ChatMemberStatus.LEFT, + 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__(status=status, user=user, **__pydantic_kwargs) diff --git a/aiogram/types/chat_member_member.py b/aiogram/types/chat_member_member.py index db5d5731..0cd89e76 100644 --- a/aiogram/types/chat_member_member.py +++ b/aiogram/types/chat_member_member.py @@ -1,10 +1,10 @@ from __future__ import annotations -from typing import TYPE_CHECKING - -from pydantic import Field +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 @@ -17,7 +17,32 @@ class ChatMemberMember(ChatMember): Source: https://core.telegram.org/bots/api#chatmembermember """ - status: str = Field("member", const=True) + status: Literal[ChatMemberStatus.MEMBER] = ChatMemberStatus.MEMBER """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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + 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, 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 30853996..c3f9ddf3 100644 --- a/aiogram/types/chat_member_owner.py +++ b/aiogram/types/chat_member_owner.py @@ -1,9 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional - -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import ChatMemberStatus from .chat_member import ChatMember if TYPE_CHECKING: @@ -17,11 +16,36 @@ class ChatMemberOwner(ChatMember): Source: https://core.telegram.org/bots/api#chatmemberowner """ - status: str = Field("creator", const=True) + status: Literal[ChatMemberStatus.CREATOR] = ChatMemberStatus.CREATOR """The member's status in the chat, always 'creator'""" user: User """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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + status: Literal[ChatMemberStatus.CREATOR] = ChatMemberStatus.CREATOR, + user: User, + is_anonymous: bool, + custom_title: 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__( + status=status, + user=user, + is_anonymous=is_anonymous, + custom_title=custom_title, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/chat_member_restricted.py b/aiogram/types/chat_member_restricted.py index 7e244024..0fc162ff 100644 --- a/aiogram/types/chat_member_restricted.py +++ b/aiogram/types/chat_member_restricted.py @@ -1,11 +1,10 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Union - -from pydantic import Field +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 @@ -18,27 +17,100 @@ class ChatMemberRestricted(ChatMember): Source: https://core.telegram.org/bots/api#chatmemberrestricted """ - status: str = Field("restricted", const=True) + status: Literal[ChatMemberStatus.RESTRICTED] = ChatMemberStatus.RESTRICTED """The member's status in the chat, always 'restricted'""" user: User """Information about the user""" is_member: bool """:code:`True`, if the user is a member of the chat at the moment of the request""" + can_send_messages: bool + """:code:`True`, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues""" + can_send_audios: bool + """:code:`True`, if the user is allowed to send audios""" + can_send_documents: bool + """:code:`True`, if the user is allowed to send documents""" + can_send_photos: bool + """:code:`True`, if the user is allowed to send photos""" + can_send_videos: bool + """:code:`True`, if the user is allowed to send videos""" + can_send_video_notes: bool + """:code:`True`, if the user is allowed to send video notes""" + 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 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 """:code:`True`, if the user is allowed to invite new users to the chat""" can_pin_messages: bool """:code:`True`, if the user is allowed to pin messages""" - can_send_messages: bool - """:code:`True`, if the user is allowed to send text messages, contacts, locations and venues""" - can_send_media_messages: bool - """:code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes""" - can_send_polls: bool - """:code:`True`, if the user is allowed to send polls""" - 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""" - until_date: Union[datetime.datetime, datetime.timedelta, int] - """Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever""" + can_manage_topics: bool + """: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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + status: Literal[ChatMemberStatus.RESTRICTED] = ChatMemberStatus.RESTRICTED, + user: User, + is_member: bool, + can_send_messages: bool, + can_send_audios: bool, + can_send_documents: bool, + can_send_photos: bool, + can_send_videos: bool, + can_send_video_notes: bool, + can_send_voice_notes: bool, + 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!!! + # 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, + is_member=is_member, + can_send_messages=can_send_messages, + can_send_audios=can_send_audios, + can_send_documents=can_send_documents, + can_send_photos=can_send_photos, + can_send_videos=can_send_videos, + can_send_video_notes=can_send_video_notes, + can_send_voice_notes=can_send_voice_notes, + 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 e4e4a340..34cd5c09 100644 --- a/aiogram/types/chat_member_updated.py +++ b/aiogram/types/chat_member_updated.py @@ -1,21 +1,48 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field +from ..client.default import Default from .base import TelegramObject +from .custom import DateTime if TYPE_CHECKING: + from ..methods import ( + SendAnimation, + SendAudio, + SendContact, + SendDice, + SendDocument, + SendGame, + SendInvoice, + SendLocation, + SendMediaGroup, + SendMessage, + SendPhoto, + SendPoll, + SendSticker, + SendVenue, + SendVideo, + SendVideoNote, + SendVoice, + ) 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 .chat_member_union import ChatMemberUnion + 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_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 .reply_parameters import ReplyParameters + from .suggested_post_parameters import SuggestedPostParameters from .user import User @@ -30,25 +57,1451 @@ class ChatMemberUpdated(TelegramObject): """Chat the user belongs to""" from_user: User = Field(..., alias="from") """Performer of the action, which resulted in the change""" - date: datetime.datetime + 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: 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat: Chat, + from_user: User, + date: DateTime, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat=chat, + from_user=from_user, + date=date, + old_chat_member=old_chat_member, + new_chat_member=new_chat_member, + invite_link=invite_link, + via_join_request=via_join_request, + via_chat_folder_invite_link=via_chat_folder_invite_link, + **__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 + + 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 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 + + 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 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 + + 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 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 + + 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 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 + + 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 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 + + 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 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 + + 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 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 + + 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 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 + + 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 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 + + 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 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 + + 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 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 + + 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 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 + + 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 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 + + 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 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 + + 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 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 + + 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 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 + + 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) 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 15ddaba4..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 Optional +from typing import TYPE_CHECKING, Any from .base import MutableTelegramObject @@ -12,19 +12,80 @@ class ChatPermissions(MutableTelegramObject): Source: https://core.telegram.org/bots/api#chatpermissions """ - can_send_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, locations and venues""" - can_send_media_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages""" - can_send_polls: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send polls, implies can_send_messages""" - can_send_other_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages""" - can_add_web_page_previews: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages, implies can_send_media_messages""" - can_change_info: 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: bool | None = None + """*Optional*. :code:`True`, if the user is allowed to send audios""" + can_send_documents: bool | None = None + """*Optional*. :code:`True`, if the user is allowed to send documents""" + can_send_photos: bool | None = None + """*Optional*. :code:`True`, if the user is allowed to send photos""" + can_send_videos: bool | None = None + """*Optional*. :code:`True`, if the user is allowed to send videos""" + can_send_video_notes: bool | None = None + """*Optional*. :code:`True`, if the user is allowed to send video notes""" + can_send_voice_notes: bool | None = None + """*Optional*. :code:`True`, if the user is allowed to send voice notes""" + 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: bool | None = None + """*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages""" + 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + can_send_messages=can_send_messages, + can_send_audios=can_send_audios, + can_send_documents=can_send_documents, + can_send_photos=can_send_photos, + can_send_videos=can_send_videos, + can_send_video_notes=can_send_video_notes, + can_send_voice_notes=can_send_voice_notes, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/chat_photo.py b/aiogram/types/chat_photo.py index a3f95f94..1a64aebf 100644 --- a/aiogram/types/chat_photo.py +++ b/aiogram/types/chat_photo.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -18,3 +20,28 @@ class ChatPhoto(TelegramObject): """File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.""" big_file_unique_id: str """Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + small_file_id: str, + small_file_unique_id: str, + big_file_id: str, + big_file_unique_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__( + small_file_id=small_file_id, + small_file_unique_id=small_file_unique_id, + big_file_id=big_file_id, + big_file_unique_id=big_file_unique_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/chat_shared.py b/aiogram/types/chat_shared.py new file mode 100644 index 00000000..80c38e1a --- /dev/null +++ b/aiogram/types/chat_shared.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from aiogram.types import TelegramObject + +if TYPE_CHECKING: + from .photo_size import PhotoSize + + +class ChatShared(TelegramObject): + """ + This object contains information about a chat that was shared with the bot using a :class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat` button. + + Source: https://core.telegram.org/bots/api#chatshared + """ + + request_id: int + """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: str | None = None + """*Optional*. Title of the chat, if the title was requested by the bot.""" + username: str | None = None + """*Optional*. Username of the chat, if the username was requested by the bot and available.""" + photo: list[PhotoSize] | None = None + """*Optional*. Available sizes of the chat photo, if the photo was requested by the bot""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + request_id: int, + chat_id: int, + title: str | None = None, + username: str | None = None, + photo: list[PhotoSize] | 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, + chat_id=chat_id, + title=title, + username=username, + photo=photo, + **__pydantic_kwargs, + ) 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 2144c0ca..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, Optional +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -14,7 +14,7 @@ if TYPE_CHECKING: class ChosenInlineResult(TelegramObject): """ Represents a `result `_ of an inline query that was chosen by the user and sent to their chat partner. - **Note:** It is necessary to enable `inline feedback `_ via `@Botfather `_ in order to receive these objects in updates. + **Note:** It is necessary to enable `inline feedback `_ via `@BotFather `_ in order to receive these objects in updates. Source: https://core.telegram.org/bots/api#choseninlineresult """ @@ -25,7 +25,34 @@ 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + result_id: str, + from_user: User, + query: str, + location: Location | None = None, + inline_message_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__( + result_id=result_id, + from_user=from_user, + query=query, + location=location, + inline_message_id=inline_message_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/contact.py b/aiogram/types/contact.py index 732b770d..9e7677a4 100644 --- a/aiogram/types/contact.py +++ b/aiogram/types/contact.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -16,9 +16,42 @@ 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + phone_number: str, + first_name: str, + last_name: str | None = None, + user_id: int | None = None, + vcard: 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__( + phone_number=phone_number, + first_name=first_name, + last_name=last_name, + user_id=user_id, + 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 new file mode 100644 index 00000000..660c0be7 --- /dev/null +++ b/aiogram/types/custom.py @@ -0,0 +1,30 @@ +import sys +from datetime import datetime, timezone +from typing import Annotated + +from pydantic import PlainSerializer + +if sys.platform == "win32": # pragma: no cover + + def _datetime_serializer(value: datetime) -> int: + tz = timezone.utc if value.tzinfo else None + + # https://github.com/aiogram/aiogram/issues/349 + # https://github.com/aiogram/aiogram/pull/880 + return round((value - datetime(1970, 1, 1, tzinfo=tz)).total_seconds()) + +else: # pragma: no cover + + def _datetime_serializer(value: datetime) -> int: + return round(value.timestamp()) + + +# Make datetime compatible with Telegram Bot API (unixtime) +DateTime = Annotated[ + datetime, + PlainSerializer( + func=_datetime_serializer, + return_type=int, + when_used="unless-none", + ), +] 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/dice.py b/aiogram/types/dice.py index 00356457..56b84f43 100644 --- a/aiogram/types/dice.py +++ b/aiogram/types/dice.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -15,6 +17,19 @@ class Dice(TelegramObject): value: int """Value of the dice, 1-6 for '🎲', '🎯' and '🎳' base emoji, 1-5 for '🏀' and '⚽' base emoji, 1-64 for '🎰' base emoji""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, emoji: str, value: 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__(emoji=emoji, value=value, **__pydantic_kwargs) + class DiceEmoji: DICE = "🎲" 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 377241d3..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, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -19,11 +19,40 @@ 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.""" - thumb: Optional[PhotoSize] = None - """*Optional*. Document thumbnail as defined by sender""" - file_name: Optional[str] = None - """*Optional*. Original filename as defined by sender""" - mime_type: Optional[str] = None - """*Optional*. MIME type of the file as defined by sender""" - file_size: Optional[int] = None - """*Optional*. File size in bytes""" + thumbnail: PhotoSize | None = None + """*Optional*. Document thumbnail as defined by the sender""" + file_name: str | None = None + """*Optional*. Original filename as defined by the sender""" + mime_type: str | None = None + """*Optional*. MIME type of the file as defined by the sender""" + 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, + 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!!! + # 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, + thumbnail=thumbnail, + file_name=file_name, + mime_type=mime_type, + file_size=file_size, + **__pydantic_kwargs, + ) 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_credentials.py b/aiogram/types/encrypted_credentials.py index 91fd7714..ca03e2a4 100644 --- a/aiogram/types/encrypted_credentials.py +++ b/aiogram/types/encrypted_credentials.py @@ -1,11 +1,13 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject class EncryptedCredentials(TelegramObject): """ - Contains data required for decrypting and authenticating :class:`aiogram.types.encrypted_passport_element.EncryptedPassportElement`. See the `Telegram Passport Documentation `_ for a complete description of the data decryption and authentication processes. + Describes data required for decrypting and authenticating :class:`aiogram.types.encrypted_passport_element.EncryptedPassportElement`. See the `Telegram Passport Documentation `_ for a complete description of the data decryption and authentication processes. Source: https://core.telegram.org/bots/api#encryptedcredentials """ @@ -16,3 +18,16 @@ class EncryptedCredentials(TelegramObject): """Base64-encoded data hash for data authentication""" secret: str """Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, data: str, hash: str, secret: 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__(data=data, hash=hash, secret=secret, **__pydantic_kwargs) diff --git a/aiogram/types/encrypted_passport_element.py b/aiogram/types/encrypted_passport_element.py index 7b958f29..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, List, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -10,7 +10,7 @@ if TYPE_CHECKING: class EncryptedPassportElement(TelegramObject): """ - Contains information about documents or other Telegram Passport elements shared with the bot by the user. + Describes documents or other Telegram Passport elements shared with the bot by the user. Source: https://core.telegram.org/bots/api#encryptedpassportelement """ @@ -19,19 +19,56 @@ 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 - """*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`.""" - phone_number: Optional[str] = None - """*Optional*. User's verified phone number, available only for 'phone_number' type""" - email: Optional[str] = None - """*Optional*. User's verified email address, available only for 'email' type""" - files: Optional[List[PassportFile]] = None - """*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`.""" - front_side: Optional[PassportFile] = None - """*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`.""" - reverse_side: Optional[PassportFile] = None - """*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`.""" - selfie: Optional[PassportFile] = None - """*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`.""" - translation: Optional[List[PassportFile]] = 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`.""" + 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: str | None = None + """*Optional*. User's verified phone number; available only for 'phone_number' type""" + email: str | None = None + """*Optional*. User's verified email address; available only for 'email' type""" + 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: 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: 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: 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: str, + hash: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + hash=hash, + data=data, + phone_number=phone_number, + email=email, + files=files, + front_side=front_side, + reverse_side=reverse_side, + selfie=selfie, + translation=translation, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/error_event.py b/aiogram/types/error_event.py new file mode 100644 index 00000000..e5eafc9c --- /dev/null +++ b/aiogram/types/error_event.py @@ -0,0 +1,28 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from aiogram.types.base import TelegramObject + +if TYPE_CHECKING: + from .update import Update + + +class ErrorEvent(TelegramObject): + """ + Internal event, should be used to receive errors while processing Updates from Telegram + + Source: https://core.telegram.org/bots/api#error-event + """ + + update: Update + """Received update""" + exception: Exception + """Exception""" + + if TYPE_CHECKING: + + def __init__( + __pydantic_self__, *, update: Update, exception: Exception, **__pydantic_kwargs: Any + ) -> None: + super().__init__(update=update, exception=exception, **__pydantic_kwargs) diff --git a/aiogram/types/external_reply_info.py b/aiogram/types/external_reply_info.py new file mode 100644 index 00000000..1b8797b0 --- /dev/null +++ b/aiogram/types/external_reply_info.py @@ -0,0 +1,156 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +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 + from .game import Game + from .giveaway import Giveaway + from .giveaway_winners import GiveawayWinners + from .invoice import Invoice + from .link_preview_options import LinkPreviewOptions + from .location import Location + from .message_origin_union import MessageOriginUnion + from .paid_media_info import PaidMediaInfo + from .photo_size import PhotoSize + from .poll import Poll + from .sticker import Sticker + from .story import Story + from .venue import Venue + from .video import Video + from .video_note import VideoNote + from .voice import Voice + + +class ExternalReplyInfo(TelegramObject): + """ + This object contains information about a message that is being replied to, which may come from another chat or forum topic. + + Source: https://core.telegram.org/bots/api#externalreplyinfo + """ + + origin: MessageOriginUnion + """Origin of the message replied to by the given message""" + chat: Chat | None = None + """*Optional*. Chat the original message belongs to. Available only if the chat is a supergroup or a channel.""" + 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: LinkPreviewOptions | None = None + """*Optional*. Options used for link preview generation for the original message, if it is a text message""" + animation: Animation | None = None + """*Optional*. Message is an animation, information about the animation""" + audio: Audio | None = None + """*Optional*. Message is an audio file, information about the file""" + document: Document | None = None + """*Optional*. Message is a general file, information about the file""" + paid_media: PaidMediaInfo | None = None + """*Optional*. Message contains paid media; information about the paid media""" + photo: list[PhotoSize] | None = None + """*Optional*. Message is a photo, available sizes of the photo""" + sticker: Sticker | None = None + """*Optional*. Message is a sticker, information about the sticker""" + story: Story | None = None + """*Optional*. Message is a forwarded story""" + video: Video | None = None + """*Optional*. Message is a video, information about the video""" + video_note: VideoNote | None = None + """*Optional*. Message is a `video note `_, information about the video message""" + voice: Voice | None = None + """*Optional*. Message is a voice message, information about the file""" + has_media_spoiler: bool | None = None + """*Optional*. :code:`True`, if the message media is covered by a spoiler animation""" + checklist: Checklist | None = None + """*Optional*. Message is a checklist""" + contact: Contact | None = None + """*Optional*. Message is a shared contact, information about the contact""" + dice: Dice | None = None + """*Optional*. Message is a dice with random value""" + game: Game | None = None + """*Optional*. Message is a game, information about the game. `More about games » `_""" + giveaway: Giveaway | None = None + """*Optional*. Message is a scheduled giveaway, information about the giveaway""" + giveaway_winners: GiveawayWinners | None = None + """*Optional*. A giveaway with public winners was completed""" + invoice: Invoice | None = None + """*Optional*. Message is an invoice for a `payment `_, information about the invoice. `More about payments » `_""" + location: Location | None = None + """*Optional*. Message is a shared location, information about the location""" + poll: Poll | None = None + """*Optional*. Message is a native poll, information about the poll""" + venue: Venue | None = None + """*Optional*. Message is a venue, information about the venue""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + origin=origin, + chat=chat, + message_id=message_id, + link_preview_options=link_preview_options, + animation=animation, + audio=audio, + document=document, + paid_media=paid_media, + photo=photo, + sticker=sticker, + story=story, + video=video, + video_note=video_note, + voice=voice, + has_media_spoiler=has_media_spoiler, + checklist=checklist, + contact=contact, + dice=dice, + game=game, + giveaway=giveaway, + giveaway_winners=giveaway_winners, + invoice=invoice, + location=location, + poll=poll, + venue=venue, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/file.py b/aiogram/types/file.py index 9a0e3206..2569d540 100644 --- a/aiogram/types/file.py +++ b/aiogram/types/file.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -9,7 +9,7 @@ class File(TelegramObject): """ This object represents a file ready to be downloaded. The file can be downloaded via the link :code:`https://api.telegram.org/file/bot/`. 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`. - Maximum file size to download is 20 MB + The maximum file size to download is 20 MB Source: https://core.telegram.org/bots/api#file """ @@ -18,7 +18,32 @@ 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 - """*Optional*. File size in bytes, if known""" - file_path: Optional[str] = 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: str | None = None """*Optional*. File path. Use :code:`https://api.telegram.org/file/bot/` to get the file.""" + + 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, + file_size: int | None = None, + file_path: 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__( + file_id=file_id, + file_unique_id=file_unique_id, + file_size=file_size, + file_path=file_path, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/force_reply.py b/aiogram/types/force_reply.py index b69ad94c..053c8d02 100644 --- a/aiogram/types/force_reply.py +++ b/aiogram/types/force_reply.py @@ -1,27 +1,50 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Literal from .base import MutableTelegramObject class ForceReply(MutableTelegramObject): """ - 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 `_. + 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 `_. Not supported in channels and for messages sent on behalf of a Telegram Business account. **Example:** A `poll bot `_ for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll: - Explain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish. - Guide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'. - The last option is definitely more attractive. And if you use :class:`aiogram.types.force_reply.ForceReply` in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions — without any extra work for the user. + The last option is definitely more attractive. And if you use :class:`aiogram.types.force_reply.ForceReply` in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user. Source: https://core.telegram.org/bots/api#forcereply """ - force_reply: bool + 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 - """*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.""" + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + force_reply: Literal[True] = True, + input_field_placeholder: str | None = None, + selective: 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__( + force_reply=force_reply, + input_field_placeholder=input_field_placeholder, + selective=selective, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/forum_topic.py b/aiogram/types/forum_topic.py new file mode 100644 index 00000000..db3da10f --- /dev/null +++ b/aiogram/types/forum_topic.py @@ -0,0 +1,51 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class ForumTopic(TelegramObject): + """ + This object represents a forum topic. + + Source: https://core.telegram.org/bots/api#forumtopic + """ + + message_thread_id: int + """Unique identifier of the forum topic""" + name: str + """Name of the topic""" + icon_color: int + """Color of the topic icon in RGB format""" + 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + message_thread_id: int, + name: str, + icon_color: int, + icon_custom_emoji_id: str | None = None, + is_name_implicit: 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__( + message_thread_id=message_thread_id, + 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_closed.py b/aiogram/types/forum_topic_closed.py new file mode 100644 index 00000000..390b3317 --- /dev/null +++ b/aiogram/types/forum_topic_closed.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from .base import TelegramObject + + +class ForumTopicClosed(TelegramObject): + """ + This object represents a service message about a forum topic closed in the chat. Currently holds no information. + + Source: https://core.telegram.org/bots/api#forumtopicclosed + """ diff --git a/aiogram/types/forum_topic_created.py b/aiogram/types/forum_topic_created.py new file mode 100644 index 00000000..1625014a --- /dev/null +++ b/aiogram/types/forum_topic_created.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class ForumTopicCreated(TelegramObject): + """ + This object represents a service message about a new forum topic created in the chat. + + Source: https://core.telegram.org/bots/api#forumtopiccreated + """ + + name: str + """Name of the topic""" + icon_color: int + """Color of the topic icon in RGB format""" + 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + name: str, + icon_color: int, + icon_custom_emoji_id: str | None = None, + is_name_implicit: 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__( + 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 new file mode 100644 index 00000000..6b011ca4 --- /dev/null +++ b/aiogram/types/forum_topic_edited.py @@ -0,0 +1,35 @@ +from typing import TYPE_CHECKING, Any + +from aiogram.types import TelegramObject + + +class ForumTopicEdited(TelegramObject): + """ + This object represents a service message about an edited forum topic. + + Source: https://core.telegram.org/bots/api#forumtopicedited + """ + + name: str | None = None + """*Optional*. New name of the topic, if it was edited""" + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + name: str | None = None, + icon_custom_emoji_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__( + name=name, icon_custom_emoji_id=icon_custom_emoji_id, **__pydantic_kwargs + ) diff --git a/aiogram/types/forum_topic_reopened.py b/aiogram/types/forum_topic_reopened.py new file mode 100644 index 00000000..e02fbafb --- /dev/null +++ b/aiogram/types/forum_topic_reopened.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from .base import TelegramObject + + +class ForumTopicReopened(TelegramObject): + """ + This object represents a service message about a forum topic reopened in the chat. Currently holds no information. + + Source: https://core.telegram.org/bots/api#forumtopicreopened + """ diff --git a/aiogram/types/game.py b/aiogram/types/game.py index f9b03bd1..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, List, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -21,11 +21,40 @@ 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + title: str, + description: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + title=title, + description=description, + photo=photo, + text=text, + text_entities=text_entities, + animation=animation, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/game_high_score.py b/aiogram/types/game_high_score.py index 30ec941a..5364be6e 100644 --- a/aiogram/types/game_high_score.py +++ b/aiogram/types/game_high_score.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -24,3 +24,16 @@ class GameHighScore(TelegramObject): """User""" score: int """Score""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, position: int, user: User, score: 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__(position=position, user=user, score=score, **__pydantic_kwargs) diff --git a/aiogram/types/general_forum_topic_hidden.py b/aiogram/types/general_forum_topic_hidden.py new file mode 100644 index 00000000..136a2753 --- /dev/null +++ b/aiogram/types/general_forum_topic_hidden.py @@ -0,0 +1,9 @@ +from aiogram.types import TelegramObject + + +class GeneralForumTopicHidden(TelegramObject): + """ + This object represents a service message about General forum topic hidden in the chat. Currently holds no information. + + Source: https://core.telegram.org/bots/api#generalforumtopichidden + """ diff --git a/aiogram/types/general_forum_topic_unhidden.py b/aiogram/types/general_forum_topic_unhidden.py new file mode 100644 index 00000000..9637a023 --- /dev/null +++ b/aiogram/types/general_forum_topic_unhidden.py @@ -0,0 +1,9 @@ +from aiogram.types import TelegramObject + + +class GeneralForumTopicUnhidden(TelegramObject): + """ + This object represents a service message about General forum topic unhidden in the chat. Currently holds no information. + + Source: https://core.telegram.org/bots/api#generalforumtopicunhidden + """ 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 new file mode 100644 index 00000000..b07482a5 --- /dev/null +++ b/aiogram/types/giveaway.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .chat import Chat + from .custom import DateTime + + +class Giveaway(TelegramObject): + """ + This object represents a message about a scheduled giveaway. + + Source: https://core.telegram.org/bots/api#giveaway + """ + + 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: 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: bool | None = None + """*Optional*. :code:`True`, if the list of giveaway winners will be visible to everyone""" + prize_description: str | None = None + """*Optional*. Description of additional giveaway prize""" + 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.""" + 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chats: list[Chat], + winners_selection_date: DateTime, + winner_count: int, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chats=chats, + winners_selection_date=winners_selection_date, + winner_count=winner_count, + only_new_members=only_new_members, + 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 new file mode 100644 index 00000000..18b9244c --- /dev/null +++ b/aiogram/types/giveaway_completed.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .message import Message + + +class GiveawayCompleted(TelegramObject): + """ + This object represents a service message about the completion of a giveaway without public winners. + + Source: https://core.telegram.org/bots/api#giveawaycompleted + """ + + winner_count: int + """Number of winners in the giveaway""" + unclaimed_prize_count: int | None = None + """*Optional*. Number of undistributed prizes""" + 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + winner_count: int, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + 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 new file mode 100644 index 00000000..fad0c39a --- /dev/null +++ b/aiogram/types/giveaway_created.py @@ -0,0 +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. + + 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 new file mode 100644 index 00000000..61ebff3c --- /dev/null +++ b/aiogram/types/giveaway_winners.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .chat import Chat + from .custom import DateTime + from .user import User + + +class GiveawayWinners(TelegramObject): + """ + This object represents a message about the completion of a giveaway with public winners. + + Source: https://core.telegram.org/bots/api#giveawaywinners + """ + + chat: Chat + """The chat that created the giveaway""" + giveaway_message_id: int + """Identifier of the message with the giveaway in the chat""" + winners_selection_date: DateTime + """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] + """List of up to 100 winners of the giveaway""" + 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""" + 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: bool | None = None + """*Optional*. :code:`True`, if only users who had joined the chats after the giveaway started were eligible to win""" + was_refunded: bool | None = None + """*Optional*. :code:`True`, if the giveaway was canceled because the payment for it was refunded""" + prize_description: str | None = None + """*Optional*. Description of additional giveaway prize""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat: Chat, + giveaway_message_id: int, + winners_selection_date: DateTime, + winner_count: int, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat=chat, + giveaway_message_id=giveaway_message_id, + winners_selection_date=winners_selection_date, + 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, + was_refunded=was_refunded, + prize_description=prize_description, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inaccessible_message.py b/aiogram/types/inaccessible_message.py new file mode 100644 index 00000000..32262625 --- /dev/null +++ b/aiogram/types/inaccessible_message.py @@ -0,0 +1,3125 @@ +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 ..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): + """ + This object describes a message that was deleted or is otherwise inaccessible to the bot. + + Source: https://core.telegram.org/bots/api#inaccessiblemessage + """ + + chat: Chat + """Chat the message belonged to""" + message_id: int + """Unique message identifier inside the chat""" + date: Literal[0] = 0 + """Always 0. The field can be used to differentiate regular and inaccessible messages.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat: Chat, + message_id: int, + date: Literal[0] = 0, + **__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=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 b661339a..f85418cd 100644 --- a/aiogram/types/inline_keyboard_button.py +++ b/aiogram/types/inline_keyboard_button.py @@ -1,34 +1,90 @@ from __future__ import annotations -from typing import TYPE_CHECKING, 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 class InlineKeyboardButton(MutableTelegramObject): """ - 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 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 - """*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.""" - login_url: Optional[LoginUrl] = None - """*Optional*. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the `Telegram Login Widget `_.""" - callback_data: Optional[str] = None - """*Optional*. Data to be sent in a `callback query `_ to the bot when button is pressed, 1-64 bytes""" - 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. Can be empty, in which case just the bot's username will be inserted.""" - switch_inline_query_current_chat: Optional[str] = None - """*Optional*. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot's username will be inserted.""" - callback_game: Optional[CallbackGame] = 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: 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: 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: 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: 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: 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 - """*Optional*. Specify :code:`True`, to send a `Pay button `_.""" + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + text: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + text=text, + icon_custom_emoji_id=icon_custom_emoji_id, + style=style, + url=url, + callback_data=callback_data, + web_app=web_app, + login_url=login_url, + 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 0bbdee37..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, List +from typing import TYPE_CHECKING, Any from .base import MutableTelegramObject @@ -10,11 +10,26 @@ if TYPE_CHECKING: class InlineKeyboardMarkup(MutableTelegramObject): """ - 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*. + This object represents an `inline keyboard `_ that appears right next to the message it belongs to. 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + inline_keyboard: list[list[InlineKeyboardButton]], + **__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__(inline_keyboard=inline_keyboard, **__pydantic_kwargs) diff --git a/aiogram/types/inline_query.py b/aiogram/types/inline_query.py index 89602803..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, List, Optional +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -8,7 +8,8 @@ from .base import TelegramObject if TYPE_CHECKING: from ..methods import AnswerInlineQuery - from .inline_query_result import InlineQueryResult + from .inline_query_result_union import InlineQueryResultUnion + from .inline_query_results_button import InlineQueryResultsButton from .location import Location from .user import User @@ -28,30 +29,76 @@ 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 - """*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 + 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: Location | None = None """*Optional*. Sender location, only for bots that request user location""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: str, + from_user: User, + query: str, + offset: str, + chat_type: str | None = None, + location: Location | 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, + from_user=from_user, + query=query, + offset=offset, + chat_type=chat_type, + location=location, + **__pydantic_kwargs, + ) + def answer( self, - results: List[InlineQueryResult], - cache_time: Optional[int] = None, - is_personal: Optional[bool] = None, - next_offset: Optional[str] = None, - switch_pm_text: Optional[str] = None, - switch_pm_parameter: 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: """ - :param results: - :param cache_time: - :param is_personal: - :param next_offset: - :param switch_pm_text: - :param switch_pm_parameter: - :return: + Shortcut for method :class:`aiogram.methods.answer_inline_query.AnswerInlineQuery` + will automatically fill method attributes: + + - :code:`inline_query_id` + + Use this method to send answers to an inline query. On success, :code:`True` is returned. + + No more than **50** results per query are allowed. + + Source: https://core.telegram.org/bots/api#answerinlinequery + + :param results: A JSON-serialized array of results for the inline query + :param cache_time: The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. + :param is_personal: 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. + :param next_offset: 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. + :param button: A JSON-serialized object describing a button to be shown above inline query results + :param switch_pm_parameter: `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. + :param switch_pm_text: 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* + :return: instance of method :class:`aiogram.methods.answer_inline_query.AnswerInlineQuery` """ - from ..methods import AnswerInlineQuery + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import AnswerInlineQuery return AnswerInlineQuery( inline_query_id=self.id, @@ -59,6 +106,8 @@ class InlineQuery(TelegramObject): cache_time=cache_time, is_personal=is_personal, next_offset=next_offset, - switch_pm_text=switch_pm_text, + button=button, switch_pm_parameter=switch_pm_parameter, - ) + switch_pm_text=switch_pm_text, + **kwargs, + ).as_(self._bot) diff --git a/aiogram/types/inline_query_result_article.py b/aiogram/types/inline_query_result_article.py index 27164254..5032987a 100644 --- a/aiogram/types/inline_query_result_article.py +++ b/aiogram/types/inline_query_result_article.py @@ -1,14 +1,15 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +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_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion class InlineQueryResultArticle(InlineQueryResult): @@ -18,25 +19,67 @@ class InlineQueryResultArticle(InlineQueryResult): Source: https://core.telegram.org/bots/api#inlinequeryresultarticle """ - type: str = Field("article", const=True) + type: Literal[InlineQueryResultType.ARTICLE] = InlineQueryResultType.ARTICLE """Type of the result, must be *article*""" id: str """Unique identifier for this result, 1-64 Bytes""" title: str """Title of the result""" - input_message_content: InputMessageContent + input_message_content: InputMessageContentUnion """Content of the message to be sent""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - url: Optional[str] = None + reply_markup: InlineKeyboardMarkup | None = None + """*Optional*. `Inline keyboard `_ attached to the message""" + 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""" - thumb_url: Optional[str] = None + thumbnail_url: str | None = None """*Optional*. Url of the thumbnail for the result""" - thumb_width: Optional[int] = None + thumbnail_width: int | None = None """*Optional*. Thumbnail width""" - thumb_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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.ARTICLE] = InlineQueryResultType.ARTICLE, + id: str, + title: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + title=title, + input_message_content=input_message_content, + reply_markup=reply_markup, + url=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 97141268..1be55609 100644 --- a/aiogram/types/inline_query_result_audio.py +++ b/aiogram/types/inline_query_result_audio.py @@ -1,27 +1,25 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +from ..client.default import Default +from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity class InlineQueryResultAudio(InlineQueryResult): """ 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. Source: https://core.telegram.org/bots/api#inlinequeryresultaudio """ - type: str = Field("audio", const=True) + type: Literal[InlineQueryResultType.AUDIO] = InlineQueryResultType.AUDIO """Type of the result, must be *audio*""" id: str """Unique identifier for this result, 1-64 bytes""" @@ -29,17 +27,56 @@ 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[str] = UNSET + 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 - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = 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 audio""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.AUDIO] = InlineQueryResultType.AUDIO, + id: str, + audio_url: str, + title: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + audio_url=audio_url, + title=title, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + performer=performer, + audio_duration=audio_duration, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_cached_audio.py b/aiogram/types/inline_query_result_cached_audio.py index d9f12668..488ac02c 100644 --- a/aiogram/types/inline_query_result_cached_audio.py +++ b/aiogram/types/inline_query_result_cached_audio.py @@ -1,39 +1,70 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +from ..client.default import Default +from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity class InlineQueryResultCachedAudio(InlineQueryResult): """ 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. Source: https://core.telegram.org/bots/api#inlinequeryresultcachedaudio """ - type: str = Field("audio", const=True) + type: Literal[InlineQueryResultType.AUDIO] = InlineQueryResultType.AUDIO """Type of the result, must be *audio*""" id: str """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[str] = UNSET + 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 - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = 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 audio""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.AUDIO] = InlineQueryResultType.AUDIO, + id: str, + audio_file_id: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + audio_file_id=audio_file_id, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_cached_document.py b/aiogram/types/inline_query_result_cached_document.py index bb4f1349..4f6c29f6 100644 --- a/aiogram/types/inline_query_result_cached_document.py +++ b/aiogram/types/inline_query_result_cached_document.py @@ -1,27 +1,25 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +from ..client.default import Default +from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity class InlineQueryResultCachedDocument(InlineQueryResult): """ 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. Source: https://core.telegram.org/bots/api#inlinequeryresultcacheddocument """ - type: str = Field("document", const=True) + type: Literal[InlineQueryResultType.DOCUMENT] = InlineQueryResultType.DOCUMENT """Type of the result, must be *document*""" id: str """Unique identifier for this result, 1-64 bytes""" @@ -29,15 +27,52 @@ 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[str] = UNSET + 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 - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = 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""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.DOCUMENT] = InlineQueryResultType.DOCUMENT, + id: str, + title: str, + document_file_id: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + title=title, + document_file_id=document_file_id, + description=description, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_cached_gif.py b/aiogram/types/inline_query_result_cached_gif.py index 053dfd43..e646e870 100644 --- a/aiogram/types/inline_query_result_cached_gif.py +++ b/aiogram/types/inline_query_result_cached_gif.py @@ -1,15 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +from ..client.default import Default +from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -20,21 +19,60 @@ class InlineQueryResultCachedGif(InlineQueryResult): Source: https://core.telegram.org/bots/api#inlinequeryresultcachedgif """ - type: str = Field("gif", const=True) + type: Literal[InlineQueryResultType.GIF] = InlineQueryResultType.GIF """Type of the result, must be *gif*""" id: str """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[str] = UNSET + 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*""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = None + 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: 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 GIF animation""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.GIF] = InlineQueryResultType.GIF, + id: str, + gif_file_id: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + gif_file_id=gif_file_id, + title=title, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_cached_mpeg4_gif.py b/aiogram/types/inline_query_result_cached_mpeg4_gif.py index 7076c187..70ff56cc 100644 --- a/aiogram/types/inline_query_result_cached_mpeg4_gif.py +++ b/aiogram/types/inline_query_result_cached_mpeg4_gif.py @@ -1,15 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +from ..client.default import Default +from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -20,21 +19,60 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult): Source: https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif """ - type: str = Field("mpeg4_gif", const=True) + type: Literal[InlineQueryResultType.MPEG4_GIF] = InlineQueryResultType.MPEG4_GIF """Type of the result, must be *mpeg4_gif*""" id: str """Unique identifier for this result, 1-64 bytes""" mpeg4_file_id: str - """A valid file identifier for the MP4 file""" - title: Optional[str] = None + """A valid file identifier for the MPEG4 file""" + 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[str] = UNSET + 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*""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = None + 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: 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 video animation""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.MPEG4_GIF] = InlineQueryResultType.MPEG4_GIF, + id: str, + mpeg4_file_id: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + mpeg4_file_id=mpeg4_file_id, + title=title, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_cached_photo.py b/aiogram/types/inline_query_result_cached_photo.py index 07ab3a50..513ba79e 100644 --- a/aiogram/types/inline_query_result_cached_photo.py +++ b/aiogram/types/inline_query_result_cached_photo.py @@ -1,15 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +from ..client.default import Default +from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -20,23 +19,64 @@ class InlineQueryResultCachedPhoto(InlineQueryResult): Source: https://core.telegram.org/bots/api#inlinequeryresultcachedphoto """ - type: str = Field("photo", const=True) + type: Literal[InlineQueryResultType.PHOTO] = InlineQueryResultType.PHOTO """Type of the result, must be *photo*""" id: str """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[str] = UNSET + 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*""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = None + 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: 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 photo""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.PHOTO] = InlineQueryResultType.PHOTO, + id: str, + photo_file_id: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + photo_file_id=photo_file_id, + title=title, + description=description, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_cached_sticker.py b/aiogram/types/inline_query_result_cached_sticker.py index 80685ff2..eb472222 100644 --- a/aiogram/types/inline_query_result_cached_sticker.py +++ b/aiogram/types/inline_query_result_cached_sticker.py @@ -1,31 +1,56 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional - -from pydantic import Field +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_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion class InlineQueryResultCachedSticker(InlineQueryResult): """ 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. Source: https://core.telegram.org/bots/api#inlinequeryresultcachedsticker """ - type: str = Field("sticker", const=True) + type: Literal[InlineQueryResultType.STICKER] = InlineQueryResultType.STICKER """Type of the result, must be *sticker*""" id: str """Unique identifier for this result, 1-64 bytes""" sticker_file_id: str """A valid file identifier of the sticker""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = 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 sticker""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.STICKER] = InlineQueryResultType.STICKER, + id: str, + sticker_file_id: str, + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | 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, + id=id, + sticker_file_id=sticker_file_id, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_cached_video.py b/aiogram/types/inline_query_result_cached_video.py index 334eafbf..e759bab0 100644 --- a/aiogram/types/inline_query_result_cached_video.py +++ b/aiogram/types/inline_query_result_cached_video.py @@ -1,15 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +from ..client.default import Default +from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -20,7 +19,7 @@ class InlineQueryResultCachedVideo(InlineQueryResult): Source: https://core.telegram.org/bots/api#inlinequeryresultcachedvideo """ - type: str = Field("video", const=True) + type: Literal[InlineQueryResultType.VIDEO] = InlineQueryResultType.VIDEO """Type of the result, must be *video*""" id: str """Unique identifier for this result, 1-64 bytes""" @@ -28,15 +27,56 @@ 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[str] = UNSET + 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*""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = None + 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: 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 video""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.VIDEO] = InlineQueryResultType.VIDEO, + id: str, + video_file_id: str, + title: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + video_file_id=video_file_id, + title=title, + description=description, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_cached_voice.py b/aiogram/types/inline_query_result_cached_voice.py index 3da9abf8..833cf2da 100644 --- a/aiogram/types/inline_query_result_cached_voice.py +++ b/aiogram/types/inline_query_result_cached_voice.py @@ -1,27 +1,25 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +from ..client.default import Default +from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity class InlineQueryResultCachedVoice(InlineQueryResult): """ 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. Source: https://core.telegram.org/bots/api#inlinequeryresultcachedvoice """ - type: str = Field("voice", const=True) + type: Literal[InlineQueryResultType.VOICE] = InlineQueryResultType.VOICE """Type of the result, must be *voice*""" id: str """Unique identifier for this result, 1-64 bytes""" @@ -29,13 +27,48 @@ 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[str] = UNSET + 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 - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = 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 voice message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.VOICE] = InlineQueryResultType.VOICE, + id: str, + voice_file_id: str, + title: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + voice_file_id=voice_file_id, + title=title, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_contact.py b/aiogram/types/inline_query_result_contact.py index dcbda121..be46226b 100644 --- a/aiogram/types/inline_query_result_contact.py +++ b/aiogram/types/inline_query_result_contact.py @@ -1,25 +1,23 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional - -from pydantic import Field +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_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion class InlineQueryResultContact(InlineQueryResult): """ 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. Source: https://core.telegram.org/bots/api#inlinequeryresultcontact """ - type: str = Field("contact", const=True) + type: Literal[InlineQueryResultType.CONTACT] = InlineQueryResultType.CONTACT """Type of the result, must be *contact*""" id: str """Unique identifier for this result, 1-64 Bytes""" @@ -27,17 +25,56 @@ 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 - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = 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 contact""" - thumb_url: Optional[str] = None + thumbnail_url: str | None = None """*Optional*. Url of the thumbnail for the result""" - thumb_width: Optional[int] = None + thumbnail_width: int | None = None """*Optional*. Thumbnail width""" - thumb_height: Optional[int] = None + thumbnail_height: int | None = None """*Optional*. Thumbnail height""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.CONTACT] = InlineQueryResultType.CONTACT, + id: str, + phone_number: str, + first_name: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + phone_number=phone_number, + first_name=first_name, + last_name=last_name, + vcard=vcard, + reply_markup=reply_markup, + input_message_content=input_message_content, + thumbnail_url=thumbnail_url, + thumbnail_width=thumbnail_width, + thumbnail_height=thumbnail_height, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_document.py b/aiogram/types/inline_query_result_document.py index 40052009..1665c8b3 100644 --- a/aiogram/types/inline_query_result_document.py +++ b/aiogram/types/inline_query_result_document.py @@ -1,27 +1,25 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +from ..client.default import Default +from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity class InlineQueryResultDocument(InlineQueryResult): """ 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. Source: https://core.telegram.org/bots/api#inlinequeryresultdocument """ - type: str = Field("document", const=True) + type: Literal[InlineQueryResultType.DOCUMENT] = InlineQueryResultType.DOCUMENT """Type of the result, must be *document*""" id: str """Unique identifier for this result, 1-64 bytes""" @@ -30,22 +28,67 @@ class InlineQueryResultDocument(InlineQueryResult): document_url: str """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 + """MIME type of the content of the file, either 'application/pdf' or 'application/zip'""" + caption: str | None = None """*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + 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[InputMessageContent] = 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""" - thumb_url: Optional[str] = None + thumbnail_url: str | None = None """*Optional*. URL of the thumbnail (JPEG only) for the file""" - thumb_width: Optional[int] = None + thumbnail_width: int | None = None """*Optional*. Thumbnail width""" - thumb_height: Optional[int] = None + thumbnail_height: int | None = None """*Optional*. Thumbnail height""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.DOCUMENT] = InlineQueryResultType.DOCUMENT, + id: str, + title: str, + document_url: str, + mime_type: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + title=title, + document_url=document_url, + mime_type=mime_type, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + description=description, + reply_markup=reply_markup, + input_message_content=input_message_content, + thumbnail_url=thumbnail_url, + thumbnail_width=thumbnail_width, + thumbnail_height=thumbnail_height, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_game.py b/aiogram/types/inline_query_result_game.py index 4ece5b95..81332b0f 100644 --- a/aiogram/types/inline_query_result_game.py +++ b/aiogram/types/inline_query_result_game.py @@ -1,9 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional - -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: @@ -13,16 +12,40 @@ if TYPE_CHECKING: class InlineQueryResultGame(InlineQueryResult): """ 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. Source: https://core.telegram.org/bots/api#inlinequeryresultgame """ - type: str = Field("game", const=True) + type: Literal[InlineQueryResultType.GAME] = InlineQueryResultType.GAME """Type of the result, must be *game*""" id: str """Unique identifier for this result, 1-64 bytes""" game_short_name: str """Short name of the game""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" + reply_markup: InlineKeyboardMarkup | None = None + """*Optional*. `Inline keyboard `_ attached to the message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.GAME] = InlineQueryResultType.GAME, + id: str, + game_short_name: str, + 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__( + type=type, + id=id, + game_short_name=game_short_name, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_gif.py b/aiogram/types/inline_query_result_gif.py index 2946437c..8911916b 100644 --- a/aiogram/types/inline_query_result_gif.py +++ b/aiogram/types/inline_query_result_gif.py @@ -1,15 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +from ..client.default import Default +from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -20,31 +19,80 @@ class InlineQueryResultGif(InlineQueryResult): Source: https://core.telegram.org/bots/api#inlinequeryresultgif """ - type: str = Field("gif", const=True) + type: Literal[InlineQueryResultType.GIF] = InlineQueryResultType.GIF """Type of the result, must be *gif*""" 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""" - thumb_url: str + """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""" - thumb_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[str] = UNSET + 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*""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = None + 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: 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 GIF animation""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.GIF] = InlineQueryResultType.GIF, + id: str, + gif_url: str, + thumbnail_url: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + gif_url=gif_url, + thumbnail_url=thumbnail_url, + gif_width=gif_width, + gif_height=gif_height, + gif_duration=gif_duration, + thumbnail_mime_type=thumbnail_mime_type, + title=title, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_location.py b/aiogram/types/inline_query_result_location.py index b7e45919..ac943df4 100644 --- a/aiogram/types/inline_query_result_location.py +++ b/aiogram/types/inline_query_result_location.py @@ -1,25 +1,23 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional - -from pydantic import Field +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_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion class InlineQueryResultLocation(InlineQueryResult): """ 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. Source: https://core.telegram.org/bots/api#inlinequeryresultlocation """ - type: str = Field("location", const=True) + type: Literal[InlineQueryResultType.LOCATION] = InlineQueryResultType.LOCATION """Type of the result, must be *location*""" id: str """Unique identifier for this result, 1-64 Bytes""" @@ -29,21 +27,66 @@ 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 - """*Optional*. Period in seconds for which the location can be updated, should be between 60 and 86400.""" - heading: 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: 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 - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = 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 location""" - thumb_url: Optional[str] = None + thumbnail_url: str | None = None """*Optional*. Url of the thumbnail for the result""" - thumb_width: Optional[int] = None + thumbnail_width: int | None = None """*Optional*. Thumbnail width""" - thumb_height: Optional[int] = None + thumbnail_height: int | None = None """*Optional*. Thumbnail height""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.LOCATION] = InlineQueryResultType.LOCATION, + id: str, + latitude: float, + longitude: float, + title: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + latitude=latitude, + longitude=longitude, + title=title, + horizontal_accuracy=horizontal_accuracy, + live_period=live_period, + heading=heading, + proximity_alert_radius=proximity_alert_radius, + reply_markup=reply_markup, + input_message_content=input_message_content, + thumbnail_url=thumbnail_url, + thumbnail_width=thumbnail_width, + thumbnail_height=thumbnail_height, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_mpeg4_gif.py b/aiogram/types/inline_query_result_mpeg4_gif.py index dc93b16a..85e26a58 100644 --- a/aiogram/types/inline_query_result_mpeg4_gif.py +++ b/aiogram/types/inline_query_result_mpeg4_gif.py @@ -1,15 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +from ..client.default import Default +from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -20,31 +19,80 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): Source: https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif """ - type: str = Field("mpeg4_gif", const=True) + type: Literal[InlineQueryResultType.MPEG4_GIF] = InlineQueryResultType.MPEG4_GIF """Type of the result, must be *mpeg4_gif*""" id: str """Unique identifier for this result, 1-64 bytes""" mpeg4_url: str - """A valid URL for the MP4 file. File size must not exceed 1MB""" - thumb_url: str + """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""" - thumb_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[str] = UNSET + 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*""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = None + 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: 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 video animation""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.MPEG4_GIF] = InlineQueryResultType.MPEG4_GIF, + id: str, + mpeg4_url: str, + thumbnail_url: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + mpeg4_url=mpeg4_url, + thumbnail_url=thumbnail_url, + mpeg4_width=mpeg4_width, + mpeg4_height=mpeg4_height, + mpeg4_duration=mpeg4_duration, + thumbnail_mime_type=thumbnail_mime_type, + title=title, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_photo.py b/aiogram/types/inline_query_result_photo.py index c150ace7..53edabf3 100644 --- a/aiogram/types/inline_query_result_photo.py +++ b/aiogram/types/inline_query_result_photo.py @@ -1,15 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +from ..client.default import Default +from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -20,29 +19,76 @@ class InlineQueryResultPhoto(InlineQueryResult): Source: https://core.telegram.org/bots/api#inlinequeryresultphoto """ - type: str = Field("photo", const=True) + type: Literal[InlineQueryResultType.PHOTO] = InlineQueryResultType.PHOTO """Type of the result, must be *photo*""" id: str """Unique identifier for this result, 1-64 bytes""" photo_url: str """A valid URL of the photo. Photo must be in **JPEG** format. Photo size must not exceed 5MB""" - thumb_url: str + 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[str] = UNSET + 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*""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = None + 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: 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 photo""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.PHOTO] = InlineQueryResultType.PHOTO, + id: str, + photo_url: str, + thumbnail_url: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + photo_url=photo_url, + thumbnail_url=thumbnail_url, + photo_width=photo_width, + photo_height=photo_height, + title=title, + description=description, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) 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 e27e6cd0..a06d3d9e 100644 --- a/aiogram/types/inline_query_result_venue.py +++ b/aiogram/types/inline_query_result_venue.py @@ -1,25 +1,23 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional - -from pydantic import Field +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_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion class InlineQueryResultVenue(InlineQueryResult): """ 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. Source: https://core.telegram.org/bots/api#inlinequeryresultvenue """ - type: str = Field("venue", const=True) + type: Literal[InlineQueryResultType.VENUE] = InlineQueryResultType.VENUE """Type of the result, must be *venue*""" id: str """Unique identifier for this result, 1-64 Bytes""" @@ -31,21 +29,68 @@ 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 - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = 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 venue""" - thumb_url: Optional[str] = None + thumbnail_url: str | None = None """*Optional*. Url of the thumbnail for the result""" - thumb_width: Optional[int] = None + thumbnail_width: int | None = None """*Optional*. Thumbnail width""" - thumb_height: Optional[int] = None + thumbnail_height: int | None = None """*Optional*. Thumbnail height""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.VENUE] = InlineQueryResultType.VENUE, + id: str, + latitude: float, + longitude: float, + title: str, + address: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + latitude=latitude, + longitude=longitude, + title=title, + address=address, + foursquare_id=foursquare_id, + foursquare_type=foursquare_type, + google_place_id=google_place_id, + google_place_type=google_place_type, + reply_markup=reply_markup, + input_message_content=input_message_content, + thumbnail_url=thumbnail_url, + thumbnail_width=thumbnail_width, + thumbnail_height=thumbnail_height, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_video.py b/aiogram/types/inline_query_result_video.py index 3e8ef3f0..00496efd 100644 --- a/aiogram/types/inline_query_result_video.py +++ b/aiogram/types/inline_query_result_video.py @@ -1,15 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +from ..client.default import Default +from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -22,33 +21,84 @@ class InlineQueryResultVideo(InlineQueryResult): Source: https://core.telegram.org/bots/api#inlinequeryresultvideo """ - type: str = Field("video", const=True) + type: Literal[InlineQueryResultType.VIDEO] = InlineQueryResultType.VIDEO """Type of the result, must be *video*""" id: str """Unique identifier for this result, 1-64 bytes""" video_url: str """A valid URL for the embedded video player or video file""" mime_type: str - """Mime type of the content of video url, 'text/html' or 'video/mp4'""" - thumb_url: str + """MIME type of the content of the video URL, 'text/html' or 'video/mp4'""" + thumbnail_url: str """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[str] = UNSET + 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*""" - video_width: Optional[int] = None + 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: 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 - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = 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 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.VIDEO] = InlineQueryResultType.VIDEO, + id: str, + video_url: str, + mime_type: str, + thumbnail_url: str, + title: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + video_url=video_url, + mime_type=mime_type, + thumbnail_url=thumbnail_url, + title=title, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + video_width=video_width, + video_height=video_height, + video_duration=video_duration, + description=description, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_voice.py b/aiogram/types/inline_query_result_voice.py index 2097f6b7..4260b43a 100644 --- a/aiogram/types/inline_query_result_voice.py +++ b/aiogram/types/inline_query_result_voice.py @@ -1,27 +1,25 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +from ..client.default import Default +from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_message_content import InputMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity class InlineQueryResultVoice(InlineQueryResult): """ 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 the voice message. - **Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. Source: https://core.telegram.org/bots/api#inlinequeryresultvoice """ - type: str = Field("voice", const=True) + type: Literal[InlineQueryResultType.VOICE] = InlineQueryResultType.VOICE """Type of the result, must be *voice*""" id: str """Unique identifier for this result, 1-64 bytes""" @@ -29,15 +27,52 @@ 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[str] = UNSET + 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 - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[InputMessageContent] = 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 voice recording""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.VOICE] = InlineQueryResultType.VOICE, + id: str, + voice_url: str, + title: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + voice_url=voice_url, + title=title, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + voice_duration=voice_duration, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_results_button.py b/aiogram/types/inline_query_results_button.py new file mode 100644 index 00000000..76fbf526 --- /dev/null +++ b/aiogram/types/inline_query_results_button.py @@ -0,0 +1,43 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .web_app_info import WebAppInfo + + +class InlineQueryResultsButton(TelegramObject): + """ + This object represents a button to be shown above inline query results. You **must** use exactly one of the optional fields. + + Source: https://core.telegram.org/bots/api#inlinequeryresultsbutton + """ + + text: str + """Label text on the button""" + 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + text: str, + web_app: WebAppInfo | None = None, + start_parameter: 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__( + text=text, web_app=web_app, start_parameter=start_parameter, **__pydantic_kwargs + ) 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 2e5a7823..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 Optional +from typing import TYPE_CHECKING, Any from .input_message_content import InputMessageContent @@ -16,7 +16,32 @@ 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + phone_number: str, + first_name: str, + last_name: str | None = None, + vcard: 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__( + phone_number=phone_number, + first_name=first_name, + last_name=last_name, + vcard=vcard, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_file.py b/aiogram/types/input_file.py index fb204e6d..b8df230e 100644 --- a/aiogram/types/input_file.py +++ b/aiogram/types/input_file.py @@ -3,11 +3,15 @@ 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 AsyncGenerator, AsyncIterator, Iterator, Optional, Union +from typing import TYPE_CHECKING, Any import aiofiles +if TYPE_CHECKING: + from aiogram.client.bot import Bot + DEFAULT_CHUNK_SIZE = 64 * 1024 # 64 kb @@ -18,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` @@ -29,18 +33,10 @@ class InputFile(ABC): self.filename = filename self.chunk_size = chunk_size - @classmethod - def __get_validators__(cls) -> Iterator[None]: - yield None - @abstractmethod - async def read(self, chunk_size: int) -> AsyncGenerator[bytes, None]: # pragma: no cover + async def read(self, bot: Bot) -> AsyncGenerator[bytes, None]: # pragma: no cover yield b"" - async def __aiter__(self) -> AsyncIterator[bytes]: - async for chunk in self.read(self.chunk_size): - yield chunk - class BufferedInputFile(InputFile): def __init__(self, file: bytes, filename: str, chunk_size: int = DEFAULT_CHUNK_SIZE): @@ -58,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: """ @@ -67,7 +63,7 @@ class BufferedInputFile(InputFile): :param path: Path to file :param filename: Filename to be propagated to telegram. - By default will be parsed from path + By default, will be parsed from path :param chunk_size: Uploading chunk size :return: instance of :obj:`BufferedInputFile` """ @@ -77,17 +73,17 @@ class BufferedInputFile(InputFile): data = f.read() return cls(data, filename=filename, chunk_size=chunk_size) - async def read(self, chunk_size: int) -> AsyncGenerator[bytes, None]: + async def read(self, bot: Bot) -> AsyncGenerator[bytes, None]: buffer = io.BytesIO(self.data) - while chunk := buffer.read(chunk_size): + while chunk := buffer.read(self.chunk_size): yield chunk 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, ): """ @@ -95,7 +91,7 @@ class FSInputFile(InputFile): :param path: Path to file :param filename: Filename to be propagated to telegram. - By default will be parsed from path + By default, will be parsed from path :param chunk_size: Uploading chunk size """ if filename is None: @@ -104,40 +100,50 @@ class FSInputFile(InputFile): self.path = path - async def read(self, chunk_size: int) -> AsyncGenerator[bytes, None]: + async def read(self, bot: Bot) -> AsyncGenerator[bytes, None]: async with aiofiles.open(self.path, "rb") as f: - chunk = await f.read(chunk_size) - while chunk: + while chunk := await f.read(self.chunk_size): yield chunk - chunk = await f.read(chunk_size) class URLInputFile(InputFile): def __init__( self, url: str, - filename: Optional[str] = None, + headers: dict[str, Any] | None = None, + filename: str | None = None, chunk_size: int = DEFAULT_CHUNK_SIZE, timeout: int = 30, + bot: Bot | None = None, ): """ Represents object for streaming files from internet :param url: URL in internet + :param headers: HTTP Headers :param filename: Filename to be propagated to telegram. :param chunk_size: Uploading chunk size + :param timeout: Timeout for downloading + :param bot: Bot instance to use HTTP session from. + If not specified, will be used current bot """ super().__init__(filename=filename, chunk_size=chunk_size) + if headers is None: + headers = {} self.url = url + self.headers = headers self.timeout = timeout + self.bot = bot - async def read(self, chunk_size: int) -> AsyncGenerator[bytes, None]: - from aiogram.client.bot import Bot - - bot = Bot.get_current(no_error=False) + async def read(self, bot: Bot) -> AsyncGenerator[bytes, None]: + bot = self.bot or bot stream = bot.session.stream_content( - url=self.url, timeout=self.timeout, chunk_size=self.chunk_size + url=self.url, + headers=self.headers, + timeout=self.timeout, + chunk_size=self.chunk_size, + raise_for_status=True, ) async for chunk in stream: 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 301fbd81..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, List, Optional +from typing import TYPE_CHECKING, Any from .input_message_content import InputMessageContent @@ -20,38 +20,95 @@ 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.""" - provider_token: str - """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.""" currency: str - """Three-letter ISO 4217 currency code, see `more on currencies `_""" - prices: List[LabeledPrice] - """Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)""" - max_tip_amount: Optional[int] = 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""" - suggested_tip_amounts: Optional[List[int]] = None + """Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.""" + 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: str | None = None + """*Optional*. Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.""" + 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: 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 - """*Optional*. 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 - """*Optional*. Photo size""" - photo_width: Optional[int] = 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: int | None = None + """*Optional*. Photo size in bytes""" + 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 - """*Optional*. Pass :code:`True`, if you require the user's full name to complete the order""" - need_phone_number: Optional[bool] = None - """*Optional*. Pass :code:`True`, if you require the user's phone number to complete the order""" - need_email: Optional[bool] = None - """*Optional*. Pass :code:`True`, if you require the user's email address to complete the order""" - need_shipping_address: Optional[bool] = None - """*Optional*. Pass :code:`True`, if you require the user's shipping address to complete the order""" - send_phone_number_to_provider: Optional[bool] = None - """*Optional*. Pass :code:`True`, if user's phone number should be sent to provider""" - send_email_to_provider: Optional[bool] = None - """*Optional*. Pass :code:`True`, if user's email address should be sent to provider""" - is_flexible: Optional[bool] = None - """*Optional*. Pass :code:`True`, if the final price depends on the shipping method""" + 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: 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: 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: 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: 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: 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + title: str, + description: str, + payload: str, + currency: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + title=title, + description=description, + payload=payload, + currency=currency, + prices=prices, + provider_token=provider_token, + max_tip_amount=max_tip_amount, + suggested_tip_amounts=suggested_tip_amounts, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_location_message_content.py b/aiogram/types/input_location_message_content.py index 700532c2..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 Optional +from typing import TYPE_CHECKING, Any from .input_message_content import InputMessageContent @@ -16,11 +16,40 @@ 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 - """*Optional*. Period in seconds for which the location can be updated, should be between 60 and 86400.""" - heading: 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + latitude: float, + longitude: float, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + latitude=latitude, + longitude=longitude, + horizontal_accuracy=horizontal_accuracy, + live_period=live_period, + heading=heading, + proximity_alert_radius=proximity_alert_radius, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_media_animation.py b/aiogram/types/input_media_animation.py index 35f28509..05eaf475 100644 --- a/aiogram/types/input_media_animation.py +++ b/aiogram/types/input_media_animation.py @@ -1,14 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional, Union +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +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 @@ -19,21 +19,64 @@ class InputMediaAnimation(InputMedia): Source: https://core.telegram.org/bots/api#inputmediaanimation """ - type: str = Field("animation", const=True) + type: Literal[InputMediaType.ANIMATION] = InputMediaType.ANIMATION """Type of the result, must be *animation*""" - media: Union[str, InputFile] - """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 info on Sending Files » `""" - thumb: Optional[Union[InputFile, str]] = 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 info on Sending Files » `""" - caption: Optional[str] = None + 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: 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: str | None = None """*Optional*. Caption of the animation to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + 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*""" - width: Optional[int] = None + 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: 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: bool | None = None + """*Optional*. Pass :code:`True` if the animation needs to be covered with a spoiler animation""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InputMediaType.ANIMATION] = InputMediaType.ANIMATION, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + media=media, + thumbnail=thumbnail, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + width=width, + height=height, + duration=duration, + has_spoiler=has_spoiler, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_media_audio.py b/aiogram/types/input_media_audio.py index 0265f67a..09d5a192 100644 --- a/aiogram/types/input_media_audio.py +++ b/aiogram/types/input_media_audio.py @@ -1,14 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional, Union +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +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 @@ -19,21 +19,56 @@ class InputMediaAudio(InputMedia): Source: https://core.telegram.org/bots/api#inputmediaaudio """ - type: str = Field("audio", const=True) + type: Literal[InputMediaType.AUDIO] = InputMediaType.AUDIO """Type of the result, must be *audio*""" - media: Union[str, InputFile] - """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 info on Sending Files » `""" - thumb: Optional[Union[InputFile, str]] = 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 info on Sending Files » `""" - caption: Optional[str] = None + 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: 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: str | None = None """*Optional*. Caption of the audio to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InputMediaType.AUDIO] = InputMediaType.AUDIO, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + media=media, + thumbnail=thumbnail, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + duration=duration, + performer=performer, + title=title, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_media_document.py b/aiogram/types/input_media_document.py index f8b3b681..674a27c4 100644 --- a/aiogram/types/input_media_document.py +++ b/aiogram/types/input_media_document.py @@ -1,14 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional, Union +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +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 @@ -19,17 +19,48 @@ class InputMediaDocument(InputMedia): Source: https://core.telegram.org/bots/api#inputmediadocument """ - type: str = Field("document", const=True) + type: Literal[InputMediaType.DOCUMENT] = InputMediaType.DOCUMENT """Type of the result, must be *document*""" - media: Union[str, InputFile] - """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 info on Sending Files » `""" - thumb: Optional[Union[InputFile, str]] = 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 info on Sending Files » `""" - caption: Optional[str] = None + 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: 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: str | None = None """*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InputMediaType.DOCUMENT] = InputMediaType.DOCUMENT, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + media=media, + thumbnail=thumbnail, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + disable_content_type_detection=disable_content_type_detection, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_media_photo.py b/aiogram/types/input_media_photo.py index 09aa2918..c789a672 100644 --- a/aiogram/types/input_media_photo.py +++ b/aiogram/types/input_media_photo.py @@ -1,14 +1,13 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional, Union +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +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 @@ -19,13 +18,48 @@ class InputMediaPhoto(InputMedia): Source: https://core.telegram.org/bots/api#inputmediaphoto """ - type: str = Field("photo", const=True) + type: Literal[InputMediaType.PHOTO] = InputMediaType.PHOTO """Type of the result, must be *photo*""" - media: Union[str, InputFile] - """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 info on Sending Files » `""" - caption: Optional[str] = None + 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: str | None = None """*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + 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: bool | Default | None = Default("show_caption_above_media") + """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" + has_spoiler: bool | None = None + """*Optional*. Pass :code:`True` if the photo needs to be covered with a spoiler animation""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InputMediaType.PHOTO] = InputMediaType.PHOTO, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + media=media, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + has_spoiler=has_spoiler, + **__pydantic_kwargs, + ) 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 b66a16c3..617bb5ff 100644 --- a/aiogram/types/input_media_video.py +++ b/aiogram/types/input_media_video.py @@ -1,14 +1,15 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional, Union +from typing import TYPE_CHECKING, Any, Literal -from pydantic import Field - -from .base import UNSET +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 @@ -19,23 +20,76 @@ class InputMediaVideo(InputMedia): Source: https://core.telegram.org/bots/api#inputmediavideo """ - type: str = Field("video", const=True) + type: Literal[InputMediaType.VIDEO] = InputMediaType.VIDEO """Type of the result, must be *video*""" - media: Union[str, InputFile] - """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 info on Sending Files » `""" - thumb: Optional[Union[InputFile, str]] = 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 info on Sending Files » `""" - caption: Optional[str] = None + 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: 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 » `""" + 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[str] = UNSET + 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*""" - width: Optional[int] = None + 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: 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 - """*Optional*. Pass :code:`True`, if the uploaded video is suitable for streaming""" + supports_streaming: bool | None = None + """*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming""" + has_spoiler: bool | None = None + """*Optional*. Pass :code:`True` if the video needs to be covered with a spoiler animation""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InputMediaType.VIDEO] = InputMediaType.VIDEO, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + media=media, + 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, + width=width, + height=height, + duration=duration, + supports_streaming=supports_streaming, + has_spoiler=has_spoiler, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_message_content.py b/aiogram/types/input_message_content.py index 4d26d4f0..858524a5 100644 --- a/aiogram/types/input_message_content.py +++ b/aiogram/types/input_message_content.py @@ -1,9 +1,9 @@ from __future__ import annotations -from .base import TelegramObject +from .base import MutableTelegramObject -class InputMessageContent(TelegramObject): +class InputMessageContent(MutableTelegramObject): """ This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types: 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.py b/aiogram/types/input_paid_media.py new file mode 100644 index 00000000..9d3193d3 --- /dev/null +++ b/aiogram/types/input_paid_media.py @@ -0,0 +1,12 @@ +from .base import TelegramObject + + +class InputPaidMedia(TelegramObject): + """ + This object describes the paid media to be sent. Currently, it can be one of + + - :class:`aiogram.types.input_paid_media_photo.InputPaidMediaPhoto` + - :class:`aiogram.types.input_paid_media_video.InputPaidMediaVideo` + + Source: https://core.telegram.org/bots/api#inputpaidmedia + """ diff --git a/aiogram/types/input_paid_media_photo.py b/aiogram/types/input_paid_media_photo.py new file mode 100644 index 00000000..0f94920d --- /dev/null +++ b/aiogram/types/input_paid_media_photo.py @@ -0,0 +1,37 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import InputPaidMediaType +from .input_file_union import InputFileUnion +from .input_paid_media import InputPaidMedia + + +class InputPaidMediaPhoto(InputPaidMedia): + """ + The paid media to send is a photo. + + Source: https://core.telegram.org/bots/api#inputpaidmediaphoto + """ + + type: Literal[InputPaidMediaType.PHOTO] = InputPaidMediaType.PHOTO + """Type of the media, must be *photo*""" + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InputPaidMediaType.PHOTO] = InputPaidMediaType.PHOTO, + media: 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, media=media, **__pydantic_kwargs) 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 new file mode 100644 index 00000000..49724fe2 --- /dev/null +++ b/aiogram/types/input_paid_media_video.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +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 + + +class InputPaidMediaVideo(InputPaidMedia): + """ + The paid media to send is a video. + + Source: https://core.telegram.org/bots/api#inputpaidmediavideo + """ + + type: Literal[InputPaidMediaType.VIDEO] = InputPaidMediaType.VIDEO + """Type of the media, must be *video*""" + 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: 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 » `""" + 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: int | None = None + """*Optional*. Video height""" + duration: int | None = None + """*Optional*. Video duration in seconds""" + supports_streaming: bool | None = None + """*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InputPaidMediaType.VIDEO] = InputPaidMediaType.VIDEO, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + media=media, + thumbnail=thumbnail, + cover=cover, + start_timestamp=start_timestamp, + width=width, + height=height, + duration=duration, + supports_streaming=supports_streaming, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_poll_option.py b/aiogram/types/input_poll_option.py new file mode 100644 index 00000000..775f8a1f --- /dev/null +++ b/aiogram/types/input_poll_option.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..client.default import Default +from .base import TelegramObject + +if TYPE_CHECKING: + from .message_entity import MessageEntity + + +class InputPollOption(TelegramObject): + """ + This object contains information about one answer option in a poll to be sent. + + Source: https://core.telegram.org/bots/api#inputpolloption + """ + + text: str + """Option text, 1-100 characters""" + 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + text: str, + text_parse_mode: str | Default | None = Default("parse_mode"), + 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__( + text=text, + text_parse_mode=text_parse_mode, + text_entities=text_entities, + **__pydantic_kwargs, + ) 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 new file mode 100644 index 00000000..73af02e7 --- /dev/null +++ b/aiogram/types/input_sticker.py @@ -0,0 +1,55 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .input_file_union import InputFileUnion + from .mask_position import MaskPosition + + +class InputSticker(TelegramObject): + """ + This object describes a sticker to be added to a sticker set. + + Source: https://core.telegram.org/bots/api#inputsticker + """ + + 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] + """List of 1-20 emoji associated with the sticker""" + mask_position: MaskPosition | None = None + """*Optional*. Position where the mask should be placed on faces. For 'mask' stickers only.""" + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + sticker: InputFileUnion, + format: str, + emoji_list: list[str], + mask_position: MaskPosition | None = None, + keywords: list[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__( + sticker=sticker, + format=format, + emoji_list=emoji_list, + mask_position=mask_position, + keywords=keywords, + **__pydantic_kwargs, + ) 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 2b502765..f7745c28 100644 --- a/aiogram/types/input_text_message_content.py +++ b/aiogram/types/input_text_message_content.py @@ -1,11 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any -from .base import UNSET +from pydantic import Field + +from ..client.default import Default from .input_message_content import InputMessageContent if TYPE_CHECKING: + from .link_preview_options import LinkPreviewOptions from .message_entity import MessageEntity @@ -18,9 +21,41 @@ class InputTextMessageContent(InputMessageContent): message_text: str """Text of the message to be sent, 1-4096 characters""" - parse_mode: Optional[str] = UNSET + 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*""" - disable_web_page_preview: Optional[bool] = None - """*Optional*. Disables link previews for links in the sent message""" + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview") + """*Optional*. Link preview generation options for the message""" + 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 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + message_text: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + message_text=message_text, + parse_mode=parse_mode, + entities=entities, + link_preview_options=link_preview_options, + disable_web_page_preview=disable_web_page_preview, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_venue_message_content.py b/aiogram/types/input_venue_message_content.py index f6ccd76f..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 Optional +from typing import TYPE_CHECKING, Any from .input_message_content import InputMessageContent @@ -20,11 +20,44 @@ 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + latitude: float, + longitude: float, + title: str, + address: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + latitude=latitude, + longitude=longitude, + title=title, + address=address, + foursquare_id=foursquare_id, + foursquare_type=foursquare_type, + google_place_id=google_place_id, + google_place_type=google_place_type, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/invoice.py b/aiogram/types/invoice.py index 1e734895..7c70f0ba 100644 --- a/aiogram/types/invoice.py +++ b/aiogram/types/invoice.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -17,6 +19,33 @@ class Invoice(TelegramObject): start_parameter: str """Unique bot deep-linking parameter that can be used to generate this invoice""" currency: str - """Three-letter ISO 4217 `currency `_ code""" + """Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars `_""" total_amount: int """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).""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + title: str, + description: str, + start_parameter: str, + currency: str, + total_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__( + title=title, + description=description, + start_parameter=start_parameter, + currency=currency, + total_amount=total_amount, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/keyboard_button.py b/aiogram/types/keyboard_button.py index c1e3e5f5..ca29d5bb 100644 --- a/aiogram/types/keyboard_button.py +++ b/aiogram/types/keyboard_button.py @@ -1,28 +1,90 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any + +from pydantic import Field 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 class KeyboardButton(MutableTelegramObject): """ - This object represents one button of the reply keyboard. For simple text buttons *String* can be used instead of this object to specify text of the button. Optional fields *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*. - - **Note:** *request_poll* option will only work in Telegram versions released after 23 January, 2020. 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_contact: Optional[bool] = 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 - """*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 - """*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""" + """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: 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: 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: 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: 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. + +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + text: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + 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, + web_app=web_app, + request_user=request_user, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/keyboard_button_poll_type.py b/aiogram/types/keyboard_button_poll_type.py index 2747adfb..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 Optional +from typing import TYPE_CHECKING, Any from .base import MutableTelegramObject @@ -12,5 +12,18 @@ 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, type: 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__(type=type, **__pydantic_kwargs) diff --git a/aiogram/types/keyboard_button_request_chat.py b/aiogram/types/keyboard_button_request_chat.py new file mode 100644 index 00000000..33db839c --- /dev/null +++ b/aiogram/types/keyboard_button_request_chat.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from aiogram.types import TelegramObject + +if TYPE_CHECKING: + from .chat_administrator_rights import ChatAdministratorRights + + +class KeyboardButtonRequestChat(TelegramObject): + """ + 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 » `_. + + Source: https://core.telegram.org/bots/api#keyboardbuttonrequestchat + """ + + request_id: int + """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: 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: 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: bool | None = None + """*Optional*. Pass :code:`True` to request a chat owned by the user. Otherwise, no additional restrictions are applied.""" + 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: 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: 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: bool | None = None + """*Optional*. Pass :code:`True` to request the chat's title""" + request_username: bool | None = None + """*Optional*. Pass :code:`True` to request the chat's username""" + request_photo: bool | None = None + """*Optional*. Pass :code:`True` to request the chat's photo""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + request_id: int, + chat_is_channel: bool, + 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!!! + # 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, + chat_is_channel=chat_is_channel, + chat_is_forum=chat_is_forum, + chat_has_username=chat_has_username, + chat_is_created=chat_is_created, + user_administrator_rights=user_administrator_rights, + bot_administrator_rights=bot_administrator_rights, + bot_is_member=bot_is_member, + request_title=request_title, + request_username=request_username, + request_photo=request_photo, + **__pydantic_kwargs, + ) 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 new file mode 100644 index 00000000..07863d2a --- /dev/null +++ b/aiogram/types/keyboard_button_request_user.py @@ -0,0 +1,44 @@ +from typing import TYPE_CHECKING, Any + +from aiogram.types import TelegramObject + + +class KeyboardButtonRequestUser(TelegramObject): + """ + This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed. `More about requesting users » `_ + + .. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023 + + Source: https://core.telegram.org/bots/api#keyboardbuttonrequestuser + """ + + 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: 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + request_id: int, + user_is_bot: bool | None = None, + user_is_premium: 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__( + request_id=request_id, + user_is_bot=user_is_bot, + user_is_premium=user_is_premium, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/keyboard_button_request_users.py b/aiogram/types/keyboard_button_request_users.py new file mode 100644 index 00000000..cac20de9 --- /dev/null +++ b/aiogram/types/keyboard_button_request_users.py @@ -0,0 +1,57 @@ +from typing import TYPE_CHECKING, Any + +from aiogram.types import TelegramObject + + +class KeyboardButtonRequestUsers(TelegramObject): + """ + 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 » `_ + + Source: https://core.telegram.org/bots/api#keyboardbuttonrequestusers + """ + + 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: 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: 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: int | None = None + """*Optional*. The maximum number of users to be selected; 1-10. Defaults to 1.""" + request_name: bool | None = None + """*Optional*. Pass :code:`True` to request the users' first and last names""" + request_username: bool | None = None + """*Optional*. Pass :code:`True` to request the users' usernames""" + request_photo: bool | None = None + """*Optional*. Pass :code:`True` to request the users' photos""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + request_id: int, + 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!!! + # 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, + user_is_bot=user_is_bot, + user_is_premium=user_is_premium, + max_quantity=max_quantity, + request_name=request_name, + request_username=request_username, + request_photo=request_photo, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/labeled_price.py b/aiogram/types/labeled_price.py index 3dcffb89..42d97af3 100644 --- a/aiogram/types/labeled_price.py +++ b/aiogram/types/labeled_price.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import MutableTelegramObject @@ -14,3 +16,16 @@ class LabeledPrice(MutableTelegramObject): """Portion label""" amount: int """Price of the product 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).""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, label: 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__(label=label, amount=amount, **__pydantic_kwargs) diff --git a/aiogram/types/link_preview_options.py b/aiogram/types/link_preview_options.py new file mode 100644 index 00000000..5074f1ea --- /dev/null +++ b/aiogram/types/link_preview_options.py @@ -0,0 +1,50 @@ +from typing import TYPE_CHECKING, Any + +from ..client.default import Default +from .base import TelegramObject + + +class LinkPreviewOptions(TelegramObject): + """ + Describes the options used for link preview generation. + + Source: https://core.telegram.org/bots/api#linkpreviewoptions + """ + + is_disabled: bool | Default | None = Default("link_preview_is_disabled") + """*Optional*. :code:`True`, if the link preview is disabled""" + 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: 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: 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + is_disabled=is_disabled, + url=url, + prefer_small_media=prefer_small_media, + prefer_large_media=prefer_large_media, + show_above_text=show_above_text, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/location.py b/aiogram/types/location.py index 2c4a1f88..f6274808 100644 --- a/aiogram/types/location.py +++ b/aiogram/types/location.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -12,15 +12,44 @@ class Location(TelegramObject): Source: https://core.telegram.org/bots/api#location """ - longitude: float - """Longitude as defined by sender""" latitude: float - """Latitude as defined by sender""" - horizontal_accuracy: Optional[float] = None + """Latitude as defined by the sender""" + longitude: float + """Longitude as defined by the sender""" + 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 - """*Optional*. Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.""" + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + latitude: float, + longitude: float, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + latitude=latitude, + longitude=longitude, + horizontal_accuracy=horizontal_accuracy, + live_period=live_period, + heading=heading, + proximity_alert_radius=proximity_alert_radius, + **__pydantic_kwargs, + ) 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 f367845e..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 Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -16,10 +16,35 @@ class LoginUrl(TelegramObject): """ url: str - """An HTTP 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 + """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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + url: str, + forward_text: str | None = None, + bot_username: str | None = None, + request_write_access: 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__( + url=url, + forward_text=forward_text, + bot_username=bot_username, + request_write_access=request_write_access, + **__pydantic_kwargs, + ) 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/mask_position.py b/aiogram/types/mask_position.py index 3eea5bda..d02852ab 100644 --- a/aiogram/types/mask_position.py +++ b/aiogram/types/mask_position.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -18,3 +20,24 @@ class MaskPosition(TelegramObject): """Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.""" scale: float """Mask scaling coefficient. For example, 2.0 means double size.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + point: str, + x_shift: float, + y_shift: float, + scale: 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__( + point=point, x_shift=x_shift, y_shift=y_shift, scale=scale, **__pydantic_kwargs + ) diff --git a/aiogram/types/maybe_inaccessible_message.py b/aiogram/types/maybe_inaccessible_message.py new file mode 100644 index 00000000..fe95ced7 --- /dev/null +++ b/aiogram/types/maybe_inaccessible_message.py @@ -0,0 +1,12 @@ +from aiogram.types import TelegramObject + + +class MaybeInaccessibleMessage(TelegramObject): + """ + This object describes a message that can be inaccessible to the bot. It can be one of + + - :class:`aiogram.types.message.Message` + - :class:`aiogram.types.inaccessible_message.InaccessibleMessage` + + Source: https://core.telegram.org/bots/api#maybeinaccessiblemessage + """ 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 new file mode 100644 index 00000000..e78b0df3 --- /dev/null +++ b/aiogram/types/menu_button.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import MutableTelegramObject + +if TYPE_CHECKING: + from .web_app_info import WebAppInfo + + +class MenuButton(MutableTelegramObject): + """ + This object describes the bot's menu button in a private chat. It should be one of + + - :class:`aiogram.types.menu_button_commands.MenuButtonCommands` + - :class:`aiogram.types.menu_button_web_app.MenuButtonWebApp` + - :class:`aiogram.types.menu_button_default.MenuButtonDefault` + + If a menu button other than :class:`aiogram.types.menu_button_default.MenuButtonDefault` is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands. + + Source: https://core.telegram.org/bots/api#menubutton + """ + + type: str + """Type of the button""" + text: str | None = None + """*Optional*. Text on the button""" + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: str, + text: str | None = None, + web_app: WebAppInfo | 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, text=text, web_app=web_app, **__pydantic_kwargs) diff --git a/aiogram/types/menu_button_commands.py b/aiogram/types/menu_button_commands.py new file mode 100644 index 00000000..54ed20b1 --- /dev/null +++ b/aiogram/types/menu_button_commands.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import MenuButtonType +from .menu_button import MenuButton + + +class MenuButtonCommands(MenuButton): + """ + Represents a menu button, which opens the bot's list of commands. + + Source: https://core.telegram.org/bots/api#menubuttoncommands + """ + + type: Literal[MenuButtonType.COMMANDS] = MenuButtonType.COMMANDS + """Type of the button, must be *commands*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[MenuButtonType.COMMANDS] = MenuButtonType.COMMANDS, + **__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/menu_button_default.py b/aiogram/types/menu_button_default.py new file mode 100644 index 00000000..12ce30eb --- /dev/null +++ b/aiogram/types/menu_button_default.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import MenuButtonType +from .menu_button import MenuButton + + +class MenuButtonDefault(MenuButton): + """ + Describes that no specific value for the menu button was set. + + Source: https://core.telegram.org/bots/api#menubuttondefault + """ + + type: Literal[MenuButtonType.DEFAULT] = MenuButtonType.DEFAULT + """Type of the button, must be *default*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[MenuButtonType.DEFAULT] = MenuButtonType.DEFAULT, + **__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/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/menu_button_web_app.py b/aiogram/types/menu_button_web_app.py new file mode 100644 index 00000000..0fc9e412 --- /dev/null +++ b/aiogram/types/menu_button_web_app.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import MenuButtonType +from .menu_button import MenuButton + +if TYPE_CHECKING: + from .web_app_info import WebAppInfo + + +class MenuButtonWebApp(MenuButton): + """ + Represents a menu button, which launches a `Web App `_. + + Source: https://core.telegram.org/bots/api#menubuttonwebapp + """ + + type: Literal[MenuButtonType.WEB_APP] = MenuButtonType.WEB_APP + """Type of the button, must be *web_app*""" + text: str + """Text on the button""" + web_app: WebAppInfo + """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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[MenuButtonType.WEB_APP] = MenuButtonType.WEB_APP, + text: str, + web_app: WebAppInfo, + **__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, text=text, web_app=web_app, **__pydantic_kwargs) diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 24435025..d2bd7754 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -1,22 +1,32 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field -from aiogram.utils import helper -from aiogram.utils.text_decorations import TextDecoration, html_decoration, markdown_decoration +from aiogram.utils.text_decorations import ( + TextDecoration, + html_decoration, + markdown_decoration, +) -from .base import UNSET, TelegramObject +from ..client.default import Default +from ..enums import ContentType +from .custom import DateTime +from .maybe_inaccessible_message import MaybeInaccessibleMessage +from .reply_parameters import ReplyParameters if TYPE_CHECKING: from ..methods import ( CopyMessage, DeleteMessage, EditMessageCaption, + EditMessageLiveLocation, + EditMessageMedia, EditMessageReplyMarkup, EditMessageText, + ForwardMessage, + PinChatMessage, SendAnimation, SendAudio, SendContact, @@ -27,6 +37,7 @@ if TYPE_CHECKING: SendLocation, SendMediaGroup, SendMessage, + SendPaidMedia, SendPhoto, SendPoll, SendSticker, @@ -34,44 +45,97 @@ if TYPE_CHECKING: SendVideo, SendVideoNote, SendVoice, + SetMessageReaction, + StopMessageLiveLocation, + UnpinChatMessage, ) from .animation import Animation from .audio import Audio 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 .force_reply import ForceReply + from .external_reply_info import ExternalReplyInfo + from .forum_topic_closed import ForumTopicClosed + from .forum_topic_created import ForumTopicCreated + from .forum_topic_edited import ForumTopicEdited + from .forum_topic_reopened import ForumTopicReopened 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 .inline_keyboard_markup import InlineKeyboardMarkup from .input_file import InputFile - from .input_media_photo import InputMediaPhoto - from .input_media_video import InputMediaVideo + 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_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_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 .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 from .venue import Venue from .video import Video + from .video_chat_ended import VideoChatEnded + from .video_chat_participants_invited import VideoChatParticipantsInvited + from .video_chat_scheduled import VideoChatScheduled + from .video_chat_started import VideoChatStarted from .video_note import VideoNote from .voice import Voice - from .voice_chat_ended import VoiceChatEnded - from .voice_chat_participants_invited import VoiceChatParticipantsInvited - from .voice_chat_scheduled import VoiceChatScheduled - from .voice_chat_started import VoiceChatStarted + from .web_app_data import WebAppData + from .write_access_allowed import WriteAccessAllowed -class Message(TelegramObject): +class Message(MaybeInaccessibleMessage): """ This object represents a message. @@ -79,121 +143,511 @@ class Message(TelegramObject): """ message_id: int - """Unique message identifier inside this chat""" - date: datetime.datetime - """Date the message was sent in Unix time""" + """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 - """Conversation the message belongs to""" - 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.""" - forward_from: Optional[User] = None - """*Optional*. For forwarded messages, sender of the original message""" - forward_from_chat: Optional[Chat] = None - """*Optional*. For messages forwarded from channels or from anonymous administrators, information about the original sender chat""" - forward_from_message_id: Optional[int] = None - """*Optional*. For messages forwarded from channels, identifier of the original message in the channel""" - forward_signature: Optional[str] = None - """*Optional*. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present""" - forward_sender_name: Optional[str] = None - """*Optional*. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages""" - forward_date: Optional[int] = None - """*Optional*. For forwarded messages, date the original message was sent in Unix time""" - is_automatic_forward: Optional[bool] = None - """*Optional*. 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, 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.""" - via_bot: Optional[User] = None + """Chat the message belongs to""" + 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: 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.""" + 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: MessageOriginUnion | None = None + """*Optional*. Information about the original message for forwarded messages""" + 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: 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: TextQuote | None = None + """*Optional*. For replies that quote part of the original message, the quoted part of the message""" + reply_to_story: Story | None = None + """*Optional*. For replies to a story, the original story""" + 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 - """*Optional*. True, if the message can't be forwarded""" - media_group_id: Optional[str] = None - """*Optional*. The unique identifier of a media message group this message belongs to""" - author_signature: Optional[str] = None + has_protected_content: bool | None = None + """*Optional*. :code:`True`, if the message can't be forwarded""" + 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 - """*Optional*. For text messages, the actual UTF-8 text of the message, 0-4096 characters""" - entities: Optional[List[MessageEntity]] = 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: list[MessageEntity] | None = None """*Optional*. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text""" - animation: Optional[Animation] = 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""" + 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: 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""" - photo: Optional[List[PhotoSize]] = None + paid_media: PaidMediaInfo | None = None + """*Optional*. Message contains paid media; information about the paid media""" + 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""" - video: Optional[Video] = None + story: Story | None = None + """*Optional*. Message is a forwarded story""" + 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 - """*Optional*. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters""" - caption_entities: Optional[List[MessageEntity]] = None + caption: str | None = None + """*Optional*. Caption for the animation, audio, document, paid media, photo, video or voice""" + 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""" - contact: Optional[Contact] = 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""" + 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[Message] = 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 is itself 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 » `_""" - connected_website: Optional[str] = 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: ChatShared | None = None + """*Optional*. Service message: a chat was shared with the bot""" + 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 » `_""" - passport_data: Optional[PassportData] = 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: 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.""" - voice_chat_scheduled: Optional[VoiceChatScheduled] = None - """*Optional*. Service message: voice chat scheduled""" - voice_chat_started: Optional[VoiceChatStarted] = None - """*Optional*. Service message: voice chat started""" - voice_chat_ended: Optional[VoiceChatEnded] = None - """*Optional*. Service message: voice chat ended""" - voice_chat_participants_invited: Optional[VoiceChatParticipantsInvited] = None - """*Optional*. Service message: new participants invited to a voice chat""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. Inline keyboard attached to the message. :code:`login_url` buttons are represented as ordinary :code:`url` buttons.""" + boost_added: ChatBoostAdded | None = None + """*Optional*. Service message: user boosted the chat""" + chat_background_set: ChatBackground | None = None + """*Optional*. Service message: chat background set""" + 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: ForumTopicEdited | None = None + """*Optional*. Service message: forum topic edited""" + forum_topic_closed: ForumTopicClosed | None = None + """*Optional*. Service message: forum topic closed""" + forum_topic_reopened: ForumTopicReopened | None = None + """*Optional*. Service message: forum topic reopened""" + general_forum_topic_hidden: GeneralForumTopicHidden | None = None + """*Optional*. Service message: the 'General' forum topic hidden""" + general_forum_topic_unhidden: GeneralForumTopicUnhidden | None = None + """*Optional*. Service message: the 'General' forum topic unhidden""" + giveaway_created: GiveawayCreated | None = None + """*Optional*. Service message: a scheduled giveaway was created""" + giveaway: Giveaway | None = None + """*Optional*. The message is a scheduled giveaway message""" + giveaway_winners: GiveawayWinners | None = None + """*Optional*. A giveaway with public winners was completed""" + giveaway_completed: GiveawayCompleted | None = None + """*Optional*. Service message: a giveaway without public winners was completed""" + 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: VideoChatStarted | None = None + """*Optional*. Service message: video chat started""" + video_chat_ended: VideoChatEnded | None = None + """*Optional*. Service message: video chat ended""" + video_chat_participants_invited: VideoChatParticipantsInvited | None = None + """*Optional*. Service message: new participants invited to a video chat""" + web_app_data: WebAppData | None = None + """*Optional*. Service message: data sent by a Web App""" + 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: 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: 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: 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: 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: 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: UserShared | None = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. Service message: a user was shared with the bot + +.. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + message_id: int, + date: DateTime, + chat: Chat, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + message_id=message_id, + 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, + is_automatic_forward=is_automatic_forward, + reply_to_message=reply_to_message, + 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, + document=document, + paid_media=paid_media, + photo=photo, + sticker=sticker, + story=story, + video=video, + video_note=video_note, + voice=voice, + caption=caption, + 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, + poll=poll, + venue=venue, + 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, + group_chat_created=group_chat_created, + supergroup_chat_created=supergroup_chat_created, + channel_chat_created=channel_chat_created, + message_auto_delete_timer_changed=message_auto_delete_timer_changed, + migrate_to_chat_id=migrate_to_chat_id, + migrate_from_chat_id=migrate_from_chat_id, + 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, + forum_topic_reopened=forum_topic_reopened, + general_forum_topic_hidden=general_forum_topic_hidden, + general_forum_topic_unhidden=general_forum_topic_unhidden, + giveaway_created=giveaway_created, + 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, + video_chat_participants_invited=video_chat_participants_invited, + web_app_data=web_app_data, + reply_markup=reply_markup, + forward_date=forward_date, + forward_from=forward_from, + forward_from_chat=forward_from_chat, + forward_from_message_id=forward_from_message_id, + forward_sender_name=forward_sender_name, + forward_signature=forward_signature, + user_shared=user_shared, + **__pydantic_kwargs, + ) @property def content_type(self) -> str: @@ -217,6 +671,8 @@ class Message(TelegramObject): 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: @@ -227,10 +683,16 @@ class Message(TelegramObject): 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: return ContentType.SUCCESSFUL_PAYMENT + if self.users_shared: + return ContentType.USERS_SHARED if self.connected_website: return ContentType.CONNECTED_WEBSITE if self.migrate_from_chat_id: @@ -247,29 +709,101 @@ class Message(TelegramObject): return ContentType.DELETE_CHAT_PHOTO if self.group_chat_created: return ContentType.GROUP_CHAT_CREATED + if self.supergroup_chat_created: + return ContentType.SUPERGROUP_CHAT_CREATED + if self.channel_chat_created: + return ContentType.CHANNEL_CHAT_CREATED + if self.paid_media: + return ContentType.PAID_MEDIA if self.passport_data: return ContentType.PASSPORT_DATA + if self.proximity_alert_triggered: + return ContentType.PROXIMITY_ALERT_TRIGGERED if self.poll: return ContentType.POLL if self.dice: return ContentType.DICE if self.message_auto_delete_timer_changed: return ContentType.MESSAGE_AUTO_DELETE_TIMER_CHANGED - if self.voice_chat_started: - return ContentType.VOICE_CHAT_STARTED - if self.voice_chat_ended: - return ContentType.VOICE_CHAT_ENDED - if self.voice_chat_participants_invited: - return ContentType.VOICE_CHAT_PARTICIPANTS_INVITED - + if self.forum_topic_created: + return ContentType.FORUM_TOPIC_CREATED + if self.forum_topic_edited: + return ContentType.FORUM_TOPIC_EDITED + if self.forum_topic_closed: + return ContentType.FORUM_TOPIC_CLOSED + if self.forum_topic_reopened: + return ContentType.FORUM_TOPIC_REOPENED + if self.general_forum_topic_hidden: + return ContentType.GENERAL_FORUM_TOPIC_HIDDEN + if self.general_forum_topic_unhidden: + return ContentType.GENERAL_FORUM_TOPIC_UNHIDDEN + if self.giveaway_created: + return ContentType.GIVEAWAY_CREATED + if self.giveaway: + return ContentType.GIVEAWAY + if self.giveaway_completed: + return ContentType.GIVEAWAY_COMPLETED + if self.giveaway_winners: + return ContentType.GIVEAWAY_WINNERS + if self.video_chat_scheduled: + return ContentType.VIDEO_CHAT_SCHEDULED + if self.video_chat_started: + return ContentType.VIDEO_CHAT_STARTED + if self.video_chat_ended: + return ContentType.VIDEO_CHAT_ENDED + if self.video_chat_participants_invited: + return ContentType.VIDEO_CHAT_PARTICIPANTS_INVITED + if self.web_app_data: + return ContentType.WEB_APP_DATA + if self.user_shared: + return ContentType.USER_SHARED + if self.chat_shared: + return ContentType.CHAT_SHARED + if self.story: + return ContentType.STORY + if self.write_access_allowed: + return ContentType.WRITE_ACCESS_ALLOWED + if self.chat_background_set: + 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: - text = self.text or self.caption - if text is None: - raise TypeError("This message doesn't have any text.") - - entities = self.entities or self.caption_entities + text = self.text or self.caption or "" + entities = self.entities or self.caption_entities or [] return text_decoration.unparse(text=text, entities=entities) @property @@ -280,448 +814,911 @@ class Message(TelegramObject): 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, - thumb: Optional[Union[InputFile, str]] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - disable_notification: Optional[bool] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Reply with animation + Shortcut for method :class:`aiogram.methods.send_animation.SendAnimation` + will automatically fill method attributes: - :param animation: - :param duration: - :param width: - :param height: - :param thumb: - :param caption: - :param parse_mode: - :param disable_notification: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 + :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` """ - from ..methods import 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, + 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(), animation=animation, + direct_messages_topic_id=direct_messages_topic_id, duration=duration, width=width, height=height, - thumb=thumb, + 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, - reply_to_message_id=self.message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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_animation( self, - animation: Union[InputFile, str], - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - disable_notification: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Answer with animation + Shortcut for method :class:`aiogram.methods.send_animation.SendAnimation` + will automatically fill method attributes: - :param animation: - :param duration: - :param width: - :param height: - :param thumb: - :param caption: - :param parse_mode: - :param disable_notification: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + 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, - thumb=thumb, + 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, - reply_to_message_id=None, + 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: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumb: Optional[Union[InputFile, str]] = None, - disable_notification: Optional[bool] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Reply with audio + Shortcut for method :class:`aiogram.methods.send_audio.SendAudio` + will automatically fill method attributes: - :param audio: - :param caption: - :param parse_mode: - :param duration: - :param performer: - :param title: - :param thumb: - :param disable_notification: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + 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(), audio=audio, + direct_messages_topic_id=direct_messages_topic_id, caption=caption, parse_mode=parse_mode, + caption_entities=caption_entities, duration=duration, performer=performer, title=title, - thumb=thumb, + thumbnail=thumbnail, disable_notification=disable_notification, - reply_to_message_id=self.message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumb: Optional[Union[InputFile, str]] = None, - disable_notification: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Answer with audio + Shortcut for method :class:`aiogram.methods.send_audio.SendAudio` + will automatically fill method attributes: - :param audio: - :param caption: - :param parse_mode: - :param duration: - :param performer: - :param title: - :param thumb: - :param disable_notification: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + 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, duration=duration, performer=performer, title=title, - thumb=thumb, + thumbnail=thumbnail, disable_notification=disable_notification, - reply_to_message_id=None, + 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, - last_name: Optional[str] = None, - vcard: Optional[str] = None, - disable_notification: Optional[bool] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Reply with contact + Shortcut for method :class:`aiogram.methods.send_contact.SendContact` + will automatically fill method attributes: - :param phone_number: - :param first_name: - :param last_name: - :param vcard: - :param disable_notification: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + 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(), 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, - reply_to_message_id=self.message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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, - last_name: Optional[str] = None, - vcard: Optional[str] = None, - disable_notification: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Answer with contact + Shortcut for method :class:`aiogram.methods.send_contact.SendContact` + will automatically fill method attributes: - :param phone_number: - :param first_name: - :param last_name: - :param vcard: - :param disable_notification: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + message_thread_id=self.message_thread_id if self.is_topic_message else None, + 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, - reply_to_message_id=None, + 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: Union[InputFile, str], - thumb: Optional[Union[InputFile, str]] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - disable_notification: Optional[bool] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Reply with document + Shortcut for method :class:`aiogram.methods.send_document.SendDocument` + will automatically fill method attributes: - :param document: - :param thumb: - :param caption: - :param parse_mode: - :param disable_notification: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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. + :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` """ - from ..methods import 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, + 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(), document=document, - thumb=thumb, + 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, - reply_to_message_id=self.message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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: Union[InputFile, str], - thumb: Optional[Union[InputFile, str]] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - disable_notification: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Answer with document + Shortcut for method :class:`aiogram.methods.send_document.SendDocument` + will automatically fill method attributes: - :param document: - :param thumb: - :param caption: - :param parse_mode: - :param disable_notification: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + message_thread_id=self.message_thread_id if self.is_topic_message else None, + business_connection_id=self.business_connection_id, document=document, - thumb=thumb, + 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, - reply_to_message_id=None, + 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_game( self, game_short_name: str, - disable_notification: Optional[bool] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[InlineKeyboardMarkup] = 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: """ - Reply with game + Shortcut for method :class:`aiogram.methods.send_game.SendGame` + will automatically fill method attributes: - :param game_short_name: - :param disable_notification: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 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` """ - from ..methods import 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, + 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(), game_short_name=game_short_name, disable_notification=disable_notification, - reply_to_message_id=self.message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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_game( self, game_short_name: str, - disable_notification: Optional[bool] = None, - reply_markup: Optional[InlineKeyboardMarkup] = 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: """ - Answer with game + Shortcut for method :class:`aiogram.methods.send_game.SendGame` + will automatically fill method attributes: - :param game_short_name: - :param disable_notification: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 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` """ - from ..methods import 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, + message_thread_id=self.message_thread_id if self.is_topic_message else None, + business_connection_id=self.business_connection_id, game_short_name=game_short_name, disable_notification=disable_notification, - reply_to_message_id=None, + 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_invoice( self, title: str, description: str, payload: str, - provider_token: str, - start_parameter: str, currency: str, - prices: List[LabeledPrice], - 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, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[InlineKeyboardMarkup] = 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: """ - Reply with invoice + Shortcut for method :class:`aiogram.methods.send_invoice.SendInvoice` + will automatically fill method attributes: - :param title: - :param description: - :param payload: - :param provider_token: - :param start_parameter: - :param currency: - :param prices: - :param provider_data: - :param photo_url: - :param photo_size: - :param photo_width: - :param photo_height: - :param need_name: - :param need_phone_number: - :param need_email: - :param need_shipping_address: - :param send_phone_number_to_provider: - :param send_email_to_provider: - :param is_flexible: - :param disable_notification: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + 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(), title=title, description=description, payload=payload, - provider_token=provider_token, - start_parameter=start_parameter, 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, + start_parameter=start_parameter, provider_data=provider_data, photo_url=photo_url, photo_size=photo_size, @@ -735,72 +1732,118 @@ class Message(TelegramObject): send_email_to_provider=send_email_to_provider, is_flexible=is_flexible, disable_notification=disable_notification, - reply_to_message_id=self.message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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_invoice( self, title: str, description: str, payload: str, - provider_token: str, - start_parameter: str, currency: str, - prices: List[LabeledPrice], - 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, - reply_markup: Optional[InlineKeyboardMarkup] = 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: """ - Answer with invoice + Shortcut for method :class:`aiogram.methods.send_invoice.SendInvoice` + will automatically fill method attributes: - :param title: - :param description: - :param payload: - :param provider_token: - :param start_parameter: - :param currency: - :param prices: - :param provider_data: - :param photo_url: - :param photo_size: - :param photo_width: - :param photo_height: - :param need_name: - :param need_phone_number: - :param need_email: - :param need_shipping_address: - :param send_phone_number_to_provider: - :param send_email_to_provider: - :param is_flexible: - :param disable_notification: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + message_thread_id=self.message_thread_id if self.is_topic_message else None, + business_connection_id=self.business_connection_id, title=title, description=description, payload=payload, - provider_token=provider_token, - start_parameter=start_parameter, 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, + start_parameter=start_parameter, provider_data=provider_data, photo_url=photo_url, photo_size=photo_size, @@ -814,480 +1857,1118 @@ class Message(TelegramObject): send_email_to_provider=send_email_to_provider, is_flexible=is_flexible, disable_notification=disable_notification, - reply_to_message_id=None, + 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, - live_period: Optional[int] = None, - disable_notification: Optional[bool] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Reply with location + Shortcut for method :class:`aiogram.methods.send_location.SendLocation` + will automatically fill method attributes: - :param latitude: - :param longitude: - :param live_period: - :param disable_notification: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + 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(), 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, - reply_to_message_id=self.message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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, - live_period: Optional[int] = None, - disable_notification: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Answer with location + Shortcut for method :class:`aiogram.methods.send_location.SendLocation` + will automatically fill method attributes: - :param latitude: - :param longitude: - :param live_period: - :param disable_notification: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + message_thread_id=self.message_thread_id if self.is_topic_message else None, + 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, - reply_to_message_id=None, + 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_media_group( self, - media: List[Union[InputMediaPhoto, InputMediaVideo]], - disable_notification: Optional[bool] = 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: """ - Reply with media group + Shortcut for method :class:`aiogram.methods.send_media_group.SendMediaGroup` + will automatically fill method attributes: - :param media: - :param disable_notification: - :param allow_sending_without_reply: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_id` + - :code:`reply_parameters` + + Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of :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 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` """ - from ..methods import 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, + 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(), media=media, + direct_messages_topic_id=direct_messages_topic_id, disable_notification=disable_notification, - reply_to_message_id=self.message_id, + 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_media_group( self, - media: List[Union[InputMediaPhoto, InputMediaVideo]], - disable_notification: 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, + reply_parameters: ReplyParameters | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, ) -> SendMediaGroup: """ - Answer with media group + Shortcut for method :class:`aiogram.methods.send_media_group.SendMediaGroup` + will automatically fill method attributes: - :param media: - :param disable_notification: - :return: + - :code:`chat_id` + - :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 :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 + :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` """ - from ..methods import 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, + 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, - reply_to_message_id=None, - ) + 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( self, text: str, - parse_mode: Optional[str] = UNSET, - disable_web_page_preview: Optional[bool] = None, - disable_notification: Optional[bool] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Reply with text message + Shortcut for method :class:`aiogram.methods.send_message.SendMessage` + will automatically fill method attributes: - :param text: - :param parse_mode: - :param disable_web_page_preview: - :param disable_notification: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct 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` """ - from ..methods import 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, + 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(), text=text, + direct_messages_topic_id=direct_messages_topic_id, parse_mode=parse_mode, - disable_web_page_preview=disable_web_page_preview, + entities=entities, + link_preview_options=link_preview_options, disable_notification=disable_notification, - reply_to_message_id=self.message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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( self, text: str, - parse_mode: Optional[str] = UNSET, - disable_web_page_preview: Optional[bool] = None, - disable_notification: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Answer with text message + Shortcut for method :class:`aiogram.methods.send_message.SendMessage` + will automatically fill method attributes: - :param text: - :param parse_mode: - :param disable_web_page_preview: - :param disable_notification: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + 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, - disable_web_page_preview=disable_web_page_preview, + entities=entities, + link_preview_options=link_preview_options, disable_notification=disable_notification, - reply_to_message_id=None, + 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_photo( self, - photo: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - disable_notification: Optional[bool] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Reply with photo + Shortcut for method :class:`aiogram.methods.send_photo.SendPhoto` + will automatically fill method attributes: - :param photo: - :param caption: - :param parse_mode: - :param disable_notification: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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* + :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` """ - from ..methods import 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, + 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(), photo=photo, + 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, - reply_to_message_id=self.message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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_photo( self, - photo: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - disable_notification: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Answer with photo + Shortcut for method :class:`aiogram.methods.send_photo.SendPhoto` + will automatically fill method attributes: - :param photo: - :param caption: - :param parse_mode: - :param disable_notification: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + 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, + show_caption_above_media=show_caption_above_media, + has_spoiler=has_spoiler, disable_notification=disable_notification, - reply_to_message_id=None, + 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_poll( self, question: str, - options: List[str], - 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[str] = UNSET, - 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, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Reply with poll + Shortcut for method :class:`aiogram.methods.send_poll.SendPoll` + will automatically fill method attributes: - :param question: - :param options: - :param is_anonymous: - :param type: - :param allows_multiple_answers: - :param correct_option_id: - :param explanation: - :param explanation_parse_mode: - :param open_period: - :param close_date: - :param is_closed: - :param disable_notification: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 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` """ - from ..methods import 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, + 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(), question=question, options=options, + question_parse_mode=question_parse_mode, + question_entities=question_entities, 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, - reply_to_message_id=self.message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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_poll( self, question: str, - options: List[str], - 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[str] = UNSET, - 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, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Answer with poll + Shortcut for method :class:`aiogram.methods.send_poll.SendPoll` + will automatically fill method attributes: - :param question: - :param options: - :param is_anonymous: - :param type: - :param allows_multiple_answers: - :param correct_option_id: - :param explanation: - :param explanation_parse_mode: - :param open_period: - :param close_date: - :param is_closed: - :param disable_notification: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 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` """ - from ..methods import 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, + message_thread_id=self.message_thread_id if self.is_topic_message else None, + business_connection_id=self.business_connection_id, question=question, options=options, + question_parse_mode=question_parse_mode, + question_entities=question_entities, 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, - reply_to_message_id=None, + 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, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Reply with dice + Shortcut for method :class:`aiogram.methods.send_dice.SendDice` + will automatically fill method attributes: - :param emoji: - :param disable_notification: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct 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` """ - from ..methods import 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, + message_thread_id=self.message_thread_id if self.is_topic_message else None, + business_connection_id=self.business_connection_id, + reply_parameters=self.as_reply_parameters(), + direct_messages_topic_id=direct_messages_topic_id, emoji=emoji, disable_notification=disable_notification, - reply_to_message_id=self.message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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_dice( self, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Answer with dice + Shortcut for method :class:`aiogram.methods.send_dice.SendDice` + will automatically fill method attributes: - :param emoji: - :param disable_notification: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + 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, - reply_to_message_id=None, + 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: Union[InputFile, str], - disable_notification: Optional[bool] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Reply with sticker + Shortcut for method :class:`aiogram.methods.send_sticker.SendSticker` + will automatically fill method attributes: - :param sticker: - :param disable_notification: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct 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` """ - from ..methods import 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, + 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(), sticker=sticker, + direct_messages_topic_id=direct_messages_topic_id, + emoji=emoji, disable_notification=disable_notification, - reply_to_message_id=self.message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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: Union[InputFile, str], - disable_notification: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Answer with sticker + Shortcut for method :class:`aiogram.methods.send_sticker.SendSticker` + will automatically fill method attributes: - :param sticker: - :param disable_notification: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + 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, - reply_to_message_id=None, + 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, @@ -1295,43 +2976,83 @@ class Message(TelegramObject): longitude: float, title: str, address: str, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Reply with venue + Shortcut for method :class:`aiogram.methods.send_venue.SendVenue` + will automatically fill method attributes: - :param latitude: - :param longitude: - :param title: - :param address: - :param foursquare_id: - :param foursquare_type: - :param disable_notification: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + 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(), 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, - reply_to_message_id=self.message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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, @@ -1339,324 +3060,646 @@ class Message(TelegramObject): longitude: float, title: str, address: str, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Answer with venue + Shortcut for method :class:`aiogram.methods.send_venue.SendVenue` + will automatically fill method attributes: - :param latitude: - :param longitude: - :param title: - :param address: - :param foursquare_id: - :param foursquare_type: - :param disable_notification: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + message_thread_id=self.message_thread_id if self.is_topic_message else None, + business_connection_id=self.business_connection_id, 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, - reply_to_message_id=None, + 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: Union[InputFile, str], - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Reply with video + Shortcut for method :class:`aiogram.methods.send_video.SendVideo` + will automatically fill method attributes: - :param video: - :param duration: - :param width: - :param height: - :param thumb: - :param caption: - :param parse_mode: - :param supports_streaming: - :param disable_notification: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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* + :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` """ - from ..methods import 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, + 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(), video=video, + direct_messages_topic_id=direct_messages_topic_id, duration=duration, width=width, height=height, - thumb=thumb, + 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, - reply_to_message_id=self.message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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: Union[InputFile, str], - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Answer with video + Shortcut for method :class:`aiogram.methods.send_video.SendVideo` + will automatically fill method attributes: - :param video: - :param duration: - :param width: - :param height: - :param thumb: - :param caption: - :param parse_mode: - :param supports_streaming: - :param disable_notification: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + 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, - thumb=thumb, + 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, - reply_to_message_id=None, + 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: Union[InputFile, str], - duration: Optional[int] = None, - length: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, - disable_notification: Optional[bool] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Reply wit video note + Shortcut for method :class:`aiogram.methods.send_video_note.SendVideoNote` + will automatically fill method attributes: - :param video_note: - :param duration: - :param length: - :param thumb: - :param disable_notification: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct 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` """ - from ..methods import 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, + 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(), video_note=video_note, + direct_messages_topic_id=direct_messages_topic_id, duration=duration, length=length, - thumb=thumb, + thumbnail=thumbnail, disable_notification=disable_notification, - reply_to_message_id=self.message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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: Union[InputFile, str], - duration: Optional[int] = None, - length: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, - disable_notification: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Answer wit video note + Shortcut for method :class:`aiogram.methods.send_video_note.SendVideoNote` + will automatically fill method attributes: - :param video_note: - :param duration: - :param length: - :param thumb: - :param disable_notification: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + 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, - thumb=thumb, + thumbnail=thumbnail, disable_notification=disable_notification, - reply_to_message_id=None, + 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: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Reply with voice + Shortcut for method :class:`aiogram.methods.send_voice.SendVoice` + will automatically fill method attributes: - :param voice: - :param caption: - :param parse_mode: - :param duration: - :param disable_notification: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct 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` """ - from ..methods import 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, + 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(), 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, - reply_to_message_id=self.message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Answer with voice + Shortcut for method :class:`aiogram.methods.send_voice.SendVoice` + will automatically fill method attributes: - :param voice: - :param caption: - :param parse_mode: - :param duration: - :param disable_notification: - :param reply_markup: - :return: + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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` """ - from ..methods import 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, + 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, - reply_to_message_id=None, + 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 send_copy( + 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_markup: Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, None] = None, - ) -> Union[ - 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 message. + Send copy of a message. Is similar to :meth:`aiogram.client.bot.Bot.copy_message` but returning the sent message instead of :class:`aiogram.types.message_id.MessageId` .. note:: - This method don't use the API method named `copyMessage` and + This method doesn't use the API method named `copyMessage` and historically implemented before the similar method is added to API :param chat_id: :param disable_notification: :param reply_to_message_id: + :param reply_parameters: :param reply_markup: + :param allow_sending_without_reply: + :param message_thread_id: + :param business_connection_id: + :param parse_mode: + :param message_effect_id: :return: """ from ..methods import ( + ForwardMessage, SendAnimation, SendAudio, SendContact, @@ -1673,58 +3716,89 @@ class Message(TelegramObject): SendVoice, ) - kwargs = { + kwargs: dict[str, Any] = { "chat_id": chat_id, "reply_markup": reply_markup or self.reply_markup, "disable_notification": disable_notification, "reply_to_message_id": reply_to_message_id, + "reply_parameters": reply_parameters, + "message_thread_id": message_thread_id, + "business_connection_id": business_connection_id, + "allow_sending_without_reply": allow_sending_without_reply, + # when sending a copy, we don't need any parse mode + # because all entities are already prepared + "parse_mode": parse_mode, + "message_effect_id": message_effect_id or self.effect_id, } - text = self.text or self.caption - entities = self.entities or self.caption_entities if self.text: - return SendMessage(text=text, entities=entities, **kwargs) - elif self.audio: + return SendMessage( + text=self.text, + entities=self.entities, + **kwargs, + ).as_(self._bot) + if self.audio: return SendAudio( audio=self.audio.file_id, - caption=text, + caption=self.caption, title=self.audio.title, performer=self.audio.performer, duration=self.audio.duration, - caption_entities=entities, + caption_entities=self.caption_entities, **kwargs, - ) - elif self.animation: + ).as_(self._bot) + if self.animation: return SendAnimation( - animation=self.animation.file_id, caption=text, caption_entities=entities, **kwargs - ) - elif self.document: + animation=self.animation.file_id, + caption=self.caption, + caption_entities=self.caption_entities, + **kwargs, + ).as_(self._bot) + if self.document: return SendDocument( - document=self.document.file_id, caption=text, caption_entities=entities, **kwargs - ) - elif self.photo: + document=self.document.file_id, + caption=self.caption, + caption_entities=self.caption_entities, + **kwargs, + ).as_(self._bot) + if self.photo: return SendPhoto( - photo=self.photo[-1].file_id, caption=text, caption_entities=entities, **kwargs - ) - elif self.sticker: - return SendSticker(sticker=self.sticker.file_id, **kwargs) - elif self.video: + photo=self.photo[-1].file_id, + caption=self.caption, + caption_entities=self.caption_entities, + **kwargs, + ).as_(self._bot) + if self.sticker: + return SendSticker( + sticker=self.sticker.file_id, + **kwargs, + ).as_(self._bot) + if self.video: return SendVideo( - video=self.video.file_id, caption=text, caption_entities=entities, **kwargs - ) - elif self.video_note: - return SendVideoNote(video_note=self.video_note.file_id, **kwargs) - elif self.voice: - return SendVoice(voice=self.voice.file_id, **kwargs) - elif self.contact: + video=self.video.file_id, + caption=self.caption, + caption_entities=self.caption_entities, + **kwargs, + ).as_(self._bot) + if self.video_note: + return SendVideoNote( + video_note=self.video_note.file_id, + **kwargs, + ).as_(self._bot) + if self.voice: + return SendVoice( + voice=self.voice.file_id, + **kwargs, + ).as_(self._bot) + if self.contact: return SendContact( phone_number=self.contact.phone_number, first_name=self.contact.first_name, last_name=self.contact.last_name, vcard=self.contact.vcard, **kwargs, - ) - elif self.venue: + ).as_(self._bot) + if self.venue: return SendVenue( latitude=self.venue.location.latitude, longitude=self.venue.location.longitude, @@ -1733,176 +3807,847 @@ class Message(TelegramObject): foursquare_id=self.venue.foursquare_id, foursquare_type=self.venue.foursquare_type, **kwargs, - ) - elif self.location: + ).as_(self._bot) + if self.location: return SendLocation( - latitude=self.location.latitude, longitude=self.location.longitude, **kwargs - ) - elif self.poll: + latitude=self.location.latitude, + longitude=self.location.longitude, + **kwargs, + ).as_(self._bot) + if self.poll: + from .input_poll_option import InputPollOption + return SendPoll( question=self.poll.question, - options=[option.text for option in self.poll.options], + options=[ + InputPollOption( + text=option.text, + voter_count=option.voter_count, + text_entities=option.text_entities, + text_parse_mode=None, + ) + for option in self.poll.options + ], **kwargs, - ) - elif self.dice: # Dice value can't be controlled - return SendDice(**kwargs) - else: - raise TypeError("This type of message can't be copied.") + ).as_(self._bot) + if self.dice: # Dice value can't be controlled + return SendDice( + **kwargs, + ).as_(self._bot) + if self.story: + return ForwardMessage( + from_chat_id=self.chat.id, + message_id=self.message_id, + **kwargs, + ).as_(self._bot) + + raise TypeError("This type of message can't be copied.") def copy_to( self, - chat_id: Union[int, str], - caption: Optional[str] = None, - parse_mode: Optional[str] = None, - caption_entities: Optional[List[MessageEntity]] = None, - disable_notification: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = 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: """ - Copy message + Shortcut for method :class:`aiogram.methods.copy_message.CopyMessage` + will automatically fill method attributes: - :param chat_id: - :param caption: - :param parse_mode: - :param caption_entities: - :param disable_notification: - :param reply_to_message_id: - :param allow_sending_without_reply: - :param reply_markup: - :return: + - :code:`from_chat_id` + - :code:`message_id` + + 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. + + 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 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 + :param reply_to_message_id: If the message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.copy_message.CopyMessage` """ - from ..methods import CopyMessage + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import CopyMessage + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return CopyMessage( - chat_id=chat_id, 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, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, + 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 edit_text( self, text: str, - parse_mode: Optional[str] = UNSET, - entities: Optional[List[MessageEntity]] = None, - disable_web_page_preview: Optional[bool] = None, - reply_markup: Optional[InlineKeyboardMarkup] = 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"), + **kwargs: Any, ) -> EditMessageText: - from ..methods import EditMessageText + """ + Shortcut for method :class:`aiogram.methods.edit_message_text.EditMessageText` + will automatically fill method attributes: + + - :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 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* + :param link_preview_options: Link preview generation options for the message + :param reply_markup: A JSON-serialized object for an `inline keyboard `_. + :param disable_web_page_preview: Disables link previews for links in this message + :return: instance of method :class:`aiogram.methods.edit_message_text.EditMessageText` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import EditMessageText + + 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, + inline_message_id=inline_message_id, parse_mode=parse_mode, entities=entities, - disable_web_page_preview=disable_web_page_preview, + link_preview_options=link_preview_options, reply_markup=reply_markup, + disable_web_page_preview=disable_web_page_preview, + **kwargs, + ).as_(self._bot) + + def forward( + self, + 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: + """ + Shortcut for method :class:`aiogram.methods.forward_message.ForwardMessage` + will automatically fill method attributes: + + - :code:`from_chat_id` + - :code:`message_id` + + 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. + + 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 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!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import ForwardMessage + + 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: InputMediaUnion, + inline_message_id: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + **kwargs: Any, + ) -> EditMessageMedia: + """ + Shortcut for method :class:`aiogram.methods.edit_message_media.EditMessageMedia` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`message_id` + - :code:`business_connection_id` + + 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 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` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import EditMessageMedia + + 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, + inline_message_id=inline_message_id, + reply_markup=reply_markup, + **kwargs, + ).as_(self._bot) + def edit_reply_markup( self, - reply_markup: Optional[InlineKeyboardMarkup] = None, + inline_message_id: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + **kwargs: Any, ) -> EditMessageReplyMarkup: - from ..methods import EditMessageReplyMarkup + """ + Shortcut for method :class:`aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup` + will automatically fill method attributes: + + - :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 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` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import EditMessageReplyMarkup + + 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, + inline_message_id=inline_message_id, reply_markup=reply_markup, + **kwargs, + ).as_(self._bot) + + def delete_reply_markup( + self, + inline_message_id: str | None = None, + **kwargs: Any, + ) -> EditMessageReplyMarkup: + """ + Shortcut for method :class:`aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup` + will automatically fill method attributes: + + - :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 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` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import EditMessageReplyMarkup + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." ) - def delete_reply_markup(self) -> EditMessageReplyMarkup: - return self.edit_reply_markup(reply_markup=None) + return EditMessageReplyMarkup( + chat_id=self.chat.id, + message_id=self.message_id, + business_connection_id=self.business_connection_id, + reply_markup=None, + inline_message_id=inline_message_id, + **kwargs, + ).as_(self._bot) + + def edit_live_location( + self, + latitude: float, + longitude: float, + 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: + """ + Shortcut for method :class:`aiogram.methods.edit_message_live_location.EditMessageLiveLocation` + will automatically fill method attributes: + + - :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. + + Source: https://core.telegram.org/bots/api#editmessagelivelocation + + :param latitude: Latitude of new location + :param longitude: Longitude of new location + :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 + :param heading: Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. + :param proximity_alert_radius: The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. + :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. + :return: instance of method :class:`aiogram.methods.edit_message_live_location.EditMessageLiveLocation` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import EditMessageLiveLocation + + 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, + inline_message_id=inline_message_id, + live_period=live_period, + horizontal_accuracy=horizontal_accuracy, + heading=heading, + proximity_alert_radius=proximity_alert_radius, + reply_markup=reply_markup, + **kwargs, + ).as_(self._bot) + + def stop_live_location( + self, + inline_message_id: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + **kwargs: Any, + ) -> StopMessageLiveLocation: + """ + Shortcut for method :class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation` + will automatically fill method attributes: + + - :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 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` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import StopMessageLiveLocation + + 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=self.business_connection_id, + inline_message_id=inline_message_id, + reply_markup=reply_markup, + **kwargs, + ).as_(self._bot) def edit_caption( self, - caption: str, - parse_mode: Optional[str] = UNSET, - caption_entities: Optional[List[MessageEntity]] = None, - 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: - from ..methods import EditMessageCaption + """ + Shortcut for method :class:`aiogram.methods.edit_message_caption.EditMessageCaption` + will automatically fill method attributes: + + - :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 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. + :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. Supported only for animation, photo and video messages. + :param reply_markup: A JSON-serialized object for an `inline keyboard `_. + :return: instance of method :class:`aiogram.methods.edit_message_caption.EditMessageCaption` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import EditMessageCaption + + 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=self.business_connection_id, + inline_message_id=inline_message_id, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, reply_markup=reply_markup, + **kwargs, + ).as_(self._bot) + + def delete( + self, + **kwargs: Any, + ) -> DeleteMessage: + """ + Shortcut for method :class:`aiogram.methods.delete_message.DeleteMessage` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`message_id` + - :code:`business_connection_id` + + Use this method to delete a message, including service messages, with the following limitations: + + - A message can only be deleted if it was sent less than 48 hours ago. + + - Service messages about a supergroup, channel, or forum topic creation can't be deleted. + + - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. + + - Bots can delete outgoing messages in private chats, groups, and supergroups. + + - Bots can delete incoming messages in private chats. + + - Bots granted *can_post_messages* permissions can delete outgoing messages in channels. + + - If the bot is an administrator of a group, 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. + + Source: https://core.telegram.org/bots/api#deletemessage + + :return: instance of method :class:`aiogram.methods.delete_message.DeleteMessage` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import DeleteMessage + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." ) - def delete(self) -> DeleteMessage: - from ..methods import DeleteMessage + return DeleteMessage( + chat_id=self.chat.id, + message_id=self.message_id, + business_connection_id=self.business_connection_id, + **kwargs, + ).as_(self._bot) - return DeleteMessage(chat_id=self.chat.id, message_id=self.message_id) + def pin( + self, + disable_notification: bool | None = None, + **kwargs: Any, + ) -> PinChatMessage: + """ + Shortcut for method :class:`aiogram.methods.pin_chat_message.PinChatMessage` + will automatically fill method attributes: - def get_url(self, force_private: bool = False) -> Optional[str]: + - :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. 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 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` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import PinChatMessage + + 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) + + def unpin( + self, + **kwargs: Any, + ) -> UnpinChatMessage: + """ + Shortcut for method :class:`aiogram.methods.unpin_chat_message.UnpinChatMessage` + will automatically fill method attributes: + + - :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. 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 + + :return: instance of method :class:`aiogram.methods.unpin_chat_message.UnpinChatMessage` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import UnpinChatMessage + + 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, 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 - if not self.chat.username or force_private: - chat_value = f"c/{self.chat.shifted_id}" - else: - chat_value = self.chat.username + chat_value = ( + f"c/{self.chat.shifted_id}" + if not self.chat.username or force_private + 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}" -class ContentType(helper.Helper): - mode = helper.HelperMode.snake_case + def react( + self, + reaction: list[ReactionTypeUnion] | None = None, + is_big: bool | None = None, + **kwargs: Any, + ) -> SetMessageReaction: + """ + Shortcut for method :class:`aiogram.methods.set_message_reaction.SetMessageReaction` + will automatically fill method attributes: - TEXT = helper.Item() # text - AUDIO = helper.Item() # audio - DOCUMENT = helper.Item() # document - ANIMATION = helper.Item() # animation - GAME = helper.Item() # game - PHOTO = helper.Item() # photo - STICKER = helper.Item() # sticker - VIDEO = helper.Item() # video - VIDEO_NOTE = helper.Item() # video_note - VOICE = helper.Item() # voice - CONTACT = helper.Item() # contact - LOCATION = helper.Item() # location - VENUE = helper.Item() # venue - NEW_CHAT_MEMBERS = helper.Item() # new_chat_member - LEFT_CHAT_MEMBER = helper.Item() # left_chat_member - INVOICE = helper.Item() # invoice - SUCCESSFUL_PAYMENT = helper.Item() # successful_payment - CONNECTED_WEBSITE = helper.Item() # connected_website - MIGRATE_TO_CHAT_ID = helper.Item() # migrate_to_chat_id - MIGRATE_FROM_CHAT_ID = helper.Item() # migrate_from_chat_id - PINNED_MESSAGE = helper.Item() # pinned_message - NEW_CHAT_TITLE = helper.Item() # new_chat_title - NEW_CHAT_PHOTO = helper.Item() # new_chat_photo - DELETE_CHAT_PHOTO = helper.Item() # delete_chat_photo - GROUP_CHAT_CREATED = helper.Item() # group_chat_created - PASSPORT_DATA = helper.Item() # passport_data - POLL = helper.Item() # poll - DICE = helper.Item() # dice - MESSAGE_AUTO_DELETE_TIMER_CHANGED = helper.Item() # message_auto_delete_timer_changed - VOICE_CHAT_STARTED = helper.Item() # voice_chat_started - VOICE_CHAT_ENDED = helper.Item() # voice_chat_ended - VOICE_CHAT_PARTICIPANTS_INVITED = helper.Item() # voice_chat_participants_invited + - :code:`chat_id` + - :code:`message_id` + - :code:`business_connection_id` - UNKNOWN = helper.Item() # unknown - ANY = helper.Item() # any + 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. 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` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SetMessageReaction + + 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, + ).as_(self._bot) + + def answer_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_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` + - :code:`message_thread_id` + - :code:`business_connection_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 direct_messages_topic_id: Identifier 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, + message_thread_id=self.message_thread_id if self.is_topic_message else None, + 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_auto_delete_timer_changed.py b/aiogram/types/message_auto_delete_timer_changed.py index 4957f08e..8414a247 100644 --- a/aiogram/types/message_auto_delete_timer_changed.py +++ b/aiogram/types/message_auto_delete_timer_changed.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -12,3 +14,18 @@ class MessageAutoDeleteTimerChanged(TelegramObject): message_auto_delete_time: int """New auto-delete time for messages in the chat; in seconds""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, message_auto_delete_time: 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__( + message_auto_delete_time=message_auto_delete_time, **__pydantic_kwargs + ) diff --git a/aiogram/types/message_entity.py b/aiogram/types/message_entity.py index 28226286..68ae3025 100644 --- a/aiogram/types/message_entity.py +++ b/aiogram/types/message_entity.py @@ -1,7 +1,6 @@ from __future__ import annotations -import warnings -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any from ..utils.text_decorations import add_surrogates, remove_surrogates from .base import MutableTelegramObject @@ -18,27 +17,60 @@ 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), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users `without usernames `_)""" + """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""" + """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 - """*Optional*. For 'text_link' only, url that will be opened after user taps on the text""" - user: Optional[User] = None + """Length of the entity in `UTF-16 code units `_""" + url: str | None = None + """*Optional*. For 'text_link' only, URL that will be opened after user taps on the text""" + 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: 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.""" - def extract(self, text: str) -> str: + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: str, + offset: int, + length: int, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + offset=offset, + length=length, + url=url, + user=user, + language=language, + custom_emoji_id=custom_emoji_id, + unix_time=unix_time, + date_time_format=date_time_format, + **__pydantic_kwargs, + ) + + def extract_from(self, text: str) -> str: return remove_surrogates( add_surrogates(text)[self.offset * 2 : (self.offset + self.length) * 2] ) - - def get_text(self, text: str) -> str: - warnings.warn( - "Method `MessageEntity.get_text(...)` deprecated and will be removed in 3.2.\n" - " Use `MessageEntity.extract(...)` instead.", - DeprecationWarning, - ) - return self.extract(text=text) diff --git a/aiogram/types/message_id.py b/aiogram/types/message_id.py index edd4784c..65efaa35 100644 --- a/aiogram/types/message_id.py +++ b/aiogram/types/message_id.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -11,4 +13,15 @@ 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!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, 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__(message_id=message_id, **__pydantic_kwargs) diff --git a/aiogram/types/message_origin.py b/aiogram/types/message_origin.py new file mode 100644 index 00000000..01f99771 --- /dev/null +++ b/aiogram/types/message_origin.py @@ -0,0 +1,14 @@ +from aiogram.types import TelegramObject + + +class MessageOrigin(TelegramObject): + """ + This object describes the origin of a message. It can be one of + + - :class:`aiogram.types.message_origin_user.MessageOriginUser` + - :class:`aiogram.types.message_origin_hidden_user.MessageOriginHiddenUser` + - :class:`aiogram.types.message_origin_chat.MessageOriginChat` + - :class:`aiogram.types.message_origin_channel.MessageOriginChannel` + + Source: https://core.telegram.org/bots/api#messageorigin + """ diff --git a/aiogram/types/message_origin_channel.py b/aiogram/types/message_origin_channel.py new file mode 100644 index 00000000..4d745c6e --- /dev/null +++ b/aiogram/types/message_origin_channel.py @@ -0,0 +1,56 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import MessageOriginType +from .custom import DateTime +from .message_origin import MessageOrigin + +if TYPE_CHECKING: + from .chat import Chat + + +class MessageOriginChannel(MessageOrigin): + """ + The message was originally sent to a channel chat. + + Source: https://core.telegram.org/bots/api#messageoriginchannel + """ + + type: Literal[MessageOriginType.CHANNEL] = MessageOriginType.CHANNEL + """Type of the message origin, always 'channel'""" + date: DateTime + """Date the message was sent originally in Unix time""" + chat: Chat + """Channel chat to which the message was originally sent""" + message_id: int + """Unique message identifier inside the chat""" + author_signature: str | None = None + """*Optional*. Signature of the original post author""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[MessageOriginType.CHANNEL] = MessageOriginType.CHANNEL, + date: DateTime, + chat: Chat, + message_id: int, + author_signature: 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__( + type=type, + date=date, + chat=chat, + message_id=message_id, + author_signature=author_signature, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/message_origin_chat.py b/aiogram/types/message_origin_chat.py new file mode 100644 index 00000000..2d6d17fc --- /dev/null +++ b/aiogram/types/message_origin_chat.py @@ -0,0 +1,52 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import MessageOriginType +from .custom import DateTime +from .message_origin import MessageOrigin + +if TYPE_CHECKING: + from .chat import Chat + + +class MessageOriginChat(MessageOrigin): + """ + The message was originally sent on behalf of a chat to a group chat. + + Source: https://core.telegram.org/bots/api#messageoriginchat + """ + + type: Literal[MessageOriginType.CHAT] = MessageOriginType.CHAT + """Type of the message origin, always 'chat'""" + date: DateTime + """Date the message was sent originally in Unix time""" + sender_chat: Chat + """Chat that sent the message originally""" + author_signature: str | None = None + """*Optional*. For messages originally sent by an anonymous chat administrator, original message author signature""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[MessageOriginType.CHAT] = MessageOriginType.CHAT, + date: DateTime, + sender_chat: Chat, + author_signature: 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__( + type=type, + date=date, + sender_chat=sender_chat, + author_signature=author_signature, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/message_origin_hidden_user.py b/aiogram/types/message_origin_hidden_user.py new file mode 100644 index 00000000..cd702f13 --- /dev/null +++ b/aiogram/types/message_origin_hidden_user.py @@ -0,0 +1,40 @@ +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import MessageOriginType +from .custom import DateTime +from .message_origin import MessageOrigin + + +class MessageOriginHiddenUser(MessageOrigin): + """ + The message was originally sent by an unknown user. + + Source: https://core.telegram.org/bots/api#messageoriginhiddenuser + """ + + type: Literal[MessageOriginType.HIDDEN_USER] = MessageOriginType.HIDDEN_USER + """Type of the message origin, always 'hidden_user'""" + date: DateTime + """Date the message was sent originally in Unix time""" + sender_user_name: str + """Name of the user that sent the message originally""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[MessageOriginType.HIDDEN_USER] = MessageOriginType.HIDDEN_USER, + date: DateTime, + sender_user_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, date=date, sender_user_name=sender_user_name, **__pydantic_kwargs + ) 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_origin_user.py b/aiogram/types/message_origin_user.py new file mode 100644 index 00000000..d77ac7ad --- /dev/null +++ b/aiogram/types/message_origin_user.py @@ -0,0 +1,43 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import MessageOriginType +from .custom import DateTime +from .message_origin import MessageOrigin + +if TYPE_CHECKING: + from .user import User + + +class MessageOriginUser(MessageOrigin): + """ + The message was originally sent by a known user. + + Source: https://core.telegram.org/bots/api#messageoriginuser + """ + + type: Literal[MessageOriginType.USER] = MessageOriginType.USER + """Type of the message origin, always 'user'""" + date: DateTime + """Date the message was sent originally in Unix time""" + sender_user: User + """User that sent the message originally""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[MessageOriginType.USER] = MessageOriginType.USER, + date: DateTime, + sender_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__(type=type, date=date, sender_user=sender_user, **__pydantic_kwargs) diff --git a/aiogram/types/message_reaction_count_updated.py b/aiogram/types/message_reaction_count_updated.py new file mode 100644 index 00000000..7e9b3bdc --- /dev/null +++ b/aiogram/types/message_reaction_count_updated.py @@ -0,0 +1,52 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .chat import Chat + from .custom import DateTime + from .reaction_count import ReactionCount + + +class MessageReactionCountUpdated(TelegramObject): + """ + This object represents reaction changes on a message with anonymous reactions. + + Source: https://core.telegram.org/bots/api#messagereactioncountupdated + """ + + chat: Chat + """The chat containing the message""" + message_id: int + """Unique message identifier inside the chat""" + date: DateTime + """Date of the change in Unix time""" + reactions: list[ReactionCount] + """List of reactions that are present on the message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat: Chat, + message_id: int, + date: DateTime, + reactions: list[ReactionCount], + **__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=chat, + message_id=message_id, + date=date, + reactions=reactions, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/message_reaction_updated.py b/aiogram/types/message_reaction_updated.py new file mode 100644 index 00000000..1d83c594 --- /dev/null +++ b/aiogram/types/message_reaction_updated.py @@ -0,0 +1,65 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .chat import Chat + from .custom import DateTime + from .reaction_type_union import ReactionTypeUnion + from .user import User + + +class MessageReactionUpdated(TelegramObject): + """ + This object represents a change of a reaction on a message performed by a user. + + Source: https://core.telegram.org/bots/api#messagereactionupdated + """ + + chat: Chat + """The chat containing the message the user reacted to""" + message_id: int + """Unique identifier of the message inside the chat""" + date: DateTime + """Date of the change in Unix time""" + old_reaction: list[ReactionTypeUnion] + """Previous list of reaction types that were set by the user""" + new_reaction: list[ReactionTypeUnion] + """New list of reaction types that have been set by the user""" + user: User | None = None + """*Optional*. The user that changed the reaction, if the user isn't anonymous""" + actor_chat: Chat | None = None + """*Optional*. The chat on behalf of which the reaction was changed, if the user is anonymous""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat: Chat, + message_id: int, + date: DateTime, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat=chat, + message_id=message_id, + date=date, + old_reaction=old_reaction, + new_reaction=new_reaction, + user=user, + actor_chat=actor_chat, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/order_info.py b/aiogram/types/order_info.py index bf354b5e..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, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -15,11 +15,36 @@ 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + name=name, + phone_number=phone_number, + email=email, + shipping_address=shipping_address, + **__pydantic_kwargs, + ) 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.py b/aiogram/types/paid_media.py new file mode 100644 index 00000000..d17c44d3 --- /dev/null +++ b/aiogram/types/paid_media.py @@ -0,0 +1,13 @@ +from .base import TelegramObject + + +class PaidMedia(TelegramObject): + """ + This object describes paid media. Currently, it can be one of + + - :class:`aiogram.types.paid_media_preview.PaidMediaPreview` + - :class:`aiogram.types.paid_media_photo.PaidMediaPhoto` + - :class:`aiogram.types.paid_media_video.PaidMediaVideo` + + Source: https://core.telegram.org/bots/api#paidmedia + """ diff --git a/aiogram/types/paid_media_info.py b/aiogram/types/paid_media_info.py new file mode 100644 index 00000000..566c63e4 --- /dev/null +++ b/aiogram/types/paid_media_info.py @@ -0,0 +1,38 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .paid_media_union import PaidMediaUnion + + +class PaidMediaInfo(TelegramObject): + """ + Describes the paid media added to a message. + + Source: https://core.telegram.org/bots/api#paidmediainfo + """ + + star_count: int + """The number of Telegram Stars that must be paid to buy access to the media""" + paid_media: list[PaidMediaUnion] + """Information about the paid media""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + star_count: int, + paid_media: list[PaidMediaUnion], + **__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__(star_count=star_count, paid_media=paid_media, **__pydantic_kwargs) diff --git a/aiogram/types/paid_media_photo.py b/aiogram/types/paid_media_photo.py new file mode 100644 index 00000000..a6ab7b93 --- /dev/null +++ b/aiogram/types/paid_media_photo.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import PaidMediaType +from .paid_media import PaidMedia + +if TYPE_CHECKING: + from .photo_size import PhotoSize + + +class PaidMediaPhoto(PaidMedia): + """ + The paid media is a photo. + + Source: https://core.telegram.org/bots/api#paidmediaphoto + """ + + type: Literal[PaidMediaType.PHOTO] = PaidMediaType.PHOTO + """Type of the paid media, always 'photo'""" + photo: list[PhotoSize] + """The photo""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[PaidMediaType.PHOTO] = PaidMediaType.PHOTO, + photo: list[PhotoSize], + **__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/paid_media_preview.py b/aiogram/types/paid_media_preview.py new file mode 100644 index 00000000..ab6b3775 --- /dev/null +++ b/aiogram/types/paid_media_preview.py @@ -0,0 +1,44 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import PaidMediaType +from .paid_media import PaidMedia + + +class PaidMediaPreview(PaidMedia): + """ + The paid media isn't available before the payment. + + Source: https://core.telegram.org/bots/api#paidmediapreview + """ + + type: Literal[PaidMediaType.PREVIEW] = PaidMediaType.PREVIEW + """Type of the paid media, always 'preview'""" + width: int | None = None + """*Optional*. Media width as defined by the sender""" + height: int | None = None + """*Optional*. Media height as defined by the sender""" + duration: int | None = None + """*Optional*. Duration of the media in seconds as defined by the sender""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[PaidMediaType.PREVIEW] = PaidMediaType.PREVIEW, + width: int | None = None, + height: int | None = None, + duration: 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, width=width, height=height, duration=duration, **__pydantic_kwargs + ) 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_media_video.py b/aiogram/types/paid_media_video.py new file mode 100644 index 00000000..28affbbf --- /dev/null +++ b/aiogram/types/paid_media_video.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import PaidMediaType +from .paid_media import PaidMedia + +if TYPE_CHECKING: + from .video import Video + + +class PaidMediaVideo(PaidMedia): + """ + The paid media is a video. + + Source: https://core.telegram.org/bots/api#paidmediavideo + """ + + type: Literal[PaidMediaType.VIDEO] = PaidMediaType.VIDEO + """Type of the paid media, always 'video'""" + video: Video + """The video""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[PaidMediaType.VIDEO] = PaidMediaType.VIDEO, + video: Video, + **__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, **__pydantic_kwargs) 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 96608226..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, List +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -11,12 +11,29 @@ if TYPE_CHECKING: class PassportData(TelegramObject): """ - Contains information about Telegram Passport data shared with the bot by the user. + Describes Telegram Passport data shared with the bot by the user. 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""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + data: list[EncryptedPassportElement], + credentials: EncryptedCredentials, + **__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__(data=data, credentials=credentials, **__pydantic_kwargs) diff --git a/aiogram/types/passport_element_error_data_field.py b/aiogram/types/passport_element_error_data_field.py index f5b0b67b..3bf2bb28 100644 --- a/aiogram/types/passport_element_error_data_field.py +++ b/aiogram/types/passport_element_error_data_field.py @@ -1,7 +1,8 @@ from __future__ import annotations -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -12,7 +13,7 @@ class PassportElementErrorDataField(PassportElementError): Source: https://core.telegram.org/bots/api#passportelementerrordatafield """ - source: str = Field("data", const=True) + source: Literal[PassportElementErrorType.DATA] = PassportElementErrorType.DATA """Error source, must be *data*""" type: str """The section of the user's Telegram Passport which has the error, one of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address'""" @@ -22,3 +23,30 @@ class PassportElementErrorDataField(PassportElementError): """Base64-encoded data hash""" message: str """Error message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[PassportElementErrorType.DATA] = PassportElementErrorType.DATA, + type: str, + field_name: str, + data_hash: str, + message: 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__( + source=source, + type=type, + field_name=field_name, + data_hash=data_hash, + message=message, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/passport_element_error_file.py b/aiogram/types/passport_element_error_file.py index 217deaaa..8bc40b3e 100644 --- a/aiogram/types/passport_element_error_file.py +++ b/aiogram/types/passport_element_error_file.py @@ -1,7 +1,8 @@ from __future__ import annotations -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -12,7 +13,7 @@ class PassportElementErrorFile(PassportElementError): Source: https://core.telegram.org/bots/api#passportelementerrorfile """ - source: str = Field("file", const=True) + source: Literal[PassportElementErrorType.FILE] = PassportElementErrorType.FILE """Error source, must be *file*""" 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'""" @@ -20,3 +21,24 @@ class PassportElementErrorFile(PassportElementError): """Base64-encoded file hash""" message: str """Error message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[PassportElementErrorType.FILE] = PassportElementErrorType.FILE, + type: str, + file_hash: str, + message: 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__( + source=source, type=type, file_hash=file_hash, message=message, **__pydantic_kwargs + ) diff --git a/aiogram/types/passport_element_error_files.py b/aiogram/types/passport_element_error_files.py index 6f42d693..740bfcc2 100644 --- a/aiogram/types/passport_element_error_files.py +++ b/aiogram/types/passport_element_error_files.py @@ -1,9 +1,8 @@ from __future__ import annotations -from typing import List - -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -14,11 +13,36 @@ class PassportElementErrorFiles(PassportElementError): Source: https://core.telegram.org/bots/api#passportelementerrorfiles """ - source: str = Field("files", const=True) + source: Literal[PassportElementErrorType.FILES] = PassportElementErrorType.FILES """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""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[PassportElementErrorType.FILES] = PassportElementErrorType.FILES, + type: str, + file_hashes: list[str], + message: 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__( + source=source, + type=type, + file_hashes=file_hashes, + message=message, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/passport_element_error_front_side.py b/aiogram/types/passport_element_error_front_side.py index 98e60acd..86315f23 100644 --- a/aiogram/types/passport_element_error_front_side.py +++ b/aiogram/types/passport_element_error_front_side.py @@ -1,7 +1,8 @@ from __future__ import annotations -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -12,7 +13,7 @@ class PassportElementErrorFrontSide(PassportElementError): Source: https://core.telegram.org/bots/api#passportelementerrorfrontside """ - source: str = Field("front_side", const=True) + source: Literal[PassportElementErrorType.FRONT_SIDE] = PassportElementErrorType.FRONT_SIDE """Error source, must be *front_side*""" type: str """The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'""" @@ -20,3 +21,26 @@ class PassportElementErrorFrontSide(PassportElementError): """Base64-encoded hash of the file with the front side of the document""" message: str """Error message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[ + PassportElementErrorType.FRONT_SIDE + ] = PassportElementErrorType.FRONT_SIDE, + type: str, + file_hash: str, + message: 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__( + source=source, type=type, file_hash=file_hash, message=message, **__pydantic_kwargs + ) diff --git a/aiogram/types/passport_element_error_reverse_side.py b/aiogram/types/passport_element_error_reverse_side.py index 0c6073ba..ecb400f4 100644 --- a/aiogram/types/passport_element_error_reverse_side.py +++ b/aiogram/types/passport_element_error_reverse_side.py @@ -1,7 +1,8 @@ from __future__ import annotations -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -12,7 +13,7 @@ class PassportElementErrorReverseSide(PassportElementError): Source: https://core.telegram.org/bots/api#passportelementerrorreverseside """ - source: str = Field("reverse_side", const=True) + source: Literal[PassportElementErrorType.REVERSE_SIDE] = PassportElementErrorType.REVERSE_SIDE """Error source, must be *reverse_side*""" type: str """The section of the user's Telegram Passport which has the issue, one of 'driver_license', 'identity_card'""" @@ -20,3 +21,26 @@ class PassportElementErrorReverseSide(PassportElementError): """Base64-encoded hash of the file with the reverse side of the document""" message: str """Error message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[ + PassportElementErrorType.REVERSE_SIDE + ] = PassportElementErrorType.REVERSE_SIDE, + type: str, + file_hash: str, + message: 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__( + source=source, type=type, file_hash=file_hash, message=message, **__pydantic_kwargs + ) diff --git a/aiogram/types/passport_element_error_selfie.py b/aiogram/types/passport_element_error_selfie.py index 4a3b2fe1..bff6dd61 100644 --- a/aiogram/types/passport_element_error_selfie.py +++ b/aiogram/types/passport_element_error_selfie.py @@ -1,7 +1,8 @@ from __future__ import annotations -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -12,7 +13,7 @@ class PassportElementErrorSelfie(PassportElementError): Source: https://core.telegram.org/bots/api#passportelementerrorselfie """ - source: str = Field("selfie", const=True) + source: Literal[PassportElementErrorType.SELFIE] = PassportElementErrorType.SELFIE """Error source, must be *selfie*""" type: str """The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'""" @@ -20,3 +21,24 @@ class PassportElementErrorSelfie(PassportElementError): """Base64-encoded hash of the file with the selfie""" message: str """Error message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[PassportElementErrorType.SELFIE] = PassportElementErrorType.SELFIE, + type: str, + file_hash: str, + message: 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__( + source=source, type=type, file_hash=file_hash, message=message, **__pydantic_kwargs + ) diff --git a/aiogram/types/passport_element_error_translation_file.py b/aiogram/types/passport_element_error_translation_file.py index d4106453..29689ca8 100644 --- a/aiogram/types/passport_element_error_translation_file.py +++ b/aiogram/types/passport_element_error_translation_file.py @@ -1,7 +1,8 @@ from __future__ import annotations -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -12,7 +13,9 @@ class PassportElementErrorTranslationFile(PassportElementError): Source: https://core.telegram.org/bots/api#passportelementerrortranslationfile """ - source: str = Field("translation_file", const=True) + source: Literal[PassportElementErrorType.TRANSLATION_FILE] = ( + PassportElementErrorType.TRANSLATION_FILE + ) """Error source, must be *translation_file*""" 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'""" @@ -20,3 +23,26 @@ class PassportElementErrorTranslationFile(PassportElementError): """Base64-encoded file hash""" message: str """Error message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[ + PassportElementErrorType.TRANSLATION_FILE + ] = PassportElementErrorType.TRANSLATION_FILE, + type: str, + file_hash: str, + message: 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__( + source=source, type=type, file_hash=file_hash, message=message, **__pydantic_kwargs + ) diff --git a/aiogram/types/passport_element_error_translation_files.py b/aiogram/types/passport_element_error_translation_files.py index df0db64f..de81b132 100644 --- a/aiogram/types/passport_element_error_translation_files.py +++ b/aiogram/types/passport_element_error_translation_files.py @@ -1,9 +1,8 @@ from __future__ import annotations -from typing import List - -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -14,11 +13,40 @@ class PassportElementErrorTranslationFiles(PassportElementError): Source: https://core.telegram.org/bots/api#passportelementerrortranslationfiles """ - source: str = Field("translation_files", const=True) + source: Literal[PassportElementErrorType.TRANSLATION_FILES] = ( + PassportElementErrorType.TRANSLATION_FILES + ) """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""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[ + PassportElementErrorType.TRANSLATION_FILES + ] = PassportElementErrorType.TRANSLATION_FILES, + type: str, + file_hashes: list[str], + message: 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__( + source=source, + type=type, + file_hashes=file_hashes, + message=message, + **__pydantic_kwargs, + ) 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/passport_element_error_unspecified.py b/aiogram/types/passport_element_error_unspecified.py index 39d0c417..3575d350 100644 --- a/aiogram/types/passport_element_error_unspecified.py +++ b/aiogram/types/passport_element_error_unspecified.py @@ -1,7 +1,8 @@ from __future__ import annotations -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal +from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -12,7 +13,7 @@ class PassportElementErrorUnspecified(PassportElementError): Source: https://core.telegram.org/bots/api#passportelementerrorunspecified """ - source: str = Field("unspecified", const=True) + source: Literal[PassportElementErrorType.UNSPECIFIED] = PassportElementErrorType.UNSPECIFIED """Error source, must be *unspecified*""" type: str """Type of element of the user's Telegram Passport which has the issue""" @@ -20,3 +21,30 @@ class PassportElementErrorUnspecified(PassportElementError): """Base64-encoded element hash""" message: str """Error message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[ + PassportElementErrorType.UNSPECIFIED + ] = PassportElementErrorType.UNSPECIFIED, + type: str, + element_hash: str, + message: 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__( + source=source, + type=type, + element_hash=element_hash, + message=message, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/passport_file.py b/aiogram/types/passport_file.py index 11a388f8..d95da61a 100644 --- a/aiogram/types/passport_file.py +++ b/aiogram/types/passport_file.py @@ -1,6 +1,9 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject +from .custom import DateTime class PassportFile(TelegramObject): @@ -16,5 +19,30 @@ class PassportFile(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.""" file_size: int """File size in bytes""" - file_date: int + file_date: DateTime """Unix time when the file was uploaded""" + + 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, + file_size: int, + file_date: DateTime, + **__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, + file_size=file_size, + file_date=file_date, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/photo_size.py b/aiogram/types/photo_size.py index 0b23b377..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 Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -20,5 +20,32 @@ 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: + # 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, + 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, + file_size=file_size, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/poll.py b/aiogram/types/poll.py index 2301235d..88714145 100644 --- a/aiogram/types/poll.py +++ b/aiogram/types/poll.py @@ -1,9 +1,11 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, List, Optional, Union +from typing import TYPE_CHECKING, Any + +from pydantic import Field from .base import TelegramObject +from .custom import DateTime if TYPE_CHECKING: from .message_entity import MessageEntity @@ -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,13 +35,79 @@ class Poll(TelegramObject): """Poll type, currently can be 'regular' or 'quiz'""" allows_multiple_answers: bool """:code:`True`, if the poll allows multiple answers""" - 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 + 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_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[Union[datetime.datetime, datetime.timedelta, int]] = 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: str, + question: str, + options: list[PollOption], + total_voter_count: int, + is_closed: bool, + is_anonymous: bool, + type: str, + allows_multiple_answers: bool, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + id=id, + question=question, + options=options, + total_voter_count=total_voter_count, + is_closed=is_closed, + is_anonymous=is_anonymous, + type=type, + allows_multiple_answers=allows_multiple_answers, + allows_revoting=allows_revoting, + question_entities=question_entities, + 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 c2cd7456..2a991316 100644 --- a/aiogram/types/poll_answer.py +++ b/aiogram/types/poll_answer.py @@ -1,10 +1,11 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Any from .base import TelegramObject if TYPE_CHECKING: + from .chat import Chat from .user import User @@ -17,7 +18,38 @@ class PollAnswer(TelegramObject): poll_id: str """Unique poll identifier""" - user: User - """The user, who changed the answer to the poll""" - option_ids: List[int] - """0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.""" + option_ids: list[int] + """0-based identifiers of chosen answer options. May be empty if the vote was retracted.""" + 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: User | None = None + """*Optional*. The user that changed the answer to the poll, if the voter isn't anonymous""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + poll_id: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + 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 cb69aa49..24c23b5f 100644 --- a/aiogram/types/poll_option.py +++ b/aiogram/types/poll_option.py @@ -1,6 +1,14 @@ from __future__ import annotations +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): @@ -10,7 +18,48 @@ 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""" + """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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + persistent_id: str, + text: str, + voter_count: int, + 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!!! + # This method was auto-generated via `butcher` + # 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 a95fb5f4..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, Optional +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -24,26 +24,75 @@ class PreCheckoutQuery(TelegramObject): from_user: User = Field(..., alias="from") """User who sent the query""" currency: str - """Three-letter ISO 4217 `currency `_ code""" + """Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars `_""" total_amount: int """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 + """Bot-specified invoice payload""" + shipping_option_id: str | None = None """*Optional*. Identifier of the shipping option chosen by the user""" - order_info: Optional[OrderInfo] = None - """*Optional*. Order info provided by the user""" + order_info: OrderInfo | None = None + """*Optional*. Order information provided by the user""" - def answer(self, ok: bool, error_message: Optional[str] = None) -> AnswerPreCheckoutQuery: + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: str, + from_user: User, + currency: str, + total_amount: int, + invoice_payload: str, + shipping_option_id: str | None = None, + order_info: OrderInfo | 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, + from_user=from_user, + currency=currency, + total_amount=total_amount, + invoice_payload=invoice_payload, + shipping_option_id=shipping_option_id, + order_info=order_info, + **__pydantic_kwargs, + ) + + def answer( + self, + ok: bool, + error_message: str | None = None, + **kwargs: Any, + ) -> AnswerPreCheckoutQuery: """ - :param ok: - :param error_message: - :return: + Shortcut for method :class:`aiogram.methods.answer_pre_checkout_query.AnswerPreCheckoutQuery` + will automatically fill method attributes: + + - :code:`pre_checkout_query_id` + + 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. + + Source: https://core.telegram.org/bots/api#answerprecheckoutquery + + :param ok: 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. + :param error_message: 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. + :return: instance of method :class:`aiogram.methods.answer_pre_checkout_query.AnswerPreCheckoutQuery` """ - from ..methods import AnswerPreCheckoutQuery + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import AnswerPreCheckoutQuery return AnswerPreCheckoutQuery( pre_checkout_query_id=self.id, ok=ok, error_message=error_message, - ) + **kwargs, + ).as_(self._bot) 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/proximity_alert_triggered.py b/aiogram/types/proximity_alert_triggered.py index 8275cd26..f5a30c69 100644 --- a/aiogram/types/proximity_alert_triggered.py +++ b/aiogram/types/proximity_alert_triggered.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -21,3 +21,23 @@ class ProximityAlertTriggered(TelegramObject): """User that set the alert""" distance: int """The distance between the users""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + traveler: User, + watcher: User, + distance: 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__( + traveler=traveler, watcher=watcher, distance=distance, **__pydantic_kwargs + ) diff --git a/aiogram/types/reaction_count.py b/aiogram/types/reaction_count.py new file mode 100644 index 00000000..4a64f0eb --- /dev/null +++ b/aiogram/types/reaction_count.py @@ -0,0 +1,38 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .reaction_type_union import ReactionTypeUnion + + +class ReactionCount(TelegramObject): + """ + Represents a reaction added to a message along with the number of times it was added. + + Source: https://core.telegram.org/bots/api#reactioncount + """ + + type: ReactionTypeUnion + """Type of the reaction""" + total_count: int + """Number of times the reaction was added""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: ReactionTypeUnion, + total_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, total_count=total_count, **__pydantic_kwargs) diff --git a/aiogram/types/reaction_type.py b/aiogram/types/reaction_type.py new file mode 100644 index 00000000..335d35d8 --- /dev/null +++ b/aiogram/types/reaction_type.py @@ -0,0 +1,13 @@ +from .base import TelegramObject + + +class ReactionType(TelegramObject): + """ + This object describes the type of a reaction. Currently, it can be one of + + - :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_custom_emoji.py b/aiogram/types/reaction_type_custom_emoji.py new file mode 100644 index 00000000..c86ec5ed --- /dev/null +++ b/aiogram/types/reaction_type_custom_emoji.py @@ -0,0 +1,34 @@ +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import ReactionTypeType +from .reaction_type import ReactionType + + +class ReactionTypeCustomEmoji(ReactionType): + """ + The reaction is based on a custom emoji. + + Source: https://core.telegram.org/bots/api#reactiontypecustomemoji + """ + + type: Literal[ReactionTypeType.CUSTOM_EMOJI] = ReactionTypeType.CUSTOM_EMOJI + """Type of the reaction, always 'custom_emoji'""" + custom_emoji_id: str + """Custom emoji identifier""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[ReactionTypeType.CUSTOM_EMOJI] = ReactionTypeType.CUSTOM_EMOJI, + custom_emoji_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__(type=type, custom_emoji_id=custom_emoji_id, **__pydantic_kwargs) diff --git a/aiogram/types/reaction_type_emoji.py b/aiogram/types/reaction_type_emoji.py new file mode 100644 index 00000000..e1a3128b --- /dev/null +++ b/aiogram/types/reaction_type_emoji.py @@ -0,0 +1,34 @@ +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import ReactionTypeType +from .reaction_type import ReactionType + + +class ReactionTypeEmoji(ReactionType): + """ + The reaction is based on an emoji. + + Source: https://core.telegram.org/bots/api#reactiontypeemoji + """ + + type: Literal[ReactionTypeType.EMOJI] = ReactionTypeType.EMOJI + """Type of the reaction, always 'emoji'""" + emoji: str + """Reaction emoji. Currently, it can be one of "❤", "👍", "👎", "🔥", "🥰", "👏", "😁", "🤔", "🤯", "😱", "🤬", "😢", "🎉", "🤩", "🤮", "💩", "🙏", "👌", "🕊", "🤡", "🥱", "🥴", "😍", "🐳", "❤‍🔥", "🌚", "🌭", "💯", "🤣", "⚡", "🍌", "🏆", "💔", "🤨", "😐", "🍓", "🍾", "💋", "🖕", "😈", "😴", "😭", "🤓", "👻", "👨‍💻", "👀", "🎃", "🙈", "😇", "😨", "🤝", "✍", "🤗", "🫡", "🎅", "🎄", "☃", "💅", "🤪", "🗿", "🆒", "💘", "🙉", "🦄", "😘", "💊", "🙊", "😎", "👾", "🤷‍♂", "🤷", "🤷‍♀", "😡" """ + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[ReactionTypeType.EMOJI] = ReactionTypeType.EMOJI, + emoji: 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, emoji=emoji, **__pydantic_kwargs) 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 6b8a65e3..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, List, Optional +from typing import TYPE_CHECKING, Any from .base import MutableTelegramObject @@ -10,18 +10,49 @@ if TYPE_CHECKING: class ReplyKeyboardMarkup(MutableTelegramObject): """ - This object represents a `custom keyboard `_ with reply options (see `Introduction to bots `_ for details and examples). + This object represents a `custom keyboard `_ with reply options (see `Introduction to bots `_ for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account. 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""" - resize_keyboard: 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: 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 - """*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 + 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: 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 - """*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.""" + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + keyboard=keyboard, + is_persistent=is_persistent, + resize_keyboard=resize_keyboard, + one_time_keyboard=one_time_keyboard, + input_field_placeholder=input_field_placeholder, + selective=selective, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/reply_keyboard_remove.py b/aiogram/types/reply_keyboard_remove.py index 1e2c2da9..51d83ad4 100644 --- a/aiogram/types/reply_keyboard_remove.py +++ b/aiogram/types/reply_keyboard_remove.py @@ -1,20 +1,37 @@ from __future__ import annotations -from typing import Optional - -from pydantic import Field +from typing import TYPE_CHECKING, Any, Literal from .base import MutableTelegramObject class ReplyKeyboardRemove(MutableTelegramObject): """ - 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`). + 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`). Not supported in channels and for messages sent on behalf of a Telegram Business account. Source: https://core.telegram.org/bots/api#replykeyboardremove """ - remove_keyboard: bool = Field(True, const=True) + 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 - """*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.""" + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + remove_keyboard: Literal[True] = True, + selective: 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__( + remove_keyboard=remove_keyboard, selective=selective, **__pydantic_kwargs + ) 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 new file mode 100644 index 00000000..9e265b1d --- /dev/null +++ b/aiogram/types/reply_parameters.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +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 + + +class ReplyParameters(TelegramObject): + """ + Describes reply parameters for the message that is being sent. + + Source: https://core.telegram.org/bots/api#replyparameters + """ + + 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: 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: 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: 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: 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + message_id: int, + chat_id: ChatIdUnion | None = None, + 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, + checklist_task_id: int | None = None, + poll_option_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__( + message_id=message_id, + chat_id=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, + 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 5c722c9e..514b2d32 100644 --- a/aiogram/types/response_parameters.py +++ b/aiogram/types/response_parameters.py @@ -1,18 +1,37 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject class ResponseParameters(TelegramObject): """ - Contains information about why a request was unsuccessful. + Describes why a request was unsuccessful. 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + migrate_to_chat_id: int | None = None, + retry_after: 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__( + migrate_to_chat_id=migrate_to_chat_id, retry_after=retry_after, **__pydantic_kwargs + ) 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.py b/aiogram/types/revenue_withdrawal_state.py new file mode 100644 index 00000000..740323e0 --- /dev/null +++ b/aiogram/types/revenue_withdrawal_state.py @@ -0,0 +1,15 @@ +from __future__ import annotations + +from .base import TelegramObject + + +class RevenueWithdrawalState(TelegramObject): + """ + This object describes the state of a revenue withdrawal operation. Currently, it can be one of + + - :class:`aiogram.types.revenue_withdrawal_state_pending.RevenueWithdrawalStatePending` + - :class:`aiogram.types.revenue_withdrawal_state_succeeded.RevenueWithdrawalStateSucceeded` + - :class:`aiogram.types.revenue_withdrawal_state_failed.RevenueWithdrawalStateFailed` + + Source: https://core.telegram.org/bots/api#revenuewithdrawalstate + """ diff --git a/aiogram/types/revenue_withdrawal_state_failed.py b/aiogram/types/revenue_withdrawal_state_failed.py new file mode 100644 index 00000000..501a9ffb --- /dev/null +++ b/aiogram/types/revenue_withdrawal_state_failed.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import RevenueWithdrawalStateType +from .revenue_withdrawal_state import RevenueWithdrawalState + + +class RevenueWithdrawalStateFailed(RevenueWithdrawalState): + """ + The withdrawal failed and the transaction was refunded. + + Source: https://core.telegram.org/bots/api#revenuewithdrawalstatefailed + """ + + type: Literal[RevenueWithdrawalStateType.FAILED] = RevenueWithdrawalStateType.FAILED + """Type of the state, always 'failed'""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[RevenueWithdrawalStateType.FAILED] = RevenueWithdrawalStateType.FAILED, + **__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/revenue_withdrawal_state_pending.py b/aiogram/types/revenue_withdrawal_state_pending.py new file mode 100644 index 00000000..c4e481f6 --- /dev/null +++ b/aiogram/types/revenue_withdrawal_state_pending.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import RevenueWithdrawalStateType +from .revenue_withdrawal_state import RevenueWithdrawalState + + +class RevenueWithdrawalStatePending(RevenueWithdrawalState): + """ + The withdrawal is in progress. + + Source: https://core.telegram.org/bots/api#revenuewithdrawalstatepending + """ + + type: Literal[RevenueWithdrawalStateType.PENDING] = RevenueWithdrawalStateType.PENDING + """Type of the state, always 'pending'""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[RevenueWithdrawalStateType.PENDING] = RevenueWithdrawalStateType.PENDING, + **__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/revenue_withdrawal_state_succeeded.py b/aiogram/types/revenue_withdrawal_state_succeeded.py new file mode 100644 index 00000000..48d45f10 --- /dev/null +++ b/aiogram/types/revenue_withdrawal_state_succeeded.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import RevenueWithdrawalStateType +from .custom import DateTime +from .revenue_withdrawal_state import RevenueWithdrawalState + + +class RevenueWithdrawalStateSucceeded(RevenueWithdrawalState): + """ + The withdrawal succeeded. + + Source: https://core.telegram.org/bots/api#revenuewithdrawalstatesucceeded + """ + + type: Literal[RevenueWithdrawalStateType.SUCCEEDED] = RevenueWithdrawalStateType.SUCCEEDED + """Type of the state, always 'succeeded'""" + date: DateTime + """Date the withdrawal was completed in Unix time""" + url: str + """An HTTPS URL that can be used to see transaction details""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[ + RevenueWithdrawalStateType.SUCCEEDED + ] = RevenueWithdrawalStateType.SUCCEEDED, + date: DateTime, + 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, date=date, url=url, **__pydantic_kwargs) 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 new file mode 100644 index 00000000..0beb96e1 --- /dev/null +++ b/aiogram/types/sent_web_app_message.py @@ -0,0 +1,29 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class SentWebAppMessage(TelegramObject): + """ + Describes an inline message sent by a `Web App `_ on behalf of a user. + + Source: https://core.telegram.org/bots/api#sentwebappmessage + """ + + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, inline_message_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__(inline_message_id=inline_message_id, **__pydantic_kwargs) diff --git a/aiogram/types/shared_user.py b/aiogram/types/shared_user.py new file mode 100644 index 00000000..e38e0ac8 --- /dev/null +++ b/aiogram/types/shared_user.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .photo_size import PhotoSize + + +class SharedUser(TelegramObject): + """ + This object contains information about a user that was shared with the bot using a :class:`aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers` button. + + Source: https://core.telegram.org/bots/api#shareduser + """ + + 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: str | None = None + """*Optional*. First name of the user, if the name was requested by the bot""" + last_name: str | None = None + """*Optional*. Last name of the user, if the name was requested by the bot""" + username: str | None = None + """*Optional*. Username of the user, if the username was requested by the bot""" + photo: list[PhotoSize] | None = None + """*Optional*. Available sizes of the chat photo, if the photo was requested by the bot""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + user_id: int, + 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!!! + # 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, + first_name=first_name, + last_name=last_name, + username=username, + photo=photo, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/shipping_address.py b/aiogram/types/shipping_address.py index 4ef322c7..a8293cd2 100644 --- a/aiogram/types/shipping_address.py +++ b/aiogram/types/shipping_address.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -11,7 +13,7 @@ class ShippingAddress(TelegramObject): """ country_code: str - """ISO 3166-1 alpha-2 country code""" + """Two-letter `ISO 3166-1 alpha-2 `_ country code""" state: str """State, if applicable""" city: str @@ -22,3 +24,32 @@ class ShippingAddress(TelegramObject): """Second line for the address""" post_code: str """Address post code""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + country_code: str, + state: str, + city: str, + street_line1: str, + street_line2: str, + post_code: 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__( + country_code=country_code, + state=state, + city=city, + street_line1=street_line1, + street_line2=street_line2, + post_code=post_code, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/shipping_option.py b/aiogram/types/shipping_option.py index 6caa84a5..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, List +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -19,5 +19,23 @@ class ShippingOption(TelegramObject): """Shipping option identifier""" title: str """Option title""" - prices: List[LabeledPrice] + prices: list[LabeledPrice] """List of price portions""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: str, + title: str, + prices: list[LabeledPrice], + **__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, title=title, prices=prices, **__pydantic_kwargs) diff --git a/aiogram/types/shipping_query.py b/aiogram/types/shipping_query.py index df00e38d..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, List, Optional +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -25,27 +25,66 @@ class ShippingQuery(TelegramObject): from_user: User = Field(..., alias="from") """User who sent the query""" invoice_payload: str - """Bot specified invoice payload""" + """Bot-specified invoice payload""" shipping_address: ShippingAddress """User specified shipping address""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: str, + from_user: User, + invoice_payload: str, + shipping_address: ShippingAddress, + **__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, + from_user=from_user, + invoice_payload=invoice_payload, + shipping_address=shipping_address, + **__pydantic_kwargs, + ) + 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: """ - :param ok: - :param shipping_options: - :param error_message: - :return: + Shortcut for method :class:`aiogram.methods.answer_shipping_query.AnswerShippingQuery` + will automatically fill method attributes: + + - :code:`shipping_query_id` + + 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. + + Source: https://core.telegram.org/bots/api#answershippingquery + + :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. + :return: instance of method :class:`aiogram.methods.answer_shipping_query.AnswerShippingQuery` """ - from ..methods import AnswerShippingQuery + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import AnswerShippingQuery return AnswerShippingQuery( shipping_query_id=self.id, ok=ok, shipping_options=shipping_options, error_message=error_message, - ) + **kwargs, + ).as_(self._bot) 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 new file mode 100644 index 00000000..181ed786 --- /dev/null +++ b/aiogram/types/star_transaction.py @@ -0,0 +1,59 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject +from .custom import DateTime + +if TYPE_CHECKING: + from .transaction_partner_union import TransactionPartnerUnion + + +class StarTransaction(TelegramObject): + """ + 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 identifier of the original transaction for refund transactions. Coincides with *SuccessfulPayment.telegram_payment_charge_id* for successful incoming payments from users.""" + amount: int + """Integer amount of Telegram Stars transferred by the transaction""" + date: DateTime + """Date the transaction was created in Unix time""" + 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: 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: str, + amount: int, + date: DateTime, + nanostar_amount: int | None = None, + source: TransactionPartnerUnion | None = None, + receiver: TransactionPartnerUnion | 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, + 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 new file mode 100644 index 00000000..b0039f4e --- /dev/null +++ b/aiogram/types/star_transactions.py @@ -0,0 +1,32 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .star_transaction import StarTransaction + + +class StarTransactions(TelegramObject): + """ + Contains a list of Telegram Star transactions. + + Source: https://core.telegram.org/bots/api#startransactions + """ + + transactions: list[StarTransaction] + """The list of transactions""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, transactions: list[StarTransaction], **__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__(transactions=transactions, **__pydantic_kwargs) diff --git a/aiogram/types/sticker.py b/aiogram/types/sticker.py index 2379d547..d0fb8d59 100644 --- a/aiogram/types/sticker.py +++ b/aiogram/types/sticker.py @@ -1,10 +1,12 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject if TYPE_CHECKING: + from ..methods import DeleteStickerFromSet, SetStickerPositionInSet + from .file import File from .mask_position import MaskPosition from .photo_size import PhotoSize @@ -20,19 +22,131 @@ class Sticker(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.""" + type: str + """Type of the sticker, currently one of 'regular', 'mask', 'custom_emoji'. The type of the sticker is independent from its format, which is determined by the fields *is_animated* and *is_video*.""" width: int """Sticker width""" height: int """Sticker height""" is_animated: bool """:code:`True`, if the sticker is `animated `_""" - thumb: Optional[PhotoSize] = None + is_video: bool + """:code:`True`, if the sticker is a `video sticker `_""" + 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""" - mask_position: Optional[MaskPosition] = None + premium_animation: File | None = None + """*Optional*. For premium regular stickers, premium animation for the sticker""" + mask_position: MaskPosition | None = None """*Optional*. For mask stickers, the position where the mask should be placed""" - file_size: Optional[int] = None + custom_emoji_id: str | None = None + """*Optional*. For custom emoji stickers, unique identifier of the custom emoji""" + 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: int | None = None """*Optional*. File size in bytes""" + + 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, + type: str, + width: int, + height: int, + is_animated: bool, + is_video: bool, + 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!!! + # 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, + type=type, + width=width, + height=height, + is_animated=is_animated, + is_video=is_video, + thumbnail=thumbnail, + emoji=emoji, + set_name=set_name, + premium_animation=premium_animation, + mask_position=mask_position, + custom_emoji_id=custom_emoji_id, + needs_repainting=needs_repainting, + file_size=file_size, + **__pydantic_kwargs, + ) + + def set_position_in_set( + self, + position: int, + **kwargs: Any, + ) -> SetStickerPositionInSet: + """ + Shortcut for method :class:`aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet` + will automatically fill method attributes: + + - :code:`sticker` + + Use this method to move a sticker in a set created by the bot to a specific position. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setstickerpositioninset + + :param position: New sticker position in the set, zero-based + :return: instance of method :class:`aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SetStickerPositionInSet + + return SetStickerPositionInSet( + sticker=self.file_id, + position=position, + **kwargs, + ).as_(self._bot) + + def delete_from_set( + self, + **kwargs: Any, + ) -> DeleteStickerFromSet: + """ + Shortcut for method :class:`aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet` + will automatically fill method attributes: + + - :code:`sticker` + + Use this method to delete a sticker from a set created by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#deletestickerfromset + + :return: instance of method :class:`aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import DeleteStickerFromSet + + return DeleteStickerFromSet( + sticker=self.file_id, + **kwargs, + ).as_(self._bot) diff --git a/aiogram/types/sticker_set.py b/aiogram/types/sticker_set.py index d26d206d..b9b10bf5 100644 --- a/aiogram/types/sticker_set.py +++ b/aiogram/types/sticker_set.py @@ -1,6 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any + +from pydantic import Field from .base import TelegramObject @@ -20,11 +22,50 @@ class StickerSet(TelegramObject): """Sticker set name""" title: str """Sticker set title""" - is_animated: bool - """:code:`True`, if the sticker set contains `animated stickers `_""" - contains_masks: bool - """:code:`True`, if the sticker set contains masks""" - stickers: List[Sticker] + sticker_type: str + """Type of stickers in the set, currently one of 'regular', 'mask', 'custom_emoji'""" + stickers: list[Sticker] """List of all set stickers""" - thumb: Optional[PhotoSize] = None - """*Optional*. Sticker set thumbnail in the .WEBP or .TGS format""" + thumbnail: PhotoSize | None = None + """*Optional*. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format""" + 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: bool | None = Field(None, json_schema_extra={"deprecated": True}) + """:code:`True`, if the sticker set contains `video stickers `_ + +.. deprecated:: API:7.2 + https://core.telegram.org/bots/api-changelog#march-31-2024""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + name: str, + title: str, + sticker_type: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + name=name, + title=title, + sticker_type=sticker_type, + stickers=stickers, + thumbnail=thumbnail, + is_animated=is_animated, + is_video=is_video, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/story.py b/aiogram/types/story.py new file mode 100644 index 00000000..69aaaecf --- /dev/null +++ b/aiogram/types/story.py @@ -0,0 +1,32 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .chat import Chat + + +class Story(TelegramObject): + """ + This object represents a story. + + Source: https://core.telegram.org/bots/api#story + """ + + chat: Chat + """Chat that posted the story""" + id: int + """Unique identifier for the story in the chat""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, chat: Chat, 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__(chat=chat, id=id, **__pydantic_kwargs) 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 d6e1ded7..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, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -10,22 +10,65 @@ 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 """ currency: str - """Three-letter ISO 4217 `currency `_ code""" + """Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars `_""" total_amount: int """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""" + """Bot-specified invoice payload""" telegram_payment_charge_id: str """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 - """*Optional*. Order info provided by the user""" + order_info: OrderInfo | None = None + """*Optional*. Order information provided by the user""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + currency: str, + total_amount: int, + invoice_payload: str, + telegram_payment_charge_id: str, + provider_payment_charge_id: str, + 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!!! + # 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, + 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 new file mode 100644 index 00000000..70721d79 --- /dev/null +++ b/aiogram/types/switch_inline_query_chosen_chat.py @@ -0,0 +1,49 @@ +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class SwitchInlineQueryChosenChat(TelegramObject): + """ + This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query. + + Source: https://core.telegram.org/bots/api#switchinlinequerychosenchat + """ + + 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: 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + query=query, + 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/types/text_quote.py b/aiogram/types/text_quote.py new file mode 100644 index 00000000..2b534763 --- /dev/null +++ b/aiogram/types/text_quote.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 TextQuote(TelegramObject): + """ + This object contains information about the quoted part of a message that is replied to by the given message. + + Source: https://core.telegram.org/bots/api#textquote + """ + + text: str + """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: 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + text: str, + position: int, + entities: list[MessageEntity] | None = None, + is_manual: 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__( + text=text, + position=position, + entities=entities, + is_manual=is_manual, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/transaction_partner.py b/aiogram/types/transaction_partner.py new file mode 100644 index 00000000..b7516dec --- /dev/null +++ b/aiogram/types/transaction_partner.py @@ -0,0 +1,17 @@ +from .base import TelegramObject + + +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 new file mode 100644 index 00000000..25383908 --- /dev/null +++ b/aiogram/types/transaction_partner_fragment.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import TransactionPartnerType +from .transaction_partner import TransactionPartner + +if TYPE_CHECKING: + from .revenue_withdrawal_state_union import RevenueWithdrawalStateUnion + + +class TransactionPartnerFragment(TransactionPartner): + """ + Describes a withdrawal transaction with Fragment. + + Source: https://core.telegram.org/bots/api#transactionpartnerfragment + """ + + type: Literal[TransactionPartnerType.FRAGMENT] = TransactionPartnerType.FRAGMENT + """Type of the transaction partner, always 'fragment'""" + withdrawal_state: RevenueWithdrawalStateUnion | None = None + """*Optional*. State of the transaction if the transaction is outgoing""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[TransactionPartnerType.FRAGMENT] = TransactionPartnerType.FRAGMENT, + withdrawal_state: RevenueWithdrawalStateUnion | 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, withdrawal_state=withdrawal_state, **__pydantic_kwargs) diff --git a/aiogram/types/transaction_partner_other.py b/aiogram/types/transaction_partner_other.py new file mode 100644 index 00000000..699297e1 --- /dev/null +++ b/aiogram/types/transaction_partner_other.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import TransactionPartnerType +from .transaction_partner import TransactionPartner + + +class TransactionPartnerOther(TransactionPartner): + """ + Describes a transaction with an unknown source or recipient. + + Source: https://core.telegram.org/bots/api#transactionpartnerother + """ + + type: Literal[TransactionPartnerType.OTHER] = TransactionPartnerType.OTHER + """Type of the transaction partner, always 'other'""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[TransactionPartnerType.OTHER] = TransactionPartnerType.OTHER, + **__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/transaction_partner_telegram_ads.py b/aiogram/types/transaction_partner_telegram_ads.py new file mode 100644 index 00000000..5df8eb60 --- /dev/null +++ b/aiogram/types/transaction_partner_telegram_ads.py @@ -0,0 +1,35 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import TransactionPartnerType +from .transaction_partner import TransactionPartner + + +class TransactionPartnerTelegramAds(TransactionPartner): + """ + Describes a withdrawal transaction to the Telegram Ads platform. + + Source: https://core.telegram.org/bots/api#transactionpartnertelegramads + """ + + type: Literal[TransactionPartnerType.TELEGRAM_ADS] = TransactionPartnerType.TELEGRAM_ADS + """Type of the transaction partner, always 'telegram_ads'""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[ + TransactionPartnerType.TELEGRAM_ADS + ] = TransactionPartnerType.TELEGRAM_ADS, + **__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/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 new file mode 100644 index 00000000..482cf481 --- /dev/null +++ b/aiogram/types/transaction_partner_user.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +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 + + +class TransactionPartnerUser(TransactionPartner): + """ + Describes a transaction with a user. + + Source: https://core.telegram.org/bots/api#transactionpartneruser + """ + + 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""" + 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[TransactionPartnerType.USER] = TransactionPartnerType.USER, + transaction_type: str, + user: User, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + 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 493d95d5..cf13b22a 100644 --- a/aiogram/types/update.py +++ b/aiogram/types/update.py @@ -1,17 +1,25 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional, cast +from typing import TYPE_CHECKING, Any, cast from ..utils.mypy_hacks import lru_cache from .base import TelegramObject if TYPE_CHECKING: + from .business_connection import BusinessConnection + from .business_messages_deleted import BusinessMessagesDeleted from .callback_query import CallbackQuery + from .chat_boost_removed import ChatBoostRemoved + from .chat_boost_updated import ChatBoostUpdated from .chat_join_request import ChatJoinRequest 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 @@ -28,40 +36,127 @@ class Update(TelegramObject): """ update_id: int - """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.""" - message: Optional[Message] = None - """*Optional*. New incoming message of any kind — text, photo, sticker, etc.""" - edited_message: Optional[Message] = None - """*Optional*. New version of a message that is known to the bot and was edited""" - channel_post: Optional[Message] = None - """*Optional*. New incoming channel post of any kind — text, photo, sticker, etc.""" - edited_channel_post: Optional[Message] = None - """*Optional*. New version of a channel post that is known to the bot and was edited""" - inline_query: Optional[InlineQuery] = None + """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: Message | None = None + """*Optional*. New incoming message of any kind - text, photo, sticker, etc.""" + 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: Message | None = None + """*Optional*. New incoming channel post of any kind - text, photo, sticker, etc.""" + 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: 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: Message | None = None + """*Optional*. New message from a connected business account""" + edited_business_message: Message | None = None + """*Optional*. New version of a message from a connected business account""" + deleted_business_messages: BusinessMessagesDeleted | None = None + """*Optional*. Messages were deleted from a connected business account""" + 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: 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: 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 - """*Optional*. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot""" - poll_answer: Optional[PollAnswer] = 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: 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 - """*Optional*. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify 'chat_member' in the list of *allowed_updates* to receive these updates.""" - chat_join_request: Optional[ChatJoinRequest] = 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: 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: 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: 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + update_id: int, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + update_id=update_id, + message=message, + edited_message=edited_message, + channel_post=channel_post, + edited_channel_post=edited_channel_post, + business_connection=business_connection, + business_message=business_message, + edited_business_message=edited_business_message, + deleted_business_messages=deleted_business_messages, + message_reaction=message_reaction, + message_reaction_count=message_reaction_count, + inline_query=inline_query, + chosen_inline_result=chosen_inline_result, + 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, + chat_member=chat_member, + chat_join_request=chat_join_request, + chat_boost=chat_boost, + removed_chat_boost=removed_chat_boost, + managed_bot=managed_bot, + **__pydantic_kwargs, + ) def __hash__(self) -> int: return hash((type(self), self.update_id)) - @property # type: ignore + @property @lru_cache() def event_type(self) -> str: """ @@ -98,6 +193,26 @@ class Update(TelegramObject): return "chat_member" if self.chat_join_request: return "chat_join_request" + if self.message_reaction: + return "message_reaction" + if self.message_reaction_count: + return "message_reaction_count" + if self.chat_boost: + return "chat_boost" + if self.removed_chat_boost: + return "removed_chat_boost" + if self.deleted_business_messages: + return "deleted_business_messages" + if self.business_connection: + return "business_connection" + if self.edited_business_message: + 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 3f700040..3722a56f 100644 --- a/aiogram/types/user.py +++ b/aiogram/types/user.py @@ -1,9 +1,14 @@ from __future__ import annotations -from typing import 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 GetUserProfileAudios, GetUserProfilePhotos + class User(TelegramObject): """ @@ -18,21 +23,162 @@ 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""" - can_join_groups: Optional[bool] = None + is_premium: bool | None = None + """*Optional*. :code:`True`, if this user is a Telegram Premium user""" + added_to_attachment_menu: bool | None = None + """*Optional*. :code:`True`, if this user added the bot to the attachment menu""" + 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 - """*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 + 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: 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: 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: int, + is_bot: bool, + first_name: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + id=id, + is_bot=is_bot, + first_name=first_name, + last_name=last_name, + username=username, + language_code=language_code, + is_premium=is_premium, + added_to_attachment_menu=added_to_attachment_menu, + can_join_groups=can_join_groups, + 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, + ) @property def full_name(self) -> str: if self.last_name: return f"{self.first_name} {self.last_name}" return self.first_name + + @property + def url(self) -> str: + return create_tg_link("user", id=self.id) + + 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: str | None = None) -> str: + if name is None: + name = self.full_name + return markdown.hlink(name, self.url) + + def get_profile_photos( + self, + offset: int | None = None, + limit: int | None = None, + **kwargs: Any, + ) -> GetUserProfilePhotos: + """ + Shortcut for method :class:`aiogram.methods.get_user_profile_photos.GetUserProfilePhotos` + will automatically fill method attributes: + + - :code:`user_id` + + Use this method to get a list of profile pictures for a user. Returns a :class:`aiogram.types.user_profile_photos.UserProfilePhotos` object. + + Source: https://core.telegram.org/bots/api#getuserprofilephotos + + :param offset: Sequential number of the first photo to be returned. By default, all photos are returned. + :param limit: Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. + :return: instance of method :class:`aiogram.methods.get_user_profile_photos.GetUserProfilePhotos` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import GetUserProfilePhotos + + return GetUserProfilePhotos( + user_id=self.id, + offset=offset, + 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 new file mode 100644 index 00000000..5182ba34 --- /dev/null +++ b/aiogram/types/user_chat_boosts.py @@ -0,0 +1,32 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .chat_boost import ChatBoost + + +class UserChatBoosts(TelegramObject): + """ + This object represents a list of boosts added to a chat by a user. + + Source: https://core.telegram.org/bots/api#userchatboosts + """ + + boosts: list[ChatBoost] + """The list of boosts added to the chat by the user""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, boosts: list[ChatBoost], **__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__(boosts=boosts, **__pydantic_kwargs) 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 ad1197bf..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, List +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -17,5 +17,22 @@ 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + total_count: int, + photos: list[list[PhotoSize]], + **__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, photos=photos, **__pydantic_kwargs) 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/user_shared.py b/aiogram/types/user_shared.py new file mode 100644 index 00000000..59d1ede1 --- /dev/null +++ b/aiogram/types/user_shared.py @@ -0,0 +1,32 @@ +from typing import TYPE_CHECKING, Any + +from aiogram.types import TelegramObject + + +class UserShared(TelegramObject): + """ + This object contains information about the user whose identifier was shared with the bot using a :class:`aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser` button. + + .. deprecated:: API:7.0 + https://core.telegram.org/bots/api-changelog#december-29-2023 + + Source: https://core.telegram.org/bots/api#usershared + """ + + request_id: int + """Identifier of the request""" + 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 a 64-bit integer or double-precision float type are safe for storing this identifier. 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.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, request_id: int, 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__(request_id=request_id, user_id=user_id, **__pydantic_kwargs) diff --git a/aiogram/types/users_shared.py b/aiogram/types/users_shared.py new file mode 100644 index 00000000..8228a9b9 --- /dev/null +++ b/aiogram/types/users_shared.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from pydantic import Field + +from .base import TelegramObject + +if TYPE_CHECKING: + from .shared_user import SharedUser + + +class UsersShared(TelegramObject): + """ + This object contains information about the users whose identifiers were shared with the bot using a :class:`aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers` button. + + Source: https://core.telegram.org/bots/api#usersshared + """ + + request_id: int + """Identifier of the request""" + users: list[SharedUser] + """Information about users shared with the bot.""" + 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 + https://core.telegram.org/bots/api-changelog#march-31-2024""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + request_id: int, + users: list[SharedUser], + user_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__( + request_id=request_id, users=users, user_ids=user_ids, **__pydantic_kwargs + ) diff --git a/aiogram/types/venue.py b/aiogram/types/venue.py index 49caceff..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, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -21,11 +21,42 @@ 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + location: Location, + title: str, + address: str, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + location=location, + title=title, + address=address, + foursquare_id=foursquare_id, + foursquare_type=foursquare_type, + google_place_id=google_place_id, + google_place_type=google_place_type, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/video.py b/aiogram/types/video.py index f245c53c..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, 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): @@ -20,16 +22,63 @@ class Video(TelegramObject): 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 as defined by sender""" + """Video width as defined by the sender""" height: int - """Video height as defined by sender""" + """Video height as defined by the sender""" duration: int - """Duration of the video in seconds as defined by sender""" - thumb: Optional[PhotoSize] = None + """Duration of the video in seconds as defined by the sender""" + thumbnail: PhotoSize | None = None """*Optional*. Video thumbnail""" - file_name: Optional[str] = None - """*Optional*. Original filename as defined by sender""" - mime_type: Optional[str] = None - """*Optional*. Mime type of a file as defined by sender""" - file_size: Optional[int] = None - """*Optional*. File size in bytes""" + 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: str | None = None + """*Optional*. MIME type of the file as defined by the sender""" + 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, + duration: int, + 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!!! + # 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, + duration=duration, + thumbnail=thumbnail, + cover=cover, + start_timestamp=start_timestamp, + qualities=qualities, + file_name=file_name, + mime_type=mime_type, + file_size=file_size, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/video_chat_ended.py b/aiogram/types/video_chat_ended.py new file mode 100644 index 00000000..289eb722 --- /dev/null +++ b/aiogram/types/video_chat_ended.py @@ -0,0 +1,27 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class VideoChatEnded(TelegramObject): + """ + This object represents a service message about a video chat ended in the chat. + + Source: https://core.telegram.org/bots/api#videochatended + """ + + duration: int + """Video chat duration in seconds""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, duration: 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__(duration=duration, **__pydantic_kwargs) diff --git a/aiogram/types/video_chat_participants_invited.py b/aiogram/types/video_chat_participants_invited.py new file mode 100644 index 00000000..31c0d77a --- /dev/null +++ b/aiogram/types/video_chat_participants_invited.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 VideoChatParticipantsInvited(TelegramObject): + """ + This object represents a service message about new members invited to a video chat. + + Source: https://core.telegram.org/bots/api#videochatparticipantsinvited + """ + + 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: + # 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__(users=users, **__pydantic_kwargs) diff --git a/aiogram/types/video_chat_scheduled.py b/aiogram/types/video_chat_scheduled.py new file mode 100644 index 00000000..c82e4953 --- /dev/null +++ b/aiogram/types/video_chat_scheduled.py @@ -0,0 +1,30 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject +from .custom import DateTime + + +class VideoChatScheduled(TelegramObject): + """ + This object represents a service message about a video chat scheduled in the chat. + + Source: https://core.telegram.org/bots/api#videochatscheduled + """ + + start_date: DateTime + """Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, start_date: DateTime, **__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__(start_date=start_date, **__pydantic_kwargs) diff --git a/aiogram/types/video_chat_started.py b/aiogram/types/video_chat_started.py new file mode 100644 index 00000000..a6f9aed0 --- /dev/null +++ b/aiogram/types/video_chat_started.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from .base import TelegramObject + + +class VideoChatStarted(TelegramObject): + """ + This object represents a service message about a video chat started in the chat. Currently holds no information. + + Source: https://core.telegram.org/bots/api#videochatstarted + """ diff --git a/aiogram/types/video_note.py b/aiogram/types/video_note.py index c2488336..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, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -20,10 +20,39 @@ class VideoNote(TelegramObject): 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.""" length: int - """Video width and height (diameter of the video message) as defined by sender""" + """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 sender""" - thumb: Optional[PhotoSize] = None + """Duration of the video in seconds as defined by the sender""" + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + file_id: str, + file_unique_id: str, + length: int, + duration: int, + thumbnail: PhotoSize | None = None, + 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, + length=length, + duration=duration, + thumbnail=thumbnail, + file_size=file_size, + **__pydantic_kwargs, + ) 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 ed940ce8..1fdcf1dc 100644 --- a/aiogram/types/voice.py +++ b/aiogram/types/voice.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -17,8 +17,35 @@ class Voice(TelegramObject): 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.""" duration: int - """Duration of the audio in seconds as defined by sender""" - mime_type: Optional[str] = None - """*Optional*. MIME type of the file as defined by sender""" - file_size: Optional[int] = None - """*Optional*. File size in bytes""" + """Duration of the audio in seconds as defined by the sender""" + mime_type: str | None = None + """*Optional*. MIME type of the file as defined by the sender""" + 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, + duration: int, + mime_type: str | None = None, + 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, + duration=duration, + mime_type=mime_type, + file_size=file_size, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/voice_chat_ended.py b/aiogram/types/voice_chat_ended.py deleted file mode 100644 index 12c705c9..00000000 --- a/aiogram/types/voice_chat_ended.py +++ /dev/null @@ -1,14 +0,0 @@ -from __future__ import annotations - -from .base import TelegramObject - - -class VoiceChatEnded(TelegramObject): - """ - This object represents a service message about a voice chat ended in the chat. - - Source: https://core.telegram.org/bots/api#voicechatended - """ - - duration: int - """Voice chat duration in seconds""" diff --git a/aiogram/types/voice_chat_participants_invited.py b/aiogram/types/voice_chat_participants_invited.py deleted file mode 100644 index b24ef91d..00000000 --- a/aiogram/types/voice_chat_participants_invited.py +++ /dev/null @@ -1,19 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, List, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .user import User - - -class VoiceChatParticipantsInvited(TelegramObject): - """ - This object represents a service message about new members invited to a voice chat. - - Source: https://core.telegram.org/bots/api#voicechatparticipantsinvited - """ - - users: Optional[List[User]] = None - """*Optional*. New members that were invited to the voice chat""" diff --git a/aiogram/types/voice_chat_scheduled.py b/aiogram/types/voice_chat_scheduled.py deleted file mode 100644 index 37c6c7bd..00000000 --- a/aiogram/types/voice_chat_scheduled.py +++ /dev/null @@ -1,14 +0,0 @@ -from __future__ import annotations - -from .base import TelegramObject - - -class VoiceChatScheduled(TelegramObject): - """ - This object represents a service message about a voice chat scheduled in the chat. - - Source: https://core.telegram.org/bots/api#voicechatscheduled - """ - - start_date: int - """Point in time (Unix timestamp) when the voice chat is supposed to be started by a chat administrator""" diff --git a/aiogram/types/voice_chat_started.py b/aiogram/types/voice_chat_started.py deleted file mode 100644 index 6ad45263..00000000 --- a/aiogram/types/voice_chat_started.py +++ /dev/null @@ -1,11 +0,0 @@ -from __future__ import annotations - -from .base import TelegramObject - - -class VoiceChatStarted(TelegramObject): - """ - This object represents a service message about a voice chat started in the chat. Currently holds no information. - - Source: https://core.telegram.org/bots/api#voicechatstarted - """ diff --git a/aiogram/types/web_app_data.py b/aiogram/types/web_app_data.py new file mode 100644 index 00000000..8fac379f --- /dev/null +++ b/aiogram/types/web_app_data.py @@ -0,0 +1,31 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class WebAppData(TelegramObject): + """ + Describes data sent from a `Web App `_ to the bot. + + Source: https://core.telegram.org/bots/api#webappdata + """ + + data: str + """The data. Be aware that a bad client can send arbitrary data in this field.""" + button_text: str + """Text of the *web_app* keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, data: str, button_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__(data=data, button_text=button_text, **__pydantic_kwargs) diff --git a/aiogram/types/web_app_info.py b/aiogram/types/web_app_info.py new file mode 100644 index 00000000..fbf9846e --- /dev/null +++ b/aiogram/types/web_app_info.py @@ -0,0 +1,27 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class WebAppInfo(TelegramObject): + """ + Describes a `Web App `_. + + Source: https://core.telegram.org/bots/api#webappinfo + """ + + url: str + """An HTTPS URL of a Web App to be opened with additional data as specified in `Initializing Web Apps `_""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, 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__(url=url, **__pydantic_kwargs) diff --git a/aiogram/types/webhook_info.py b/aiogram/types/webhook_info.py index 3b1a64a0..c0d2c4e1 100644 --- a/aiogram/types/webhook_info.py +++ b/aiogram/types/webhook_info.py @@ -1,14 +1,14 @@ from __future__ import annotations -import datetime -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any from .base import TelegramObject +from .custom import DateTime class WebhookInfo(TelegramObject): """ - Contains information about the current status of a webhook. + Describes the current status of a webhook. Source: https://core.telegram.org/bots/api#webhookinfo """ @@ -19,13 +19,50 @@ 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[Union[datetime.datetime, datetime.timedelta, int]] = 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""" - max_connections: Optional[int] = None - """*Optional*. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery""" - allowed_updates: Optional[List[str]] = 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: int | None = None + """*Optional*. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery""" + 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: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + url: str, + has_custom_certificate: bool, + pending_update_count: int, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + url=url, + has_custom_certificate=has_custom_certificate, + pending_update_count=pending_update_count, + ip_address=ip_address, + last_error_date=last_error_date, + last_error_message=last_error_message, + last_synchronization_error_date=last_synchronization_error_date, + max_connections=max_connections, + allowed_updates=allowed_updates, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/write_access_allowed.py b/aiogram/types/write_access_allowed.py new file mode 100644 index 00000000..77e933f2 --- /dev/null +++ b/aiogram/types/write_access_allowed.py @@ -0,0 +1,41 @@ +from typing import TYPE_CHECKING, Any + +from aiogram.types import TelegramObject + + +class WriteAccessAllowed(TelegramObject): + """ + This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method `requestWriteAccess `_. + + Source: https://core.telegram.org/bots/api#writeaccessallowed + """ + + 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: 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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + 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!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + from_request=from_request, + web_app_name=web_app_name, + from_attachment_menu=from_attachment_menu, + **__pydantic_kwargs, + ) diff --git a/aiogram/utils/auth_widget.py b/aiogram/utils/auth_widget.py index a67afe65..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: @@ -15,14 +15,16 @@ def check_signature(token: str, hash: str, **kwargs: Any) -> bool: :return: """ secret = hashlib.sha256(token.encode("utf-8")) - check_string = "\n".join(map(lambda k: f"{k}={kwargs[k]}", sorted(kwargs))) + 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 f0b1b578..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: @@ -77,4 +79,7 @@ class Backoff: self._next_delay = self.min_delay def __str__(self) -> str: - return f"Backoff(tryings={self._counter}, current_delay={self._current_delay}, next_delay={self._next_delay})" + return ( + f"Backoff(tryings={self._counter}, current_delay={self._current_delay}, " + f"next_delay={self._next_delay})" + ) diff --git a/aiogram/utils/callback_answer.py b/aiogram/utils/callback_answer.py new file mode 100644 index 00000000..5cf30598 --- /dev/null +++ b/aiogram/utils/callback_answer.py @@ -0,0 +1,218 @@ +from collections.abc import Awaitable, Callable +from typing import Any + +from aiogram import BaseMiddleware, loggers +from aiogram.dispatcher.flags import get_flag +from aiogram.exceptions import CallbackAnswerException +from aiogram.methods import AnswerCallbackQuery +from aiogram.types import CallbackQuery, TelegramObject + + +class CallbackAnswer: + def __init__( + self, + answered: bool, + disabled: bool = False, + text: str | None = None, + show_alert: bool | None = None, + url: str | None = None, + cache_time: int | None = None, + ) -> None: + """ + Callback answer configuration + + :param answered: this request is already answered by middleware + :param disabled: answer will not be performed + :param text: answer with text + :param show_alert: show alert + :param url: game url + :param cache_time: cache answer for some time + """ + self._answered = answered + self._disabled = disabled + self._text = text + self._show_alert = show_alert + self._url = url + self._cache_time = cache_time + + def disable(self) -> None: + """ + Deactivate answering for this handler + """ + self.disabled = True + + @property + def disabled(self) -> bool: + """Indicates that automatic answer is disabled in this handler""" + return self._disabled + + @disabled.setter + def disabled(self, value: bool) -> None: + if self._answered: + msg = "Can't change disabled state after answer" + raise CallbackAnswerException(msg) + self._disabled = value + + @property + def answered(self) -> bool: + """ + Indicates that request is already answered by middleware + """ + return self._answered + + @property + def text(self) -> str | None: + """ + Response text + :return: + """ + return self._text + + @text.setter + def text(self, value: str | None) -> None: + if self._answered: + msg = "Can't change text after answer" + raise CallbackAnswerException(msg) + self._text = value + + @property + def show_alert(self) -> bool | None: + """ + Whether to display an alert + """ + return self._show_alert + + @show_alert.setter + def show_alert(self, value: bool | None) -> None: + if self._answered: + msg = "Can't change show_alert after answer" + raise CallbackAnswerException(msg) + self._show_alert = value + + @property + def url(self) -> str | None: + """ + Game url + """ + return self._url + + @url.setter + def url(self, value: str | None) -> None: + if self._answered: + msg = "Can't change url after answer" + raise CallbackAnswerException(msg) + self._url = value + + @property + def cache_time(self) -> int | None: + """ + Response cache time + """ + return self._cache_time + + @cache_time.setter + def cache_time(self, value: int | None) -> None: + if self._answered: + msg = "Can't change cache_time after answer" + raise CallbackAnswerException(msg) + self._cache_time = value + + def __str__(self) -> str: + args = ", ".join( + f"{k}={v!r}" + for k, v in { + "answered": self.answered, + "disabled": self.disabled, + "text": self.text, + "show_alert": self.show_alert, + "url": self.url, + "cache_time": self.cache_time, + }.items() + if v is not None + ) + return f"{type(self).__name__}({args})" + + +class CallbackAnswerMiddleware(BaseMiddleware): + def __init__( + self, + pre: bool = False, + 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 + handlers to automatically take answer to all requests + + :param pre: send answer before execute handler + :param text: answer with text + :param show_alert: show alert + :param url: game url + :param cache_time: cache answer for some time + """ + self.pre = pre + self.text = text + self.show_alert = show_alert + self.url = url + self.cache_time = cache_time + + async def __call__( + self, + handler: Callable[[TelegramObject, dict[str, Any]], Awaitable[Any]], + event: TelegramObject, + 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"), + ) + + if not callback_answer.disabled and callback_answer.answered: + await self.answer(event, callback_answer) + try: + return await handler(event, data) + finally: + if not callback_answer.disabled and not callback_answer.answered: + await self.answer(event, callback_answer) + + def construct_callback_answer( + self, + properties: dict[str, Any] | bool | None, + ) -> CallbackAnswer: + pre, disabled, text, show_alert, url, cache_time = ( + self.pre, + False, + self.text, + self.show_alert, + self.url, + self.cache_time, + ) + if isinstance(properties, dict): + pre = properties.get("pre", pre) + disabled = properties.get("disabled", disabled) + text = properties.get("text", text) + show_alert = properties.get("show_alert", show_alert) + url = properties.get("url", url) + cache_time = properties.get("cache_time", cache_time) + + return CallbackAnswer( + answered=pre, + disabled=disabled, + text=text, + show_alert=show_alert, + url=url, + cache_time=cache_time, + ) + + def answer(self, event: CallbackQuery, callback_answer: CallbackAnswer) -> AnswerCallbackQuery: + loggers.middlewares.info("Answer to callback query id=%s", event.id) + return event.answer( + text=callback_answer.text, + show_alert=callback_answer.show_alert, + url=callback_answer.url, + cache_time=callback_answer.cache_time, + ) diff --git a/aiogram/utils/chat_action.py b/aiogram/utils/chat_action.py index 2a9dddcc..fdb55b13 100644 --- a/aiogram/utils/chat_action.py +++ b/aiogram/utils/chat_action.py @@ -2,17 +2,18 @@ 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.getter import get_flag +from aiogram.dispatcher.flags import get_flag from aiogram.types import Message, TelegramObject logger = logging.getLogger(__name__) DEFAULT_INTERVAL = 5.0 -DEFAULT_INITIAL_SLEEP = 0.1 +DEFAULT_INITIAL_SLEEP = 0.0 class ChatActionSender: @@ -23,30 +24,31 @@ class ChatActionSender: Provides simply to use context manager. Technically sender start background task with infinity loop which works - until action will be finished and sends the `chat action `_ + until action will be finished and sends the + `chat action `_ every 5 seconds. """ def __init__( self, *, - chat_id: Union[str, int], + bot: Bot, + chat_id: str | int, + message_thread_id: int | None = None, action: str = "typing", interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, - bot: Optional[Bot] = None, ) -> None: """ + :param bot: instance of the bot :param chat_id: target chat id + :param message_thread_id: unique identifier for the target message thread; supergroups only :param action: chat action type :param interval: interval between iterations - :param initial_sleep: sleep before first iteration - :param bot: instance of the bot, can be omitted from the context + :param initial_sleep: sleep before first sending of the action """ - if bot is None: - bot = Bot.get_current(False) - self.chat_id = chat_id + self.message_thread_id = message_thread_id self.action = action self.interval = interval self.initial_sleep = initial_sleep @@ -55,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: @@ -84,7 +86,11 @@ class ChatActionSender: self.bot.id, counter, ) - await self.bot.send_chat_action(chat_id=self.chat_id, action=self.action) + await self.bot.send_chat_action( + chat_id=self.chat_id, + action=self.action, + message_thread_id=self.message_thread_id, + ) counter += 1 interval = self.interval - (time.monotonic() - start) @@ -103,14 +109,15 @@ 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: async with self._lock: if not self.running: return - if not self._close_event.is_set(): + if not self._close_event.is_set(): # pragma: no branches self._close_event.set() await self._closed_event.wait() self._task = None @@ -121,17 +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], - bot: Optional[Bot] = None, + chat_id: int | str, + bot: Bot, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -139,6 +147,7 @@ class ChatActionSender: return cls( bot=bot, chat_id=chat_id, + message_thread_id=message_thread_id, action="typing", interval=interval, initial_sleep=initial_sleep, @@ -147,8 +156,9 @@ class ChatActionSender: @classmethod def upload_photo( cls, - chat_id: Union[int, str], - bot: Optional[Bot] = None, + chat_id: int | str, + bot: Bot, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -156,6 +166,7 @@ class ChatActionSender: return cls( bot=bot, chat_id=chat_id, + message_thread_id=message_thread_id, action="upload_photo", interval=interval, initial_sleep=initial_sleep, @@ -164,8 +175,9 @@ class ChatActionSender: @classmethod def record_video( cls, - chat_id: Union[int, str], - bot: Optional[Bot] = None, + chat_id: int | str, + bot: Bot, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -173,6 +185,7 @@ class ChatActionSender: return cls( bot=bot, chat_id=chat_id, + message_thread_id=message_thread_id, action="record_video", interval=interval, initial_sleep=initial_sleep, @@ -181,8 +194,9 @@ class ChatActionSender: @classmethod def upload_video( cls, - chat_id: Union[int, str], - bot: Optional[Bot] = None, + chat_id: int | str, + bot: Bot, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -190,6 +204,7 @@ class ChatActionSender: return cls( bot=bot, chat_id=chat_id, + message_thread_id=message_thread_id, action="upload_video", interval=interval, initial_sleep=initial_sleep, @@ -198,8 +213,9 @@ class ChatActionSender: @classmethod def record_voice( cls, - chat_id: Union[int, str], - bot: Optional[Bot] = None, + chat_id: int | str, + bot: Bot, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -207,6 +223,7 @@ class ChatActionSender: return cls( bot=bot, chat_id=chat_id, + message_thread_id=message_thread_id, action="record_voice", interval=interval, initial_sleep=initial_sleep, @@ -215,8 +232,9 @@ class ChatActionSender: @classmethod def upload_voice( cls, - chat_id: Union[int, str], - bot: Optional[Bot] = None, + chat_id: int | str, + bot: Bot, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -224,6 +242,7 @@ class ChatActionSender: return cls( bot=bot, chat_id=chat_id, + message_thread_id=message_thread_id, action="upload_voice", interval=interval, initial_sleep=initial_sleep, @@ -232,8 +251,9 @@ class ChatActionSender: @classmethod def upload_document( cls, - chat_id: Union[int, str], - bot: Optional[Bot] = None, + chat_id: int | str, + bot: Bot, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -241,6 +261,7 @@ class ChatActionSender: return cls( bot=bot, chat_id=chat_id, + message_thread_id=message_thread_id, action="upload_document", interval=interval, initial_sleep=initial_sleep, @@ -249,8 +270,9 @@ class ChatActionSender: @classmethod def choose_sticker( cls, - chat_id: Union[int, str], - bot: Optional[Bot] = None, + chat_id: int | str, + bot: Bot, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -258,6 +280,7 @@ class ChatActionSender: return cls( bot=bot, chat_id=chat_id, + message_thread_id=message_thread_id, action="choose_sticker", interval=interval, initial_sleep=initial_sleep, @@ -266,8 +289,9 @@ class ChatActionSender: @classmethod def find_location( cls, - chat_id: Union[int, str], - bot: Optional[Bot] = None, + chat_id: int | str, + bot: Bot, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -275,6 +299,7 @@ class ChatActionSender: return cls( bot=bot, chat_id=chat_id, + message_thread_id=message_thread_id, action="find_location", interval=interval, initial_sleep=initial_sleep, @@ -283,8 +308,9 @@ class ChatActionSender: @classmethod def record_video_note( cls, - chat_id: Union[int, str], - bot: Optional[Bot] = None, + chat_id: int | str, + bot: Bot, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -292,6 +318,7 @@ class ChatActionSender: return cls( bot=bot, chat_id=chat_id, + message_thread_id=message_thread_id, action="record_video_note", interval=interval, initial_sleep=initial_sleep, @@ -300,8 +327,9 @@ class ChatActionSender: @classmethod def upload_video_note( cls, - chat_id: Union[int, str], - bot: Optional[Bot] = None, + chat_id: int | str, + bot: Bot, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -309,6 +337,7 @@ class ChatActionSender: return cls( bot=bot, chat_id=chat_id, + message_thread_id=message_thread_id, action="upload_video_note", interval=interval, initial_sleep=initial_sleep, @@ -322,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) @@ -343,5 +372,10 @@ class ChatActionMiddleware(BaseMiddleware): kwargs["action"] = "typing" else: kwargs["action"] = chat_action + kwargs["message_thread_id"] = ( + event.message_thread_id + if isinstance(event, Message) and event.is_topic_message + else None + ) async with ChatActionSender(bot=bot, chat_id=event.chat.id, **kwargs): return await handler(event, data) diff --git a/aiogram/utils/chat_member.py b/aiogram/utils/chat_member.py new file mode 100644 index 00000000..817f1732 --- /dev/null +++ b/aiogram/utils/chat_member.py @@ -0,0 +1,36 @@ +from typing import Annotated + +from pydantic import Field, TypeAdapter + +from aiogram.types import ( + ChatMember, + ChatMemberAdministrator, + ChatMemberBanned, + ChatMemberLeft, + ChatMemberMember, + ChatMemberOwner, + ChatMemberRestricted, +) + +ChatMemberUnion = ( + ChatMemberOwner + | ChatMemberAdministrator + | ChatMemberMember + | ChatMemberRestricted + | ChatMemberLeft + | ChatMemberBanned +) + +ChatMemberCollection = tuple[type[ChatMember], ...] + +ChatMemberAdapter: TypeAdapter[ChatMemberUnion] = TypeAdapter( + Annotated[ + ChatMemberUnion, + Field(discriminator="status"), + ], +) + +ADMINS: ChatMemberCollection = (ChatMemberOwner, ChatMemberAdministrator) +USERS: ChatMemberCollection = (ChatMemberMember, ChatMemberRestricted) +MEMBERS: ChatMemberCollection = ADMINS + USERS +NOT_MEMBERS: ChatMemberCollection = (ChatMemberLeft, ChatMemberBanned) 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 bedaa6bc..1de7581e 100644 --- a/aiogram/utils/deep_linking.py +++ b/aiogram/utils/deep_linking.py @@ -1,133 +1,158 @@ -""" -Deep linking +from __future__ import annotations -Telegram bots have a deep linking mechanism, that allows for passing -additional parameters to the bot on startup. It could be a command that -launches the bot — or an auth token to connect the user's Telegram -account to their account on some external service. +__all__ = [ + "create_deep_link", + "create_start_link", + "create_startapp_link", + "create_startgroup_link", + "create_telegram_link", + "decode_payload", + "encode_payload", +] -You can read detailed description in the source: -https://core.telegram.org/bots#deep-linking - -We have add some utils to get deep links more handy. - -Basic link example: - - .. code-block:: python - - from aiogram.utils.deep_linking import get_start_link - link = await get_start_link('foo') - - # result: 'https://t.me/MyBot?start=foo' - -Encoded link example: - - .. code-block:: python - - from aiogram.utils.deep_linking import get_start_link - - link = await get_start_link('foo', encode=True) - # result: 'https://t.me/MyBot?start=Zm9v' - -Decode it back example: - .. code-block:: python - - from aiogram.utils.deep_linking import decode_payload - from aiogram.types import Message - - @dp.message_handler(commands=["start"]) - async def handler(message: Message): - args = message.get_args() - payload = decode_payload(args) - await message.answer(f"Your payload: {payload}") - -""" import re -from base64 import urlsafe_b64decode, urlsafe_b64encode -from typing import Literal, cast +from typing import TYPE_CHECKING, Literal, cast -from aiogram import Bot from aiogram.utils.link import create_telegram_link +from aiogram.utils.payload import decode_payload, encode_payload -BAD_PATTERN = re.compile(r"[^_A-z0-9-]") +if TYPE_CHECKING: + from collections.abc import Callable + + from aiogram import Bot + +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) -> str: +async def create_start_link( + bot: Bot, + payload: str, + encode: bool = False, + 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 - :param encode: encode payload with base64url + :param encode: encode payload with base64url or custom encoder + :param encoder: custom encoder callable :return: link """ username = (await bot.me()).username return create_deep_link( - username=cast(str, username), link_type="start", payload=payload, encode=encode + username=cast(str, username), + link_type="start", + payload=payload, + encode=encode, + encoder=encoder, ) -async def create_startgroup_link(bot: Bot, payload: str, encode: bool = False) -> str: +async def create_startgroup_link( + bot: Bot, + payload: str, + encode: bool = False, + 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 - :param encode: encode payload with base64url + :param encode: encode payload with base64url or custom encoder + :param encoder: custom encoder callable :return: link """ username = (await bot.me()).username return create_deep_link( - username=cast(str, username), link_type="startgroup", payload=payload, encode=encode + username=cast(str, username), + link_type="startgroup", + payload=payload, + encode=encode, + encoder=encoder, + ) + + +async def create_startapp_link( + bot: Bot, + payload: str, + encode: bool = False, + 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"], payload: str, encode: bool = False + 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 encode: pass True to encode the payload + :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 """ if not isinstance(payload, str): payload = str(payload) - if encode: - payload = encode_payload(payload) + if encode or encoder: + 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}) - -def encode_payload(payload: str) -> str: - """Encode payload with URL-safe base64url.""" - payload = str(payload) - bytes_payload: bytes = urlsafe_b64encode(payload.encode()) - str_payload = bytes_payload.decode() - return str_payload.replace("=", "") - - -def decode_payload(payload: str) -> str: - """Decode payload with URL-safe base64url.""" - payload += "=" * (4 - len(payload) % 4) - result: bytes = urlsafe_b64decode(payload) - return result.decode() + return deep_link diff --git a/aiogram/utils/formatting.py b/aiogram/utils/formatting.py new file mode 100644 index 00000000..4dfccd64 --- /dev/null +++ b/aiogram/utils/formatting.py @@ -0,0 +1,735 @@ +from __future__ import annotations + +import textwrap +from collections.abc import Generator, Iterable, Iterator +from datetime import datetime +from typing import Any, ClassVar + +from typing_extensions import Self + +from aiogram.enums import MessageEntityType +from aiogram.types import MessageEntity, User +from aiogram.utils.text_decorations import ( + add_surrogates, + html_decoration, + markdown_decoration, + remove_surrogates, +) + +NodeType = Any + + +def sizeof(value: str) -> int: + return len(value.encode("utf-16-le")) // 2 + + +class Text(Iterable[NodeType]): + """ + Simple text element + """ + + type: ClassVar[str | None] = None + + __slots__ = ("_body", "_params") + + def __init__( + self, + *body: NodeType, + **params: Any, + ) -> None: + self._body: tuple[NodeType, ...] = body + self._params: dict[str, Any] = params + + @classmethod + 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( + self, + *, + _offset: int = 0, + _sort: bool = True, + _collect_entities: bool = True, + ) -> tuple[str, list[MessageEntity]]: + """ + Render elements tree as text with entities list + + :return: + """ + + text = "" + entities = [] + offset = _offset + + for node in self._body: + if not isinstance(node, Text): + node = str(node) + text += node + offset += sizeof(node) + else: + node_text, node_entities = node.render( + _offset=offset, + _sort=False, + _collect_entities=_collect_entities, + ) + text += node_text + offset += sizeof(node_text) + if _collect_entities: + entities.extend(node_entities) + + if _collect_entities and self.type: + entities.append(self._render_entity(offset=_offset, length=offset - _offset)) + + if _collect_entities and _sort: + entities.sort(key=lambda entity: entity.offset) + + return text, entities + + def _render_entity(self, *, offset: int, length: int) -> MessageEntity: + assert self.type is not None, "Node without type can't be rendered as entity" + return MessageEntity(type=self.type, offset=offset, length=length, **self._params) + + def as_kwargs( + self, + *, + text_key: str = "text", + entities_key: str = "entities", + replace_parse_mode: bool = True, + parse_mode_key: str = "parse_mode", + ) -> dict[str, Any]: + """ + Render element tree as keyword arguments for usage in an API call, for example: + + .. code-block:: python + + entities = Text(...) + await message.answer(**entities.as_kwargs()) + + :param text_key: + :param entities_key: + :param replace_parse_mode: + :param parse_mode_key: + :return: + """ + text_value, entities_value = self.render() + result: dict[str, Any] = { + text_key: text_value, + entities_key: entities_value, + } + if replace_parse_mode: + 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 + """ + text, entities = self.render() + return html_decoration.unparse(text, entities) + + def as_markdown(self) -> str: + """ + Render elements tree as MarkdownV2 markup + """ + text, entities = self.render() + return markdown_decoration.unparse(text, entities) + + def replace(self: Self, *args: Any, **kwargs: Any) -> Self: + return type(self)(*args, **{**self._params, **kwargs}) + + def as_pretty_string(self, indent: bool = False) -> str: + sep = ",\n" if indent else ", " + body = sep.join( + item.as_pretty_string(indent=indent) if isinstance(item, Text) else repr(item) + for item in self._body + ) + params = sep.join(f"{k}={v!r}" for k, v in self._params.items() if v is not None) + + args = [] + if body: + args.append(body) + if params: + args.append(params) + + args_str = sep.join(args) + if indent: + args_str = textwrap.indent("\n" + args_str + "\n", " ") + return f"{type(self).__name__}({args_str})" + + 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) is Text and isinstance(other, str): + return type(self)(*self, other, **self._params) + return Text(self, other) + + def __iter__(self) -> Iterator[NodeType]: + yield from self._body + + def __len__(self) -> int: + text, _ = self.render(_collect_entities=False) + return sizeof(text) + + def __getitem__(self, item: slice) -> Text: + if not isinstance(item, slice): + 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 + stop = len(self) if item.stop is None else item.stop + if start == stop: + return self.replace() + + nodes = [] + position = 0 + + for node in self._body: + node_size = len(node) + current_position = position + position += node_size + if position < start: + continue + if current_position > stop: + break + a = max((0, start - current_position)) + b = min((node_size, stop - current_position)) + new_node = node[a:b] + if not new_node: + continue + nodes.append(new_node) + + return self.replace(*nodes) + + +class HashTag(Text): + """ + Hashtag element. + + .. warning:: + + The value should always start with '#' symbol + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.HASHTAG` + """ + + type = MessageEntityType.HASHTAG + + def __init__(self, *body: NodeType, **params: Any) -> None: + if len(body) != 1: + msg = "Hashtag can contain only one element" + raise ValueError(msg) + if not isinstance(body[0], str): + msg = "Hashtag can contain only string" + raise ValueError(msg) + if not body[0].startswith("#"): + body = ("#" + body[0],) + super().__init__(*body, **params) + + +class CashTag(Text): + """ + Cashtag element. + + .. warning:: + + The value should always start with '$' symbol + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.CASHTAG` + """ + + type = MessageEntityType.CASHTAG + + def __init__(self, *body: NodeType, **params: Any) -> None: + if len(body) != 1: + msg = "Cashtag can contain only one element" + raise ValueError(msg) + if not isinstance(body[0], str): + msg = "Cashtag can contain only string" + raise ValueError(msg) + if not body[0].startswith("$"): + body = ("$" + body[0],) + super().__init__(*body, **params) + + +class BotCommand(Text): + """ + Bot command element. + + .. warning:: + + The value should always start with '/' symbol + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.BOT_COMMAND` + """ + + type = MessageEntityType.BOT_COMMAND + + +class Url(Text): + """ + Url element. + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.URL` + """ + + type = MessageEntityType.URL + + +class Email(Text): + """ + Email element. + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.EMAIL` + """ + + type = MessageEntityType.EMAIL + + +class PhoneNumber(Text): + """ + Phone number element. + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.PHONE_NUMBER` + """ + + type = MessageEntityType.PHONE_NUMBER + + +class Bold(Text): + """ + Bold element. + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.BOLD` + """ + + type = MessageEntityType.BOLD + + +class Italic(Text): + """ + Italic element. + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.ITALIC` + """ + + type = MessageEntityType.ITALIC + + +class Underline(Text): + """ + Underline element. + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.UNDERLINE` + """ + + type = MessageEntityType.UNDERLINE + + +class Strikethrough(Text): + """ + Strikethrough element. + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.STRIKETHROUGH` + """ + + type = MessageEntityType.STRIKETHROUGH + + +class Spoiler(Text): + """ + Spoiler element. + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.SPOILER` + """ + + type = MessageEntityType.SPOILER + + +class Code(Text): + """ + Code element. + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.CODE` + """ + + type = MessageEntityType.CODE + + +class Pre(Text): + """ + Pre element. + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.PRE` + """ + + type = MessageEntityType.PRE + + def __init__(self, *body: NodeType, language: str | None = None, **params: Any) -> None: + super().__init__(*body, language=language, **params) + + +class TextLink(Text): + """ + Text link element. + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.TEXT_LINK` + """ + + type = MessageEntityType.TEXT_LINK + + def __init__(self, *body: NodeType, url: str, **params: Any) -> None: + super().__init__(*body, url=url, **params) + + +class TextMention(Text): + """ + Text mention element. + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.TEXT_MENTION` + """ + + type = MessageEntityType.TEXT_MENTION + + def __init__(self, *body: NodeType, user: User, **params: Any) -> None: + super().__init__(*body, user=user, **params) + + +class CustomEmoji(Text): + """ + Custom emoji element. + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.CUSTOM_EMOJI` + """ + + type = MessageEntityType.CUSTOM_EMOJI + + def __init__(self, *body: NodeType, custom_emoji_id: str, **params: Any) -> None: + super().__init__(*body, custom_emoji_id=custom_emoji_id, **params) + + +class BlockQuote(Text): + """ + Block quote element. + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.BLOCKQUOTE` + """ + + type = MessageEntityType.BLOCKQUOTE + + +class ExpandableBlockQuote(Text): + """ + Expandable block quote element. + + Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` + with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.EXPANDABLE_BLOCKQUOTE` + """ + + type = MessageEntityType.EXPANDABLE_BLOCKQUOTE + + +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, + BotCommand.type: BotCommand, + Url.type: Url, + Email.type: Email, + PhoneNumber.type: PhoneNumber, + Bold.type: Bold, + Italic.type: Italic, + Underline.type: Underline, + Strikethrough.type: Strikethrough, + Spoiler.type: Spoiler, + Code.type: Code, + Pre.type: Pre, + TextLink.type: TextLink, + TextMention.type: TextMention, + CustomEmoji.type: CustomEmoji, + BlockQuote.type: BlockQuote, + ExpandableBlockQuote.type: ExpandableBlockQuote, + DateTime.type: DateTime, +} + + +def _apply_entity(entity: MessageEntity, *nodes: NodeType) -> NodeType: + """ + Apply single entity to text + + :param entity: + :param text: + :return: + """ + node_type = NODE_TYPES.get(entity.type, Text) + return node_type( + *nodes, + **entity.model_dump(exclude={"type", "offset", "length"}, warnings=False), + ) + + +def _unparse_entities( + text: bytes, + entities: list[MessageEntity], + offset: int | None = None, + length: int | None = None, +) -> Generator[NodeType, None, None]: + if offset is None: + offset = 0 + length = length or len(text) + + for index, entity in enumerate(entities): + if entity.offset * 2 < offset: + continue + if entity.offset * 2 > offset: + yield remove_surrogates(text[offset : entity.offset * 2]) + start = entity.offset * 2 + offset = entity.offset * 2 + entity.length * 2 + + sub_entities = list(filter(lambda e: e.offset * 2 < (offset or 0), entities[index + 1 :])) + yield _apply_entity( + entity, + *_unparse_entities(text, sub_entities, offset=start, length=offset), + ) + + if offset < length: + yield remove_surrogates(text[offset:length]) + + +def as_line(*items: NodeType, end: str = "\n", sep: str = "") -> Text: + """ + Wrap multiple nodes into line with :code:`\\\\n` at the end of line. + + :param items: Text or Any + :param end: ending of the line, by default is :code:`\\\\n` + :param sep: separator between items, by default is empty string + :return: Text + """ + if sep: + nodes = [] + for item in items[:-1]: + nodes.extend([item, sep]) + nodes.extend([items[-1], end]) + else: + nodes = [*items, end] + return Text(*nodes) + + +def as_list(*items: NodeType, sep: str = "\n") -> Text: + """ + Wrap each element to separated lines + + :param items: + :param sep: + :return: + """ + nodes = [] + for item in items[:-1]: + nodes.extend([item, sep]) + nodes.append(items[-1]) + return Text(*nodes) + + +def as_marked_list(*items: NodeType, marker: str = "- ") -> Text: + """ + Wrap elements as marked list + + :param items: + :param marker: line marker, by default is '- ' + :return: Text + """ + return as_list(*(Text(marker, item) for item in items)) + + +def as_numbered_list(*items: NodeType, start: int = 1, fmt: str = "{}. ") -> Text: + """ + Wrap elements as numbered list + + :param items: + :param start: initial number, by default 1 + :param fmt: number format, by default '{}. ' + :return: Text + """ + return as_list(*(Text(fmt.format(index), item) for index, item in enumerate(items, start))) + + +def as_section(title: NodeType, *body: NodeType) -> Text: + """ + Wrap elements as simple section, section has title and body + + :param title: + :param body: + :return: Text + """ + return Text(title, "\n", *body) + + +def as_marked_section( + title: NodeType, + *body: NodeType, + marker: str = "- ", +) -> Text: + """ + Wrap elements as section with marked list + + :param title: + :param body: + :param marker: + :return: + """ + return as_section(title, as_marked_list(*body, marker=marker)) + + +def as_numbered_section( + title: NodeType, + *body: NodeType, + start: int = 1, + fmt: str = "{}. ", +) -> Text: + """ + Wrap elements as section with numbered list + + :param title: + :param body: + :param start: + :param fmt: + :return: + """ + return as_section(title, as_numbered_list(*body, start=start, fmt=fmt)) + + +def as_key_value(key: NodeType, value: NodeType) -> Text: + """ + Wrap elements pair as key-value line. (:code:`{key}: {value}`) + + :param key: + :param value: + :return: Text + """ + return Text(Bold(key, ":"), " ", value) diff --git a/aiogram/utils/helper.py b/aiogram/utils/helper.py deleted file mode 100644 index 9b4cd039..00000000 --- a/aiogram/utils/helper.py +++ /dev/null @@ -1,293 +0,0 @@ -""" -Example: - >>> from aiogram.utils.helper import Helper, ListItem, HelperMode, Item - >>> class MyHelper(Helper): - ... mode = HelperMode.lowerCamelCase - ... FOO_ITEM = ListItem() - ... BAR_ITEM = ListItem() - ... BAZ_ITEM = ListItem() - ... LOREM = Item() - ... - >>> print(MyHelper.FOO_ITEM & MyHelper.BAR_ITEM) - <<< ['fooItem', 'barItem'] - >>> print(MyHelper.all()) - <<< ['barItem', 'bazItem', 'fooItem', 'lorem'] -""" -import inspect -from typing import Any, Callable, Generic, Iterable, List, Optional, TypeVar, Union, cast -from weakref import WeakKeyDictionary - -T = TypeVar("T") - -PROPS_KEYS_ATTR_NAME = "_props_keys" - - -class Helper: - mode = "" - - @classmethod - def all(cls) -> List[Any]: - """ - Get all consts - :return: list - """ - result: List[Any] = [] - for name in dir(cls): - if not name.isupper(): - continue - value = getattr(cls, name) - if isinstance(value, ItemsList): - result.append(value[0]) - else: - result.append(value) - return result - - -class HelperMode(Helper): - mode = "original" - - SCREAMING_SNAKE_CASE = "SCREAMING_SNAKE_CASE" - lowerCamelCase = "lowerCamelCase" - CamelCase = "CamelCase" - snake_case = "snake_case" - lowercase = "lowercase" - - @classmethod - def all(cls) -> List[str]: - return [ - cls.SCREAMING_SNAKE_CASE, - cls.lowerCamelCase, - cls.CamelCase, - cls.snake_case, - cls.lowercase, - ] - - @classmethod - def _screaming_snake_case(cls, text: str) -> str: - """ - Transform text to SCREAMING_SNAKE_CASE - - :param text: - :return: - """ - if text.isupper(): - return text - result = "" - for pos, symbol in enumerate(text): - if symbol.isupper() and pos > 0: - result += "_" + symbol - else: - result += symbol.upper() - return result - - @classmethod - def _snake_case(cls, text: str) -> str: - """ - Transform text to snake case (Based on SCREAMING_SNAKE_CASE) - - :param text: - :return: - """ - if text.islower(): - return text - return cls._screaming_snake_case(text).lower() - - @classmethod - def _camel_case(cls, text: str, first_upper: bool = False) -> str: - """ - Transform text to camelCase or CamelCase - - :param text: - :param first_upper: first symbol must be upper? - :return: - """ - result = "" - need_upper = False - for pos, symbol in enumerate(text): - if symbol == "_" and pos > 0: - need_upper = True - else: - if need_upper: - result += symbol.upper() - else: - result += symbol.lower() - need_upper = False - if first_upper: - result = result[0].upper() + result[1:] - return result - - @classmethod - def apply(cls, text: str, mode: Union[str, Callable[[str], str]]) -> str: - """ - Apply mode for text - - :param text: - :param mode: - :return: - """ - if mode == cls.SCREAMING_SNAKE_CASE: - return cls._screaming_snake_case(text) - if mode == cls.snake_case: - return cls._snake_case(text) - if mode == cls.lowercase: - return cls._snake_case(text).replace("_", "") - if mode == cls.lowerCamelCase: - return cls._camel_case(text) - if mode == cls.CamelCase: - return cls._camel_case(text, True) - if callable(mode): - return mode(text) - return text - - -class _BaseItem: - def __init__(self, value: Optional[str] = None): - self._value = cast(str, value) - - def __set_name__(self, owner: Any, name: str) -> None: - if not name.isupper(): - raise NameError("Name for helper item must be in uppercase!") - if not self._value: - if not inspect.isclass(owner) or not issubclass(owner, Helper): - raise RuntimeError("Instances of Item can be used only as Helper attributes") - self._value = HelperMode.apply(name, owner.mode) - - -class Item(_BaseItem): - """ - Helper item - - If a value is not provided, - it will be automatically generated based on a variable's name - """ - - def __get__(self, instance: Any, owner: Any) -> str: - return self._value - - -class ListItem(_BaseItem): - """ - This item is always a list - - You can use &, | and + operators for that. - """ - - def add(self, other: "ListItem") -> "ListItem": # pragma: no cover - return self + other - - def __get__(self, instance: Any, owner: Any) -> "ItemsList": - return ItemsList(self._value) - - def __getitem__(self, item: Any) -> Any: # pragma: no cover - # Only for IDE. This method is never be called. - return self._value - - # Need only for IDE - __iadd__ = __add__ = __rand__ = __and__ = __ror__ = __or__ = add - - -class ItemsList(List[str]): - """ - Patch for default list - - This class provides +, &, |, +=, &=, |= operators for extending the list - """ - - def __init__(self, *seq: Any): - super(ItemsList, self).__init__(map(str, seq)) - - def add(self, other: Iterable[str]) -> "ItemsList": - self.extend(other) - return self - - __iadd__ = __add__ = __rand__ = __and__ = __ror__ = __or__ = add - - -class OrderedHelperMeta(type): - def __new__(mcs, name: Any, bases: Any, namespace: Any, **kwargs: Any) -> "OrderedHelperMeta": - cls = super().__new__(mcs, name, bases, namespace) - - props_keys = [] - - for prop_name in ( - name for name, prop in namespace.items() if isinstance(prop, (Item, ListItem)) - ): - props_keys.append(prop_name) - - setattr(cls, PROPS_KEYS_ATTR_NAME, props_keys) - - return cls - - -class OrderedHelper(Helper, metaclass=OrderedHelperMeta): - mode = "" - - @classmethod - def all(cls) -> List[str]: - """ - Get all Items values - """ - result = [] - for name in getattr(cls, PROPS_KEYS_ATTR_NAME, []): - value = getattr(cls, name) - if isinstance(value, ItemsList): - result.append(value[0]) - else: - result.append(value) - return result - - -class Default(Generic[T]): - """ - Descriptor that holds default value getter - - Example: - >>> class MyClass: - ... att = Default("dflt") - ... - >>> my_instance = MyClass() - >>> my_instance.att = "not dflt" - >>> my_instance.att - 'not dflt' - >>> MyClass.att - 'dflt' - >>> del my_instance.att - >>> my_instance.att - 'dflt' - >>> - - Intended to be used as a class attribute and only internally. - """ - - __slots__ = "fget", "_descriptor_instances" - - def __init__( - self, - default: Optional[T] = None, - *, - fget: Optional[Callable[[Any], T]] = None, - ) -> None: - self.fget = fget or (lambda _: cast(T, default)) - self._descriptor_instances = WeakKeyDictionary() # type: ignore - - def __get__(self, instance: Any, owner: Any) -> T: - if instance is None: - return self.fget(instance) - - return self._descriptor_instances.get(instance, self.fget(instance)) - - def __set__(self, instance: Any, value: T) -> None: - if instance is None or isinstance(instance, type): - raise AttributeError( - "Instance cannot be class or None. Setter must be called from a class." - ) - - self._descriptor_instances[instance] = value - - def __delete__(self, instance: Any) -> None: - if instance is None or isinstance(instance, type): - raise AttributeError( - "Instance cannot be class or None. Deleter must be called from a class." - ) - - self._descriptor_instances.pop(instance, None) 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 830ead54..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) # type: ignore - 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 dabbfae8..462f4db0 100644 --- a/aiogram/utils/i18n/middleware.py +++ b/aiogram/utils/i18n/middleware.py @@ -1,19 +1,25 @@ +from __future__ import annotations + from abc import ABC, abstractmethod -from typing import Any, Awaitable, Callable, Dict, Optional, Set, cast +from typing import TYPE_CHECKING, Any try: from babel import Locale, UnknownLocaleError except ImportError: # pragma: no cover - Locale = None + Locale = None # type: ignore class UnknownLocaleError(Exception): # type: ignore pass from aiogram import BaseMiddleware, Router -from aiogram.dispatcher.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,28 +104,30 @@ 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) - if event_from_user is 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: locale = Locale.parse(event_from_user.language_code, sep="-") @@ -127,7 +136,7 @@ class SimpleI18nMiddleware(I18nMiddleware): if locale.language not in self.i18n.available_locales: return self.i18n.default_locale - return cast(str, locale.language) + return locale.language class ConstI18nMiddleware(I18nMiddleware): @@ -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/imports.py b/aiogram/utils/imports.py deleted file mode 100644 index edc0a6a0..00000000 --- a/aiogram/utils/imports.py +++ /dev/null @@ -1,23 +0,0 @@ -import importlib -from typing import Any - - -def import_module(target: str) -> Any: - if not isinstance(target, str): - raise ValueError(f"Target should be string not {type(target).__class__.__name__}") - - module_name, _, attr_name = target.partition(":") - if not module_name or not attr_name: - raise ValueError(f'Import string "{target}" must be in format ":"') - - try: - module = importlib.import_module(module_name) - except ImportError: - raise ValueError(f'Could not import module "{module_name}".') - - try: - attribute = getattr(module, attr_name) - except AttributeError: - raise ValueError(f'Module "{module_name}" has no attribute "{attr_name}"') - - return attribute diff --git a/aiogram/utils/keyboard.py b/aiogram/utils/keyboard.py index 48e9e0da..2dba452c 100644 --- a/aiogram/utils/keyboard.py +++ b/aiogram/utils/keyboard.py @@ -1,58 +1,59 @@ from __future__ import annotations +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, - no_type_check, -) +from typing import TYPE_CHECKING, Any, Generic, TypeVar, cast -from aiogram.dispatcher.filters.callback_data import CallbackData +from aiogram.filters.callback_data import CallbackData from aiogram.types import ( CallbackGame, + CopyTextButton, InlineKeyboardButton, InlineKeyboardMarkup, KeyboardButton, KeyboardButtonPollType, + KeyboardButtonRequestChat, + KeyboardButtonRequestUsers, LoginUrl, ReplyKeyboardMarkup, + SwitchInlineQueryChosenChat, + WebAppInfo, ) +if TYPE_CHECKING: + from collections.abc import Generator, Iterable + ButtonType = TypeVar("ButtonType", InlineKeyboardButton, KeyboardButton) T = TypeVar("T") -MAX_WIDTH = 8 -MIN_WIDTH = 1 -MAX_BUTTONS = 100 -class KeyboardBuilder(Generic[ButtonType]): +class KeyboardBuilder(ABC, Generic[ButtonType]): """ Generic keyboard builder that helps to adjust your markup with defined shape of lines. Works both of InlineKeyboardMarkup and ReplyKeyboardMarkup. """ + max_width: int = 0 + min_width: int = 0 + 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]: @@ -72,9 +73,8 @@ class KeyboardBuilder(Generic[ButtonType]): """ 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: @@ -86,7 +86,7 @@ class KeyboardBuilder(Generic[ButtonType]): """ 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 @@ -95,15 +95,18 @@ class KeyboardBuilder(Generic[ButtonType]): :return: """ if not isinstance(row, list): - raise ValueError( - f"Row {row!r} should be type 'List[{self._button_type.__name__}]' not type {type(row).__name__}" + msg = ( + f"Row {row!r} should be type 'list[{self._button_type.__name__}]' " + f"not type {type(row).__name__}" ) - if len(row) > MAX_WIDTH: - raise ValueError(f"Row {row!r} is too long (MAX_WIDTH={MAX_WIDTH})") + raise ValueError(msg) + if len(row) > 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 @@ -113,14 +116,17 @@ class KeyboardBuilder(Generic[ButtonType]): """ count = 0 if not isinstance(markup, list): - raise ValueError( - f"Markup should be type 'List[List[{self._button_type.__name__}]]' not type {type(markup).__name__!r}" + 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 > MAX_BUTTONS: - raise ValueError(f"Too much buttons detected Max allowed count - {MAX_BUTTONS}") + if 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: @@ -131,20 +137,14 @@ class KeyboardBuilder(Generic[ButtonType]): :return: """ if not isinstance(size, int): - raise ValueError("Only int sizes are allowed") - if size not in range(MIN_WIDTH, MAX_WIDTH + 1): - raise ValueError(f"Row size {size} are not allowed") + msg = "Only int sizes are allowed" + raise ValueError(msg) + if size not in range(self.min_width, self.max_width + 1): + msg = f"Row size {size} is not allowed, range: [{self.min_width}, {self.max_width}]" + raise ValueError(msg) return size - def copy(self: "KeyboardBuilder[ButtonType]") -> "KeyboardBuilder[ButtonType]": - """ - Make full copy of current builder with markup - - :return: - """ - return self.__class__(self._button_type, markup=self.export()) - - def export(self) -> List[List[ButtonType]]: + def export(self) -> list[list[ButtonType]]: """ Export configured markup as list of lists of buttons @@ -158,7 +158,7 @@ class KeyboardBuilder(Generic[ButtonType]): """ 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. @@ -169,21 +169,24 @@ class KeyboardBuilder(Generic[ButtonType]): markup = self.export() # Try to add new buttons to the end of last row if it possible - if markup and len(markup[-1]) < MAX_WIDTH: + if markup and len(markup[-1]) < self.max_width: last_row = markup[-1] - pos = MAX_WIDTH - len(last_row) + pos = self.max_width - len(last_row) head, buttons = buttons[:pos], buttons[pos:] last_row.extend(head) # Separate buttons to exclusive rows with max possible row width - while buttons: - row, buttons = buttons[:MAX_WIDTH], buttons[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: int = MAX_WIDTH) -> "KeyboardBuilder[ButtonType]": + def row(self, *buttons: ButtonType, width: int | None = None) -> KeyboardBuilder[ButtonType]: """ Add row to markup @@ -193,6 +196,9 @@ class KeyboardBuilder(Generic[ButtonType]): :param width: :return: """ + if width is None: + width = self.max_width + self._validate_size(width) self._validate_buttons(*buttons) self._markup.extend( @@ -200,27 +206,28 @@ class KeyboardBuilder(Generic[ButtonType]): ) 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. - By default when the sum of passed sizes is lower than buttons count the last + By default, when the sum of passed sizes is lower than buttons count the last one size will be used for tail of the markup. - If repeat=True is passed - all sizes will be cycled when available more buttons count than all sizes + If repeat=True is passed - all sizes will be cycled when available more buttons + count than all sizes :param sizes: :param repeat: :return: """ if not sizes: - sizes = (MAX_WIDTH,) + sizes = (self.max_width,) validated_sizes = map(self._validate_size, sizes) sizes_iter = repeat_all(validated_sizes) if repeat else repeat_last(validated_sizes) size = next(sizes_iter) markup = [] - row: List[ButtonType] = [] + row: list[ButtonType] = [] for button in self.buttons: if len(row) >= size: markup.append(row) @@ -232,16 +239,37 @@ class KeyboardBuilder(Generic[ButtonType]): self._markup = markup return self - def button(self, **kwargs: Any) -> "KeyboardBuilder[ButtonType]": - if isinstance(callback_data := kwargs.get("callback_data", None), CallbackData): + def _button(self, **kwargs: Any) -> KeyboardBuilder[ButtonType]: + """ + Add button to markup + + :param kwargs: + :return: + """ + 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: - return ReplyKeyboardMarkup(keyboard=self.export(), **kwargs) - return InlineKeyboardMarkup(inline_keyboard=self.export()) + keyboard = cast(list[list[KeyboardButton]], self.export()) # type: ignore + return ReplyKeyboardMarkup(keyboard=keyboard, **kwargs) + inline_keyboard = cast(list[list[InlineKeyboardButton]], self.export()) # type: ignore + return InlineKeyboardMarkup(inline_keyboard=inline_keyboard) + + def attach(self, builder: KeyboardBuilder[ButtonType]) -> KeyboardBuilder[ButtonType]: + if not isinstance(builder, KeyboardBuilder): + msg = f"Only KeyboardBuilder can be attached, not {type(builder).__name__}" + raise ValueError(msg) + if builder._button_type is not self._button_type: + 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 def repeat_last(items: Iterable[T]) -> Generator[T, None, None]: @@ -267,31 +295,56 @@ class InlineKeyboardBuilder(KeyboardBuilder[InlineKeyboardButton]): Inline keyboard builder inherits all methods from generic builder """ - if TYPE_CHECKING: + max_width: int = 8 + min_width: int = 1 + max_buttons: int = 100 - @no_type_check - def button( - self, - text: str, - url: Optional[str] = None, - login_url: Optional[LoginUrl] = None, - callback_data: Optional[Union[str, CallbackData]] = None, - switch_inline_query: Optional[str] = None, - switch_inline_query_current_chat: Optional[str] = None, - callback_game: Optional[CallbackGame] = None, - pay: Optional[bool] = None, - **kwargs: Any, - ) -> "KeyboardBuilder[InlineKeyboardButton]": - ... + def button( + self, + *, + text: str, + 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: + 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, + login_url=login_url, + 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, + ), + ) - def as_markup(self, **kwargs: Any) -> InlineKeyboardMarkup: - """Construct an InlineKeyboardMarkup""" - ... + def as_markup(self, **kwargs: Any) -> InlineKeyboardMarkup: + """Construct an InlineKeyboardMarkup""" + return cast(InlineKeyboardMarkup, super().as_markup(**kwargs)) - 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 @@ -299,35 +352,80 @@ class InlineKeyboardBuilder(KeyboardBuilder[InlineKeyboardButton]): """ return InlineKeyboardBuilder(markup=self.export()) + @classmethod + def from_markup( + cls: type[InlineKeyboardBuilder], + markup: InlineKeyboardMarkup, + ) -> InlineKeyboardBuilder: + """ + Create builder from existing markup + + :param markup: + :return: + """ + return cls(markup=markup.inline_keyboard) + class ReplyKeyboardBuilder(KeyboardBuilder[KeyboardButton]): """ Reply keyboard builder inherits all methods from generic builder """ - if TYPE_CHECKING: + max_width: int = 10 + min_width: int = 1 + max_buttons: int = 300 - @no_type_check - def button( - self, - text: str, - request_contact: Optional[bool] = None, - request_location: Optional[bool] = None, - request_poll: Optional[KeyboardButtonPollType] = None, - **kwargs: Any, - ) -> "KeyboardBuilder[KeyboardButton]": - ... + def button( + self, + *, + text: str, + 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: + 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, + request_location=request_location, + request_poll=request_poll, + web_app=web_app, + **kwargs, + ), + ) - def as_markup(self, **kwargs: Any) -> ReplyKeyboardMarkup: - ... + def as_markup(self, **kwargs: Any) -> ReplyKeyboardMarkup: + """Construct a ReplyKeyboardMarkup""" + return cast(ReplyKeyboardMarkup, super().as_markup(**kwargs)) - 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 :return: """ return ReplyKeyboardBuilder(markup=self.export()) + + @classmethod + def from_markup(cls, markup: ReplyKeyboardMarkup) -> ReplyKeyboardBuilder: + """ + Create builder from existing markup + + :param markup: + :return: + """ + return cls(markup=markup.keyboard) diff --git a/aiogram/utils/link.py b/aiogram/utils/link.py index 87d402e2..e1575303 100644 --- a/aiogram/utils/link.py +++ b/aiogram/utils/link.py @@ -1,18 +1,74 @@ from typing import Any from urllib.parse import urlencode, urljoin +BASE_DOCS_URL = "https://docs.aiogram.dev/" +BRANCH = "dev-3.x" + +BASE_PAGE_URL = f"{BASE_DOCS_URL}/en/{BRANCH}/" + + +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) + if fragment_: + url += "#" + fragment_ + return url + + +def docs_url(*path: str, fragment_: str | None = None, **query: Any) -> str: + return _format_url(BASE_PAGE_URL, *path, fragment_=fragment_, **query) + def create_tg_link(link: str, **kwargs: Any) -> str: - url = f"tg://{link}" - if kwargs: - query = urlencode(kwargs) - url += f"?{query}" - return url + return _format_url(f"tg://{link}", **kwargs) -def create_telegram_link(uri: str, **kwargs: Any) -> str: - url = urljoin("https://t.me", uri) - if kwargs: - query = urlencode(query=kwargs) - url += f"?{query}" - return url +def create_telegram_link(*path: str, **kwargs: Any) -> str: + return _format_url("https://t.me", *path, **kwargs) + + +def create_channel_bot_link( + username: str, + parameter: str | None = None, + change_info: bool = False, + post_messages: bool = False, + edit_messages: bool = False, + delete_messages: bool = False, + restrict_members: bool = False, + invite_users: bool = False, + pin_messages: bool = False, + promote_members: bool = False, + manage_video_chats: bool = False, + anonymous: bool = False, + manage_chat: bool = False, +) -> str: + params = {} + if parameter is not None: + params["startgroup"] = parameter + permissions = [] + if change_info: + permissions.append("change_info") + if post_messages: + permissions.append("post_messages") + if edit_messages: + permissions.append("edit_messages") + if delete_messages: + permissions.append("delete_messages") + if restrict_members: + permissions.append("restrict_members") + if invite_users: + permissions.append("invite_users") + if pin_messages: + permissions.append("pin_messages") + if promote_members: + permissions.append("promote_members") + if manage_video_chats: + permissions.append("manage_video_chats") + if anonymous: + permissions.append("anonymous") + if manage_chat: + permissions.append("manage_chat") + if permissions: + params["admin"] = "+".join(permissions) + return create_telegram_link(username, **params) diff --git a/aiogram/utils/magic_filter.py b/aiogram/utils/magic_filter.py index a00d0010..563492e7 100644 --- a/aiogram/utils/magic_filter.py +++ b/aiogram/utils/magic_filter.py @@ -1,3 +1,4 @@ +from collections.abc import Iterable from typing import Any from magic_filter import MagicFilter as _MagicFilter @@ -12,8 +13,9 @@ class AsFilterResultOperation(BaseOperation): self.name = name def resolve(self, value: Any, initial_value: Any) -> Any: - if value: - return {self.name: value} + if value is None or (isinstance(value, Iterable) and not value): + return None + return {self.name: value} class MagicFilter(_MagicFilter): diff --git a/aiogram/utils/markdown.py b/aiogram/utils/markdown.py index 68437fa9..290cfddb 100644 --- a/aiogram/utils/markdown.py +++ b/aiogram/utils/markdown.py @@ -26,7 +26,7 @@ def bold(*content: Any, sep: str = " ") -> str: :param sep: :return: """ - return markdown_decoration.bold(value=html_decoration.quote(_join(*content, sep=sep))) + return markdown_decoration.bold(value=markdown_decoration.quote(_join(*content, sep=sep))) def hbold(*content: Any, sep: str = " ") -> str: @@ -48,7 +48,7 @@ def italic(*content: Any, sep: str = " ") -> str: :param sep: :return: """ - return markdown_decoration.italic(value=html_decoration.quote(_join(*content, sep=sep))) + return markdown_decoration.italic(value=markdown_decoration.quote(_join(*content, sep=sep))) def hitalic(*content: Any, sep: str = " ") -> str: @@ -70,7 +70,7 @@ def code(*content: Any, sep: str = " ") -> str: :param sep: :return: """ - return markdown_decoration.code(value=html_decoration.quote(_join(*content, sep=sep))) + return markdown_decoration.code(value=markdown_decoration.quote(_join(*content, sep=sep))) def hcode(*content: Any, sep: str = " ") -> str: @@ -92,7 +92,7 @@ def pre(*content: Any, sep: str = "\n") -> str: :param sep: :return: """ - return markdown_decoration.pre(value=html_decoration.quote(_join(*content, sep=sep))) + return markdown_decoration.pre(value=markdown_decoration.quote(_join(*content, sep=sep))) def hpre(*content: Any, sep: str = "\n") -> str: @@ -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)), ) @@ -160,7 +160,7 @@ def link(title: str, url: str) -> str: :param url: :return: """ - return markdown_decoration.link(value=html_decoration.quote(title), link=url) + return markdown_decoration.link(value=markdown_decoration.quote(title), link=url) def hlink(title: str, url: str) -> str: @@ -174,6 +174,30 @@ def hlink(title: str, url: str) -> str: return html_decoration.link(value=html_decoration.quote(title), link=url) +def blockquote(*content: Any, sep: str = "\n") -> str: + """ + Make blockquote (Markdown) + + :param content: + :param sep: + :return: + """ + return markdown_decoration.blockquote( + value=markdown_decoration.quote(_join(*content, sep=sep)), + ) + + +def hblockquote(*content: Any, sep: str = "\n") -> str: + """ + Make blockquote (HTML) + + :param content: + :param sep: + :return: + """ + return html_decoration.blockquote(value=html_decoration.quote(_join(*content, sep=sep))) + + def hide_link(url: str) -> str: """ Hide URL (HTML only) diff --git a/aiogram/utils/media_group.py b/aiogram/utils/media_group.py new file mode 100644 index 00000000..8a7eb53a --- /dev/null +++ b/aiogram/utils/media_group.py @@ -0,0 +1,366 @@ +from typing import Any, Literal, overload + +from aiogram.enums import InputMediaType +from aiogram.types import ( + UNSET_PARSE_MODE, + InputFile, + InputMedia, + InputMediaAudio, + InputMediaDocument, + InputMediaPhoto, + InputMediaVideo, + MessageEntity, +) + +MediaType = InputMediaAudio | InputMediaPhoto | InputMediaVideo | InputMediaDocument + +MAX_MEDIA_GROUP_SIZE = 10 + + +class MediaGroupBuilder: + # Animated media is not supported yet in Bot API to send as a media group + + def __init__( + self, + media: list[MediaType] | None = None, + caption: str | None = None, + caption_entities: list[MessageEntity] | None = None, + ) -> None: + """ + Helper class for building media groups. + + :param media: A list of media elements to add to the media group. (optional) + :param caption: Caption for the media group. (optional) + :param caption_entities: List of special entities in the caption, + like usernames, URLs, etc. (optional) + """ + self._media: list[MediaType] = [] + self.caption = caption + self.caption_entities = caption_entities + + self._extend(media or []) + + def _add(self, media: MediaType) -> None: + if not isinstance(media, InputMedia): + msg = "Media must be instance of InputMedia" + raise ValueError(msg) + + if len(self._media) >= MAX_MEDIA_GROUP_SIZE: + msg = "Media group can't contain more than 10 elements" + raise ValueError(msg) + + self._media.append(media) + + def _extend(self, media: list[MediaType]) -> None: + for m in media: + self._add(m) + + @overload + def add( + self, + *, + type: Literal[InputMediaType.AUDIO], + 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 + + @overload + def add( + self, + *, + type: Literal[InputMediaType.PHOTO], + 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 + + @overload + def add( + self, + *, + type: Literal[InputMediaType.VIDEO], + 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 + + @overload + def add( + self, + *, + type: Literal[InputMediaType.DOCUMENT], + 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 + + def add(self, **kwargs: Any) -> None: + """ + Add a media object to the media group. + + :param kwargs: Keyword arguments for the media object. + The available keyword arguments depend on the media type. + :return: None + """ + type_ = kwargs.pop("type", None) + if type_ == InputMediaType.AUDIO: + self.add_audio(**kwargs) + elif type_ == InputMediaType.PHOTO: + self.add_photo(**kwargs) + elif type_ == InputMediaType.VIDEO: + self.add_video(**kwargs) + elif type_ == InputMediaType.DOCUMENT: + self.add_document(**kwargs) + else: + msg = f"Unknown media type: {type_!r}" + raise ValueError(msg) + + def add_audio( + self, + 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: + """ + Add an audio file to the media group. + + :param media: 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 » ` + :param thumbnail: *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. + :param caption: *Optional*. Caption of the audio to be sent, 0-1024 characters + after entities parsing + :param parse_mode: *Optional*. Mode for parsing entities in the audio caption. + See `formatting options `_ + for more details. + :param caption_entities: *Optional*. List of special entities that appear in the caption, + which can be specified instead of *parse_mode* + :param duration: *Optional*. Duration of the audio in seconds + :param performer: *Optional*. Performer of the audio + :param title: *Optional*. Title of the audio + :return: None + """ + self._add( + InputMediaAudio( + media=media, + thumbnail=thumbnail, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + duration=duration, + performer=performer, + title=title, + **kwargs, + ), + ) + + def add_photo( + self, + 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: + """ + Add a photo to the media group. + + :param media: 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 » ` + :param caption: *Optional*. Caption of the photo to be sent, 0-1024 characters + after entities parsing + :param parse_mode: *Optional*. Mode for parsing entities in the photo caption. + See `formatting options `_ + for more details. + :param caption_entities: *Optional*. List of special entities that appear in the caption, + which can be specified instead of *parse_mode* + :param has_spoiler: *Optional*. Pass :code:`True` if the photo needs to be covered + with a spoiler animation + :return: None + """ + self._add( + InputMediaPhoto( + media=media, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + has_spoiler=has_spoiler, + **kwargs, + ), + ) + + def add_video( + self, + 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: + """ + Add a video to the media group. + + :param media: 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 » ` + :param thumbnail: *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 » ` + :param caption: *Optional*. Caption of the video to be sent, + 0-1024 characters after entities parsing + :param parse_mode: *Optional*. Mode for parsing entities in the video caption. + See `formatting options `_ + for more details. + :param caption_entities: *Optional*. List of special entities that appear in the caption, + which can be specified instead of *parse_mode* + :param width: *Optional*. Video width + :param height: *Optional*. Video height + :param duration: *Optional*. Video duration in seconds + :param supports_streaming: *Optional*. Pass :code:`True` if the uploaded video is + suitable for streaming + :param has_spoiler: *Optional*. Pass :code:`True` if the video needs to be covered + with a spoiler animation + :return: None + """ + self._add( + InputMediaVideo( + media=media, + thumbnail=thumbnail, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + width=width, + height=height, + duration=duration, + supports_streaming=supports_streaming, + has_spoiler=has_spoiler, + **kwargs, + ), + ) + + def add_document( + self, + 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: + """ + Add a document to the media group. + + :param media: 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 » ` + :param thumbnail: *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 » ` + :param caption: *Optional*. Caption of the document to be sent, + 0-1024 characters after entities parsing + :param parse_mode: *Optional*. Mode for parsing entities in the document caption. + See `formatting options `_ + for more details. + :param caption_entities: *Optional*. List of special entities that appear + in the caption, which can be specified instead of *parse_mode* + :param disable_content_type_detection: *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. + :return: None + + """ + self._add( + InputMediaDocument( + media=media, + thumbnail=thumbnail, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + disable_content_type_detection=disable_content_type_detection, + **kwargs, + ), + ) + + def build(self) -> list[MediaType]: + """ + Builds a list of media objects for a media group. + + Adds the caption to the first media object if it is present. + + :return: List of media objects. + """ + 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 + + return [ + ( + media.model_copy(update=update_first_media) + if index == 0 and self.caption is not None + else media + ) + for index, media in enumerate(self._media) + ] 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 new file mode 100644 index 00000000..057ee76f --- /dev/null +++ b/aiogram/utils/payload.py @@ -0,0 +1,114 @@ +""" +Payload preparing + +We have added some utils to make work with payload easier. + +Basic encode example: + + .. code-block:: python + + from aiogram.utils.payload import encode_payload + + encoded = encode_payload("foo") + + # result: "Zm9v" + +Basic decode it back example: + + .. code-block:: python + + from aiogram.utils.payload import decode_payload + + encoded = "Zm9v" + decoded = decode_payload(encoded) + # result: "foo" + +Encoding and decoding with your own methods: + + 1. Create your own cryptor + + .. code-block:: python + + from Cryptodome.Cipher import AES + from Cryptodome.Util.Padding import pad, unpad + + class Cryptor: + def __init__(self, key: str): + self.key = key.encode("utf-8") + self.mode = AES.MODE_ECB # never use ECB in strong systems obviously + self.size = 32 + + @property + def cipher(self): + return AES.new(self.key, self.mode) + + def encrypt(self, data: bytes) -> bytes: + return self.cipher.encrypt(pad(data, self.size)) + + def decrypt(self, data: bytes) -> bytes: + decrypted_data = self.cipher.decrypt(data) + return unpad(decrypted_data, self.size) + + 2. Pass cryptor callable methods to aiogram payload tools + + .. code-block:: python + + cryptor = Cryptor("abcdefghijklmnop") + encoded = encode_payload("foo", encoder=cryptor.encrypt) + decoded = decode_payload(encoded_payload, decoder=cryptor.decrypt) + + # result: decoded == "foo" + +""" + +from __future__ import annotations + +from base64 import urlsafe_b64decode, urlsafe_b64encode +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from collections.abc import Callable + + +def encode_payload( + payload: str, + encoder: Callable[[bytes], bytes] | None = None, +) -> str: + """Encode payload with encoder. + + Result also will be encoded with URL-safe base64url. + """ + if not isinstance(payload, str): + payload = str(payload) + + payload_bytes = payload.encode("utf-8") + if encoder is not None: + payload_bytes = encoder(payload_bytes) + + return _encode_b64(payload_bytes) + + +def decode_payload( + payload: str, + decoder: Callable[[bytes], bytes] | None = None, +) -> str: + """Decode URL-safe base64url payload with decoder.""" + original_payload = _decode_b64(payload) + + if decoder is None: + return original_payload.decode() + + return decoder(original_payload).decode() + + +def _encode_b64(payload: bytes) -> str: + """Encode with URL-safe base64url.""" + bytes_payload: bytes = urlsafe_b64encode(payload) + str_payload = bytes_payload.decode() + return str_payload.replace("=", "") + + +def _decode_b64(payload: str) -> bytes: + """Decode with URL-safe base64url.""" + payload += "=" * (4 - len(payload) % 4) + return urlsafe_b64decode(payload.encode()) diff --git a/aiogram/utils/serialization.py b/aiogram/utils/serialization.py new file mode 100644 index 00000000..cfa47f4d --- /dev/null +++ b/aiogram/utils/serialization.py @@ -0,0 +1,89 @@ +from dataclasses import dataclass +from typing import Any + +from pydantic import BaseModel + +from aiogram import Bot +from aiogram.client.default import DefaultBotProperties +from aiogram.methods import TelegramMethod +from aiogram.types import InputFile + + +def _get_fake_bot(default: DefaultBotProperties | None = None) -> Bot: + if default is None: + default = DefaultBotProperties() + return Bot(token="42:Fake", default=default) + + +@dataclass +class DeserializedTelegramObject: + """ + Represents a dumped Telegram object. + + :param data: The dumped data of the Telegram object. + :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] + """ + + data: Any + files: dict[str, InputFile] + + +def deserialize_telegram_object( + obj: Any, + default: DefaultBotProperties | None = None, + include_api_method_name: bool = True, +) -> DeserializedTelegramObject: + """ + Deserialize Telegram Object to JSON compatible Python object. + + :param obj: The object to be deserialized. + :param default: Default bot properties + should be passed only if you want to use custom defaults. + :param include_api_method_name: Whether to include the API method name in the result. + :return: The deserialized Telegram object. + """ + extends = {} + if include_api_method_name and isinstance(obj, TelegramMethod): + extends["method"] = obj.__api_method__ + + if isinstance(obj, BaseModel): + obj = obj.model_dump(mode="python", warnings=False) + + # Fake bot is needed to exclude global defaults from the object. + fake_bot = _get_fake_bot(default=default) + + files: dict[str, InputFile] = {} + prepared = fake_bot.session.prepare_value( + obj, + bot=fake_bot, + files=files, + _dumps_json=False, + ) + + if isinstance(prepared, dict): + prepared.update(extends) + return DeserializedTelegramObject(data=prepared, files=files) + + +def deserialize_telegram_object_to_python( + obj: Any, + default: DefaultBotProperties | None = None, + include_api_method_name: bool = True, +) -> Any: + """ + Deserialize telegram object to JSON compatible Python object excluding files. + + :param obj: The telegram object to be deserialized. + :param default: Default bot properties + should be passed only if you want to use custom defaults. + :param include_api_method_name: Whether to include the API method name in the result. + :return: The deserialized telegram object. + """ + return deserialize_telegram_object( + obj, + default=default, + include_api_method_name=include_api_method_name, + ).data diff --git a/aiogram/utils/text_decorations.py b/aiogram/utils/text_decorations.py index bd45fae8..c835c27b 100644 --- a/aiogram/utils/text_decorations.py +++ b/aiogram/utils/text_decorations.py @@ -3,17 +3,26 @@ 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", + "remove_surrogates", ) @@ -34,28 +43,55 @@ class TextDecoration(ABC): :param text: :return: """ - if entity.type in {"bot_command", "url", "mention", "phone_number"}: - # This entities should not be changed + if entity.type in { + MessageEntityType.BOT_COMMAND, + MessageEntityType.URL, + MessageEntityType.MENTION, + MessageEntityType.PHONE_NUMBER, + MessageEntityType.HASHTAG, + MessageEntityType.CASHTAG, + MessageEntityType.EMAIL, + }: + # These entities should not be changed return text - if entity.type in {"bold", "italic", "code", "underline", "strikethrough"}: + if entity.type in { + MessageEntityType.BOLD, + MessageEntityType.ITALIC, + MessageEntityType.CODE, + MessageEntityType.UNDERLINE, + MessageEntityType.STRIKETHROUGH, + MessageEntityType.SPOILER, + MessageEntityType.BLOCKQUOTE, + MessageEntityType.EXPANDABLE_BLOCKQUOTE, + }: return cast(str, getattr(self, entity.type)(value=text)) - if entity.type == "pre": + if entity.type == MessageEntityType.PRE: return ( self.pre_language(value=text, language=entity.language) if entity.language else self.pre(value=text) ) - if entity.type == "text_mention": + if entity.type == MessageEntityType.TEXT_MENTION: from aiogram.types import User user = cast(User, entity.user) return self.link(value=text, link=f"tg://user?id={user.id}") - if entity.type == "text_link": + if entity.type == MessageEntityType.TEXT_LINK: 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 @@ -63,20 +99,19 @@ class TextDecoration(ABC): :param entities: Array of MessageEntities :return: """ - result = "".join( + return "".join( self._unparse_entities( add_surrogates(text), sorted(entities, key=lambda item: item.offset) if entities else [], - ) + ), ) - return result 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 @@ -91,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, @@ -102,70 +137,157 @@ class TextDecoration(ABC): yield self.quote(remove_surrogates(text[offset:length])) @abstractmethod - def link(self, value: str, link: str) -> str: # pragma: no cover + def link(self, value: str, link: str) -> str: pass @abstractmethod - def bold(self, value: str) -> str: # pragma: no cover + def bold(self, value: str) -> str: pass @abstractmethod - def italic(self, value: str) -> str: # pragma: no cover + def italic(self, value: str) -> str: pass @abstractmethod - def code(self, value: str) -> str: # pragma: no cover + def code(self, value: str) -> str: pass @abstractmethod - def pre(self, value: str) -> str: # pragma: no cover + def pre(self, value: str) -> str: pass @abstractmethod - def pre_language(self, value: str, language: str) -> str: # pragma: no cover + def pre_language(self, value: str, language: str) -> str: pass @abstractmethod - def underline(self, value: str) -> str: # pragma: no cover + def underline(self, value: str) -> str: pass @abstractmethod - def strikethrough(self, value: str) -> str: # pragma: no cover + def strikethrough(self, value: str) -> str: pass @abstractmethod - def quote(self, value: str) -> str: # pragma: no cover + def spoiler(self, value: str) -> str: + pass + + @abstractmethod + def quote(self, value: str) -> str: + pass + + @abstractmethod + def custom_emoji(self, value: str, custom_emoji_id: str) -> str: + pass + + @abstractmethod + def blockquote(self, value: str) -> str: + pass + + @abstractmethod + 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"{value}" + return self._tag(self.BOLD_TAG, value) def italic(self, value: str) -> str: - return f"{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"{value}" + return self._tag(self.UNDERLINE_TAG, value) def strikethrough(self, value: str) -> str: - return f"{value}" + return self._tag(self.STRIKETHROUGH_TAG, value) + + def spoiler(self, value: str) -> str: + 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 self._tag(self.EMOJI_TAG, value, attrs={"emoji-id": custom_emoji_id}) + + def blockquote(self, value: str) -> str: + return self._tag(self.BLOCKQUOTE_TAG, value) + + def expandable_blockquote(self, value: str) -> str: + 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): MARKDOWN_QUOTE_PATTERN: Pattern[str] = re.compile(r"([_*\[\]()~`>#+\-=|{}.!\\])") @@ -194,9 +316,38 @@ class MarkdownDecoration(TextDecoration): def strikethrough(self, value: str) -> str: return f"~{value}~" + def spoiler(self, value: str) -> str: + return f"||{value}||" + def quote(self, value: str) -> str: return re.sub(pattern=self.MARKDOWN_QUOTE_PATTERN, repl=r"\\\1", string=value) + def custom_emoji(self, value: str, custom_emoji_id: str) -> str: + 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()) + + 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/warnings.py b/aiogram/utils/warnings.py index 96cdbe52..3099fc34 100644 --- a/aiogram/utils/warnings.py +++ b/aiogram/utils/warnings.py @@ -2,5 +2,5 @@ class AiogramWarning(Warning): pass -class CodeHasNoEffect(AiogramWarning): +class Recommendation(AiogramWarning): pass diff --git a/aiogram/utils/web_app.py b/aiogram/utils/web_app.py new file mode 100644 index 00000000..2e4b6cb8 --- /dev/null +++ b/aiogram/utils/web_app.py @@ -0,0 +1,187 @@ +import hashlib +import hmac +import json +from collections.abc import Callable +from datetime import datetime +from operator import itemgetter +from typing import Any +from urllib.parse import parse_qsl + +from aiogram.types import TelegramObject + + +class WebAppChat(TelegramObject): + """ + This object represents a chat. + + Source: https://core.telegram.org/bots/webapps#webappchat + """ + + id: int + """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 chat, can be either “group”, “supergroup” or “channel”""" + title: str + """Title of the chat""" + username: str | None = None + """Username of the chat""" + 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.""" + + +class WebAppUser(TelegramObject): + """ + This object contains the data of the Web App user. + + Source: https://core.telegram.org/bots/webapps#webappuser + """ + + id: int + """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.""" + 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: str | None = None + """Last name of the user or bot.""" + username: str | None = None + """Username of the user or bot.""" + language_code: str | None = None + """IETF language tag of the user's language. Returns in user field only.""" + is_premium: bool | None = None + """True, if this user is a Telegram Premium user.""" + added_to_attachment_menu: bool | None = None + """True, if this user added the bot to the attachment menu.""" + allows_write_to_pm: bool | None = None + """True, if this user allowed the bot to message them.""" + 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.""" + + +class WebAppInitData(TelegramObject): + """ + This object contains data that is transferred to the Web App when it is opened. + It is empty if the Web App was launched from a keyboard button. + + Source: https://core.telegram.org/bots/webapps#webappinitdata + """ + + query_id: str | None = None + """A unique identifier for the Web App session, required for sending messages + via the answerWebAppQuery method.""" + user: WebAppUser | None = None + """An object containing data about the current user.""" + 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: 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: 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: 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: 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: 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.""" + hash: str + """A hash of all passed parameters, which the bot server can use to check their validity.""" + + +def check_webapp_signature(token: str, init_data: str) -> bool: + """ + Check incoming WebApp init data signature + + Source: https://core.telegram.org/bots/webapps#validating-data-received-via-the-web-app + + :param token: bot Token + :param init_data: data from frontend to be validated + :return: + """ + try: + parsed_data = dict(parse_qsl(init_data, strict_parsing=True)) + except ValueError: # pragma: no cover + # Init data is not a valid query string + return False + if "hash" not in parsed_data: + # Hash is not present in init data + return False + hash_ = parsed_data.pop("hash") + + data_check_string = "\n".join( + f"{k}={v}" for k, v in sorted(parsed_data.items(), key=itemgetter(0)) + ) + 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, + ).hexdigest() + return hmac.compare_digest(calculated_hash, hash_) + + +def parse_webapp_init_data( + init_data: str, + *, + loads: Callable[..., Any] = json.loads, +) -> WebAppInitData: + """ + Parse WebApp init data and return it as WebAppInitData object + + This method doesn't make any security check, so you shall not trust to this data, + use :code:`safe_parse_webapp_init_data` instead. + + :param init_data: data from frontend to be parsed + :param loads: + :return: + """ + result = {} + for key, value in parse_qsl(init_data): + if (value.startswith("[") and value.endswith("]")) or ( + value.startswith("{") and value.endswith("}") + ): + value = loads(value) + result[key] = value + return WebAppInitData(**result) + + +def safe_parse_webapp_init_data( + token: str, + init_data: str, + *, + loads: Callable[..., Any] = json.loads, +) -> WebAppInitData: + """ + Validate raw WebApp init data and return it as WebAppInitData object + + Raise :obj:`ValueError` when data is invalid + + :param token: bot token + :param init_data: data from frontend to be parsed and validated + :param loads: + :return: + """ + if check_webapp_signature(token, init_data): + return parse_webapp_init_data(init_data, loads=loads) + 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/dispatcher/fsm/storage/__init__.py b/aiogram/webhook/__init__.py similarity index 100% rename from aiogram/dispatcher/fsm/storage/__init__.py rename to aiogram/webhook/__init__.py diff --git a/aiogram/dispatcher/webhook/aiohttp_server.py b/aiogram/webhook/aiohttp_server.py similarity index 56% rename from aiogram/dispatcher/webhook/aiohttp_server.py rename to aiogram/webhook/aiohttp_server.py index a8d084f8..4e390a4d 100644 --- a/aiogram/dispatcher/webhook/aiohttp_server.py +++ b/aiogram/webhook/aiohttp_server.py @@ -1,30 +1,37 @@ import asyncio +import secrets from abc import ABC, abstractmethod from asyncio import Transport -from typing import Any, Awaitable, Callable, Dict, Optional, Tuple, cast +from collections.abc import Awaitable, Callable +from typing import TYPE_CHECKING, Any, cast -from aiohttp import 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.dispatcher.webhook.security import IPFilter from aiogram.methods import TelegramMethod +from aiogram.methods.base import TelegramType +from aiogram.webhook.security import IPFilter + +if TYPE_CHECKING: + from aiogram.types import InputFile def setup_application(app: Application, dispatcher: Dispatcher, /, **kwargs: Any) -> None: """ - This function helps to configure startup-shutdown process + This function helps to configure a startup-shutdown process - :param app: - :param dispatcher: - :param kwargs: + :param app: aiohttp application + :param dispatcher: aiogram dispatcher + :param kwargs: additional data :return: """ workflow_data = { "app": app, "dispatcher": dispatcher, + **dispatcher.workflow_data, **kwargs, } @@ -38,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 @@ -69,7 +76,7 @@ def ip_filter_middleware( async def _ip_filter_middleware(request: web.Request, handler: Handler) -> Any: ip_address, accept = check_ip(ip_filter=ip_filter, request=request) if not accept: - loggers.webhook.warning(f"Blocking request from an unauthorized IP: {ip_address}") + loggers.webhook.warning("Blocking request from an unauthorized IP: %s", ip_address) raise web.HTTPUnauthorized() return await handler(request) @@ -77,21 +84,24 @@ def ip_filter_middleware( class BaseRequestHandler(ABC): - """ - Base handler that helps to handle incoming request from aiohttp - and propagate it to the Dispatcher - """ - def __init__( - self, dispatcher: Dispatcher, handle_in_background: bool = True, **data: Any + self, + dispatcher: Dispatcher, + handle_in_background: bool = False, + **data: Any, ) -> None: """ + Base handler that helps to handle incoming request from aiohttp + and propagate it to the Dispatcher + :param dispatcher: instance of :class:`aiogram.dispatcher.dispatcher.Dispatcher` - :param handle_in_background: immediately respond to the Telegram instead of waiting end of handler process + :param handle_in_background: immediately responds to the Telegram instead of + a waiting end of a handler process """ self.dispatcher = dispatcher self.handle_in_background = handle_in_background self.data = data + self._background_feed_update_tasks: set[asyncio.Task[Any]] = set() def register(self, app: Application, /, path: str, **kwargs: Any) -> None: """ @@ -104,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 @@ -121,33 +131,76 @@ class BaseRequestHandler(ABC): :param request: :return: Bot instance """ + + @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) async def _handle_request_background(self, bot: Bot, request: web.Request) -> web.Response: - asyncio.create_task( + 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: 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)}", + ) + + payload = writer.append(result.__api_method__) + payload.set_content_disposition("form-data", name="method") + + 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: + continue + payload = writer.append(value) + payload.set_content_disposition("form-data", name=key) + + for key, value in files.items(): + payload = writer.append(value.read(bot)) + payload.set_content_disposition( + "form-data", + name=key, + filename=value.filename or key, + ) + + return writer + async def _handle_request(self, bot: Bot, request: web.Request) -> web.Response: - result = 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, ) - if result: - return web.json_response(result, dumps=bot.session.json_dumps) - return web.json_response({}, dumps=bot.session.json_dumps) + return web.Response(body=self._build_response_writer(bot=bot, result=result)) async def handle(self, request: web.Request) -> web.Response: bot = await self.resolve_bot(request) + if not self.verify_secret(request.headers.get("X-Telegram-Bot-Api-Secret-Token", ""), bot): + return web.Response(body="Unauthorized", status=401) if self.handle_in_background: return await self._handle_request_background(bot=bot, request=request) return await self._handle_request(bot=bot, request=request) @@ -156,20 +209,30 @@ class BaseRequestHandler(ABC): class SimpleRequestHandler(BaseRequestHandler): - """ - Handler for single Bot instance - """ - def __init__( - self, dispatcher: Dispatcher, bot: Bot, handle_in_background: bool = True, **data: Any + self, + dispatcher: Dispatcher, + bot: Bot, + handle_in_background: bool = True, + secret_token: str | None = None, + **data: Any, ) -> None: """ + Handler for single Bot instance + :param dispatcher: instance of :class:`aiogram.dispatcher.dispatcher.Dispatcher` - :param handle_in_background: immediately respond to the Telegram instead of waiting end of handler process + :param handle_in_background: immediately responds to the Telegram instead of + a waiting end of handler process :param bot: instance of :class:`aiogram.client.bot.Bot` """ super().__init__(dispatcher=dispatcher, handle_in_background=handle_in_background, **data) self.bot = bot + self.secret_token = secret_token + + def verify_secret(self, telegram_secret_token: str, bot: Bot) -> bool: + if self.secret_token: + return secrets.compare_digest(telegram_secret_token, self.secret_token) + return True async def close(self) -> None: """ @@ -182,27 +245,35 @@ class SimpleRequestHandler(BaseRequestHandler): class TokenBasedRequestHandler(BaseRequestHandler): - """ - Handler that supports multiple bots, the context will be resolved from path variable 'bot_token' - """ - def __init__( 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: """ + Handler that supports multiple bots the context will be resolved + from path variable 'bot_token' + + .. note:: + + This handler is not recommended in due to token is available in URL + and can be logged by reverse proxy server or other middleware. + :param dispatcher: instance of :class:`aiogram.dispatcher.dispatcher.Dispatcher` - :param handle_in_background: immediately respond to the Telegram instead of waiting end of handler process + :param handle_in_background: immediately responds to the Telegram instead of + a waiting end of handler process :param bot_settings: kwargs that will be passed to new Bot instance """ super().__init__(dispatcher=dispatcher, handle_in_background=handle_in_background, **data) 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 async def close(self) -> None: for bot in self.bots.values(): @@ -217,12 +288,13 @@ 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: """ - Get bot token from path and create or get from cache Bot instance + Get bot token from a path and create or get from cache Bot instance :param request: :return: diff --git a/aiogram/dispatcher/webhook/security.py b/aiogram/webhook/security.py similarity index 59% rename from aiogram/dispatcher/webhook/security.py rename to aiogram/webhook/security.py index 91d38204..71248e9f 100644 --- a/aiogram/dispatcher/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/bot.rst b/docs/api/bot.rst index 3ee89dc2..f9e4e332 100644 --- a/docs/api/bot.rst +++ b/docs/api/bot.rst @@ -9,9 +9,14 @@ This class has aliases for all methods and named in :code:`lower_camel_case`. For example :code:`sendMessage` named :code:`send_message` and has the same specification with all class-based methods. +.. warning:: + + A full list of methods can be found in the appropriate section of the documentation + .. autoclass:: aiogram.client.bot.Bot - :members: + :members: __init__,token,id,context,me,download_file,download :show-inheritance: :member-order: bysource :special-members: __init__ :undoc-members: True + :noindex: diff --git a/docs/api/defaults.rst b/docs/api/defaults.rst new file mode 100644 index 00000000..69de1528 --- /dev/null +++ b/docs/api/defaults.rst @@ -0,0 +1,81 @@ +=============== +Global defaults +=============== + +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. + +There are some properties that can be set: + +.. autoclass:: aiogram.client.default.DefaultBotProperties + :members: + :member-order: bysource + :undoc-members: True + +.. note:: + + 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. + +.. danger:: + + If you upgrading from aiogram 3.0-3.6 to 3.7, + you should update your code to use `aiogram.client.default.DefaultBotProperties`. + +Example +======= + +Here is an example of setting default parse mode for all requests to Telegram Bot API: + +.. code-block:: python + + bot = Bot( + token=..., + default=DefaultBotProperties( + parse_mode=ParseMode.HTML, + ) + ) + +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. + +Instead of + +.. code-block:: python + + await bot.send_message(chat_id, text, parse_mode=ParseMode.HTML) + +you can use + +.. code-block:: python + + await bot.send_message(chat_id, text) + +and the message will be sent with HTML parse mode. + +In some cases you may want to override default properties for some requests. You can do it by passing +explicit values to the method: + +.. code-block:: python + + await bot.send_message(chat_id, text, parse_mode=ParseMode.MARKDOWN_V2) + +In this case the message will be sent with Markdown parse mode instead of default HTML. + +Another example of overriding default properties: + +.. code-block:: python + + await bot.send_message(chat_id, text, parse_mode=None) + +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`. + +.. code-block:: python + + await bot.send_message( + chat_id=chat_id, + text=text, + entities=[MessageEntity(type='bold', offset=0, length=4)], + parse_mode=None + ) diff --git a/docs/api/download_file.rst b/docs/api/download_file.rst index d60e8051..06450ba3 100644 --- a/docs/api/download_file.rst +++ b/docs/api/download_file.rst @@ -31,9 +31,7 @@ Download file by `file_path` to destination. If you want to automatically create destination (:obj:`io.BytesIO`) use default value of destination and handle result of this method. -.. autoclass:: aiogram.client.bot.Bot - :members: download_file - :exclude-members: __init__ +.. automethod:: aiogram.client.bot.Bot.download_file There are two options where you can download the file: to **disk** or to **binary I/O object**. @@ -81,9 +79,7 @@ Download file by `file_id` or `Downloadable` object to destination. If you want to automatically create destination (:obj:`io.BytesIO`) use default value of destination and handle result of this method. -.. autoclass:: aiogram.client.bot.Bot - :members: download - :exclude-members: __init__ +.. automethod:: aiogram.client.bot.Bot.download It differs from `download_file <#download-file>`__ **only** in that it accepts `file_id` or an `Downloadable` object (object that contains the `file_id` attribute) instead of `file_path`. diff --git a/docs/api/enums/bot_command_scope_type.rst b/docs/api/enums/bot_command_scope_type.rst new file mode 100644 index 00000000..06209bd4 --- /dev/null +++ b/docs/api/enums/bot_command_scope_type.rst @@ -0,0 +1,9 @@ +################### +BotCommandScopeType +################### + + +.. automodule:: aiogram.enums.bot_command_scope_type + :members: + :member-order: bysource + :undoc-members: True 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/chat_action.rst b/docs/api/enums/chat_action.rst new file mode 100644 index 00000000..75141b38 --- /dev/null +++ b/docs/api/enums/chat_action.rst @@ -0,0 +1,9 @@ +########## +ChatAction +########## + + +.. automodule:: aiogram.enums.chat_action + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/chat_boost_source_type.rst b/docs/api/enums/chat_boost_source_type.rst new file mode 100644 index 00000000..b32ab76e --- /dev/null +++ b/docs/api/enums/chat_boost_source_type.rst @@ -0,0 +1,9 @@ +################### +ChatBoostSourceType +################### + + +.. automodule:: aiogram.enums.chat_boost_source_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/types/voice_chat_started.rst b/docs/api/enums/chat_member_status.rst similarity index 60% rename from docs/api/types/voice_chat_started.rst rename to docs/api/enums/chat_member_status.rst index c1a1964b..38581606 100644 --- a/docs/api/types/voice_chat_started.rst +++ b/docs/api/enums/chat_member_status.rst @@ -1,9 +1,9 @@ ################ -VoiceChatStarted +ChatMemberStatus ################ -.. automodule:: aiogram.types.voice_chat_started +.. automodule:: aiogram.enums.chat_member_status :members: :member-order: bysource :undoc-members: True diff --git a/docs/api/enums/chat_type.rst b/docs/api/enums/chat_type.rst new file mode 100644 index 00000000..71f50f7b --- /dev/null +++ b/docs/api/enums/chat_type.rst @@ -0,0 +1,9 @@ +######## +ChatType +######## + + +.. automodule:: aiogram.enums.chat_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/content_type.rst b/docs/api/enums/content_type.rst new file mode 100644 index 00000000..148694ba --- /dev/null +++ b/docs/api/enums/content_type.rst @@ -0,0 +1,9 @@ +########### +ContentType +########### + + +.. automodule:: aiogram.enums.content_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/currency.rst b/docs/api/enums/currency.rst new file mode 100644 index 00000000..a180811b --- /dev/null +++ b/docs/api/enums/currency.rst @@ -0,0 +1,9 @@ +######## +Currency +######## + + +.. automodule:: aiogram.enums.currency + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/dice_emoji.rst b/docs/api/enums/dice_emoji.rst new file mode 100644 index 00000000..783c71bd --- /dev/null +++ b/docs/api/enums/dice_emoji.rst @@ -0,0 +1,9 @@ +######### +DiceEmoji +######### + + +.. automodule:: aiogram.enums.dice_emoji + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/encrypted_passport_element.rst b/docs/api/enums/encrypted_passport_element.rst new file mode 100644 index 00000000..9d79b162 --- /dev/null +++ b/docs/api/enums/encrypted_passport_element.rst @@ -0,0 +1,9 @@ +######################## +EncryptedPassportElement +######################## + + +.. automodule:: aiogram.enums.encrypted_passport_element + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/index.rst b/docs/api/enums/index.rst new file mode 100644 index 00000000..8082a207 --- /dev/null +++ b/docs/api/enums/index.rst @@ -0,0 +1,46 @@ +.. _enums: + +##### +Enums +##### + +Here is list of all available enums: + + +.. toctree:: + :maxdepth: 1 + + bot_command_scope_type + button_style + chat_action + chat_boost_source_type + chat_member_status + chat_type + content_type + currency + dice_emoji + encrypted_passport_element + 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 + poll_type + reaction_type_type + 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/inline_query_result_type.rst b/docs/api/enums/inline_query_result_type.rst new file mode 100644 index 00000000..51268f57 --- /dev/null +++ b/docs/api/enums/inline_query_result_type.rst @@ -0,0 +1,9 @@ +##################### +InlineQueryResultType +##################### + + +.. automodule:: aiogram.enums.inline_query_result_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/types/voice_chat_ended.rst b/docs/api/enums/input_media_type.rst similarity index 61% rename from docs/api/types/voice_chat_ended.rst rename to docs/api/enums/input_media_type.rst index cce70b7c..7cb3451b 100644 --- a/docs/api/types/voice_chat_ended.rst +++ b/docs/api/enums/input_media_type.rst @@ -1,9 +1,9 @@ ############## -VoiceChatEnded +InputMediaType ############## -.. automodule:: aiogram.types.voice_chat_ended +.. automodule:: aiogram.enums.input_media_type :members: :member-order: bysource :undoc-members: True diff --git a/docs/api/types/voice_chat_scheduled.rst b/docs/api/enums/input_paid_media_type.rst similarity index 60% rename from docs/api/types/voice_chat_scheduled.rst rename to docs/api/enums/input_paid_media_type.rst index e63936e2..a666773f 100644 --- a/docs/api/types/voice_chat_scheduled.rst +++ b/docs/api/enums/input_paid_media_type.rst @@ -1,9 +1,9 @@ ################## -VoiceChatScheduled +InputPaidMediaType ################## -.. automodule:: aiogram.types.voice_chat_scheduled +.. automodule:: aiogram.enums.input_paid_media_type :members: :member-order: bysource :undoc-members: True 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/keyboard_button_poll_type_type.rst b/docs/api/enums/keyboard_button_poll_type_type.rst new file mode 100644 index 00000000..028b2637 --- /dev/null +++ b/docs/api/enums/keyboard_button_poll_type_type.rst @@ -0,0 +1,9 @@ +########################## +KeyboardButtonPollTypeType +########################## + + +.. automodule:: aiogram.enums.keyboard_button_poll_type_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/mask_position_point.rst b/docs/api/enums/mask_position_point.rst new file mode 100644 index 00000000..ba8b4337 --- /dev/null +++ b/docs/api/enums/mask_position_point.rst @@ -0,0 +1,9 @@ +################# +MaskPositionPoint +################# + + +.. automodule:: aiogram.enums.mask_position_point + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/menu_button_type.rst b/docs/api/enums/menu_button_type.rst new file mode 100644 index 00000000..551e3d78 --- /dev/null +++ b/docs/api/enums/menu_button_type.rst @@ -0,0 +1,9 @@ +############## +MenuButtonType +############## + + +.. automodule:: aiogram.enums.menu_button_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/message_entity_type.rst b/docs/api/enums/message_entity_type.rst new file mode 100644 index 00000000..66e06564 --- /dev/null +++ b/docs/api/enums/message_entity_type.rst @@ -0,0 +1,9 @@ +################# +MessageEntityType +################# + + +.. automodule:: aiogram.enums.message_entity_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/message_origin_type.rst b/docs/api/enums/message_origin_type.rst new file mode 100644 index 00000000..e30b3e46 --- /dev/null +++ b/docs/api/enums/message_origin_type.rst @@ -0,0 +1,9 @@ +################# +MessageOriginType +################# + + +.. automodule:: aiogram.enums.message_origin_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/paid_media_type.rst b/docs/api/enums/paid_media_type.rst new file mode 100644 index 00000000..1ad89633 --- /dev/null +++ b/docs/api/enums/paid_media_type.rst @@ -0,0 +1,9 @@ +############# +PaidMediaType +############# + + +.. automodule:: aiogram.enums.paid_media_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/parse_mode.rst b/docs/api/enums/parse_mode.rst new file mode 100644 index 00000000..66abbd1c --- /dev/null +++ b/docs/api/enums/parse_mode.rst @@ -0,0 +1,9 @@ +######### +ParseMode +######### + + +.. automodule:: aiogram.enums.parse_mode + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/passport_element_error_type.rst b/docs/api/enums/passport_element_error_type.rst new file mode 100644 index 00000000..c79d9b11 --- /dev/null +++ b/docs/api/enums/passport_element_error_type.rst @@ -0,0 +1,9 @@ +######################## +PassportElementErrorType +######################## + + +.. automodule:: aiogram.enums.passport_element_error_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/poll_type.rst b/docs/api/enums/poll_type.rst new file mode 100644 index 00000000..977805cd --- /dev/null +++ b/docs/api/enums/poll_type.rst @@ -0,0 +1,9 @@ +######## +PollType +######## + + +.. automodule:: aiogram.enums.poll_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/reaction_type_type.rst b/docs/api/enums/reaction_type_type.rst new file mode 100644 index 00000000..9135db50 --- /dev/null +++ b/docs/api/enums/reaction_type_type.rst @@ -0,0 +1,9 @@ +################ +ReactionTypeType +################ + + +.. automodule:: aiogram.enums.reaction_type_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/revenue_withdrawal_state_type.rst b/docs/api/enums/revenue_withdrawal_state_type.rst new file mode 100644 index 00000000..be56bc5b --- /dev/null +++ b/docs/api/enums/revenue_withdrawal_state_type.rst @@ -0,0 +1,9 @@ +########################## +RevenueWithdrawalStateType +########################## + + +.. automodule:: aiogram.enums.revenue_withdrawal_state_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/sticker_format.rst b/docs/api/enums/sticker_format.rst new file mode 100644 index 00000000..278602a0 --- /dev/null +++ b/docs/api/enums/sticker_format.rst @@ -0,0 +1,9 @@ +############# +StickerFormat +############# + + +.. automodule:: aiogram.enums.sticker_format + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/sticker_type.rst b/docs/api/enums/sticker_type.rst new file mode 100644 index 00000000..549c1d27 --- /dev/null +++ b/docs/api/enums/sticker_type.rst @@ -0,0 +1,9 @@ +########### +StickerType +########### + + +.. automodule:: aiogram.enums.sticker_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/topic_icon_color.rst b/docs/api/enums/topic_icon_color.rst new file mode 100644 index 00000000..974a26cf --- /dev/null +++ b/docs/api/enums/topic_icon_color.rst @@ -0,0 +1,9 @@ +############## +TopicIconColor +############## + + +.. automodule:: aiogram.enums.topic_icon_color + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/transaction_partner_type.rst b/docs/api/enums/transaction_partner_type.rst new file mode 100644 index 00000000..247b5d15 --- /dev/null +++ b/docs/api/enums/transaction_partner_type.rst @@ -0,0 +1,9 @@ +###################### +TransactionPartnerType +###################### + + +.. automodule:: aiogram.enums.transaction_partner_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/enums/update_type.rst b/docs/api/enums/update_type.rst new file mode 100644 index 00000000..8c81bb58 --- /dev/null +++ b/docs/api/enums/update_type.rst @@ -0,0 +1,9 @@ +########## +UpdateType +########## + + +.. automodule:: aiogram.enums.update_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/index.rst b/docs/api/index.rst index e82565a8..89a35839 100644 --- a/docs/api/index.rst +++ b/docs/api/index.rst @@ -11,5 +11,7 @@ All methods and types is fully autogenerated from Telegram Bot API docs by parse session/index types/index methods/index + enums/index download_file upload_file + defaults diff --git a/docs/api/methods/add_sticker_to_set.rst b/docs/api/methods/add_sticker_to_set.rst index 68d1cbc6..8168a20e 100644 --- a/docs/api/methods/add_sticker_to_set.rst +++ b/docs/api/methods/add_sticker_to_set.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.add_sticker_to_set import AddStickerToSet` - alias: :code:`from aiogram.methods import AddStickerToSet` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await AddStickerToSet(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/answer_callback_query.rst b/docs/api/methods/answer_callback_query.rst index 1ffad5f5..42c016ec 100644 --- a/docs/api/methods/answer_callback_query.rst +++ b/docs/api/methods/answer_callback_query.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.answer_callback_query import AnswerCallbackQuery` - alias: :code:`from aiogram.methods import AnswerCallbackQuery` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await AnswerCallbackQuery(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return AnswerCallbackQuery(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.callback_query.CallbackQuery.answer` diff --git a/docs/api/methods/answer_inline_query.rst b/docs/api/methods/answer_inline_query.rst index a2231c5b..3d4b7948 100644 --- a/docs/api/methods/answer_inline_query.rst +++ b/docs/api/methods/answer_inline_query.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.answer_inline_query import AnswerInlineQuery` - alias: :code:`from aiogram.methods import AnswerInlineQuery` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await AnswerInlineQuery(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return AnswerInlineQuery(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.inline_query.InlineQuery.answer` diff --git a/docs/api/methods/answer_pre_checkout_query.rst b/docs/api/methods/answer_pre_checkout_query.rst index c332f6e6..46197e4a 100644 --- a/docs/api/methods/answer_pre_checkout_query.rst +++ b/docs/api/methods/answer_pre_checkout_query.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.answer_pre_checkout_query import AnswerPreCheckoutQuery` - alias: :code:`from aiogram.methods import AnswerPreCheckoutQuery` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await AnswerPreCheckoutQuery(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return AnswerPreCheckoutQuery(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.pre_checkout_query.PreCheckoutQuery.answer` diff --git a/docs/api/methods/answer_shipping_query.rst b/docs/api/methods/answer_shipping_query.rst index 2b3f5212..de381d0c 100644 --- a/docs/api/methods/answer_shipping_query.rst +++ b/docs/api/methods/answer_shipping_query.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.answer_shipping_query import AnswerShippingQuery` - alias: :code:`from aiogram.methods import AnswerShippingQuery` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await AnswerShippingQuery(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return AnswerShippingQuery(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.shipping_query.ShippingQuery.answer` diff --git a/docs/api/methods/answer_web_app_query.rst b/docs/api/methods/answer_web_app_query.rst new file mode 100644 index 00000000..3a38dab0 --- /dev/null +++ b/docs/api/methods/answer_web_app_query.rst @@ -0,0 +1,45 @@ +################# +answerWebAppQuery +################# + +Returns: :obj:`SentWebAppMessage` + +.. automodule:: aiogram.methods.answer_web_app_query + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: SentWebAppMessage = await bot.answer_web_app_query(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.answer_web_app_query import AnswerWebAppQuery` +- alias: :code:`from aiogram.methods import AnswerWebAppQuery` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: SentWebAppMessage = await bot(AnswerWebAppQuery(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return AnswerWebAppQuery(...) diff --git a/docs/api/methods/approve_chat_join_request.rst b/docs/api/methods/approve_chat_join_request.rst index 8ac4643a..d87335dc 100644 --- a/docs/api/methods/approve_chat_join_request.rst +++ b/docs/api/methods/approve_chat_join_request.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.approve_chat_join_request import ApproveChatJoinRequest` - alias: :code:`from aiogram.methods import ApproveChatJoinRequest` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await ApproveChatJoinRequest(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return ApproveChatJoinRequest(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat_join_request.ChatJoinRequest.approve` 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/ban_chat_member.rst b/docs/api/methods/ban_chat_member.rst index 0f8edf8b..1197408e 100644 --- a/docs/api/methods/ban_chat_member.rst +++ b/docs/api/methods/ban_chat_member.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.ban_chat_member import BanChatMember` - alias: :code:`from aiogram.methods import BanChatMember` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await BanChatMember(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return BanChatMember(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.ban` diff --git a/docs/api/methods/ban_chat_sender_chat.rst b/docs/api/methods/ban_chat_sender_chat.rst index 5c6182eb..8e237cab 100644 --- a/docs/api/methods/ban_chat_sender_chat.rst +++ b/docs/api/methods/ban_chat_sender_chat.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.ban_chat_sender_chat import BanChatSenderChat` - alias: :code:`from aiogram.methods import BanChatSenderChat` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await BanChatSenderChat(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return BanChatSenderChat(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.ban_sender_chat` diff --git a/docs/api/methods/close.rst b/docs/api/methods/close.rst index 2ae15875..a3f509cf 100644 --- a/docs/api/methods/close.rst +++ b/docs/api/methods/close.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.close import Close` - alias: :code:`from aiogram.methods import Close` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await Close(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/close_forum_topic.rst b/docs/api/methods/close_forum_topic.rst new file mode 100644 index 00000000..416fae77 --- /dev/null +++ b/docs/api/methods/close_forum_topic.rst @@ -0,0 +1,45 @@ +############### +closeForumTopic +############### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.close_forum_topic + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.close_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.close_forum_topic import CloseForumTopic` +- alias: :code:`from aiogram.methods import CloseForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(CloseForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return CloseForumTopic(...) diff --git a/docs/api/methods/close_general_forum_topic.rst b/docs/api/methods/close_general_forum_topic.rst new file mode 100644 index 00000000..b316c264 --- /dev/null +++ b/docs/api/methods/close_general_forum_topic.rst @@ -0,0 +1,45 @@ +###################### +closeGeneralForumTopic +###################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.close_general_forum_topic + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.close_general_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.close_general_forum_topic import CloseGeneralForumTopic` +- alias: :code:`from aiogram.methods import CloseGeneralForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(CloseGeneralForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return CloseGeneralForumTopic(...) 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_message.rst b/docs/api/methods/copy_message.rst index a4f5c9b9..ae1e5dd1 100644 --- a/docs/api/methods/copy_message.rst +++ b/docs/api/methods/copy_message.rst @@ -8,6 +8,7 @@ Returns: :obj:`MessageId` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.copy_message import CopyMessage` - alias: :code:`from aiogram.methods import CopyMessage` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: MessageId = await CopyMessage(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return CopyMessage(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.copy_to` diff --git a/docs/api/methods/copy_messages.rst b/docs/api/methods/copy_messages.rst new file mode 100644 index 00000000..99bc2b47 --- /dev/null +++ b/docs/api/methods/copy_messages.rst @@ -0,0 +1,45 @@ +############ +copyMessages +############ + +Returns: :obj:`list[MessageId]` + +.. automodule:: aiogram.methods.copy_messages + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: list[MessageId] = await bot.copy_messages(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.copy_messages import CopyMessages` +- alias: :code:`from aiogram.methods import CopyMessages` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: list[MessageId] = await bot(CopyMessages(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return CopyMessages(...) diff --git a/docs/api/methods/create_chat_invite_link.rst b/docs/api/methods/create_chat_invite_link.rst index 787eded8..67b2e5c8 100644 --- a/docs/api/methods/create_chat_invite_link.rst +++ b/docs/api/methods/create_chat_invite_link.rst @@ -8,6 +8,7 @@ Returns: :obj:`ChatInviteLink` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.create_chat_invite_link import CreateChatInviteLink` - alias: :code:`from aiogram.methods import CreateChatInviteLink` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: ChatInviteLink = await CreateChatInviteLink(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return CreateChatInviteLink(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.create_invite_link` 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/create_forum_topic.rst b/docs/api/methods/create_forum_topic.rst new file mode 100644 index 00000000..4663049c --- /dev/null +++ b/docs/api/methods/create_forum_topic.rst @@ -0,0 +1,45 @@ +################ +createForumTopic +################ + +Returns: :obj:`ForumTopic` + +.. automodule:: aiogram.methods.create_forum_topic + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: ForumTopic = await bot.create_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.create_forum_topic import CreateForumTopic` +- alias: :code:`from aiogram.methods import CreateForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: ForumTopic = await bot(CreateForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return CreateForumTopic(...) diff --git a/docs/api/methods/create_invoice_link.rst b/docs/api/methods/create_invoice_link.rst new file mode 100644 index 00000000..ace5b729 --- /dev/null +++ b/docs/api/methods/create_invoice_link.rst @@ -0,0 +1,45 @@ +################# +createInvoiceLink +################# + +Returns: :obj:`str` + +.. automodule:: aiogram.methods.create_invoice_link + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: str = await bot.create_invoice_link(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.create_invoice_link import CreateInvoiceLink` +- alias: :code:`from aiogram.methods import CreateInvoiceLink` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: str = await bot(CreateInvoiceLink(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return CreateInvoiceLink(...) diff --git a/docs/api/methods/create_new_sticker_set.rst b/docs/api/methods/create_new_sticker_set.rst index 475c1c01..e59e1b14 100644 --- a/docs/api/methods/create_new_sticker_set.rst +++ b/docs/api/methods/create_new_sticker_set.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.create_new_sticker_set import CreateNewStickerSet` - alias: :code:`from aiogram.methods import CreateNewStickerSet` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await CreateNewStickerSet(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/decline_chat_join_request.rst b/docs/api/methods/decline_chat_join_request.rst index f367ec36..5cee1a7e 100644 --- a/docs/api/methods/decline_chat_join_request.rst +++ b/docs/api/methods/decline_chat_join_request.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.decline_chat_join_request import DeclineChatJoinRequest` - alias: :code:`from aiogram.methods import DeclineChatJoinRequest` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await DeclineChatJoinRequest(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return DeclineChatJoinRequest(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat_join_request.ChatJoinRequest.decline` 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_chat_photo.rst b/docs/api/methods/delete_chat_photo.rst index 637cef64..4757aa75 100644 --- a/docs/api/methods/delete_chat_photo.rst +++ b/docs/api/methods/delete_chat_photo.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.delete_chat_photo import DeleteChatPhoto` - alias: :code:`from aiogram.methods import DeleteChatPhoto` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await DeleteChatPhoto(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return DeleteChatPhoto(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.delete_photo` diff --git a/docs/api/methods/delete_chat_sticker_set.rst b/docs/api/methods/delete_chat_sticker_set.rst index a06cc894..6af3c840 100644 --- a/docs/api/methods/delete_chat_sticker_set.rst +++ b/docs/api/methods/delete_chat_sticker_set.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.delete_chat_sticker_set import DeleteChatStickerSet` - alias: :code:`from aiogram.methods import DeleteChatStickerSet` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await DeleteChatStickerSet(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return DeleteChatStickerSet(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.delete_sticker_set` diff --git a/docs/api/methods/delete_forum_topic.rst b/docs/api/methods/delete_forum_topic.rst new file mode 100644 index 00000000..3966c7d8 --- /dev/null +++ b/docs/api/methods/delete_forum_topic.rst @@ -0,0 +1,45 @@ +################ +deleteForumTopic +################ + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.delete_forum_topic + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.delete_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.delete_forum_topic import DeleteForumTopic` +- alias: :code:`from aiogram.methods import DeleteForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(DeleteForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return DeleteForumTopic(...) diff --git a/docs/api/methods/delete_message.rst b/docs/api/methods/delete_message.rst index 96b721e9..3ad298f0 100644 --- a/docs/api/methods/delete_message.rst +++ b/docs/api/methods/delete_message.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.delete_message import DeleteMessage` - alias: :code:`from aiogram.methods import DeleteMessage` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await DeleteMessage(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,10 @@ As reply into Webhook in handler .. code-block:: python return DeleteMessage(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.delete_message` +- :meth:`aiogram.types.message.Message.delete` diff --git a/docs/api/methods/delete_messages.rst b/docs/api/methods/delete_messages.rst new file mode 100644 index 00000000..e61cf392 --- /dev/null +++ b/docs/api/methods/delete_messages.rst @@ -0,0 +1,45 @@ +############## +deleteMessages +############## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.delete_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_messages(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.delete_messages import DeleteMessages` +- alias: :code:`from aiogram.methods import DeleteMessages` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(DeleteMessages(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return DeleteMessages(...) diff --git a/docs/api/methods/delete_my_commands.rst b/docs/api/methods/delete_my_commands.rst index 5077f68c..cc11d818 100644 --- a/docs/api/methods/delete_my_commands.rst +++ b/docs/api/methods/delete_my_commands.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.delete_my_commands import DeleteMyCommands` - alias: :code:`from aiogram.methods import DeleteMyCommands` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await DeleteMyCommands(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/delete_sticker_from_set.rst b/docs/api/methods/delete_sticker_from_set.rst index ac491710..7821ef0e 100644 --- a/docs/api/methods/delete_sticker_from_set.rst +++ b/docs/api/methods/delete_sticker_from_set.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.delete_sticker_from_set import DeleteStickerFromSet` - alias: :code:`from aiogram.methods import DeleteStickerFromSet` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await DeleteStickerFromSet(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return DeleteStickerFromSet(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.sticker.Sticker.delete_from_set` diff --git a/docs/api/methods/delete_sticker_set.rst b/docs/api/methods/delete_sticker_set.rst new file mode 100644 index 00000000..cc2dbdd2 --- /dev/null +++ b/docs/api/methods/delete_sticker_set.rst @@ -0,0 +1,45 @@ +################ +deleteStickerSet +################ + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.delete_sticker_set + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.delete_sticker_set(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.delete_sticker_set import DeleteStickerSet` +- alias: :code:`from aiogram.methods import DeleteStickerSet` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(DeleteStickerSet(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return DeleteStickerSet(...) 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/delete_webhook.rst b/docs/api/methods/delete_webhook.rst index b1f4d02c..1c3ad04d 100644 --- a/docs/api/methods/delete_webhook.rst +++ b/docs/api/methods/delete_webhook.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.delete_webhook import DeleteWebhook` - alias: :code:`from aiogram.methods import DeleteWebhook` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await DeleteWebhook(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/edit_chat_invite_link.rst b/docs/api/methods/edit_chat_invite_link.rst index a9702e84..709d26b8 100644 --- a/docs/api/methods/edit_chat_invite_link.rst +++ b/docs/api/methods/edit_chat_invite_link.rst @@ -8,6 +8,7 @@ Returns: :obj:`ChatInviteLink` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.edit_chat_invite_link import EditChatInviteLink` - alias: :code:`from aiogram.methods import EditChatInviteLink` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: ChatInviteLink = await EditChatInviteLink(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return EditChatInviteLink(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.edit_invite_link` 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_forum_topic.rst b/docs/api/methods/edit_forum_topic.rst new file mode 100644 index 00000000..a190d534 --- /dev/null +++ b/docs/api/methods/edit_forum_topic.rst @@ -0,0 +1,45 @@ +############## +editForumTopic +############## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.edit_forum_topic + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.edit_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.edit_forum_topic import EditForumTopic` +- alias: :code:`from aiogram.methods import EditForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(EditForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return EditForumTopic(...) diff --git a/docs/api/methods/edit_general_forum_topic.rst b/docs/api/methods/edit_general_forum_topic.rst new file mode 100644 index 00000000..a06021d5 --- /dev/null +++ b/docs/api/methods/edit_general_forum_topic.rst @@ -0,0 +1,45 @@ +##################### +editGeneralForumTopic +##################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.edit_general_forum_topic + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.edit_general_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.edit_general_forum_topic import EditGeneralForumTopic` +- alias: :code:`from aiogram.methods import EditGeneralForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(EditGeneralForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return EditGeneralForumTopic(...) diff --git a/docs/api/methods/edit_message_caption.rst b/docs/api/methods/edit_message_caption.rst index fb8a001a..85959fbc 100644 --- a/docs/api/methods/edit_message_caption.rst +++ b/docs/api/methods/edit_message_caption.rst @@ -2,12 +2,13 @@ editMessageCaption ################## -Returns: :obj:`Union[Message, bool]` +Returns: :obj:`Message | bool` .. automodule:: aiogram.methods.edit_message_caption :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -18,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 @@ -29,19 +30,12 @@ Imports: - :code:`from aiogram.methods.edit_message_caption import EditMessageCaption` - alias: :code:`from aiogram.methods import EditMessageCaption` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Union[Message, bool] = await EditMessageCaption(...) - 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return EditMessageCaption(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.edit_caption` 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 85022f03..eb384aa5 100644 --- a/docs/api/methods/edit_message_live_location.rst +++ b/docs/api/methods/edit_message_live_location.rst @@ -2,12 +2,13 @@ editMessageLiveLocation ####################### -Returns: :obj:`Union[Message, bool]` +Returns: :obj:`Message | bool` .. automodule:: aiogram.methods.edit_message_live_location :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -18,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 @@ -29,19 +30,12 @@ Imports: - :code:`from aiogram.methods.edit_message_live_location import EditMessageLiveLocation` - alias: :code:`from aiogram.methods import EditMessageLiveLocation` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Union[Message, bool] = await EditMessageLiveLocation(...) - 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return EditMessageLiveLocation(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.edit_live_location` diff --git a/docs/api/methods/edit_message_media.rst b/docs/api/methods/edit_message_media.rst index 5e77467f..1cd05a5f 100644 --- a/docs/api/methods/edit_message_media.rst +++ b/docs/api/methods/edit_message_media.rst @@ -2,12 +2,13 @@ editMessageMedia ################ -Returns: :obj:`Union[Message, bool]` +Returns: :obj:`Message | bool` .. automodule:: aiogram.methods.edit_message_media :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -18,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 @@ -29,19 +30,12 @@ Imports: - :code:`from aiogram.methods.edit_message_media import EditMessageMedia` - alias: :code:`from aiogram.methods import EditMessageMedia` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Union[Message, bool] = await EditMessageMedia(...) - 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return EditMessageMedia(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.edit_media` diff --git a/docs/api/methods/edit_message_reply_markup.rst b/docs/api/methods/edit_message_reply_markup.rst index 34916d42..309ef712 100644 --- a/docs/api/methods/edit_message_reply_markup.rst +++ b/docs/api/methods/edit_message_reply_markup.rst @@ -2,12 +2,13 @@ editMessageReplyMarkup ###################### -Returns: :obj:`Union[Message, bool]` +Returns: :obj:`Message | bool` .. automodule:: aiogram.methods.edit_message_reply_markup :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -18,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 @@ -29,19 +30,12 @@ Imports: - :code:`from aiogram.methods.edit_message_reply_markup import EditMessageReplyMarkup` - alias: :code:`from aiogram.methods import EditMessageReplyMarkup` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Union[Message, bool] = await EditMessageReplyMarkup(...) - 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -49,3 +43,10 @@ As reply into Webhook in handler .. code-block:: python return EditMessageReplyMarkup(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.edit_reply_markup` +- :meth:`aiogram.types.message.Message.delete_reply_markup` diff --git a/docs/api/methods/edit_message_text.rst b/docs/api/methods/edit_message_text.rst index 32645b94..cab3bb89 100644 --- a/docs/api/methods/edit_message_text.rst +++ b/docs/api/methods/edit_message_text.rst @@ -2,12 +2,13 @@ editMessageText ############### -Returns: :obj:`Union[Message, bool]` +Returns: :obj:`Message | bool` .. automodule:: aiogram.methods.edit_message_text :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -18,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 @@ -29,19 +30,12 @@ Imports: - :code:`from aiogram.methods.edit_message_text import EditMessageText` - alias: :code:`from aiogram.methods import EditMessageText` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Union[Message, bool] = await EditMessageText(...) - 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return EditMessageText(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.edit_text` 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/export_chat_invite_link.rst b/docs/api/methods/export_chat_invite_link.rst index ea8c6fcd..c8aa1b6b 100644 --- a/docs/api/methods/export_chat_invite_link.rst +++ b/docs/api/methods/export_chat_invite_link.rst @@ -8,6 +8,7 @@ Returns: :obj:`str` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.export_chat_invite_link import ExportChatInviteLink` - alias: :code:`from aiogram.methods import ExportChatInviteLink` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: str = await ExportChatInviteLink(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return ExportChatInviteLink(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.export_invite_link` diff --git a/docs/api/methods/forward_message.rst b/docs/api/methods/forward_message.rst index fcf8fd59..516442ad 100644 --- a/docs/api/methods/forward_message.rst +++ b/docs/api/methods/forward_message.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.forward_message import ForwardMessage` - alias: :code:`from aiogram.methods import ForwardMessage` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await ForwardMessage(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return ForwardMessage(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.forward` diff --git a/docs/api/methods/forward_messages.rst b/docs/api/methods/forward_messages.rst new file mode 100644 index 00000000..8907e6fa --- /dev/null +++ b/docs/api/methods/forward_messages.rst @@ -0,0 +1,45 @@ +############### +forwardMessages +############### + +Returns: :obj:`list[MessageId]` + +.. automodule:: aiogram.methods.forward_messages + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: list[MessageId] = await bot.forward_messages(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.forward_messages import ForwardMessages` +- alias: :code:`from aiogram.methods import ForwardMessages` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: list[MessageId] = await bot(ForwardMessages(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return ForwardMessages(...) 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_business_connection.rst b/docs/api/methods/get_business_connection.rst new file mode 100644 index 00000000..f6bc58e9 --- /dev/null +++ b/docs/api/methods/get_business_connection.rst @@ -0,0 +1,38 @@ +##################### +getBusinessConnection +##################### + +Returns: :obj:`BusinessConnection` + +.. automodule:: aiogram.methods.get_business_connection + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: BusinessConnection = await bot.get_business_connection(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_business_connection import GetBusinessConnection` +- alias: :code:`from aiogram.methods import GetBusinessConnection` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: BusinessConnection = await bot(GetBusinessConnection(...)) diff --git a/docs/api/methods/get_chat.rst b/docs/api/methods/get_chat.rst index 79124ed2..d5fbc489 100644 --- a/docs/api/methods/get_chat.rst +++ b/docs/api/methods/get_chat.rst @@ -2,12 +2,13 @@ getChat ####### -Returns: :obj:`Chat` +Returns: :obj:`ChatFullInfo` .. automodule:: aiogram.methods.get_chat :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -18,7 +19,7 @@ As bot method .. code-block:: - result: Chat = await bot.get_chat(...) + result: ChatFullInfo = await bot.get_chat(...) Method as object @@ -29,16 +30,9 @@ Imports: - :code:`from aiogram.methods.get_chat import GetChat` - alias: :code:`from aiogram.methods import GetChat` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Chat = await GetChat(...) - With specific bot ~~~~~~~~~~~~~~~~~ .. code-block:: python - result: Chat = await bot(GetChat(...)) + result: ChatFullInfo = await bot(GetChat(...)) diff --git a/docs/api/methods/get_chat_administrators.rst b/docs/api/methods/get_chat_administrators.rst index 558c948a..7936090e 100644 --- a/docs/api/methods/get_chat_administrators.rst +++ b/docs/api/methods/get_chat_administrators.rst @@ -2,12 +2,13 @@ getChatAdministrators ##################### -Returns: :obj:`List[Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]]` +Returns: :obj:`list[ResultChatMemberUnion]` .. automodule:: aiogram.methods.get_chat_administrators :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -18,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 @@ -29,16 +30,17 @@ Imports: - :code:`from aiogram.methods.get_chat_administrators import GetChatAdministrators` - alias: :code:`from aiogram.methods import GetChatAdministrators` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: List[Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]] = await GetChatAdministrators(...) - With specific bot ~~~~~~~~~~~~~~~~~ .. code-block:: python - result: List[Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]] = await bot(GetChatAdministrators(...)) + result: list[ResultChatMemberUnion] = await bot(GetChatAdministrators(...)) + + + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.get_administrators` 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 13b58321..653eb7f6 100644 --- a/docs/api/methods/get_chat_member.rst +++ b/docs/api/methods/get_chat_member.rst @@ -2,12 +2,13 @@ getChatMember ############# -Returns: :obj:`Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]` +Returns: :obj:`ResultChatMemberUnion` .. automodule:: aiogram.methods.get_chat_member :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -18,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 @@ -29,16 +30,17 @@ Imports: - :code:`from aiogram.methods.get_chat_member import GetChatMember` - alias: :code:`from aiogram.methods import GetChatMember` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned] = await GetChatMember(...) - With specific bot ~~~~~~~~~~~~~~~~~ .. code-block:: python - result: Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned] = await bot(GetChatMember(...)) + result: ResultChatMemberUnion = await bot(GetChatMember(...)) + + + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.get_member` diff --git a/docs/api/methods/get_chat_member_count.rst b/docs/api/methods/get_chat_member_count.rst index 2bee4cd9..73177a1a 100644 --- a/docs/api/methods/get_chat_member_count.rst +++ b/docs/api/methods/get_chat_member_count.rst @@ -8,6 +8,7 @@ Returns: :obj:`int` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,16 +30,17 @@ Imports: - :code:`from aiogram.methods.get_chat_member_count import GetChatMemberCount` - alias: :code:`from aiogram.methods import GetChatMemberCount` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: int = await GetChatMemberCount(...) - With specific bot ~~~~~~~~~~~~~~~~~ .. code-block:: python result: int = await bot(GetChatMemberCount(...)) + + + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.get_member_count` diff --git a/docs/api/methods/get_chat_members_count.rst b/docs/api/methods/get_chat_members_count.rst deleted file mode 100644 index 6286e845..00000000 --- a/docs/api/methods/get_chat_members_count.rst +++ /dev/null @@ -1,44 +0,0 @@ -################### -getChatMembersCount -################### - -Returns: :obj:`int` - -.. automodule:: aiogram.methods.get_chat_members_count - :members: - :member-order: bysource - :undoc-members: True - - -Usage -===== - -As bot method -------------- - -.. code-block:: - - result: int = await bot.get_chat_members_count(...) - - -Method as object ----------------- - -Imports: - -- :code:`from aiogram.methods.get_chat_members_count import GetChatMembersCount` -- alias: :code:`from aiogram.methods import GetChatMembersCount` - -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: int = await GetChatMembersCount(...) - -With specific bot -~~~~~~~~~~~~~~~~~ - -.. code-block:: python - - result: int = await bot(GetChatMembersCount(...)) diff --git a/docs/api/methods/get_chat_menu_button.rst b/docs/api/methods/get_chat_menu_button.rst new file mode 100644 index 00000000..16ae0bc4 --- /dev/null +++ b/docs/api/methods/get_chat_menu_button.rst @@ -0,0 +1,38 @@ +################# +getChatMenuButton +################# + +Returns: :obj:`ResultMenuButtonUnion` + +.. automodule:: aiogram.methods.get_chat_menu_button + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: ResultMenuButtonUnion = await bot.get_chat_menu_button(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_chat_menu_button import GetChatMenuButton` +- alias: :code:`from aiogram.methods import GetChatMenuButton` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + 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 new file mode 100644 index 00000000..26806e57 --- /dev/null +++ b/docs/api/methods/get_custom_emoji_stickers.rst @@ -0,0 +1,38 @@ +###################### +getCustomEmojiStickers +###################### + +Returns: :obj:`list[Sticker]` + +.. automodule:: aiogram.methods.get_custom_emoji_stickers + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: list[Sticker] = await bot.get_custom_emoji_stickers(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_custom_emoji_stickers import GetCustomEmojiStickers` +- alias: :code:`from aiogram.methods import GetCustomEmojiStickers` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: list[Sticker] = await bot(GetCustomEmojiStickers(...)) diff --git a/docs/api/methods/get_file.rst b/docs/api/methods/get_file.rst index ee96326b..5eda2ebf 100644 --- a/docs/api/methods/get_file.rst +++ b/docs/api/methods/get_file.rst @@ -8,6 +8,7 @@ Returns: :obj:`File` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.get_file import GetFile` - alias: :code:`from aiogram.methods import GetFile` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: File = await GetFile(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_forum_topic_icon_stickers.rst b/docs/api/methods/get_forum_topic_icon_stickers.rst new file mode 100644 index 00000000..8d3e3062 --- /dev/null +++ b/docs/api/methods/get_forum_topic_icon_stickers.rst @@ -0,0 +1,38 @@ +######################### +getForumTopicIconStickers +######################### + +Returns: :obj:`list[Sticker]` + +.. automodule:: aiogram.methods.get_forum_topic_icon_stickers + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: list[Sticker] = await bot.get_forum_topic_icon_stickers(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_forum_topic_icon_stickers import GetForumTopicIconStickers` +- alias: :code:`from aiogram.methods import GetForumTopicIconStickers` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + 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 4fb1f06e..9ca7fdc9 100644 --- a/docs/api/methods/get_game_high_scores.rst +++ b/docs/api/methods/get_game_high_scores.rst @@ -2,12 +2,13 @@ getGameHighScores ################# -Returns: :obj:`List[GameHighScore]` +Returns: :obj:`list[GameHighScore]` .. automodule:: aiogram.methods.get_game_high_scores :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -18,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 @@ -29,16 +30,9 @@ Imports: - :code:`from aiogram.methods.get_game_high_scores import GetGameHighScores` - alias: :code:`from aiogram.methods import GetGameHighScores` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: List[GameHighScore] = await GetGameHighScores(...) - 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_me.rst b/docs/api/methods/get_me.rst index 7ae9d580..96117b9e 100644 --- a/docs/api/methods/get_me.rst +++ b/docs/api/methods/get_me.rst @@ -8,6 +8,7 @@ Returns: :obj:`User` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.get_me import GetMe` - alias: :code:`from aiogram.methods import GetMe` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: User = await GetMe(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_my_commands.rst b/docs/api/methods/get_my_commands.rst index 9dba9fe6..1a4d7b80 100644 --- a/docs/api/methods/get_my_commands.rst +++ b/docs/api/methods/get_my_commands.rst @@ -2,12 +2,13 @@ getMyCommands ############# -Returns: :obj:`List[BotCommand]` +Returns: :obj:`list[BotCommand]` .. automodule:: aiogram.methods.get_my_commands :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -18,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 @@ -29,16 +30,9 @@ Imports: - :code:`from aiogram.methods.get_my_commands import GetMyCommands` - alias: :code:`from aiogram.methods import GetMyCommands` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: List[BotCommand] = await GetMyCommands(...) - 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_default_administrator_rights.rst b/docs/api/methods/get_my_default_administrator_rights.rst new file mode 100644 index 00000000..360f482a --- /dev/null +++ b/docs/api/methods/get_my_default_administrator_rights.rst @@ -0,0 +1,38 @@ +############################### +getMyDefaultAdministratorRights +############################### + +Returns: :obj:`ChatAdministratorRights` + +.. automodule:: aiogram.methods.get_my_default_administrator_rights + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: ChatAdministratorRights = await bot.get_my_default_administrator_rights(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_my_default_administrator_rights import GetMyDefaultAdministratorRights` +- alias: :code:`from aiogram.methods import GetMyDefaultAdministratorRights` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: ChatAdministratorRights = await bot(GetMyDefaultAdministratorRights(...)) diff --git a/docs/api/methods/get_my_description.rst b/docs/api/methods/get_my_description.rst new file mode 100644 index 00000000..d8846821 --- /dev/null +++ b/docs/api/methods/get_my_description.rst @@ -0,0 +1,38 @@ +################ +getMyDescription +################ + +Returns: :obj:`BotDescription` + +.. automodule:: aiogram.methods.get_my_description + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: BotDescription = await bot.get_my_description(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_my_description import GetMyDescription` +- alias: :code:`from aiogram.methods import GetMyDescription` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: BotDescription = await bot(GetMyDescription(...)) diff --git a/docs/api/methods/get_my_name.rst b/docs/api/methods/get_my_name.rst new file mode 100644 index 00000000..5bf9c10d --- /dev/null +++ b/docs/api/methods/get_my_name.rst @@ -0,0 +1,38 @@ +######### +getMyName +######### + +Returns: :obj:`BotName` + +.. automodule:: aiogram.methods.get_my_name + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: BotName = await bot.get_my_name(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_my_name import GetMyName` +- alias: :code:`from aiogram.methods import GetMyName` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: BotName = await bot(GetMyName(...)) diff --git a/docs/api/methods/get_my_short_description.rst b/docs/api/methods/get_my_short_description.rst new file mode 100644 index 00000000..3acac53a --- /dev/null +++ b/docs/api/methods/get_my_short_description.rst @@ -0,0 +1,38 @@ +##################### +getMyShortDescription +##################### + +Returns: :obj:`BotShortDescription` + +.. automodule:: aiogram.methods.get_my_short_description + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: BotShortDescription = await bot.get_my_short_description(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_my_short_description import GetMyShortDescription` +- alias: :code:`from aiogram.methods import GetMyShortDescription` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: BotShortDescription = await bot(GetMyShortDescription(...)) 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_star_transactions.rst b/docs/api/methods/get_star_transactions.rst new file mode 100644 index 00000000..0e77ca9b --- /dev/null +++ b/docs/api/methods/get_star_transactions.rst @@ -0,0 +1,38 @@ +################### +getStarTransactions +################### + +Returns: :obj:`StarTransactions` + +.. automodule:: aiogram.methods.get_star_transactions + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: StarTransactions = await bot.get_star_transactions(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_star_transactions import GetStarTransactions` +- alias: :code:`from aiogram.methods import GetStarTransactions` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: StarTransactions = await bot(GetStarTransactions(...)) diff --git a/docs/api/methods/get_sticker_set.rst b/docs/api/methods/get_sticker_set.rst index a1feb38c..e30f9110 100644 --- a/docs/api/methods/get_sticker_set.rst +++ b/docs/api/methods/get_sticker_set.rst @@ -8,6 +8,7 @@ Returns: :obj:`StickerSet` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.get_sticker_set import GetStickerSet` - alias: :code:`from aiogram.methods import GetStickerSet` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: StickerSet = await GetStickerSet(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_updates.rst b/docs/api/methods/get_updates.rst index 6ff33d31..005fd6de 100644 --- a/docs/api/methods/get_updates.rst +++ b/docs/api/methods/get_updates.rst @@ -2,12 +2,13 @@ getUpdates ########## -Returns: :obj:`List[Update]` +Returns: :obj:`list[Update]` .. automodule:: aiogram.methods.get_updates :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -18,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 @@ -29,16 +30,9 @@ Imports: - :code:`from aiogram.methods.get_updates import GetUpdates` - alias: :code:`from aiogram.methods import GetUpdates` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: List[Update] = await GetUpdates(...) - 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_chat_boosts.rst b/docs/api/methods/get_user_chat_boosts.rst new file mode 100644 index 00000000..ce2cd4ba --- /dev/null +++ b/docs/api/methods/get_user_chat_boosts.rst @@ -0,0 +1,38 @@ +################# +getUserChatBoosts +################# + +Returns: :obj:`UserChatBoosts` + +.. automodule:: aiogram.methods.get_user_chat_boosts + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: UserChatBoosts = await bot.get_user_chat_boosts(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_user_chat_boosts import GetUserChatBoosts` +- alias: :code:`from aiogram.methods import GetUserChatBoosts` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: UserChatBoosts = await bot(GetUserChatBoosts(...)) 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/get_user_profile_photos.rst b/docs/api/methods/get_user_profile_photos.rst index dab76989..7b165bae 100644 --- a/docs/api/methods/get_user_profile_photos.rst +++ b/docs/api/methods/get_user_profile_photos.rst @@ -8,6 +8,7 @@ Returns: :obj:`UserProfilePhotos` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,16 +30,17 @@ Imports: - :code:`from aiogram.methods.get_user_profile_photos import GetUserProfilePhotos` - alias: :code:`from aiogram.methods import GetUserProfilePhotos` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: UserProfilePhotos = await GetUserProfilePhotos(...) - With specific bot ~~~~~~~~~~~~~~~~~ .. code-block:: python result: UserProfilePhotos = await bot(GetUserProfilePhotos(...)) + + + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.user.User.get_profile_photos` diff --git a/docs/api/methods/get_webhook_info.rst b/docs/api/methods/get_webhook_info.rst index 519e1207..a2e2dc08 100644 --- a/docs/api/methods/get_webhook_info.rst +++ b/docs/api/methods/get_webhook_info.rst @@ -8,6 +8,7 @@ Returns: :obj:`WebhookInfo` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.get_webhook_info import GetWebhookInfo` - alias: :code:`from aiogram.methods import GetWebhookInfo` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: WebhookInfo = await GetWebhookInfo(...) - With specific bot ~~~~~~~~~~~~~~~~~ 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/hide_general_forum_topic.rst b/docs/api/methods/hide_general_forum_topic.rst new file mode 100644 index 00000000..619e5233 --- /dev/null +++ b/docs/api/methods/hide_general_forum_topic.rst @@ -0,0 +1,45 @@ +##################### +hideGeneralForumTopic +##################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.hide_general_forum_topic + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.hide_general_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.hide_general_forum_topic import HideGeneralForumTopic` +- alias: :code:`from aiogram.methods import HideGeneralForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(HideGeneralForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return HideGeneralForumTopic(...) diff --git a/docs/api/methods/index.rst b/docs/api/methods/index.rst index 1a4143d0..187f8bb6 100644 --- a/docs/api/methods/index.rst +++ b/docs/api/methods/index.rst @@ -5,18 +5,28 @@ Methods Here is list of all available API methods: - -Getting updates -=============== +Stickers +======== .. toctree:: :maxdepth: 1 - get_updates - set_webhook - delete_webhook - get_webhook_info - + add_sticker_to_set + create_new_sticker_set + delete_sticker_from_set + delete_sticker_set + get_custom_emoji_stickers + get_sticker_set + replace_sticker_in_set + send_sticker + set_custom_emoji_sticker_set_thumbnail + set_sticker_emoji_list + set_sticker_keywords + set_sticker_mask_position + set_sticker_position_in_set + set_sticker_set_thumbnail + set_sticker_set_title + upload_sticker_file Available methods ================= @@ -24,64 +34,130 @@ Available methods .. toctree:: :maxdepth: 1 - get_me - log_out - close - send_message - forward_message - copy_message - send_photo - send_audio - send_document - send_video - send_animation - send_voice - send_video_note - send_media_group - send_location - edit_message_live_location - stop_message_live_location - send_venue - send_contact - send_poll - send_dice - send_chat_action - get_user_profile_photos - get_file - ban_chat_member - kick_chat_member - unban_chat_member - restrict_chat_member - promote_chat_member - set_chat_administrator_custom_title - ban_chat_sender_chat - unban_chat_sender_chat - set_chat_permissions - export_chat_invite_link - create_chat_invite_link - edit_chat_invite_link - revoke_chat_invite_link + 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 - set_chat_photo + delete_business_messages delete_chat_photo - set_chat_title - set_chat_description - pin_chat_message - unpin_chat_message - unpin_all_chat_messages - leave_chat + 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_member_count - get_chat_members_count + get_chat_gifts get_chat_member - set_chat_sticker_set - delete_chat_sticker_set - answer_callback_query - set_my_commands - delete_my_commands + 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 + get_my_description + 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 + send_venue + 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 + set_chat_sticker_set + set_chat_title + set_message_reaction + set_my_commands + 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 + unpin_all_chat_messages + unpin_all_forum_topic_messages + unpin_all_general_forum_topic_messages + unpin_chat_message + upgrade_gift + verify_chat + verify_user Updating messages ================= @@ -89,35 +165,28 @@ Updating messages .. toctree:: :maxdepth: 1 - edit_message_text + 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 + edit_message_text + stop_message_live_location stop_poll - delete_message -Stickers -======== +Games +===== .. toctree:: :maxdepth: 1 - send_sticker - get_sticker_set - upload_sticker_file - create_new_sticker_set - add_sticker_to_set - set_sticker_position_in_set - delete_sticker_from_set - set_sticker_set_thumb - -Inline mode -=========== - -.. toctree:: - :maxdepth: 1 - - answer_inline_query + get_game_high_scores + send_game + set_game_score Payments ======== @@ -125,9 +194,25 @@ Payments .. toctree:: :maxdepth: 1 - send_invoice - answer_shipping_query 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 + +Getting updates +=============== + +.. toctree:: + :maxdepth: 1 + + delete_webhook + get_updates + get_webhook_info + set_webhook Telegram Passport ================= @@ -137,12 +222,10 @@ Telegram Passport set_passport_data_errors -Games -===== +Inline mode +=========== .. toctree:: :maxdepth: 1 - send_game - set_game_score - get_game_high_scores + answer_inline_query diff --git a/docs/api/methods/kick_chat_member.rst b/docs/api/methods/kick_chat_member.rst deleted file mode 100644 index da73a535..00000000 --- a/docs/api/methods/kick_chat_member.rst +++ /dev/null @@ -1,51 +0,0 @@ -############## -kickChatMember -############## - -Returns: :obj:`bool` - -.. automodule:: aiogram.methods.kick_chat_member - :members: - :member-order: bysource - :undoc-members: True - - -Usage -===== - -As bot method -------------- - -.. code-block:: - - result: bool = await bot.kick_chat_member(...) - - -Method as object ----------------- - -Imports: - -- :code:`from aiogram.methods.kick_chat_member import KickChatMember` -- alias: :code:`from aiogram.methods import KickChatMember` - -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await KickChatMember(...) - -With specific bot -~~~~~~~~~~~~~~~~~ - -.. code-block:: python - - result: bool = await bot(KickChatMember(...)) - -As reply into Webhook in handler -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. code-block:: python - - return KickChatMember(...) diff --git a/docs/api/methods/leave_chat.rst b/docs/api/methods/leave_chat.rst index a78dce7e..fd829a1a 100644 --- a/docs/api/methods/leave_chat.rst +++ b/docs/api/methods/leave_chat.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.leave_chat import LeaveChat` - alias: :code:`from aiogram.methods import LeaveChat` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await LeaveChat(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return LeaveChat(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.leave` diff --git a/docs/api/methods/log_out.rst b/docs/api/methods/log_out.rst index 0049c3f2..d1545da8 100644 --- a/docs/api/methods/log_out.rst +++ b/docs/api/methods/log_out.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.log_out import LogOut` - alias: :code:`from aiogram.methods import LogOut` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await LogOut(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/pin_chat_message.rst b/docs/api/methods/pin_chat_message.rst index 717f86a1..e6374d29 100644 --- a/docs/api/methods/pin_chat_message.rst +++ b/docs/api/methods/pin_chat_message.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.pin_chat_message import PinChatMessage` - alias: :code:`from aiogram.methods import PinChatMessage` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await PinChatMessage(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,10 @@ As reply into Webhook in handler .. code-block:: python return PinChatMessage(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.pin_message` +- :meth:`aiogram.types.message.Message.pin` 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/promote_chat_member.rst b/docs/api/methods/promote_chat_member.rst index 67bf3671..19bcd5be 100644 --- a/docs/api/methods/promote_chat_member.rst +++ b/docs/api/methods/promote_chat_member.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.promote_chat_member import PromoteChatMember` - alias: :code:`from aiogram.methods import PromoteChatMember` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await PromoteChatMember(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return PromoteChatMember(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.promote` 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/refund_star_payment.rst b/docs/api/methods/refund_star_payment.rst new file mode 100644 index 00000000..1248d500 --- /dev/null +++ b/docs/api/methods/refund_star_payment.rst @@ -0,0 +1,45 @@ +################# +refundStarPayment +################# + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.refund_star_payment + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.refund_star_payment(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.refund_star_payment import RefundStarPayment` +- alias: :code:`from aiogram.methods import RefundStarPayment` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(RefundStarPayment(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return RefundStarPayment(...) 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/reopen_forum_topic.rst b/docs/api/methods/reopen_forum_topic.rst new file mode 100644 index 00000000..9838d934 --- /dev/null +++ b/docs/api/methods/reopen_forum_topic.rst @@ -0,0 +1,45 @@ +################ +reopenForumTopic +################ + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.reopen_forum_topic + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.reopen_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.reopen_forum_topic import ReopenForumTopic` +- alias: :code:`from aiogram.methods import ReopenForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(ReopenForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return ReopenForumTopic(...) diff --git a/docs/api/methods/reopen_general_forum_topic.rst b/docs/api/methods/reopen_general_forum_topic.rst new file mode 100644 index 00000000..5d89f7cc --- /dev/null +++ b/docs/api/methods/reopen_general_forum_topic.rst @@ -0,0 +1,45 @@ +####################### +reopenGeneralForumTopic +####################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.reopen_general_forum_topic + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.reopen_general_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.reopen_general_forum_topic import ReopenGeneralForumTopic` +- alias: :code:`from aiogram.methods import ReopenGeneralForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(ReopenGeneralForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return ReopenGeneralForumTopic(...) 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/replace_sticker_in_set.rst b/docs/api/methods/replace_sticker_in_set.rst new file mode 100644 index 00000000..ae050abf --- /dev/null +++ b/docs/api/methods/replace_sticker_in_set.rst @@ -0,0 +1,45 @@ +################### +replaceStickerInSet +################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.replace_sticker_in_set + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.replace_sticker_in_set(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.replace_sticker_in_set import ReplaceStickerInSet` +- alias: :code:`from aiogram.methods import ReplaceStickerInSet` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(ReplaceStickerInSet(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return ReplaceStickerInSet(...) 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/restrict_chat_member.rst b/docs/api/methods/restrict_chat_member.rst index a93c4c92..da10bbd9 100644 --- a/docs/api/methods/restrict_chat_member.rst +++ b/docs/api/methods/restrict_chat_member.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.restrict_chat_member import RestrictChatMember` - alias: :code:`from aiogram.methods import RestrictChatMember` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await RestrictChatMember(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return RestrictChatMember(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.restrict` diff --git a/docs/api/methods/revoke_chat_invite_link.rst b/docs/api/methods/revoke_chat_invite_link.rst index 530133f8..5d88c4ce 100644 --- a/docs/api/methods/revoke_chat_invite_link.rst +++ b/docs/api/methods/revoke_chat_invite_link.rst @@ -8,6 +8,7 @@ Returns: :obj:`ChatInviteLink` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.revoke_chat_invite_link import RevokeChatInviteLink` - alias: :code:`from aiogram.methods import RevokeChatInviteLink` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: ChatInviteLink = await RevokeChatInviteLink(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return RevokeChatInviteLink(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.revoke_invite_link` 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 2e6284b5..5ca79893 100644 --- a/docs/api/methods/send_animation.rst +++ b/docs/api/methods/send_animation.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_animation import SendAnimation` - alias: :code:`from aiogram.methods import SendAnimation` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendAnimation(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendAnimation(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer_animation` +- :meth:`aiogram.types.message.Message.reply_animation` +- :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 ce023e84..0f6c16a6 100644 --- a/docs/api/methods/send_audio.rst +++ b/docs/api/methods/send_audio.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_audio import SendAudio` - alias: :code:`from aiogram.methods import SendAudio` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendAudio(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendAudio(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer_audio` +- :meth:`aiogram.types.message.Message.reply_audio` +- :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_chat_action.rst b/docs/api/methods/send_chat_action.rst index 97d3bd22..efff1e27 100644 --- a/docs/api/methods/send_chat_action.rst +++ b/docs/api/methods/send_chat_action.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_chat_action import SendChatAction` - alias: :code:`from aiogram.methods import SendChatAction` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SendChatAction(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return SendChatAction(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.do` 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 48cae668..7c30d2b8 100644 --- a/docs/api/methods/send_contact.rst +++ b/docs/api/methods/send_contact.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_contact import SendContact` - alias: :code:`from aiogram.methods import SendContact` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendContact(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendContact(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer_contact` +- :meth:`aiogram.types.message.Message.reply_contact` +- :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 2774fd6d..ad4e4d20 100644 --- a/docs/api/methods/send_dice.rst +++ b/docs/api/methods/send_dice.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_dice import SendDice` - alias: :code:`from aiogram.methods import SendDice` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendDice(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendDice(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer_dice` +- :meth:`aiogram.types.message.Message.reply_dice` +- :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 5134bcde..2d3c358d 100644 --- a/docs/api/methods/send_document.rst +++ b/docs/api/methods/send_document.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_document import SendDocument` - alias: :code:`from aiogram.methods import SendDocument` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendDocument(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendDocument(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer_document` +- :meth:`aiogram.types.message.Message.reply_document` +- :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 149e3131..da31edaa 100644 --- a/docs/api/methods/send_game.rst +++ b/docs/api/methods/send_game.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_game import SendGame` - alias: :code:`from aiogram.methods import SendGame` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendGame(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendGame(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer_game` +- :meth:`aiogram.types.message.Message.reply_game` +- :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 90132a46..00e2e745 100644 --- a/docs/api/methods/send_invoice.rst +++ b/docs/api/methods/send_invoice.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_invoice import SendInvoice` - alias: :code:`from aiogram.methods import SendInvoice` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendInvoice(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendInvoice(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer_invoice` +- :meth:`aiogram.types.message.Message.reply_invoice` +- :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 769d6724..8a73ac80 100644 --- a/docs/api/methods/send_location.rst +++ b/docs/api/methods/send_location.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_location import SendLocation` - alias: :code:`from aiogram.methods import SendLocation` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendLocation(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendLocation(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer_location` +- :meth:`aiogram.types.message.Message.reply_location` +- :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 c962e049..069d50be 100644 --- a/docs/api/methods/send_media_group.rst +++ b/docs/api/methods/send_media_group.rst @@ -2,12 +2,13 @@ sendMediaGroup ############## -Returns: :obj:`List[Message]` +Returns: :obj:`list[Message]` .. automodule:: aiogram.methods.send_media_group :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -18,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 @@ -29,19 +30,12 @@ Imports: - :code:`from aiogram.methods.send_media_group import SendMediaGroup` - alias: :code:`from aiogram.methods import SendMediaGroup` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: List[Message] = await SendMediaGroup(...) - With specific bot ~~~~~~~~~~~~~~~~~ .. code-block:: python - result: List[Message] = await bot(SendMediaGroup(...)) + result: list[Message] = await bot(SendMediaGroup(...)) As reply into Webhook in handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendMediaGroup(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer_media_group` +- :meth:`aiogram.types.message.Message.reply_media_group` +- :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 c054b382..7596c28d 100644 --- a/docs/api/methods/send_message.rst +++ b/docs/api/methods/send_message.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_message import SendMessage` - alias: :code:`from aiogram.methods import SendMessage` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendMessage(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendMessage(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer` +- :meth:`aiogram.types.message.Message.reply` +- :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 new file mode 100644 index 00000000..fe380a8f --- /dev/null +++ b/docs/api/methods/send_paid_media.rst @@ -0,0 +1,54 @@ +############# +sendPaidMedia +############# + +Returns: :obj:`Message` + +.. automodule:: aiogram.methods.send_paid_media + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: Message = await bot.send_paid_media(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.send_paid_media import SendPaidMedia` +- alias: :code:`from aiogram.methods import SendPaidMedia` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: Message = await bot(SendPaidMedia(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SendPaidMedia(...) + + +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 f6dfd0f5..1470274c 100644 --- a/docs/api/methods/send_photo.rst +++ b/docs/api/methods/send_photo.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_photo import SendPhoto` - alias: :code:`from aiogram.methods import SendPhoto` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendPhoto(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendPhoto(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer_photo` +- :meth:`aiogram.types.message.Message.reply_photo` +- :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 7261399b..b37cd9e8 100644 --- a/docs/api/methods/send_poll.rst +++ b/docs/api/methods/send_poll.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_poll import SendPoll` - alias: :code:`from aiogram.methods import SendPoll` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendPoll(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendPoll(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer_poll` +- :meth:`aiogram.types.message.Message.reply_poll` +- :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 9c27417b..4b22c805 100644 --- a/docs/api/methods/send_sticker.rst +++ b/docs/api/methods/send_sticker.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_sticker import SendSticker` - alias: :code:`from aiogram.methods import SendSticker` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendSticker(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendSticker(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer_sticker` +- :meth:`aiogram.types.message.Message.reply_sticker` +- :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 f87100de..de53528e 100644 --- a/docs/api/methods/send_venue.rst +++ b/docs/api/methods/send_venue.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_venue import SendVenue` - alias: :code:`from aiogram.methods import SendVenue` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendVenue(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendVenue(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer_venue` +- :meth:`aiogram.types.message.Message.reply_venue` +- :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 8fe6ed40..87731278 100644 --- a/docs/api/methods/send_video.rst +++ b/docs/api/methods/send_video.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_video import SendVideo` - alias: :code:`from aiogram.methods import SendVideo` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendVideo(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendVideo(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer_video` +- :meth:`aiogram.types.message.Message.reply_video` +- :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 f10f534e..78255cc8 100644 --- a/docs/api/methods/send_video_note.rst +++ b/docs/api/methods/send_video_note.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_video_note import SendVideoNote` - alias: :code:`from aiogram.methods import SendVideoNote` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendVideoNote(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendVideoNote(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer_video_note` +- :meth:`aiogram.types.message.Message.reply_video_note` +- :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 b3583bb1..3b4bb0c9 100644 --- a/docs/api/methods/send_voice.rst +++ b/docs/api/methods/send_voice.rst @@ -8,6 +8,7 @@ Returns: :obj:`Message` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.send_voice import SendVoice` - alias: :code:`from aiogram.methods import SendVoice` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendVoice(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,15 @@ As reply into Webhook in handler .. code-block:: python return SendVoice(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.answer_voice` +- :meth:`aiogram.types.message.Message.reply_voice` +- :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_administrator_custom_title.rst b/docs/api/methods/set_chat_administrator_custom_title.rst index ca73df29..560185f1 100644 --- a/docs/api/methods/set_chat_administrator_custom_title.rst +++ b/docs/api/methods/set_chat_administrator_custom_title.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.set_chat_administrator_custom_title import SetChatAdministratorCustomTitle` - alias: :code:`from aiogram.methods import SetChatAdministratorCustomTitle` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SetChatAdministratorCustomTitle(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return SetChatAdministratorCustomTitle(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.set_administrator_custom_title` diff --git a/docs/api/methods/set_chat_description.rst b/docs/api/methods/set_chat_description.rst index 0625516c..7cd242b7 100644 --- a/docs/api/methods/set_chat_description.rst +++ b/docs/api/methods/set_chat_description.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.set_chat_description import SetChatDescription` - alias: :code:`from aiogram.methods import SetChatDescription` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SetChatDescription(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return SetChatDescription(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.set_description` 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_chat_menu_button.rst b/docs/api/methods/set_chat_menu_button.rst new file mode 100644 index 00000000..2262dca7 --- /dev/null +++ b/docs/api/methods/set_chat_menu_button.rst @@ -0,0 +1,45 @@ +################# +setChatMenuButton +################# + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_chat_menu_button + :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_menu_button(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_chat_menu_button import SetChatMenuButton` +- alias: :code:`from aiogram.methods import SetChatMenuButton` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetChatMenuButton(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetChatMenuButton(...) diff --git a/docs/api/methods/set_chat_permissions.rst b/docs/api/methods/set_chat_permissions.rst index b287a7e2..0636fede 100644 --- a/docs/api/methods/set_chat_permissions.rst +++ b/docs/api/methods/set_chat_permissions.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.set_chat_permissions import SetChatPermissions` - alias: :code:`from aiogram.methods import SetChatPermissions` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SetChatPermissions(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return SetChatPermissions(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.set_permissions` diff --git a/docs/api/methods/set_chat_photo.rst b/docs/api/methods/set_chat_photo.rst index 536696e8..6a5edccd 100644 --- a/docs/api/methods/set_chat_photo.rst +++ b/docs/api/methods/set_chat_photo.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,16 +30,17 @@ Imports: - :code:`from aiogram.methods.set_chat_photo import SetChatPhoto` - alias: :code:`from aiogram.methods import SetChatPhoto` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SetChatPhoto(...) - With specific bot ~~~~~~~~~~~~~~~~~ .. code-block:: python result: bool = await bot(SetChatPhoto(...)) + + + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.set_photo` diff --git a/docs/api/methods/set_chat_sticker_set.rst b/docs/api/methods/set_chat_sticker_set.rst index 71e447b2..f42c7b2e 100644 --- a/docs/api/methods/set_chat_sticker_set.rst +++ b/docs/api/methods/set_chat_sticker_set.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.set_chat_sticker_set import SetChatStickerSet` - alias: :code:`from aiogram.methods import SetChatStickerSet` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SetChatStickerSet(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return SetChatStickerSet(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.set_sticker_set` diff --git a/docs/api/methods/set_chat_title.rst b/docs/api/methods/set_chat_title.rst index b9473be9..657283a4 100644 --- a/docs/api/methods/set_chat_title.rst +++ b/docs/api/methods/set_chat_title.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.set_chat_title import SetChatTitle` - alias: :code:`from aiogram.methods import SetChatTitle` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SetChatTitle(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return SetChatTitle(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.set_title` diff --git a/docs/api/methods/set_custom_emoji_sticker_set_thumbnail.rst b/docs/api/methods/set_custom_emoji_sticker_set_thumbnail.rst new file mode 100644 index 00000000..16cce30f --- /dev/null +++ b/docs/api/methods/set_custom_emoji_sticker_set_thumbnail.rst @@ -0,0 +1,45 @@ +################################# +setCustomEmojiStickerSetThumbnail +################################# + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_custom_emoji_sticker_set_thumbnail + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_custom_emoji_sticker_set_thumbnail(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_custom_emoji_sticker_set_thumbnail import SetCustomEmojiStickerSetThumbnail` +- alias: :code:`from aiogram.methods import SetCustomEmojiStickerSetThumbnail` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetCustomEmojiStickerSetThumbnail(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetCustomEmojiStickerSetThumbnail(...) diff --git a/docs/api/methods/set_game_score.rst b/docs/api/methods/set_game_score.rst index de9dd9b3..73dae21a 100644 --- a/docs/api/methods/set_game_score.rst +++ b/docs/api/methods/set_game_score.rst @@ -2,12 +2,13 @@ setGameScore ############ -Returns: :obj:`Union[Message, bool]` +Returns: :obj:`Message | bool` .. automodule:: aiogram.methods.set_game_score :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -18,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 @@ -29,19 +30,12 @@ Imports: - :code:`from aiogram.methods.set_game_score import SetGameScore` - alias: :code:`from aiogram.methods import SetGameScore` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Union[Message, bool] = await SetGameScore(...) - 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_message_reaction.rst b/docs/api/methods/set_message_reaction.rst new file mode 100644 index 00000000..88a60445 --- /dev/null +++ b/docs/api/methods/set_message_reaction.rst @@ -0,0 +1,51 @@ +################## +setMessageReaction +################## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_message_reaction + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_message_reaction(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_message_reaction import SetMessageReaction` +- alias: :code:`from aiogram.methods import SetMessageReaction` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetMessageReaction(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetMessageReaction(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.react` diff --git a/docs/api/methods/set_my_commands.rst b/docs/api/methods/set_my_commands.rst index 456bf270..b8491102 100644 --- a/docs/api/methods/set_my_commands.rst +++ b/docs/api/methods/set_my_commands.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.set_my_commands import SetMyCommands` - alias: :code:`from aiogram.methods import SetMyCommands` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SetMyCommands(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/set_my_default_administrator_rights.rst b/docs/api/methods/set_my_default_administrator_rights.rst new file mode 100644 index 00000000..db381aea --- /dev/null +++ b/docs/api/methods/set_my_default_administrator_rights.rst @@ -0,0 +1,45 @@ +############################### +setMyDefaultAdministratorRights +############################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_my_default_administrator_rights + :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_default_administrator_rights(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_my_default_administrator_rights import SetMyDefaultAdministratorRights` +- alias: :code:`from aiogram.methods import SetMyDefaultAdministratorRights` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetMyDefaultAdministratorRights(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetMyDefaultAdministratorRights(...) diff --git a/docs/api/methods/set_my_description.rst b/docs/api/methods/set_my_description.rst new file mode 100644 index 00000000..a3032799 --- /dev/null +++ b/docs/api/methods/set_my_description.rst @@ -0,0 +1,45 @@ +################ +setMyDescription +################ + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_my_description + :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_description(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_my_description import SetMyDescription` +- alias: :code:`from aiogram.methods import SetMyDescription` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetMyDescription(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetMyDescription(...) diff --git a/docs/api/methods/set_my_name.rst b/docs/api/methods/set_my_name.rst new file mode 100644 index 00000000..2a536ff4 --- /dev/null +++ b/docs/api/methods/set_my_name.rst @@ -0,0 +1,45 @@ +######### +setMyName +######### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_my_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_my_name(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_my_name import SetMyName` +- alias: :code:`from aiogram.methods import SetMyName` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetMyName(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetMyName(...) 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_my_short_description.rst b/docs/api/methods/set_my_short_description.rst new file mode 100644 index 00000000..e2bf6f7a --- /dev/null +++ b/docs/api/methods/set_my_short_description.rst @@ -0,0 +1,45 @@ +##################### +setMyShortDescription +##################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_my_short_description + :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_short_description(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_my_short_description import SetMyShortDescription` +- alias: :code:`from aiogram.methods import SetMyShortDescription` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetMyShortDescription(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetMyShortDescription(...) diff --git a/docs/api/methods/set_passport_data_errors.rst b/docs/api/methods/set_passport_data_errors.rst index 8db5be3c..b05fe1b2 100644 --- a/docs/api/methods/set_passport_data_errors.rst +++ b/docs/api/methods/set_passport_data_errors.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.set_passport_data_errors import SetPassportDataErrors` - alias: :code:`from aiogram.methods import SetPassportDataErrors` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SetPassportDataErrors(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/set_sticker_emoji_list.rst b/docs/api/methods/set_sticker_emoji_list.rst new file mode 100644 index 00000000..5856fbc5 --- /dev/null +++ b/docs/api/methods/set_sticker_emoji_list.rst @@ -0,0 +1,45 @@ +################### +setStickerEmojiList +################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_sticker_emoji_list + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_sticker_emoji_list(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_sticker_emoji_list import SetStickerEmojiList` +- alias: :code:`from aiogram.methods import SetStickerEmojiList` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetStickerEmojiList(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetStickerEmojiList(...) diff --git a/docs/api/methods/set_sticker_keywords.rst b/docs/api/methods/set_sticker_keywords.rst new file mode 100644 index 00000000..5e263d39 --- /dev/null +++ b/docs/api/methods/set_sticker_keywords.rst @@ -0,0 +1,45 @@ +################## +setStickerKeywords +################## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_sticker_keywords + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_sticker_keywords(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_sticker_keywords import SetStickerKeywords` +- alias: :code:`from aiogram.methods import SetStickerKeywords` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetStickerKeywords(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetStickerKeywords(...) diff --git a/docs/api/methods/set_sticker_mask_position.rst b/docs/api/methods/set_sticker_mask_position.rst new file mode 100644 index 00000000..dc0d0eb9 --- /dev/null +++ b/docs/api/methods/set_sticker_mask_position.rst @@ -0,0 +1,45 @@ +###################### +setStickerMaskPosition +###################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_sticker_mask_position + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_sticker_mask_position(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_sticker_mask_position import SetStickerMaskPosition` +- alias: :code:`from aiogram.methods import SetStickerMaskPosition` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetStickerMaskPosition(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetStickerMaskPosition(...) diff --git a/docs/api/methods/set_sticker_position_in_set.rst b/docs/api/methods/set_sticker_position_in_set.rst index f0b4771b..82915f41 100644 --- a/docs/api/methods/set_sticker_position_in_set.rst +++ b/docs/api/methods/set_sticker_position_in_set.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.set_sticker_position_in_set import SetStickerPositionInSet` - alias: :code:`from aiogram.methods import SetStickerPositionInSet` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SetStickerPositionInSet(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return SetStickerPositionInSet(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.sticker.Sticker.set_position_in_set` diff --git a/docs/api/methods/set_sticker_set_thumb.rst b/docs/api/methods/set_sticker_set_thumb.rst deleted file mode 100644 index fb4a85e6..00000000 --- a/docs/api/methods/set_sticker_set_thumb.rst +++ /dev/null @@ -1,51 +0,0 @@ -################## -setStickerSetThumb -################## - -Returns: :obj:`bool` - -.. automodule:: aiogram.methods.set_sticker_set_thumb - :members: - :member-order: bysource - :undoc-members: True - - -Usage -===== - -As bot method -------------- - -.. code-block:: - - result: bool = await bot.set_sticker_set_thumb(...) - - -Method as object ----------------- - -Imports: - -- :code:`from aiogram.methods.set_sticker_set_thumb import SetStickerSetThumb` -- alias: :code:`from aiogram.methods import SetStickerSetThumb` - -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SetStickerSetThumb(...) - -With specific bot -~~~~~~~~~~~~~~~~~ - -.. code-block:: python - - result: bool = await bot(SetStickerSetThumb(...)) - -As reply into Webhook in handler -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. code-block:: python - - return SetStickerSetThumb(...) diff --git a/docs/api/methods/set_sticker_set_thumbnail.rst b/docs/api/methods/set_sticker_set_thumbnail.rst new file mode 100644 index 00000000..3a72fab0 --- /dev/null +++ b/docs/api/methods/set_sticker_set_thumbnail.rst @@ -0,0 +1,45 @@ +###################### +setStickerSetThumbnail +###################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_sticker_set_thumbnail + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_sticker_set_thumbnail(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_sticker_set_thumbnail import SetStickerSetThumbnail` +- alias: :code:`from aiogram.methods import SetStickerSetThumbnail` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetStickerSetThumbnail(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetStickerSetThumbnail(...) diff --git a/docs/api/methods/set_sticker_set_title.rst b/docs/api/methods/set_sticker_set_title.rst new file mode 100644 index 00000000..74d487b2 --- /dev/null +++ b/docs/api/methods/set_sticker_set_title.rst @@ -0,0 +1,45 @@ +################## +setStickerSetTitle +################## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_sticker_set_title + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_sticker_set_title(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_sticker_set_title import SetStickerSetTitle` +- alias: :code:`from aiogram.methods import SetStickerSetTitle` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetStickerSetTitle(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetStickerSetTitle(...) 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/set_webhook.rst b/docs/api/methods/set_webhook.rst index 5e0a6e20..52def7c0 100644 --- a/docs/api/methods/set_webhook.rst +++ b/docs/api/methods/set_webhook.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.set_webhook import SetWebhook` - alias: :code:`from aiogram.methods import SetWebhook` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SetWebhook(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/stop_message_live_location.rst b/docs/api/methods/stop_message_live_location.rst index f7519860..d71c1cb0 100644 --- a/docs/api/methods/stop_message_live_location.rst +++ b/docs/api/methods/stop_message_live_location.rst @@ -2,12 +2,13 @@ stopMessageLiveLocation ####################### -Returns: :obj:`Union[Message, bool]` +Returns: :obj:`Message | bool` .. automodule:: aiogram.methods.stop_message_live_location :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -18,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 @@ -29,19 +30,12 @@ Imports: - :code:`from aiogram.methods.stop_message_live_location import StopMessageLiveLocation` - alias: :code:`from aiogram.methods import StopMessageLiveLocation` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Union[Message, bool] = await StopMessageLiveLocation(...) - 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return StopMessageLiveLocation(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.message.Message.stop_live_location` diff --git a/docs/api/methods/stop_poll.rst b/docs/api/methods/stop_poll.rst index 2e14c094..83c14574 100644 --- a/docs/api/methods/stop_poll.rst +++ b/docs/api/methods/stop_poll.rst @@ -8,6 +8,7 @@ Returns: :obj:`Poll` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.stop_poll import StopPoll` - alias: :code:`from aiogram.methods import StopPoll` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Poll = await StopPoll(...) - With specific bot ~~~~~~~~~~~~~~~~~ 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/unban_chat_member.rst b/docs/api/methods/unban_chat_member.rst index 6aae1669..4b76a602 100644 --- a/docs/api/methods/unban_chat_member.rst +++ b/docs/api/methods/unban_chat_member.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.unban_chat_member import UnbanChatMember` - alias: :code:`from aiogram.methods import UnbanChatMember` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await UnbanChatMember(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return UnbanChatMember(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.unban` diff --git a/docs/api/methods/unban_chat_sender_chat.rst b/docs/api/methods/unban_chat_sender_chat.rst index f0f929da..88b00b90 100644 --- a/docs/api/methods/unban_chat_sender_chat.rst +++ b/docs/api/methods/unban_chat_sender_chat.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.unban_chat_sender_chat import UnbanChatSenderChat` - alias: :code:`from aiogram.methods import UnbanChatSenderChat` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await UnbanChatSenderChat(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return UnbanChatSenderChat(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.unban_sender_chat` diff --git a/docs/api/methods/unhide_general_forum_topic.rst b/docs/api/methods/unhide_general_forum_topic.rst new file mode 100644 index 00000000..6e6be61b --- /dev/null +++ b/docs/api/methods/unhide_general_forum_topic.rst @@ -0,0 +1,45 @@ +####################### +unhideGeneralForumTopic +####################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.unhide_general_forum_topic + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.unhide_general_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.unhide_general_forum_topic import UnhideGeneralForumTopic` +- alias: :code:`from aiogram.methods import UnhideGeneralForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(UnhideGeneralForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return UnhideGeneralForumTopic(...) diff --git a/docs/api/methods/unpin_all_chat_messages.rst b/docs/api/methods/unpin_all_chat_messages.rst index 90c2ca9e..571be7f0 100644 --- a/docs/api/methods/unpin_all_chat_messages.rst +++ b/docs/api/methods/unpin_all_chat_messages.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.unpin_all_chat_messages import UnpinAllChatMessages` - alias: :code:`from aiogram.methods import UnpinAllChatMessages` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await UnpinAllChatMessages(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return UnpinAllChatMessages(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.unpin_all_messages` diff --git a/docs/api/methods/unpin_all_forum_topic_messages.rst b/docs/api/methods/unpin_all_forum_topic_messages.rst new file mode 100644 index 00000000..60b03070 --- /dev/null +++ b/docs/api/methods/unpin_all_forum_topic_messages.rst @@ -0,0 +1,45 @@ +########################## +unpinAllForumTopicMessages +########################## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.unpin_all_forum_topic_messages + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.unpin_all_forum_topic_messages(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.unpin_all_forum_topic_messages import UnpinAllForumTopicMessages` +- alias: :code:`from aiogram.methods import UnpinAllForumTopicMessages` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(UnpinAllForumTopicMessages(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return UnpinAllForumTopicMessages(...) diff --git a/docs/api/methods/unpin_all_general_forum_topic_messages.rst b/docs/api/methods/unpin_all_general_forum_topic_messages.rst new file mode 100644 index 00000000..b71da566 --- /dev/null +++ b/docs/api/methods/unpin_all_general_forum_topic_messages.rst @@ -0,0 +1,51 @@ +################################# +unpinAllGeneralForumTopicMessages +################################# + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.unpin_all_general_forum_topic_messages + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.unpin_all_general_forum_topic_messages(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.unpin_all_general_forum_topic_messages import UnpinAllGeneralForumTopicMessages` +- alias: :code:`from aiogram.methods import UnpinAllGeneralForumTopicMessages` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(UnpinAllGeneralForumTopicMessages(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return UnpinAllGeneralForumTopicMessages(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.unpin_all_general_forum_topic_messages` diff --git a/docs/api/methods/unpin_chat_message.rst b/docs/api/methods/unpin_chat_message.rst index 02c6e816..bfc3d614 100644 --- a/docs/api/methods/unpin_chat_message.rst +++ b/docs/api/methods/unpin_chat_message.rst @@ -8,6 +8,7 @@ Returns: :obj:`bool` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.unpin_chat_message import UnpinChatMessage` - alias: :code:`from aiogram.methods import UnpinChatMessage` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await UnpinChatMessage(...) - With specific bot ~~~~~~~~~~~~~~~~~ @@ -49,3 +43,10 @@ As reply into Webhook in handler .. code-block:: python return UnpinChatMessage(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.unpin_message` +- :meth:`aiogram.types.message.Message.unpin` 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/upload_sticker_file.rst b/docs/api/methods/upload_sticker_file.rst index 210c9784..88cc8859 100644 --- a/docs/api/methods/upload_sticker_file.rst +++ b/docs/api/methods/upload_sticker_file.rst @@ -8,6 +8,7 @@ Returns: :obj:`File` :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields Usage @@ -29,13 +30,6 @@ Imports: - :code:`from aiogram.methods.upload_sticker_file import UploadStickerFile` - alias: :code:`from aiogram.methods import UploadStickerFile` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: File = await UploadStickerFile(...) - With specific bot ~~~~~~~~~~~~~~~~~ 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/session/aiohttp.rst b/docs/api/session/aiohttp.rst index 7dd9713b..523d76b6 100644 --- a/docs/api/session/aiohttp.rst +++ b/docs/api/session/aiohttp.rst @@ -14,7 +14,7 @@ Usage example .. code-block:: from aiogram import Bot - from aiogram.session.aiohttp import AiohttpSession + from aiogram.client.session.aiohttp import AiohttpSession session = AiohttpSession() bot = Bot('42:token', session=session) diff --git a/docs/api/session/custom_server.rst b/docs/api/session/custom_server.rst index 23126551..22c5b6bd 100644 --- a/docs/api/session/custom_server.rst +++ b/docs/api/session/custom_server.rst @@ -1,14 +1,14 @@ Use Custom API server ===================== -.. autoclass:: aiogram.client.telegram.TelegramAPIServer - :members: - For example, if you want to use self-hosted API server: -.. code-block:: python3 +.. code-block:: python session = AiohttpSession( api=TelegramAPIServer.from_base('http://localhost:8082') ) bot = Bot(..., session=session) + +.. autoclass:: aiogram.client.telegram.TelegramAPIServer + :members: diff --git a/docs/api/session/index.rst b/docs/api/session/index.rst index dff24e7a..da92bd4d 100644 --- a/docs/api/session/index.rst +++ b/docs/api/session/index.rst @@ -8,3 +8,4 @@ Client sessions is used for interacting with API server. custom_server base aiohttp + middleware diff --git a/docs/api/session/middleware.rst b/docs/api/session/middleware.rst new file mode 100644 index 00000000..5a312c3e --- /dev/null +++ b/docs/api/session/middleware.rst @@ -0,0 +1,75 @@ +########################## +Client session middlewares +########################## + +In some cases you may want to add some middlewares to the client session to customize the behavior of the client. + +Some useful cases that is: + +- Log the outgoing requests +- Customize the request parameters +- Handle rate limiting errors and retry the request +- others ... + +So, you can do it using client session middlewares. +A client session middleware is a function (or callable class) that receives the request and the next middleware to call. +The middleware can modify the request and then call the next middleware to continue the request processing. + +How to register client session middleware? +========================================== + +Register using register method +------------------------------ + +.. code-block:: python + + bot.session.middleware(RequestLogging(ignore_methods=[GetUpdates])) + +Register using decorator +------------------------ + +.. code-block:: python + + @bot.session.middleware() + async def my_middleware( + make_request: NextRequestMiddlewareType[TelegramType], + bot: "Bot", + method: TelegramMethod[TelegramType], + ) -> Response[TelegramType]: + # do something with request + return await make_request(bot, method) + + +Example +======= + +Class based session middleware +------------------------------ + +.. literalinclude:: ../../../aiogram/client/session/middlewares/request_logging.py + :lines: 16- + :language: python + :linenos: + +.. note:: + + this middleware is already implemented inside aiogram, so, if you want to use it you can + just import it :code:`from aiogram.client.session.middlewares.request_logging import RequestLogging` + + +Function based session middleware +--------------------------------- + +.. code-block:: python + + async def __call__( + self, + make_request: NextRequestMiddlewareType[TelegramType], + bot: "Bot", + method: TelegramMethod[TelegramType], + ) -> Response[TelegramType]: + try: + # do something with request + return await make_request(bot, method) + finally: + # do something after request 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/animation.rst b/docs/api/types/animation.rst index 1d111c20..ee4f4875 100644 --- a/docs/api/types/animation.rst +++ b/docs/api/types/animation.rst @@ -7,3 +7,4 @@ Animation :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/audio.rst b/docs/api/types/audio.rst index e29b246c..a4f5a42a 100644 --- a/docs/api/types/audio.rst +++ b/docs/api/types/audio.rst @@ -7,3 +7,4 @@ Audio :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/background_fill.rst b/docs/api/types/background_fill.rst new file mode 100644 index 00000000..d9431b7c --- /dev/null +++ b/docs/api/types/background_fill.rst @@ -0,0 +1,10 @@ +############## +BackgroundFill +############## + + +.. automodule:: aiogram.types.background_fill + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/background_fill_freeform_gradient.rst b/docs/api/types/background_fill_freeform_gradient.rst new file mode 100644 index 00000000..5b051686 --- /dev/null +++ b/docs/api/types/background_fill_freeform_gradient.rst @@ -0,0 +1,10 @@ +############################## +BackgroundFillFreeformGradient +############################## + + +.. automodule:: aiogram.types.background_fill_freeform_gradient + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/background_fill_gradient.rst b/docs/api/types/background_fill_gradient.rst new file mode 100644 index 00000000..6e87e7f9 --- /dev/null +++ b/docs/api/types/background_fill_gradient.rst @@ -0,0 +1,10 @@ +###################### +BackgroundFillGradient +###################### + + +.. automodule:: aiogram.types.background_fill_gradient + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/background_fill_solid.rst b/docs/api/types/background_fill_solid.rst new file mode 100644 index 00000000..9fdafa26 --- /dev/null +++ b/docs/api/types/background_fill_solid.rst @@ -0,0 +1,10 @@ +################### +BackgroundFillSolid +################### + + +.. automodule:: aiogram.types.background_fill_solid + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/background_type.rst b/docs/api/types/background_type.rst new file mode 100644 index 00000000..f4e457d5 --- /dev/null +++ b/docs/api/types/background_type.rst @@ -0,0 +1,10 @@ +############## +BackgroundType +############## + + +.. automodule:: aiogram.types.background_type + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/background_type_chat_theme.rst b/docs/api/types/background_type_chat_theme.rst new file mode 100644 index 00000000..cd13f8c1 --- /dev/null +++ b/docs/api/types/background_type_chat_theme.rst @@ -0,0 +1,10 @@ +####################### +BackgroundTypeChatTheme +####################### + + +.. automodule:: aiogram.types.background_type_chat_theme + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/background_type_fill.rst b/docs/api/types/background_type_fill.rst new file mode 100644 index 00000000..d79cc474 --- /dev/null +++ b/docs/api/types/background_type_fill.rst @@ -0,0 +1,10 @@ +################## +BackgroundTypeFill +################## + + +.. automodule:: aiogram.types.background_type_fill + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/background_type_pattern.rst b/docs/api/types/background_type_pattern.rst new file mode 100644 index 00000000..e1c69401 --- /dev/null +++ b/docs/api/types/background_type_pattern.rst @@ -0,0 +1,10 @@ +##################### +BackgroundTypePattern +##################### + + +.. automodule:: aiogram.types.background_type_pattern + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/background_type_wallpaper.rst b/docs/api/types/background_type_wallpaper.rst new file mode 100644 index 00000000..49a043ba --- /dev/null +++ b/docs/api/types/background_type_wallpaper.rst @@ -0,0 +1,10 @@ +####################### +BackgroundTypeWallpaper +####################### + + +.. automodule:: aiogram.types.background_type_wallpaper + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/birthdate.rst b/docs/api/types/birthdate.rst new file mode 100644 index 00000000..0039c686 --- /dev/null +++ b/docs/api/types/birthdate.rst @@ -0,0 +1,10 @@ +######### +Birthdate +######### + + +.. automodule:: aiogram.types.birthdate + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/bot_command.rst b/docs/api/types/bot_command.rst index 4b8c60ab..5b3307c8 100644 --- a/docs/api/types/bot_command.rst +++ b/docs/api/types/bot_command.rst @@ -7,3 +7,4 @@ BotCommand :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/bot_command_scope.rst b/docs/api/types/bot_command_scope.rst index fa89f3ab..82c404c6 100644 --- a/docs/api/types/bot_command_scope.rst +++ b/docs/api/types/bot_command_scope.rst @@ -7,3 +7,4 @@ BotCommandScope :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/bot_command_scope_all_chat_administrators.rst b/docs/api/types/bot_command_scope_all_chat_administrators.rst index cfde1f73..46110136 100644 --- a/docs/api/types/bot_command_scope_all_chat_administrators.rst +++ b/docs/api/types/bot_command_scope_all_chat_administrators.rst @@ -7,3 +7,4 @@ BotCommandScopeAllChatAdministrators :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/bot_command_scope_all_group_chats.rst b/docs/api/types/bot_command_scope_all_group_chats.rst index 2fe3ec7a..e191c5db 100644 --- a/docs/api/types/bot_command_scope_all_group_chats.rst +++ b/docs/api/types/bot_command_scope_all_group_chats.rst @@ -7,3 +7,4 @@ BotCommandScopeAllGroupChats :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/bot_command_scope_all_private_chats.rst b/docs/api/types/bot_command_scope_all_private_chats.rst index 4c018322..41cf2ff2 100644 --- a/docs/api/types/bot_command_scope_all_private_chats.rst +++ b/docs/api/types/bot_command_scope_all_private_chats.rst @@ -7,3 +7,4 @@ BotCommandScopeAllPrivateChats :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/bot_command_scope_chat.rst b/docs/api/types/bot_command_scope_chat.rst index ee7900fc..4f098f9e 100644 --- a/docs/api/types/bot_command_scope_chat.rst +++ b/docs/api/types/bot_command_scope_chat.rst @@ -7,3 +7,4 @@ BotCommandScopeChat :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/bot_command_scope_chat_administrators.rst b/docs/api/types/bot_command_scope_chat_administrators.rst index 76e72c45..b3cd9aa7 100644 --- a/docs/api/types/bot_command_scope_chat_administrators.rst +++ b/docs/api/types/bot_command_scope_chat_administrators.rst @@ -7,3 +7,4 @@ BotCommandScopeChatAdministrators :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/bot_command_scope_chat_member.rst b/docs/api/types/bot_command_scope_chat_member.rst index 60a76fa1..4e953111 100644 --- a/docs/api/types/bot_command_scope_chat_member.rst +++ b/docs/api/types/bot_command_scope_chat_member.rst @@ -7,3 +7,4 @@ BotCommandScopeChatMember :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/bot_command_scope_default.rst b/docs/api/types/bot_command_scope_default.rst index fe97331b..9a45c243 100644 --- a/docs/api/types/bot_command_scope_default.rst +++ b/docs/api/types/bot_command_scope_default.rst @@ -7,3 +7,4 @@ BotCommandScopeDefault :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/bot_description.rst b/docs/api/types/bot_description.rst new file mode 100644 index 00000000..16409cf3 --- /dev/null +++ b/docs/api/types/bot_description.rst @@ -0,0 +1,10 @@ +############## +BotDescription +############## + + +.. automodule:: aiogram.types.bot_description + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/bot_name.rst b/docs/api/types/bot_name.rst new file mode 100644 index 00000000..2eb8fbf4 --- /dev/null +++ b/docs/api/types/bot_name.rst @@ -0,0 +1,10 @@ +####### +BotName +####### + + +.. automodule:: aiogram.types.bot_name + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/bot_short_description.rst b/docs/api/types/bot_short_description.rst new file mode 100644 index 00000000..61dbbaea --- /dev/null +++ b/docs/api/types/bot_short_description.rst @@ -0,0 +1,10 @@ +################### +BotShortDescription +################### + + +.. automodule:: aiogram.types.bot_short_description + :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/business_connection.rst b/docs/api/types/business_connection.rst new file mode 100644 index 00000000..1a196bc3 --- /dev/null +++ b/docs/api/types/business_connection.rst @@ -0,0 +1,10 @@ +################## +BusinessConnection +################## + + +.. automodule:: aiogram.types.business_connection + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/business_intro.rst b/docs/api/types/business_intro.rst new file mode 100644 index 00000000..31939bb7 --- /dev/null +++ b/docs/api/types/business_intro.rst @@ -0,0 +1,10 @@ +############# +BusinessIntro +############# + + +.. automodule:: aiogram.types.business_intro + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/business_location.rst b/docs/api/types/business_location.rst new file mode 100644 index 00000000..751dcbf1 --- /dev/null +++ b/docs/api/types/business_location.rst @@ -0,0 +1,10 @@ +################ +BusinessLocation +################ + + +.. automodule:: aiogram.types.business_location + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/business_messages_deleted.rst b/docs/api/types/business_messages_deleted.rst new file mode 100644 index 00000000..7854d96e --- /dev/null +++ b/docs/api/types/business_messages_deleted.rst @@ -0,0 +1,10 @@ +####################### +BusinessMessagesDeleted +####################### + + +.. automodule:: aiogram.types.business_messages_deleted + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/business_opening_hours.rst b/docs/api/types/business_opening_hours.rst new file mode 100644 index 00000000..c3b2e770 --- /dev/null +++ b/docs/api/types/business_opening_hours.rst @@ -0,0 +1,10 @@ +#################### +BusinessOpeningHours +#################### + + +.. automodule:: aiogram.types.business_opening_hours + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/business_opening_hours_interval.rst b/docs/api/types/business_opening_hours_interval.rst new file mode 100644 index 00000000..561efe7c --- /dev/null +++ b/docs/api/types/business_opening_hours_interval.rst @@ -0,0 +1,10 @@ +############################ +BusinessOpeningHoursInterval +############################ + + +.. automodule:: aiogram.types.business_opening_hours_interval + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/callback_game.rst b/docs/api/types/callback_game.rst index 789519f3..8e5f32f1 100644 --- a/docs/api/types/callback_game.rst +++ b/docs/api/types/callback_game.rst @@ -7,3 +7,4 @@ CallbackGame :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/callback_query.rst b/docs/api/types/callback_query.rst index 22ddc99b..dee49c20 100644 --- a/docs/api/types/callback_query.rst +++ b/docs/api/types/callback_query.rst @@ -7,3 +7,4 @@ CallbackQuery :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat.rst b/docs/api/types/chat.rst index 5b506b1b..e473f6be 100644 --- a/docs/api/types/chat.rst +++ b/docs/api/types/chat.rst @@ -7,3 +7,4 @@ Chat :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_administrator_rights.rst b/docs/api/types/chat_administrator_rights.rst new file mode 100644 index 00000000..c728cc83 --- /dev/null +++ b/docs/api/types/chat_administrator_rights.rst @@ -0,0 +1,10 @@ +####################### +ChatAdministratorRights +####################### + + +.. automodule:: aiogram.types.chat_administrator_rights + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_background.rst b/docs/api/types/chat_background.rst new file mode 100644 index 00000000..9d55f7d0 --- /dev/null +++ b/docs/api/types/chat_background.rst @@ -0,0 +1,10 @@ +############## +ChatBackground +############## + + +.. automodule:: aiogram.types.chat_background + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_boost.rst b/docs/api/types/chat_boost.rst new file mode 100644 index 00000000..be3a4c07 --- /dev/null +++ b/docs/api/types/chat_boost.rst @@ -0,0 +1,10 @@ +######### +ChatBoost +######### + + +.. automodule:: aiogram.types.chat_boost + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_boost_added.rst b/docs/api/types/chat_boost_added.rst new file mode 100644 index 00000000..a62a05f8 --- /dev/null +++ b/docs/api/types/chat_boost_added.rst @@ -0,0 +1,10 @@ +############## +ChatBoostAdded +############## + + +.. automodule:: aiogram.types.chat_boost_added + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_boost_removed.rst b/docs/api/types/chat_boost_removed.rst new file mode 100644 index 00000000..b3b1d70f --- /dev/null +++ b/docs/api/types/chat_boost_removed.rst @@ -0,0 +1,10 @@ +################ +ChatBoostRemoved +################ + + +.. automodule:: aiogram.types.chat_boost_removed + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_boost_source.rst b/docs/api/types/chat_boost_source.rst new file mode 100644 index 00000000..cb5ca355 --- /dev/null +++ b/docs/api/types/chat_boost_source.rst @@ -0,0 +1,10 @@ +############### +ChatBoostSource +############### + + +.. automodule:: aiogram.types.chat_boost_source + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_boost_source_gift_code.rst b/docs/api/types/chat_boost_source_gift_code.rst new file mode 100644 index 00000000..f79c99aa --- /dev/null +++ b/docs/api/types/chat_boost_source_gift_code.rst @@ -0,0 +1,10 @@ +####################### +ChatBoostSourceGiftCode +####################### + + +.. automodule:: aiogram.types.chat_boost_source_gift_code + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_boost_source_giveaway.rst b/docs/api/types/chat_boost_source_giveaway.rst new file mode 100644 index 00000000..549d64e0 --- /dev/null +++ b/docs/api/types/chat_boost_source_giveaway.rst @@ -0,0 +1,10 @@ +####################### +ChatBoostSourceGiveaway +####################### + + +.. automodule:: aiogram.types.chat_boost_source_giveaway + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_boost_source_premium.rst b/docs/api/types/chat_boost_source_premium.rst new file mode 100644 index 00000000..d8720a33 --- /dev/null +++ b/docs/api/types/chat_boost_source_premium.rst @@ -0,0 +1,10 @@ +###################### +ChatBoostSourcePremium +###################### + + +.. automodule:: aiogram.types.chat_boost_source_premium + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_boost_updated.rst b/docs/api/types/chat_boost_updated.rst new file mode 100644 index 00000000..14332673 --- /dev/null +++ b/docs/api/types/chat_boost_updated.rst @@ -0,0 +1,10 @@ +################ +ChatBoostUpdated +################ + + +.. automodule:: aiogram.types.chat_boost_updated + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_full_info.rst b/docs/api/types/chat_full_info.rst new file mode 100644 index 00000000..702c64da --- /dev/null +++ b/docs/api/types/chat_full_info.rst @@ -0,0 +1,10 @@ +############ +ChatFullInfo +############ + + +.. automodule:: aiogram.types.chat_full_info + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_invite_link.rst b/docs/api/types/chat_invite_link.rst index d64e28ae..3ee3f9ea 100644 --- a/docs/api/types/chat_invite_link.rst +++ b/docs/api/types/chat_invite_link.rst @@ -7,3 +7,4 @@ ChatInviteLink :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_join_request.rst b/docs/api/types/chat_join_request.rst index 236a472a..3ff695a8 100644 --- a/docs/api/types/chat_join_request.rst +++ b/docs/api/types/chat_join_request.rst @@ -7,3 +7,4 @@ ChatJoinRequest :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_location.rst b/docs/api/types/chat_location.rst index 5d528095..74dff084 100644 --- a/docs/api/types/chat_location.rst +++ b/docs/api/types/chat_location.rst @@ -7,3 +7,4 @@ ChatLocation :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_member.rst b/docs/api/types/chat_member.rst index bd357f7c..7cf71744 100644 --- a/docs/api/types/chat_member.rst +++ b/docs/api/types/chat_member.rst @@ -7,3 +7,4 @@ ChatMember :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_member_administrator.rst b/docs/api/types/chat_member_administrator.rst index 55302054..f8c98c7b 100644 --- a/docs/api/types/chat_member_administrator.rst +++ b/docs/api/types/chat_member_administrator.rst @@ -7,3 +7,4 @@ ChatMemberAdministrator :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_member_banned.rst b/docs/api/types/chat_member_banned.rst index 31570bec..95085cfc 100644 --- a/docs/api/types/chat_member_banned.rst +++ b/docs/api/types/chat_member_banned.rst @@ -7,3 +7,4 @@ ChatMemberBanned :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_member_left.rst b/docs/api/types/chat_member_left.rst index 52a4dd9d..6f6d7e0d 100644 --- a/docs/api/types/chat_member_left.rst +++ b/docs/api/types/chat_member_left.rst @@ -7,3 +7,4 @@ ChatMemberLeft :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_member_member.rst b/docs/api/types/chat_member_member.rst index 8f884af9..ec014bd2 100644 --- a/docs/api/types/chat_member_member.rst +++ b/docs/api/types/chat_member_member.rst @@ -7,3 +7,4 @@ ChatMemberMember :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_member_owner.rst b/docs/api/types/chat_member_owner.rst index 09eee65c..3319823b 100644 --- a/docs/api/types/chat_member_owner.rst +++ b/docs/api/types/chat_member_owner.rst @@ -7,3 +7,4 @@ ChatMemberOwner :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_member_restricted.rst b/docs/api/types/chat_member_restricted.rst index dcc3db58..65fdffa5 100644 --- a/docs/api/types/chat_member_restricted.rst +++ b/docs/api/types/chat_member_restricted.rst @@ -7,3 +7,4 @@ ChatMemberRestricted :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_member_updated.rst b/docs/api/types/chat_member_updated.rst index e02ddd8b..f1ae6dd8 100644 --- a/docs/api/types/chat_member_updated.rst +++ b/docs/api/types/chat_member_updated.rst @@ -7,3 +7,4 @@ ChatMemberUpdated :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/chat_permissions.rst b/docs/api/types/chat_permissions.rst index 6eedb23b..934eb1c5 100644 --- a/docs/api/types/chat_permissions.rst +++ b/docs/api/types/chat_permissions.rst @@ -7,3 +7,4 @@ ChatPermissions :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_photo.rst b/docs/api/types/chat_photo.rst index 7821d5ba..e1284cc1 100644 --- a/docs/api/types/chat_photo.rst +++ b/docs/api/types/chat_photo.rst @@ -7,3 +7,4 @@ ChatPhoto :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_shared.rst b/docs/api/types/chat_shared.rst new file mode 100644 index 00000000..c180f114 --- /dev/null +++ b/docs/api/types/chat_shared.rst @@ -0,0 +1,10 @@ +########## +ChatShared +########## + + +.. automodule:: aiogram.types.chat_shared + :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/chosen_inline_result.rst b/docs/api/types/chosen_inline_result.rst index 3f86a983..0519b88a 100644 --- a/docs/api/types/chosen_inline_result.rst +++ b/docs/api/types/chosen_inline_result.rst @@ -7,3 +7,4 @@ ChosenInlineResult :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/contact.rst b/docs/api/types/contact.rst index f99e1d27..152a6efc 100644 --- a/docs/api/types/contact.rst +++ b/docs/api/types/contact.rst @@ -7,3 +7,4 @@ Contact :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/dice.rst b/docs/api/types/dice.rst index 41ddf6c4..ba6309f4 100644 --- a/docs/api/types/dice.rst +++ b/docs/api/types/dice.rst @@ -7,3 +7,4 @@ Dice :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/document.rst b/docs/api/types/document.rst index 48799778..1d9a34d7 100644 --- a/docs/api/types/document.rst +++ b/docs/api/types/document.rst @@ -7,3 +7,4 @@ Document :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/encrypted_credentials.rst b/docs/api/types/encrypted_credentials.rst index 41425c95..7bce1366 100644 --- a/docs/api/types/encrypted_credentials.rst +++ b/docs/api/types/encrypted_credentials.rst @@ -7,3 +7,4 @@ EncryptedCredentials :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/encrypted_passport_element.rst b/docs/api/types/encrypted_passport_element.rst index 0acf7a8e..b5634dc5 100644 --- a/docs/api/types/encrypted_passport_element.rst +++ b/docs/api/types/encrypted_passport_element.rst @@ -7,3 +7,4 @@ EncryptedPassportElement :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/external_reply_info.rst b/docs/api/types/external_reply_info.rst new file mode 100644 index 00000000..86040076 --- /dev/null +++ b/docs/api/types/external_reply_info.rst @@ -0,0 +1,10 @@ +################# +ExternalReplyInfo +################# + + +.. automodule:: aiogram.types.external_reply_info + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/file.rst b/docs/api/types/file.rst index 5a9d920e..ab525e80 100644 --- a/docs/api/types/file.rst +++ b/docs/api/types/file.rst @@ -7,3 +7,4 @@ File :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/force_reply.rst b/docs/api/types/force_reply.rst index 326cd91f..a5f5d93c 100644 --- a/docs/api/types/force_reply.rst +++ b/docs/api/types/force_reply.rst @@ -7,3 +7,4 @@ ForceReply :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/forum_topic.rst b/docs/api/types/forum_topic.rst new file mode 100644 index 00000000..ee38ae7b --- /dev/null +++ b/docs/api/types/forum_topic.rst @@ -0,0 +1,10 @@ +########## +ForumTopic +########## + + +.. automodule:: aiogram.types.forum_topic + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/forum_topic_closed.rst b/docs/api/types/forum_topic_closed.rst new file mode 100644 index 00000000..97e8afde --- /dev/null +++ b/docs/api/types/forum_topic_closed.rst @@ -0,0 +1,10 @@ +################ +ForumTopicClosed +################ + + +.. automodule:: aiogram.types.forum_topic_closed + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/forum_topic_created.rst b/docs/api/types/forum_topic_created.rst new file mode 100644 index 00000000..63fc4a8f --- /dev/null +++ b/docs/api/types/forum_topic_created.rst @@ -0,0 +1,10 @@ +################# +ForumTopicCreated +################# + + +.. automodule:: aiogram.types.forum_topic_created + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/forum_topic_edited.rst b/docs/api/types/forum_topic_edited.rst new file mode 100644 index 00000000..d3d41960 --- /dev/null +++ b/docs/api/types/forum_topic_edited.rst @@ -0,0 +1,10 @@ +################ +ForumTopicEdited +################ + + +.. automodule:: aiogram.types.forum_topic_edited + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/forum_topic_reopened.rst b/docs/api/types/forum_topic_reopened.rst new file mode 100644 index 00000000..a14b3877 --- /dev/null +++ b/docs/api/types/forum_topic_reopened.rst @@ -0,0 +1,10 @@ +################## +ForumTopicReopened +################## + + +.. automodule:: aiogram.types.forum_topic_reopened + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/game.rst b/docs/api/types/game.rst index 62a7f390..8ee3f03d 100644 --- a/docs/api/types/game.rst +++ b/docs/api/types/game.rst @@ -7,3 +7,4 @@ Game :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/game_high_score.rst b/docs/api/types/game_high_score.rst index 6f8d8194..64a2a751 100644 --- a/docs/api/types/game_high_score.rst +++ b/docs/api/types/game_high_score.rst @@ -7,3 +7,4 @@ GameHighScore :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/general_forum_topic_hidden.rst b/docs/api/types/general_forum_topic_hidden.rst new file mode 100644 index 00000000..032d190a --- /dev/null +++ b/docs/api/types/general_forum_topic_hidden.rst @@ -0,0 +1,10 @@ +####################### +GeneralForumTopicHidden +####################### + + +.. automodule:: aiogram.types.general_forum_topic_hidden + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/general_forum_topic_unhidden.rst b/docs/api/types/general_forum_topic_unhidden.rst new file mode 100644 index 00000000..55764d2c --- /dev/null +++ b/docs/api/types/general_forum_topic_unhidden.rst @@ -0,0 +1,10 @@ +######################### +GeneralForumTopicUnhidden +######################### + + +.. automodule:: aiogram.types.general_forum_topic_unhidden + :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/giveaway.rst b/docs/api/types/giveaway.rst new file mode 100644 index 00000000..6b0ce93f --- /dev/null +++ b/docs/api/types/giveaway.rst @@ -0,0 +1,10 @@ +######## +Giveaway +######## + + +.. automodule:: aiogram.types.giveaway + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/giveaway_completed.rst b/docs/api/types/giveaway_completed.rst new file mode 100644 index 00000000..1733cf94 --- /dev/null +++ b/docs/api/types/giveaway_completed.rst @@ -0,0 +1,10 @@ +################# +GiveawayCompleted +################# + + +.. automodule:: aiogram.types.giveaway_completed + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/giveaway_created.rst b/docs/api/types/giveaway_created.rst new file mode 100644 index 00000000..5830708d --- /dev/null +++ b/docs/api/types/giveaway_created.rst @@ -0,0 +1,10 @@ +############### +GiveawayCreated +############### + + +.. automodule:: aiogram.types.giveaway_created + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/giveaway_winners.rst b/docs/api/types/giveaway_winners.rst new file mode 100644 index 00000000..bb6a0d0b --- /dev/null +++ b/docs/api/types/giveaway_winners.rst @@ -0,0 +1,10 @@ +############### +GiveawayWinners +############### + + +.. automodule:: aiogram.types.giveaway_winners + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inaccessible_message.rst b/docs/api/types/inaccessible_message.rst new file mode 100644 index 00000000..d70aec55 --- /dev/null +++ b/docs/api/types/inaccessible_message.rst @@ -0,0 +1,10 @@ +################### +InaccessibleMessage +################### + + +.. automodule:: aiogram.types.inaccessible_message + :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 f9b1bfc2..24fe694c 100644 --- a/docs/api/types/index.rst +++ b/docs/api/types/index.rst @@ -5,6 +5,328 @@ Types Here is list of all available API types: +Available types +=============== + +.. toctree:: + :maxdepth: 1 + + accepted_gift_types + animation + audio + background_fill + background_fill_freeform_gradient + background_fill_gradient + background_fill_solid + background_type + background_type_chat_theme + background_type_fill + background_type_pattern + background_type_wallpaper + birthdate + bot_command + bot_command_scope + bot_command_scope_all_chat_administrators + bot_command_scope_all_group_chats + bot_command_scope_all_private_chats + bot_command_scope_chat + bot_command_scope_chat_administrators + bot_command_scope_chat_member + bot_command_scope_default + bot_description + bot_name + bot_short_description + business_bot_rights + business_connection + business_intro + business_location + business_messages_deleted + business_opening_hours + business_opening_hours_interval + callback_query + chat + chat_administrator_rights + chat_background + chat_boost + chat_boost_added + chat_boost_removed + chat_boost_source + chat_boost_source_gift_code + chat_boost_source_giveaway + chat_boost_source_premium + chat_boost_updated + chat_full_info + chat_invite_link + chat_join_request + chat_location + chat_member + chat_member_administrator + chat_member_banned + chat_member_left + chat_member_member + 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 + force_reply + forum_topic + forum_topic_closed + forum_topic_created + forum_topic_edited + forum_topic_reopened + general_forum_topic_hidden + general_forum_topic_unhidden + gift + gift_background + gift_info + gifts + giveaway + giveaway_completed + giveaway_created + giveaway_winners + inaccessible_message + inline_keyboard_button + inline_keyboard_markup + input_checklist + input_checklist_task + input_file + input_media + input_media_animation + input_media_audio + input_media_document + input_media_photo + input_media_video + input_paid_media + 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 + menu_button_default + menu_button_web_app + message + message_auto_delete_timer_changed + message_entity + message_id + message_origin + message_origin_channel + message_origin_chat + message_origin_hidden_user + 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 + video + video_chat_ended + video_chat_participants_invited + video_chat_scheduled + video_chat_started + video_note + video_quality + voice + web_app_data + web_app_info + write_access_allowed + +Inline mode +=========== + +.. toctree:: + :maxdepth: 1 + + chosen_inline_result + inline_query + inline_query_result + inline_query_result_article + inline_query_result_audio + inline_query_result_cached_audio + inline_query_result_cached_document + inline_query_result_cached_gif + inline_query_result_cached_mpeg4_gif + inline_query_result_cached_photo + inline_query_result_cached_sticker + inline_query_result_cached_video + inline_query_result_cached_voice + inline_query_result_contact + inline_query_result_document + inline_query_result_game + inline_query_result_gif + inline_query_result_location + inline_query_result_mpeg4_gif + inline_query_result_photo + inline_query_result_venue + inline_query_result_video + inline_query_result_voice + inline_query_results_button + input_contact_message_content + input_invoice_message_content + input_location_message_content + input_message_content + input_text_message_content + input_venue_message_content + +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 +======== + +.. toctree:: + :maxdepth: 1 + + input_sticker + mask_position + sticker + sticker_set + +Telegram Passport +================= + +.. toctree:: + :maxdepth: 1 + + encrypted_credentials + encrypted_passport_element + passport_data + passport_element_error + passport_element_error_data_field + passport_element_error_file + passport_element_error_files + passport_element_error_front_side + passport_element_error_reverse_side + passport_element_error_selfie + passport_element_error_translation_file + passport_element_error_translation_files + passport_element_error_unspecified + passport_file Getting updates =============== @@ -15,169 +337,12 @@ Getting updates update webhook_info -Available types -=============== - -.. toctree:: - :maxdepth: 1 - - user - chat - message - message_id - message_entity - photo_size - animation - audio - document - video - video_note - voice - contact - dice - poll_option - poll_answer - poll - location - venue - proximity_alert_triggered - message_auto_delete_timer_changed - voice_chat_scheduled - voice_chat_started - voice_chat_ended - voice_chat_participants_invited - user_profile_photos - file - reply_keyboard_markup - keyboard_button - keyboard_button_poll_type - reply_keyboard_remove - inline_keyboard_markup - inline_keyboard_button - login_url - callback_query - force_reply - chat_photo - chat_invite_link - chat_member - chat_member_owner - chat_member_administrator - chat_member_member - chat_member_restricted - chat_member_left - chat_member_banned - chat_member_updated - chat_join_request - chat_permissions - chat_location - bot_command - bot_command_scope - bot_command_scope_default - bot_command_scope_all_private_chats - bot_command_scope_all_group_chats - bot_command_scope_all_chat_administrators - bot_command_scope_chat - bot_command_scope_chat_administrators - bot_command_scope_chat_member - response_parameters - input_media - input_media_photo - input_media_video - input_media_animation - input_media_audio - input_media_document - input_file - - - -Stickers -======== - -.. toctree:: - :maxdepth: 1 - - sticker - sticker_set - mask_position - -Inline mode -=========== - -.. toctree:: - :maxdepth: 1 - - inline_query - inline_query_result - inline_query_result_article - inline_query_result_photo - inline_query_result_gif - inline_query_result_mpeg4_gif - inline_query_result_video - inline_query_result_audio - inline_query_result_voice - inline_query_result_document - inline_query_result_location - inline_query_result_venue - inline_query_result_contact - inline_query_result_game - inline_query_result_cached_photo - inline_query_result_cached_gif - inline_query_result_cached_mpeg4_gif - inline_query_result_cached_sticker - inline_query_result_cached_document - inline_query_result_cached_video - inline_query_result_cached_voice - inline_query_result_cached_audio - input_message_content - input_text_message_content - input_location_message_content - input_venue_message_content - input_contact_message_content - input_invoice_message_content - chosen_inline_result - -Payments -======== - -.. toctree:: - :maxdepth: 1 - - labeled_price - invoice - shipping_address - order_info - shipping_option - successful_payment - shipping_query - pre_checkout_query - -Telegram Passport -================= - -.. toctree:: - :maxdepth: 1 - - passport_data - passport_file - encrypted_passport_element - encrypted_credentials - passport_element_error - passport_element_error_data_field - passport_element_error_front_side - passport_element_error_reverse_side - passport_element_error_selfie - passport_element_error_file - passport_element_error_files - passport_element_error_translation_file - passport_element_error_translation_files - passport_element_error_unspecified - Games ===== .. toctree:: :maxdepth: 1 - game callback_game + game game_high_score diff --git a/docs/api/types/inline_keyboard_button.rst b/docs/api/types/inline_keyboard_button.rst index 1075ad01..43ca6325 100644 --- a/docs/api/types/inline_keyboard_button.rst +++ b/docs/api/types/inline_keyboard_button.rst @@ -7,3 +7,4 @@ InlineKeyboardButton :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_keyboard_markup.rst b/docs/api/types/inline_keyboard_markup.rst index b7c5108f..ff47ff06 100644 --- a/docs/api/types/inline_keyboard_markup.rst +++ b/docs/api/types/inline_keyboard_markup.rst @@ -7,3 +7,4 @@ InlineKeyboardMarkup :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query.rst b/docs/api/types/inline_query.rst index 7577b29c..437f0880 100644 --- a/docs/api/types/inline_query.rst +++ b/docs/api/types/inline_query.rst @@ -7,3 +7,4 @@ InlineQuery :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result.rst b/docs/api/types/inline_query_result.rst index ba3e265f..0caa7246 100644 --- a/docs/api/types/inline_query_result.rst +++ b/docs/api/types/inline_query_result.rst @@ -7,3 +7,4 @@ InlineQueryResult :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_article.rst b/docs/api/types/inline_query_result_article.rst index 8ffb1db9..59c1c085 100644 --- a/docs/api/types/inline_query_result_article.rst +++ b/docs/api/types/inline_query_result_article.rst @@ -7,3 +7,4 @@ InlineQueryResultArticle :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_audio.rst b/docs/api/types/inline_query_result_audio.rst index 50858460..58d5b640 100644 --- a/docs/api/types/inline_query_result_audio.rst +++ b/docs/api/types/inline_query_result_audio.rst @@ -7,3 +7,4 @@ InlineQueryResultAudio :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_cached_audio.rst b/docs/api/types/inline_query_result_cached_audio.rst index bcce043d..9c9e83dd 100644 --- a/docs/api/types/inline_query_result_cached_audio.rst +++ b/docs/api/types/inline_query_result_cached_audio.rst @@ -7,3 +7,4 @@ InlineQueryResultCachedAudio :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_cached_document.rst b/docs/api/types/inline_query_result_cached_document.rst index 0813734d..d6081dc9 100644 --- a/docs/api/types/inline_query_result_cached_document.rst +++ b/docs/api/types/inline_query_result_cached_document.rst @@ -7,3 +7,4 @@ InlineQueryResultCachedDocument :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_cached_gif.rst b/docs/api/types/inline_query_result_cached_gif.rst index d1103a55..e38a0305 100644 --- a/docs/api/types/inline_query_result_cached_gif.rst +++ b/docs/api/types/inline_query_result_cached_gif.rst @@ -7,3 +7,4 @@ InlineQueryResultCachedGif :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_cached_mpeg4_gif.rst b/docs/api/types/inline_query_result_cached_mpeg4_gif.rst index 022ce1ca..f073b73e 100644 --- a/docs/api/types/inline_query_result_cached_mpeg4_gif.rst +++ b/docs/api/types/inline_query_result_cached_mpeg4_gif.rst @@ -7,3 +7,4 @@ InlineQueryResultCachedMpeg4Gif :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_cached_photo.rst b/docs/api/types/inline_query_result_cached_photo.rst index 3fcd27bc..c75f6d34 100644 --- a/docs/api/types/inline_query_result_cached_photo.rst +++ b/docs/api/types/inline_query_result_cached_photo.rst @@ -7,3 +7,4 @@ InlineQueryResultCachedPhoto :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_cached_sticker.rst b/docs/api/types/inline_query_result_cached_sticker.rst index 30a5d5b3..d0e965a8 100644 --- a/docs/api/types/inline_query_result_cached_sticker.rst +++ b/docs/api/types/inline_query_result_cached_sticker.rst @@ -7,3 +7,4 @@ InlineQueryResultCachedSticker :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_cached_video.rst b/docs/api/types/inline_query_result_cached_video.rst index 0c5acbe9..a7a7b130 100644 --- a/docs/api/types/inline_query_result_cached_video.rst +++ b/docs/api/types/inline_query_result_cached_video.rst @@ -7,3 +7,4 @@ InlineQueryResultCachedVideo :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_cached_voice.rst b/docs/api/types/inline_query_result_cached_voice.rst index 5b4f0d8e..95dbe44a 100644 --- a/docs/api/types/inline_query_result_cached_voice.rst +++ b/docs/api/types/inline_query_result_cached_voice.rst @@ -7,3 +7,4 @@ InlineQueryResultCachedVoice :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_contact.rst b/docs/api/types/inline_query_result_contact.rst index 123b4d61..ca3f74bc 100644 --- a/docs/api/types/inline_query_result_contact.rst +++ b/docs/api/types/inline_query_result_contact.rst @@ -7,3 +7,4 @@ InlineQueryResultContact :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_document.rst b/docs/api/types/inline_query_result_document.rst index 6352c6c3..d5e03940 100644 --- a/docs/api/types/inline_query_result_document.rst +++ b/docs/api/types/inline_query_result_document.rst @@ -7,3 +7,4 @@ InlineQueryResultDocument :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_game.rst b/docs/api/types/inline_query_result_game.rst index 562c1974..4f57d322 100644 --- a/docs/api/types/inline_query_result_game.rst +++ b/docs/api/types/inline_query_result_game.rst @@ -7,3 +7,4 @@ InlineQueryResultGame :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_gif.rst b/docs/api/types/inline_query_result_gif.rst index 552252de..54628ab6 100644 --- a/docs/api/types/inline_query_result_gif.rst +++ b/docs/api/types/inline_query_result_gif.rst @@ -7,3 +7,4 @@ InlineQueryResultGif :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_location.rst b/docs/api/types/inline_query_result_location.rst index fcde9fb2..7f637827 100644 --- a/docs/api/types/inline_query_result_location.rst +++ b/docs/api/types/inline_query_result_location.rst @@ -7,3 +7,4 @@ InlineQueryResultLocation :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_mpeg4_gif.rst b/docs/api/types/inline_query_result_mpeg4_gif.rst index ccdfb06f..80144e82 100644 --- a/docs/api/types/inline_query_result_mpeg4_gif.rst +++ b/docs/api/types/inline_query_result_mpeg4_gif.rst @@ -7,3 +7,4 @@ InlineQueryResultMpeg4Gif :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_photo.rst b/docs/api/types/inline_query_result_photo.rst index 4af41c8e..e36c6b01 100644 --- a/docs/api/types/inline_query_result_photo.rst +++ b/docs/api/types/inline_query_result_photo.rst @@ -7,3 +7,4 @@ InlineQueryResultPhoto :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_venue.rst b/docs/api/types/inline_query_result_venue.rst index b3c40c01..ea0b5331 100644 --- a/docs/api/types/inline_query_result_venue.rst +++ b/docs/api/types/inline_query_result_venue.rst @@ -7,3 +7,4 @@ InlineQueryResultVenue :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_video.rst b/docs/api/types/inline_query_result_video.rst index e27f6be3..b767f746 100644 --- a/docs/api/types/inline_query_result_video.rst +++ b/docs/api/types/inline_query_result_video.rst @@ -7,3 +7,4 @@ InlineQueryResultVideo :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_result_voice.rst b/docs/api/types/inline_query_result_voice.rst index 4496c4fe..fc648e0a 100644 --- a/docs/api/types/inline_query_result_voice.rst +++ b/docs/api/types/inline_query_result_voice.rst @@ -7,3 +7,4 @@ InlineQueryResultVoice :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/inline_query_results_button.rst b/docs/api/types/inline_query_results_button.rst new file mode 100644 index 00000000..75903af3 --- /dev/null +++ b/docs/api/types/inline_query_results_button.rst @@ -0,0 +1,10 @@ +######################## +InlineQueryResultsButton +######################## + + +.. automodule:: aiogram.types.inline_query_results_button + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields 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_contact_message_content.rst b/docs/api/types/input_contact_message_content.rst index a3100b83..ea3ae3f0 100644 --- a/docs/api/types/input_contact_message_content.rst +++ b/docs/api/types/input_contact_message_content.rst @@ -7,3 +7,4 @@ InputContactMessageContent :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_file.rst b/docs/api/types/input_file.rst index 4197e6cd..1cb8fa16 100644 --- a/docs/api/types/input_file.rst +++ b/docs/api/types/input_file.rst @@ -7,3 +7,4 @@ InputFile :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_invoice_message_content.rst b/docs/api/types/input_invoice_message_content.rst index f5d7a0ab..f08e8fff 100644 --- a/docs/api/types/input_invoice_message_content.rst +++ b/docs/api/types/input_invoice_message_content.rst @@ -7,3 +7,4 @@ InputInvoiceMessageContent :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_location_message_content.rst b/docs/api/types/input_location_message_content.rst index 6ca59b0b..8c79a76c 100644 --- a/docs/api/types/input_location_message_content.rst +++ b/docs/api/types/input_location_message_content.rst @@ -7,3 +7,4 @@ InputLocationMessageContent :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_media.rst b/docs/api/types/input_media.rst index 9b3f386b..f2bbb471 100644 --- a/docs/api/types/input_media.rst +++ b/docs/api/types/input_media.rst @@ -7,3 +7,4 @@ InputMedia :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_media_animation.rst b/docs/api/types/input_media_animation.rst index 9c00494b..eb6b2754 100644 --- a/docs/api/types/input_media_animation.rst +++ b/docs/api/types/input_media_animation.rst @@ -7,3 +7,4 @@ InputMediaAnimation :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_media_audio.rst b/docs/api/types/input_media_audio.rst index c12d307c..f44b52c7 100644 --- a/docs/api/types/input_media_audio.rst +++ b/docs/api/types/input_media_audio.rst @@ -7,3 +7,4 @@ InputMediaAudio :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_media_document.rst b/docs/api/types/input_media_document.rst index 645b78e7..4dc1eca0 100644 --- a/docs/api/types/input_media_document.rst +++ b/docs/api/types/input_media_document.rst @@ -7,3 +7,4 @@ InputMediaDocument :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_media_photo.rst b/docs/api/types/input_media_photo.rst index 32656e29..d78d91ef 100644 --- a/docs/api/types/input_media_photo.rst +++ b/docs/api/types/input_media_photo.rst @@ -7,3 +7,4 @@ InputMediaPhoto :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_media_video.rst b/docs/api/types/input_media_video.rst index 57099c51..c6b84be0 100644 --- a/docs/api/types/input_media_video.rst +++ b/docs/api/types/input_media_video.rst @@ -7,3 +7,4 @@ InputMediaVideo :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_message_content.rst b/docs/api/types/input_message_content.rst index 84040fb7..c79c4c6c 100644 --- a/docs/api/types/input_message_content.rst +++ b/docs/api/types/input_message_content.rst @@ -7,3 +7,4 @@ InputMessageContent :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_paid_media.rst b/docs/api/types/input_paid_media.rst new file mode 100644 index 00000000..6d140432 --- /dev/null +++ b/docs/api/types/input_paid_media.rst @@ -0,0 +1,10 @@ +############## +InputPaidMedia +############## + + +.. automodule:: aiogram.types.input_paid_media + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_paid_media_photo.rst b/docs/api/types/input_paid_media_photo.rst new file mode 100644 index 00000000..ecaf00a6 --- /dev/null +++ b/docs/api/types/input_paid_media_photo.rst @@ -0,0 +1,10 @@ +################### +InputPaidMediaPhoto +################### + + +.. automodule:: aiogram.types.input_paid_media_photo + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_paid_media_video.rst b/docs/api/types/input_paid_media_video.rst new file mode 100644 index 00000000..305d8f04 --- /dev/null +++ b/docs/api/types/input_paid_media_video.rst @@ -0,0 +1,10 @@ +################### +InputPaidMediaVideo +################### + + +.. automodule:: aiogram.types.input_paid_media_video + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_poll_option.rst b/docs/api/types/input_poll_option.rst new file mode 100644 index 00000000..66b7f11b --- /dev/null +++ b/docs/api/types/input_poll_option.rst @@ -0,0 +1,10 @@ +############### +InputPollOption +############### + + +.. automodule:: aiogram.types.input_poll_option + :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_sticker.rst b/docs/api/types/input_sticker.rst new file mode 100644 index 00000000..e235697d --- /dev/null +++ b/docs/api/types/input_sticker.rst @@ -0,0 +1,10 @@ +############ +InputSticker +############ + + +.. automodule:: aiogram.types.input_sticker + :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/input_text_message_content.rst b/docs/api/types/input_text_message_content.rst index 1eb83e54..b019fb5d 100644 --- a/docs/api/types/input_text_message_content.rst +++ b/docs/api/types/input_text_message_content.rst @@ -7,3 +7,4 @@ InputTextMessageContent :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_venue_message_content.rst b/docs/api/types/input_venue_message_content.rst index 479a99a0..6288d78a 100644 --- a/docs/api/types/input_venue_message_content.rst +++ b/docs/api/types/input_venue_message_content.rst @@ -7,3 +7,4 @@ InputVenueMessageContent :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/invoice.rst b/docs/api/types/invoice.rst index 24ecc961..e5582e52 100644 --- a/docs/api/types/invoice.rst +++ b/docs/api/types/invoice.rst @@ -7,3 +7,4 @@ Invoice :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/keyboard_button.rst b/docs/api/types/keyboard_button.rst index 9faca06d..b67d22fa 100644 --- a/docs/api/types/keyboard_button.rst +++ b/docs/api/types/keyboard_button.rst @@ -7,3 +7,4 @@ KeyboardButton :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/keyboard_button_poll_type.rst b/docs/api/types/keyboard_button_poll_type.rst index 9a4974a5..c15f6e1f 100644 --- a/docs/api/types/keyboard_button_poll_type.rst +++ b/docs/api/types/keyboard_button_poll_type.rst @@ -7,3 +7,4 @@ KeyboardButtonPollType :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/keyboard_button_request_chat.rst b/docs/api/types/keyboard_button_request_chat.rst new file mode 100644 index 00000000..083bbd55 --- /dev/null +++ b/docs/api/types/keyboard_button_request_chat.rst @@ -0,0 +1,10 @@ +######################### +KeyboardButtonRequestChat +######################### + + +.. automodule:: aiogram.types.keyboard_button_request_chat + :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/keyboard_button_request_user.rst b/docs/api/types/keyboard_button_request_user.rst new file mode 100644 index 00000000..fe5be538 --- /dev/null +++ b/docs/api/types/keyboard_button_request_user.rst @@ -0,0 +1,10 @@ +######################### +KeyboardButtonRequestUser +######################### + + +.. automodule:: aiogram.types.keyboard_button_request_user + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/keyboard_button_request_users.rst b/docs/api/types/keyboard_button_request_users.rst new file mode 100644 index 00000000..7c130394 --- /dev/null +++ b/docs/api/types/keyboard_button_request_users.rst @@ -0,0 +1,10 @@ +########################## +KeyboardButtonRequestUsers +########################## + + +.. automodule:: aiogram.types.keyboard_button_request_users + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/labeled_price.rst b/docs/api/types/labeled_price.rst index a76b28f3..da5ccabb 100644 --- a/docs/api/types/labeled_price.rst +++ b/docs/api/types/labeled_price.rst @@ -7,3 +7,4 @@ LabeledPrice :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/link_preview_options.rst b/docs/api/types/link_preview_options.rst new file mode 100644 index 00000000..636553ac --- /dev/null +++ b/docs/api/types/link_preview_options.rst @@ -0,0 +1,10 @@ +################## +LinkPreviewOptions +################## + + +.. automodule:: aiogram.types.link_preview_options + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/location.rst b/docs/api/types/location.rst index 2957683a..e6fa6bf0 100644 --- a/docs/api/types/location.rst +++ b/docs/api/types/location.rst @@ -7,3 +7,4 @@ Location :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/login_url.rst b/docs/api/types/login_url.rst index f72b28b6..3caae33d 100644 --- a/docs/api/types/login_url.rst +++ b/docs/api/types/login_url.rst @@ -7,3 +7,4 @@ LoginUrl :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/mask_position.rst b/docs/api/types/mask_position.rst index 74c28494..d53f7598 100644 --- a/docs/api/types/mask_position.rst +++ b/docs/api/types/mask_position.rst @@ -7,3 +7,4 @@ MaskPosition :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/maybe_inaccessible_message.rst b/docs/api/types/maybe_inaccessible_message.rst new file mode 100644 index 00000000..fade915c --- /dev/null +++ b/docs/api/types/maybe_inaccessible_message.rst @@ -0,0 +1,10 @@ +######################## +MaybeInaccessibleMessage +######################## + + +.. automodule:: aiogram.types.maybe_inaccessible_message + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/menu_button.rst b/docs/api/types/menu_button.rst new file mode 100644 index 00000000..a1ab0d8b --- /dev/null +++ b/docs/api/types/menu_button.rst @@ -0,0 +1,10 @@ +########## +MenuButton +########## + + +.. automodule:: aiogram.types.menu_button + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/menu_button_commands.rst b/docs/api/types/menu_button_commands.rst new file mode 100644 index 00000000..f5662136 --- /dev/null +++ b/docs/api/types/menu_button_commands.rst @@ -0,0 +1,10 @@ +################## +MenuButtonCommands +################## + + +.. automodule:: aiogram.types.menu_button_commands + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/menu_button_default.rst b/docs/api/types/menu_button_default.rst new file mode 100644 index 00000000..6594f436 --- /dev/null +++ b/docs/api/types/menu_button_default.rst @@ -0,0 +1,10 @@ +################# +MenuButtonDefault +################# + + +.. automodule:: aiogram.types.menu_button_default + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/menu_button_web_app.rst b/docs/api/types/menu_button_web_app.rst new file mode 100644 index 00000000..f65948fd --- /dev/null +++ b/docs/api/types/menu_button_web_app.rst @@ -0,0 +1,10 @@ +################ +MenuButtonWebApp +################ + + +.. automodule:: aiogram.types.menu_button_web_app + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/message.rst b/docs/api/types/message.rst index 5e1be4f7..90ce74ca 100644 --- a/docs/api/types/message.rst +++ b/docs/api/types/message.rst @@ -7,3 +7,4 @@ Message :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/message_auto_delete_timer_changed.rst b/docs/api/types/message_auto_delete_timer_changed.rst index 102caacc..80d3f7db 100644 --- a/docs/api/types/message_auto_delete_timer_changed.rst +++ b/docs/api/types/message_auto_delete_timer_changed.rst @@ -7,3 +7,4 @@ MessageAutoDeleteTimerChanged :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/message_entity.rst b/docs/api/types/message_entity.rst index 38ee737d..15d9e15c 100644 --- a/docs/api/types/message_entity.rst +++ b/docs/api/types/message_entity.rst @@ -7,3 +7,4 @@ MessageEntity :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/message_id.rst b/docs/api/types/message_id.rst index 2ed2adc6..55f15959 100644 --- a/docs/api/types/message_id.rst +++ b/docs/api/types/message_id.rst @@ -7,3 +7,4 @@ MessageId :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/message_origin.rst b/docs/api/types/message_origin.rst new file mode 100644 index 00000000..cda0f666 --- /dev/null +++ b/docs/api/types/message_origin.rst @@ -0,0 +1,10 @@ +############# +MessageOrigin +############# + + +.. automodule:: aiogram.types.message_origin + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/message_origin_channel.rst b/docs/api/types/message_origin_channel.rst new file mode 100644 index 00000000..f60cc7c0 --- /dev/null +++ b/docs/api/types/message_origin_channel.rst @@ -0,0 +1,10 @@ +#################### +MessageOriginChannel +#################### + + +.. automodule:: aiogram.types.message_origin_channel + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/message_origin_chat.rst b/docs/api/types/message_origin_chat.rst new file mode 100644 index 00000000..f084219a --- /dev/null +++ b/docs/api/types/message_origin_chat.rst @@ -0,0 +1,10 @@ +################# +MessageOriginChat +################# + + +.. automodule:: aiogram.types.message_origin_chat + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/message_origin_hidden_user.rst b/docs/api/types/message_origin_hidden_user.rst new file mode 100644 index 00000000..3a8b5291 --- /dev/null +++ b/docs/api/types/message_origin_hidden_user.rst @@ -0,0 +1,10 @@ +####################### +MessageOriginHiddenUser +####################### + + +.. automodule:: aiogram.types.message_origin_hidden_user + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/message_origin_user.rst b/docs/api/types/message_origin_user.rst new file mode 100644 index 00000000..99e1f261 --- /dev/null +++ b/docs/api/types/message_origin_user.rst @@ -0,0 +1,10 @@ +################# +MessageOriginUser +################# + + +.. automodule:: aiogram.types.message_origin_user + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/message_reaction_count_updated.rst b/docs/api/types/message_reaction_count_updated.rst new file mode 100644 index 00000000..6951609e --- /dev/null +++ b/docs/api/types/message_reaction_count_updated.rst @@ -0,0 +1,10 @@ +########################### +MessageReactionCountUpdated +########################### + + +.. automodule:: aiogram.types.message_reaction_count_updated + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/message_reaction_updated.rst b/docs/api/types/message_reaction_updated.rst new file mode 100644 index 00000000..527219c4 --- /dev/null +++ b/docs/api/types/message_reaction_updated.rst @@ -0,0 +1,10 @@ +###################### +MessageReactionUpdated +###################### + + +.. automodule:: aiogram.types.message_reaction_updated + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/order_info.rst b/docs/api/types/order_info.rst index 6180f709..5529a607 100644 --- a/docs/api/types/order_info.rst +++ b/docs/api/types/order_info.rst @@ -7,3 +7,4 @@ OrderInfo :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.rst b/docs/api/types/paid_media.rst new file mode 100644 index 00000000..1e10cf31 --- /dev/null +++ b/docs/api/types/paid_media.rst @@ -0,0 +1,10 @@ +######### +PaidMedia +######### + + +.. automodule:: aiogram.types.paid_media + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/paid_media_info.rst b/docs/api/types/paid_media_info.rst new file mode 100644 index 00000000..94797a81 --- /dev/null +++ b/docs/api/types/paid_media_info.rst @@ -0,0 +1,10 @@ +############# +PaidMediaInfo +############# + + +.. automodule:: aiogram.types.paid_media_info + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/paid_media_photo.rst b/docs/api/types/paid_media_photo.rst new file mode 100644 index 00000000..e14f0c16 --- /dev/null +++ b/docs/api/types/paid_media_photo.rst @@ -0,0 +1,10 @@ +############## +PaidMediaPhoto +############## + + +.. automodule:: aiogram.types.paid_media_photo + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/paid_media_preview.rst b/docs/api/types/paid_media_preview.rst new file mode 100644 index 00000000..8a27b282 --- /dev/null +++ b/docs/api/types/paid_media_preview.rst @@ -0,0 +1,10 @@ +################ +PaidMediaPreview +################ + + +.. automodule:: aiogram.types.paid_media_preview + :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_media_video.rst b/docs/api/types/paid_media_video.rst new file mode 100644 index 00000000..0a2b9e3d --- /dev/null +++ b/docs/api/types/paid_media_video.rst @@ -0,0 +1,10 @@ +############## +PaidMediaVideo +############## + + +.. automodule:: aiogram.types.paid_media_video + :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/passport_data.rst b/docs/api/types/passport_data.rst index 9a3de684..eea326bb 100644 --- a/docs/api/types/passport_data.rst +++ b/docs/api/types/passport_data.rst @@ -7,3 +7,4 @@ PassportData :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/passport_element_error.rst b/docs/api/types/passport_element_error.rst index 8fc30e86..24e16dd0 100644 --- a/docs/api/types/passport_element_error.rst +++ b/docs/api/types/passport_element_error.rst @@ -7,3 +7,4 @@ PassportElementError :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/passport_element_error_data_field.rst b/docs/api/types/passport_element_error_data_field.rst index b9382471..08e75bc1 100644 --- a/docs/api/types/passport_element_error_data_field.rst +++ b/docs/api/types/passport_element_error_data_field.rst @@ -7,3 +7,4 @@ PassportElementErrorDataField :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/passport_element_error_file.rst b/docs/api/types/passport_element_error_file.rst index 877def6a..7d209266 100644 --- a/docs/api/types/passport_element_error_file.rst +++ b/docs/api/types/passport_element_error_file.rst @@ -7,3 +7,4 @@ PassportElementErrorFile :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/passport_element_error_files.rst b/docs/api/types/passport_element_error_files.rst index 922b4ffb..9d9f5585 100644 --- a/docs/api/types/passport_element_error_files.rst +++ b/docs/api/types/passport_element_error_files.rst @@ -7,3 +7,4 @@ PassportElementErrorFiles :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/passport_element_error_front_side.rst b/docs/api/types/passport_element_error_front_side.rst index 3f7dfe81..c72e9b87 100644 --- a/docs/api/types/passport_element_error_front_side.rst +++ b/docs/api/types/passport_element_error_front_side.rst @@ -7,3 +7,4 @@ PassportElementErrorFrontSide :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/passport_element_error_reverse_side.rst b/docs/api/types/passport_element_error_reverse_side.rst index dd61c9a1..a9147a70 100644 --- a/docs/api/types/passport_element_error_reverse_side.rst +++ b/docs/api/types/passport_element_error_reverse_side.rst @@ -7,3 +7,4 @@ PassportElementErrorReverseSide :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/passport_element_error_selfie.rst b/docs/api/types/passport_element_error_selfie.rst index d3463191..ed452899 100644 --- a/docs/api/types/passport_element_error_selfie.rst +++ b/docs/api/types/passport_element_error_selfie.rst @@ -7,3 +7,4 @@ PassportElementErrorSelfie :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/passport_element_error_translation_file.rst b/docs/api/types/passport_element_error_translation_file.rst index 3a0e16aa..68e3417b 100644 --- a/docs/api/types/passport_element_error_translation_file.rst +++ b/docs/api/types/passport_element_error_translation_file.rst @@ -7,3 +7,4 @@ PassportElementErrorTranslationFile :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/passport_element_error_translation_files.rst b/docs/api/types/passport_element_error_translation_files.rst index 9ac03422..5102b071 100644 --- a/docs/api/types/passport_element_error_translation_files.rst +++ b/docs/api/types/passport_element_error_translation_files.rst @@ -7,3 +7,4 @@ PassportElementErrorTranslationFiles :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/passport_element_error_unspecified.rst b/docs/api/types/passport_element_error_unspecified.rst index ec90bed9..6510d51e 100644 --- a/docs/api/types/passport_element_error_unspecified.rst +++ b/docs/api/types/passport_element_error_unspecified.rst @@ -7,3 +7,4 @@ PassportElementErrorUnspecified :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/passport_file.rst b/docs/api/types/passport_file.rst index 4c737fff..1a2dcd56 100644 --- a/docs/api/types/passport_file.rst +++ b/docs/api/types/passport_file.rst @@ -7,3 +7,4 @@ PassportFile :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/photo_size.rst b/docs/api/types/photo_size.rst index 1086588c..3605b912 100644 --- a/docs/api/types/photo_size.rst +++ b/docs/api/types/photo_size.rst @@ -7,3 +7,4 @@ PhotoSize :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/poll.rst b/docs/api/types/poll.rst index fd11bc88..294b323b 100644 --- a/docs/api/types/poll.rst +++ b/docs/api/types/poll.rst @@ -7,3 +7,4 @@ Poll :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/poll_answer.rst b/docs/api/types/poll_answer.rst index fe92fb6a..680cc75e 100644 --- a/docs/api/types/poll_answer.rst +++ b/docs/api/types/poll_answer.rst @@ -7,3 +7,4 @@ PollAnswer :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/poll_option.rst b/docs/api/types/poll_option.rst index 72ebfbd2..b85634e0 100644 --- a/docs/api/types/poll_option.rst +++ b/docs/api/types/poll_option.rst @@ -7,3 +7,4 @@ PollOption :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/pre_checkout_query.rst b/docs/api/types/pre_checkout_query.rst index 418c11b9..8f330051 100644 --- a/docs/api/types/pre_checkout_query.rst +++ b/docs/api/types/pre_checkout_query.rst @@ -7,3 +7,4 @@ PreCheckoutQuery :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/proximity_alert_triggered.rst b/docs/api/types/proximity_alert_triggered.rst index 98ac7d2f..16a47c11 100644 --- a/docs/api/types/proximity_alert_triggered.rst +++ b/docs/api/types/proximity_alert_triggered.rst @@ -7,3 +7,4 @@ ProximityAlertTriggered :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/reaction_count.rst b/docs/api/types/reaction_count.rst new file mode 100644 index 00000000..5d61e4ce --- /dev/null +++ b/docs/api/types/reaction_count.rst @@ -0,0 +1,10 @@ +############# +ReactionCount +############# + + +.. automodule:: aiogram.types.reaction_count + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/reaction_type.rst b/docs/api/types/reaction_type.rst new file mode 100644 index 00000000..174bc444 --- /dev/null +++ b/docs/api/types/reaction_type.rst @@ -0,0 +1,10 @@ +############ +ReactionType +############ + + +.. automodule:: aiogram.types.reaction_type + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/reaction_type_custom_emoji.rst b/docs/api/types/reaction_type_custom_emoji.rst new file mode 100644 index 00000000..184a6976 --- /dev/null +++ b/docs/api/types/reaction_type_custom_emoji.rst @@ -0,0 +1,10 @@ +####################### +ReactionTypeCustomEmoji +####################### + + +.. automodule:: aiogram.types.reaction_type_custom_emoji + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/reaction_type_emoji.rst b/docs/api/types/reaction_type_emoji.rst new file mode 100644 index 00000000..d01b5fcb --- /dev/null +++ b/docs/api/types/reaction_type_emoji.rst @@ -0,0 +1,10 @@ +################# +ReactionTypeEmoji +################# + + +.. automodule:: aiogram.types.reaction_type_emoji + :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/reply_keyboard_markup.rst b/docs/api/types/reply_keyboard_markup.rst index a5c5ae85..01c040ee 100644 --- a/docs/api/types/reply_keyboard_markup.rst +++ b/docs/api/types/reply_keyboard_markup.rst @@ -7,3 +7,4 @@ ReplyKeyboardMarkup :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/reply_keyboard_remove.rst b/docs/api/types/reply_keyboard_remove.rst index 799ad3a9..b54b06f7 100644 --- a/docs/api/types/reply_keyboard_remove.rst +++ b/docs/api/types/reply_keyboard_remove.rst @@ -7,3 +7,4 @@ ReplyKeyboardRemove :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/reply_parameters.rst b/docs/api/types/reply_parameters.rst new file mode 100644 index 00000000..22c3c734 --- /dev/null +++ b/docs/api/types/reply_parameters.rst @@ -0,0 +1,10 @@ +############### +ReplyParameters +############### + + +.. automodule:: aiogram.types.reply_parameters + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/response_parameters.rst b/docs/api/types/response_parameters.rst index 5b7056b8..31ae0c34 100644 --- a/docs/api/types/response_parameters.rst +++ b/docs/api/types/response_parameters.rst @@ -7,3 +7,4 @@ ResponseParameters :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/revenue_withdrawal_state.rst b/docs/api/types/revenue_withdrawal_state.rst new file mode 100644 index 00000000..059a64b5 --- /dev/null +++ b/docs/api/types/revenue_withdrawal_state.rst @@ -0,0 +1,10 @@ +###################### +RevenueWithdrawalState +###################### + + +.. automodule:: aiogram.types.revenue_withdrawal_state + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/revenue_withdrawal_state_failed.rst b/docs/api/types/revenue_withdrawal_state_failed.rst new file mode 100644 index 00000000..3fbe74d9 --- /dev/null +++ b/docs/api/types/revenue_withdrawal_state_failed.rst @@ -0,0 +1,10 @@ +############################ +RevenueWithdrawalStateFailed +############################ + + +.. automodule:: aiogram.types.revenue_withdrawal_state_failed + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/revenue_withdrawal_state_pending.rst b/docs/api/types/revenue_withdrawal_state_pending.rst new file mode 100644 index 00000000..3eecde08 --- /dev/null +++ b/docs/api/types/revenue_withdrawal_state_pending.rst @@ -0,0 +1,10 @@ +############################# +RevenueWithdrawalStatePending +############################# + + +.. automodule:: aiogram.types.revenue_withdrawal_state_pending + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/revenue_withdrawal_state_succeeded.rst b/docs/api/types/revenue_withdrawal_state_succeeded.rst new file mode 100644 index 00000000..4d79bbd1 --- /dev/null +++ b/docs/api/types/revenue_withdrawal_state_succeeded.rst @@ -0,0 +1,10 @@ +############################### +RevenueWithdrawalStateSucceeded +############################### + + +.. automodule:: aiogram.types.revenue_withdrawal_state_succeeded + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/sent_web_app_message.rst b/docs/api/types/sent_web_app_message.rst new file mode 100644 index 00000000..a8563b8d --- /dev/null +++ b/docs/api/types/sent_web_app_message.rst @@ -0,0 +1,10 @@ +################# +SentWebAppMessage +################# + + +.. automodule:: aiogram.types.sent_web_app_message + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/shared_user.rst b/docs/api/types/shared_user.rst new file mode 100644 index 00000000..2fd3f46f --- /dev/null +++ b/docs/api/types/shared_user.rst @@ -0,0 +1,10 @@ +########## +SharedUser +########## + + +.. automodule:: aiogram.types.shared_user + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/shipping_address.rst b/docs/api/types/shipping_address.rst index 0421c58e..6eb704f8 100644 --- a/docs/api/types/shipping_address.rst +++ b/docs/api/types/shipping_address.rst @@ -7,3 +7,4 @@ ShippingAddress :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/shipping_option.rst b/docs/api/types/shipping_option.rst index 28e13897..e5f57874 100644 --- a/docs/api/types/shipping_option.rst +++ b/docs/api/types/shipping_option.rst @@ -7,3 +7,4 @@ ShippingOption :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/shipping_query.rst b/docs/api/types/shipping_query.rst index c4ccdf70..761a2f52 100644 --- a/docs/api/types/shipping_query.rst +++ b/docs/api/types/shipping_query.rst @@ -7,3 +7,4 @@ ShippingQuery :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/star_transaction.rst b/docs/api/types/star_transaction.rst new file mode 100644 index 00000000..1bf89d7c --- /dev/null +++ b/docs/api/types/star_transaction.rst @@ -0,0 +1,10 @@ +############### +StarTransaction +############### + + +.. automodule:: aiogram.types.star_transaction + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/star_transactions.rst b/docs/api/types/star_transactions.rst new file mode 100644 index 00000000..5ceadd1e --- /dev/null +++ b/docs/api/types/star_transactions.rst @@ -0,0 +1,10 @@ +################ +StarTransactions +################ + + +.. automodule:: aiogram.types.star_transactions + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/sticker.rst b/docs/api/types/sticker.rst index f15dd9ef..3f69a389 100644 --- a/docs/api/types/sticker.rst +++ b/docs/api/types/sticker.rst @@ -7,3 +7,4 @@ Sticker :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/sticker_set.rst b/docs/api/types/sticker_set.rst index a25e064f..9f50ef1d 100644 --- a/docs/api/types/sticker_set.rst +++ b/docs/api/types/sticker_set.rst @@ -7,3 +7,4 @@ StickerSet :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/story.rst b/docs/api/types/story.rst new file mode 100644 index 00000000..68565b39 --- /dev/null +++ b/docs/api/types/story.rst @@ -0,0 +1,10 @@ +##### +Story +##### + + +.. automodule:: aiogram.types.story + :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/successful_payment.rst b/docs/api/types/successful_payment.rst index f21f860b..ed882b60 100644 --- a/docs/api/types/successful_payment.rst +++ b/docs/api/types/successful_payment.rst @@ -7,3 +7,4 @@ SuccessfulPayment :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/switch_inline_query_chosen_chat.rst b/docs/api/types/switch_inline_query_chosen_chat.rst new file mode 100644 index 00000000..0934367d --- /dev/null +++ b/docs/api/types/switch_inline_query_chosen_chat.rst @@ -0,0 +1,10 @@ +########################### +SwitchInlineQueryChosenChat +########################### + + +.. automodule:: aiogram.types.switch_inline_query_chosen_chat + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/text_quote.rst b/docs/api/types/text_quote.rst new file mode 100644 index 00000000..2bf3372e --- /dev/null +++ b/docs/api/types/text_quote.rst @@ -0,0 +1,10 @@ +######### +TextQuote +######### + + +.. automodule:: aiogram.types.text_quote + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/transaction_partner.rst b/docs/api/types/transaction_partner.rst new file mode 100644 index 00000000..2d5a3ee4 --- /dev/null +++ b/docs/api/types/transaction_partner.rst @@ -0,0 +1,10 @@ +################## +TransactionPartner +################## + + +.. automodule:: aiogram.types.transaction_partner + :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_fragment.rst b/docs/api/types/transaction_partner_fragment.rst new file mode 100644 index 00000000..3516bdd7 --- /dev/null +++ b/docs/api/types/transaction_partner_fragment.rst @@ -0,0 +1,10 @@ +########################## +TransactionPartnerFragment +########################## + + +.. automodule:: aiogram.types.transaction_partner_fragment + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/transaction_partner_other.rst b/docs/api/types/transaction_partner_other.rst new file mode 100644 index 00000000..0cdf3d9e --- /dev/null +++ b/docs/api/types/transaction_partner_other.rst @@ -0,0 +1,10 @@ +####################### +TransactionPartnerOther +####################### + + +.. automodule:: aiogram.types.transaction_partner_other + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/transaction_partner_telegram_ads.rst b/docs/api/types/transaction_partner_telegram_ads.rst new file mode 100644 index 00000000..545d277e --- /dev/null +++ b/docs/api/types/transaction_partner_telegram_ads.rst @@ -0,0 +1,10 @@ +############################# +TransactionPartnerTelegramAds +############################# + + +.. automodule:: aiogram.types.transaction_partner_telegram_ads + :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/transaction_partner_user.rst b/docs/api/types/transaction_partner_user.rst new file mode 100644 index 00000000..7016653b --- /dev/null +++ b/docs/api/types/transaction_partner_user.rst @@ -0,0 +1,10 @@ +###################### +TransactionPartnerUser +###################### + + +.. automodule:: aiogram.types.transaction_partner_user + :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/update.rst b/docs/api/types/update.rst index 5419da6e..b789cb3d 100644 --- a/docs/api/types/update.rst +++ b/docs/api/types/update.rst @@ -7,3 +7,4 @@ Update :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/user.rst b/docs/api/types/user.rst index b13f8808..92a0bf32 100644 --- a/docs/api/types/user.rst +++ b/docs/api/types/user.rst @@ -7,3 +7,4 @@ User :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/user_chat_boosts.rst b/docs/api/types/user_chat_boosts.rst new file mode 100644 index 00000000..597c9d15 --- /dev/null +++ b/docs/api/types/user_chat_boosts.rst @@ -0,0 +1,10 @@ +############## +UserChatBoosts +############## + + +.. automodule:: aiogram.types.user_chat_boosts + :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_profile_photos.rst b/docs/api/types/user_profile_photos.rst index b6cce934..29bf9a88 100644 --- a/docs/api/types/user_profile_photos.rst +++ b/docs/api/types/user_profile_photos.rst @@ -7,3 +7,4 @@ UserProfilePhotos :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/user_shared.rst b/docs/api/types/user_shared.rst new file mode 100644 index 00000000..6a485188 --- /dev/null +++ b/docs/api/types/user_shared.rst @@ -0,0 +1,10 @@ +########## +UserShared +########## + + +.. automodule:: aiogram.types.user_shared + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/users_shared.rst b/docs/api/types/users_shared.rst new file mode 100644 index 00000000..c9ff42a1 --- /dev/null +++ b/docs/api/types/users_shared.rst @@ -0,0 +1,10 @@ +########### +UsersShared +########### + + +.. automodule:: aiogram.types.users_shared + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/venue.rst b/docs/api/types/venue.rst index 75a71fff..1827dd18 100644 --- a/docs/api/types/venue.rst +++ b/docs/api/types/venue.rst @@ -7,3 +7,4 @@ Venue :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/video.rst b/docs/api/types/video.rst index 0478b3f7..a2a2c032 100644 --- a/docs/api/types/video.rst +++ b/docs/api/types/video.rst @@ -7,3 +7,4 @@ Video :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/video_chat_ended.rst b/docs/api/types/video_chat_ended.rst new file mode 100644 index 00000000..6edfb158 --- /dev/null +++ b/docs/api/types/video_chat_ended.rst @@ -0,0 +1,10 @@ +############## +VideoChatEnded +############## + + +.. automodule:: aiogram.types.video_chat_ended + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/video_chat_participants_invited.rst b/docs/api/types/video_chat_participants_invited.rst new file mode 100644 index 00000000..8812311f --- /dev/null +++ b/docs/api/types/video_chat_participants_invited.rst @@ -0,0 +1,10 @@ +############################ +VideoChatParticipantsInvited +############################ + + +.. automodule:: aiogram.types.video_chat_participants_invited + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/video_chat_scheduled.rst b/docs/api/types/video_chat_scheduled.rst new file mode 100644 index 00000000..e612af51 --- /dev/null +++ b/docs/api/types/video_chat_scheduled.rst @@ -0,0 +1,10 @@ +################## +VideoChatScheduled +################## + + +.. automodule:: aiogram.types.video_chat_scheduled + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/video_chat_started.rst b/docs/api/types/video_chat_started.rst new file mode 100644 index 00000000..a58fb47e --- /dev/null +++ b/docs/api/types/video_chat_started.rst @@ -0,0 +1,10 @@ +################ +VideoChatStarted +################ + + +.. automodule:: aiogram.types.video_chat_started + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/video_note.rst b/docs/api/types/video_note.rst index b9d308e5..ad0912a6 100644 --- a/docs/api/types/video_note.rst +++ b/docs/api/types/video_note.rst @@ -7,3 +7,4 @@ VideoNote :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/api/types/voice.rst b/docs/api/types/voice.rst index 7d58722d..c963205a 100644 --- a/docs/api/types/voice.rst +++ b/docs/api/types/voice.rst @@ -7,3 +7,4 @@ Voice :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/voice_chat_participants_invited.rst b/docs/api/types/voice_chat_participants_invited.rst deleted file mode 100644 index 89a94fa9..00000000 --- a/docs/api/types/voice_chat_participants_invited.rst +++ /dev/null @@ -1,9 +0,0 @@ -############################ -VoiceChatParticipantsInvited -############################ - - -.. automodule:: aiogram.types.voice_chat_participants_invited - :members: - :member-order: bysource - :undoc-members: True diff --git a/docs/api/types/web_app_data.rst b/docs/api/types/web_app_data.rst new file mode 100644 index 00000000..e4369a88 --- /dev/null +++ b/docs/api/types/web_app_data.rst @@ -0,0 +1,10 @@ +########## +WebAppData +########## + + +.. automodule:: aiogram.types.web_app_data + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/web_app_info.rst b/docs/api/types/web_app_info.rst new file mode 100644 index 00000000..6ebfad64 --- /dev/null +++ b/docs/api/types/web_app_info.rst @@ -0,0 +1,10 @@ +########## +WebAppInfo +########## + + +.. automodule:: aiogram.types.web_app_info + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/webhook_info.rst b/docs/api/types/webhook_info.rst index 259a01bc..7194b726 100644 --- a/docs/api/types/webhook_info.rst +++ b/docs/api/types/webhook_info.rst @@ -7,3 +7,4 @@ WebhookInfo :members: :member-order: bysource :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/write_access_allowed.rst b/docs/api/types/write_access_allowed.rst new file mode 100644 index 00000000..62fa76d6 --- /dev/null +++ b/docs/api/types/write_access_allowed.rst @@ -0,0 +1,10 @@ +################## +WriteAccessAllowed +################## + + +.. automodule:: aiogram.types.write_access_allowed + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/upload_file.rst b/docs/api/upload_file.rst index 4579700e..24fa726f 100644 --- a/docs/api/upload_file.rst +++ b/docs/api/upload_file.rst @@ -10,9 +10,9 @@ there are three ways to send files (photos, stickers, audio, media, etc.): If the file is already stored somewhere on the Telegram servers or file is available by the URL, you don't need to reupload it. -But if you need to upload new file just use subclasses of `InputFile `__. +But if you need to upload a new file just use subclasses of `InputFile `__. -Here is available three different builtin types of input file: +Here are the three different available builtin types of input file: - :class:`aiogram.types.input_file.FSInputFile` - `uploading from file system <#upload-from-file-system>`__ - :class:`aiogram.types.input_file.BufferedInputFile` - `uploading from buffer <#upload-from-buffer>`__ @@ -20,12 +20,10 @@ Here is available three different builtin types of input file: .. warning:: - **Be respectful with Telegram** + **Be respectful to Telegram** - Instances of `InputFile` is reusable. - That's mean you can create instance of InputFile and sent this file multiple times but Telegram - is 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. Upload from file system ======================= @@ -45,7 +43,7 @@ Then you can use it: .. autoclass:: aiogram.types.input_file.FSInputFile - :members: + :members: __init__ Upload from buffer @@ -53,7 +51,7 @@ Upload from buffer Files can be also passed from buffer (For example you generate image using `Pillow `_ -and the want's to sent it to the Telegram): +and you want to send it to Telegram): Import wrapper: @@ -68,7 +66,7 @@ And then you can use it: text_file = BufferedInputFile(b"Hello, world!", filename="file.txt") .. autoclass:: aiogram.types.input_file.BufferedInputFile - :members: + :members: __init__ Upload from url =============== diff --git a/docs/conf.py b/docs/conf.py index 9fd7778d..3fa07d02 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,5 @@ import datetime +from pathlib import Path import aiogram @@ -19,7 +20,7 @@ html_theme_options = {} html_css_files = [ "stylesheets/extra.css", ] -highlight_language = 'python3' +highlight_language = "python3" extensions = [ "sphinx.ext.todo", @@ -27,9 +28,9 @@ extensions = [ "sphinx.ext.autodoc", "sphinx.ext.ifconfig", "sphinx.ext.intersphinx", - "sphinx-prompt", "sphinx_substitution_extensions", "sphinx_copybutton", + # "sphinxcontrib.towncrier.ext", # Temporary disabled due to bug in the extension https://github.com/sphinx-contrib/sphinxcontrib-towncrier/issues/92 ] rst_prolog = f""" @@ -39,8 +40,9 @@ rst_prolog = f""" :language: python3 """ -language = None -locale_dirs = ["locales"] +# language = None +locale_dirs = ["locale/"] +gettext_compact = False exclude_patterns = [] source_suffix = ".rst" @@ -61,3 +63,20 @@ texinfo_documents = [ "Miscellaneous", ), ] + +# add_module_names = False + +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 new file mode 100644 index 00000000..4b9f6c1f --- /dev/null +++ b/docs/contributing.rst @@ -0,0 +1,376 @@ +============ +Contributing +============ + +You're welcome to contribute to aiogram! + +*aiogram* is an open-source project, and anyone can contribute to it in any possible way + + +Developing +========== + +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. + +How to work with pull-request you can read in the `GitHub docs `_ + +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) + + +Use virtualenv +-------------- + +You can create a virtual environment in a directory using :code:`venv` module (it should be pre-installed by default): + +.. code-block::bash + + python -m venv .venv + +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. + + +Activate the environment +------------------------ + +Linux / macOS: + +.. code-block:: bash + + source .venv/bin/activate + +Windows cmd + +.. code-block:: text + + .\.venv\Scripts\activate + +Windows PowerShell + +.. code-block:: powershell + + .\.venv\Scripts\activate.ps1 + +To check it worked, use described command, it should show the :code:`pip` version and location +inside the isolated environment + +.. code-block:: + + pip -V + + +Also make sure you have the latest pip version in your virtual environment to avoid +errors on next steps: + +.. code-block:: + + python -m pip install --upgrade pip + + +Setup project +------------- + +After activating the environment install `aiogram` from sources and their dependencies. + +Linux / macOS: + +.. code-block:: bash + + pip install -e ."[dev,test,docs,fast,redis,mongo,proxy,i18n]" + +Windows: + +.. code-block:: bash + + pip install -e .[dev,test,docs,fast,redis,mongo,proxy,i18n] + +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 +---------------------- + +At this point you can make any changes in the code that you want, it can be any fixes, +implementing new features or experimenting. + + +Format the code (code-style) +---------------------------- + +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 + + 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 +--------- + +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 +----------------- + +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. + +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, +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 +---------------- + +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. + +:code:`` is Issue or Pull-request number, after release link to this issue will +be published to the *Changelog* page. + +:code:`` is a changes category marker, it can be one of: + +- :code:`feature` - when you are implementing new feature +- :code:`bugfix` - when you fix a bug +- :code:`doc` - when you improve the docs +- :code:`removal` - when you remove something from the framework +- :code:`misc` - when changed something inside the Core or project configuration + +If you have troubles with changing category feel free to ask Core-contributors to help with choosing it. + +Complete +-------- + +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. + + +Star on GitHub +============== + +You can "star" repository on GitHub - https://github.com/aiogram/aiogram (click the star button at the top right) + +Adding stars makes it easier for other people to find this project and understand how useful it is. + +Guides +====== + +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. + +This will help more people learn about the framework and learn how to use it + + +Take answers +============ + +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. + +Funding +======= + +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. + +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 `_. diff --git a/docs/dispatcher/class_based_handlers/base.rst b/docs/dispatcher/class_based_handlers/base.rst index 0d478224..72b06e33 100644 --- a/docs/dispatcher/class_based_handlers/base.rst +++ b/docs/dispatcher/class_based_handlers/base.rst @@ -6,15 +6,15 @@ BaseHandler Base handler is generic abstract class and should be used in all other class-based handlers. -Import: :code:`from aiogram.handler import BaseHandler` +Import: :code:`from aiogram.handlers import BaseHandler` By default you will need to override only method :code:`async def handle(self) -> Any: ...` -This class is also have an default initializer and you don't need to change it. -Initializer accepts current event and all contextual data and which -can be accessed from the handler through attributes: :code:`event: TelegramEvent` and :code:`data: Dict[Any, str]` +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[str, Any]` -If instance of the bot is specified in context data or current context it can be accessed through *bot* class attribute. +If an instance of the bot is specified in context data or current context it can be accessed through *bot* class attribute. Example ======= diff --git a/docs/dispatcher/class_based_handlers/callback_query.rst b/docs/dispatcher/class_based_handlers/callback_query.rst index a8cdf152..98012af3 100644 --- a/docs/dispatcher/class_based_handlers/callback_query.rst +++ b/docs/dispatcher/class_based_handlers/callback_query.rst @@ -3,7 +3,7 @@ CallbackQueryHandler #################### -.. automodule:: aiogram.dispatcher.handler.callback_query +.. automodule:: aiogram.handlers.callback_query :members: :member-order: bysource :undoc-members: True diff --git a/docs/dispatcher/class_based_handlers/message.rst b/docs/dispatcher/class_based_handlers/message.rst index 1945e8ba..27629901 100644 --- a/docs/dispatcher/class_based_handlers/message.rst +++ b/docs/dispatcher/class_based_handlers/message.rst @@ -21,7 +21,7 @@ Simple usage Extension ========= -This base handler is subclass of [BaseHandler](basics.md#basehandler) with some extensions: +This base handler is subclass of :ref:`BaseHandler ` with some extensions: - :code:`self.chat` is alias for :code:`self.event.chat` - :code:`self.from_user` is alias for :code:`self.event.from_user` diff --git a/docs/dispatcher/dependency_injection.rst b/docs/dispatcher/dependency_injection.rst new file mode 100644 index 00000000..3c6a3821 --- /dev/null +++ b/docs/dispatcher/dependency_injection.rst @@ -0,0 +1,130 @@ +#################### +Dependency injection +#################### + +Dependency injection is a programming technique that makes a class independent of its dependencies. +It achieves that by decoupling the usage of an object from its creation. +This helps you to follow `SOLID's `_ dependency +inversion and single responsibility principles. + + +How it works in aiogram +======================= + +For each update :class:`aiogram.dispatcher.dispatcher.Dispatcher` passes handling context data. +Filters and middleware can also make changes to the context. + +To access contextual data you should specify corresponding keyword parameter in handler or filter. +For example, to get :class:`aiogram.fsm.context.FSMContext` we do it like that: + +.. code-block:: python + + @router.message(ProfileCompletion.add_photo, F.photo) + async def add_photo( + message: types.Message, bot: Bot, state: FSMContext + ) -> Any: + ... # do something with photo + + +Injecting own dependencies +========================== + +Aiogram provides several ways to complement / modify contextual data. + +The first and easiest way is to simply specify the named arguments in +:class:`aiogram.dispatcher.dispatcher.Dispatcher` initialization, polling start methods +or :class:`aiogram.webhook.aiohttp_server.SimpleRequestHandler` initialization if you use webhooks. + +.. code-block:: python + + async def main() -> None: + dp = Dispatcher(..., foo=42) + return await dp.start_polling( + bot, bar="Bazz" + ) + +Analogy for webhook: + +.. code-block:: python + + async def main() -> None: + dp = Dispatcher(..., foo=42) + handler = SimpleRequestHandler(dispatcher=dp, bot=bot, bar="Bazz") + ... # starting webhook + +:class:`aiogram.dispatcher.dispatcher.Dispatcher`'s workflow data also can be supplemented +by setting values as in a dictionary: + +.. code-block:: python + + dp = Dispatcher(...) + dp["eggs"] = Spam() + +The middlewares updates the context quite often. +You can read more about them on this page: + +- :ref:`Middlewares ` + +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/dispatcher.rst b/docs/dispatcher/dispatcher.rst index 507b2ed0..6fc4dbc7 100644 --- a/docs/dispatcher/dispatcher.rst +++ b/docs/dispatcher/dispatcher.rst @@ -1,17 +1,17 @@ ########## -Dispathcer +Dispatcher ########## -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. -Here is only listed base information about Dispatcher. All about writing handlers, filters and etc. you can found in next pages: +Here is only listed base information about Dispatcher. All about writing handlers, filters and etc. you can find in next pages: -- `Router `__ -- `Observer `__ +- :ref:`Router ` +- :ref:`Filtering events` .. autoclass:: aiogram.dispatcher.dispatcher.Dispatcher - :members: __init__, feed_update, feed_raw_update, feed_webhook_update, start_polling, run_polling + :members: __init__, feed_update, feed_raw_update, feed_webhook_update, start_polling, run_polling, stop_polling Simple usage @@ -39,16 +39,26 @@ Example: router1 = Router() dp.include_router(router1) + +.. _Handling updates: + Handling updates ================ -All updates can be propagated to the dispatcher by :obj:`Dispatcher.feed_update(bot=..., update=...)` method: +All updates can be propagated to the dispatcher by :meth:`~aiogram.dispatcher.dispatcher.Dispatcher.feed_update` method: .. code-block:: python - bot = Bot(...) - dp = Dispathcher() + from aiogram import Bot, Dispatcher - ... + async def update_handler(update: Update, bot: Bot, dispatcher: Dispatcher): + result = await dp.feed_update(bot, update) - result = await dp.feed_update(bot=bot, update=incoming_update) +Also you can feed raw update (dictionary) object to the dispatcher by :meth:`~aiogram.dispatcher.dispatcher.Dispatcher.feed_raw_update` method: + +.. code-block:: python + + from aiogram import Bot, Dispatcher + + async def update_handler(raw_update: dict[str, Any], bot: Bot, dispatcher: Dispatcher): + result = await dp.feed_raw_update(bot, raw_update) diff --git a/docs/dispatcher/errors.rst b/docs/dispatcher/errors.rst new file mode 100644 index 00000000..ace9a81b --- /dev/null +++ b/docs/dispatcher/errors.rst @@ -0,0 +1,49 @@ +###### +Errors +###### + + +Handling errors +=============== + +Is recommended way that you should use errors inside handlers using try-except block, +but in common cases you can use global errors handler at router or dispatcher level. + +If you specify errors handler for router - it will be used for all handlers inside this router. + +If you specify errors handler for dispatcher - it will be used for all handlers inside all routers. + +.. code-block:: python + + @router.error(ExceptionTypeFilter(MyCustomException), F.update.message.as_("message")) + async def handle_my_custom_exception(event: ErrorEvent, message: Message): + # do something with error + await message.answer("Oops, something went wrong!") + + + @router.error() + async def error_handler(event: ErrorEvent): + logger.critical("Critical error caused by %s", event.exception, exc_info=True) + # do something with error + ... + + +.. _error-event: + +ErrorEvent +========== + +.. automodule:: aiogram.types.error_event + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + +.. _error-types: + +Error types +=========== + +.. automodule:: aiogram.exceptions + :members: + :member-order: bysource diff --git a/docs/dispatcher/filters/callback_data.rst b/docs/dispatcher/filters/callback_data.rst new file mode 100644 index 00000000..a16848fe --- /dev/null +++ b/docs/dispatcher/filters/callback_data.rst @@ -0,0 +1,121 @@ +.. _Callback data factory: + +============================== +Callback Data Factory & Filter +============================== + +.. autoclass:: aiogram.filters.callback_data.CallbackData + :members: + :member-order: bysource + :undoc-members: False + :exclude-members: model_config,model_fields + +Usage +===== + +Create subclass of :code:`CallbackData`: + +.. code-block:: python + + class MyCallback(CallbackData, prefix="my"): + foo: str + bar: int + +After that you can generate any callback based on this class, for example: + +.. code-block:: python + + cb1 = MyCallback(foo="demo", bar=42) + cb1.pack() # returns 'my:demo:42' + cb1.unpack('my:demo:42') # returns + +So... Now you can use this class to generate any callbacks with defined structure + +.. code-block:: python + + ... + # Pass it into the markup + InlineKeyboardButton( + text="demo", + callback_data=MyCallback(foo="demo", bar="42").pack() # value should be packed to string + ) + ... + +... and handle by specific rules + +.. code-block:: python + + # Filter callback by type and value of field :code:`foo` + @router.callback_query(MyCallback.filter(F.foo == "demo")) + async def my_callback_foo(query: CallbackQuery, callback_data: MyCallback): + await query.answer(...) + ... + print("bar =", callback_data.bar) + +Also can be used in :doc:`Keyboard builder `: + +.. code-block:: python + + builder = InlineKeyboardBuilder() + builder.button( + text="demo", + callback_data=MyCallback(foo="demo", bar="42") # Value can be not packed to string inplace, because builder knows what to do with callback instance + ) + + +Another abstract example: + +.. code-block:: python + + class Action(str, Enum): + ban = "ban" + kick = "kick" + warn = "warn" + + class AdminAction(CallbackData, prefix="adm"): + action: Action + chat_id: int + user_id: int + + ... + # Inside handler + builder = InlineKeyboardBuilder() + for action in Action: + builder.button( + text=action.value.title(), + callback_data=AdminAction(action=action, chat_id=chat_id, user_id=user_id), + ) + await bot.send_message( + chat_id=admins_chat, + text=f"What do you want to do with {html.quote(name)}", + reply_markup=builder.as_markup(), + ) + ... + + @router.callback_query(AdminAction.filter(F.action == Action.ban)) + async def ban_user(query: CallbackQuery, callback_data: AdminAction, bot: Bot): + await bot.ban_chat_member( + chat_id=callback_data.chat_id, + user_id=callback_data.user_id, + ... + ) + +Known limitations +================= + +Allowed types and their subclasses: + +- :code:`str` +- :code:`int` +- :code:`bool` +- :code:`float` +- :code:`Decimal` (:code:`from decimal import Decimal`) +- :code:`Fraction` (:code:`from fractions import Fraction`) +- :code:`UUID` (:code:`from uuid import UUID`) +- :code:`Enum` (:code:`from enum import Enum`, only for string enums) +- :code:`IntEnum` (:code:`from enum import IntEnum`, only for int enums) + + +.. note:: + + Note that the integer Enum's should be always is subclasses of :code:`IntEnum` in due to parsing issues. diff --git a/docs/dispatcher/filters/chat_member_updated.rst b/docs/dispatcher/filters/chat_member_updated.rst index d02313f4..356fba1d 100644 --- a/docs/dispatcher/filters/chat_member_updated.rst +++ b/docs/dispatcher/filters/chat_member_updated.rst @@ -2,12 +2,33 @@ ChatMemberUpdated ================= -.. autoclass:: aiogram.dispatcher.filters.chat_member_updated.ChatMemberUpdatedFilter +Usage +===== + +Handle user leave or join events + +.. code-block:: python + + from aiogram.filters import IS_MEMBER, IS_NOT_MEMBER + + @router.chat_member(ChatMemberUpdatedFilter(IS_MEMBER >> IS_NOT_MEMBER)) + async def on_user_leave(event: ChatMemberUpdated): ... + + @router.chat_member(ChatMemberUpdatedFilter(IS_NOT_MEMBER >> IS_MEMBER)) + async def on_user_join(event: ChatMemberUpdated): ... + +Or construct your own terms via using pre-defined set of statuses and transitions. + + +Explanation +=========== + +.. autoclass:: aiogram.filters.chat_member_updated.ChatMemberUpdatedFilter :members: :member-order: bysource :undoc-members: False -You can import from :code:`aiogram.dispatcher.filters` all available +You can import from :code:`aiogram.filters` all available variants of `statuses`_, `status groups`_ or `transitions`_: Statuses @@ -77,22 +98,6 @@ will produce swap of old and new statuses. Note that if you define the status unions (via :code:`|`) you will need to add brackets for the statement before use shift operator in due to operator priorities. -Usage -===== - -Handle user leave or join events - -.. code-block:: python - - from aiogram.dispatcher.filters import IS_MEMBER, IS_NOT_MEMBER - - @router.chat_member(chat_member_updated=IS_MEMBER >> IS_NOT_MEMBER) - async def on_user_leave(event: ChatMemberUpdated): ... - - @router.chat_member(chat_member_updated=IS_NOT_MEMBER >> IS_MEMBER) - async def on_user_join(event: ChatMemberUpdated): ... - -Or construct your own terms via using pre-defined set of statuses and transitions. Allowed handlers ================ diff --git a/docs/dispatcher/filters/command.rst b/docs/dispatcher/filters/command.rst index 645c6acf..171e659b 100644 --- a/docs/dispatcher/filters/command.rst +++ b/docs/dispatcher/filters/command.rst @@ -2,32 +2,32 @@ Command ======= -.. autoclass:: aiogram.dispatcher.filters.command.Command - :members: - :member-order: bysource - :undoc-members: False - -When filter is passed the :class:`aiogram.dispatcher.filters.command.CommandObject` will be passed to the handler argument :code:`command` - -.. autoclass:: aiogram.dispatcher.filters.command.CommandObject - :members: - :member-order: bysource - :undoc-members: False - - Usage ===== -1. Filter single variant of commands: :code:`Command(commands=["start"])` or :code:`Command(commands="start")` -2. Handle command by regexp pattern: :code:`Command(commands=[re.compile(r"item_(\d+)")])` -3. Match command by multiple variants: :code:`Command(commands=["item", re.compile(r"item_(\d+)")])` -4. Handle commands in public chats intended for other bots: :code:`Command(commands=["command"], commands)` -5. As keyword argument in registerer: :code:`@router.message(commands=["help"])` +1. Filter single variant of commands: :code:`Command("start")` +2. Handle command by regexp pattern: :code:`Command(re.compile(r"item_(\\d+)"))` +3. Match command by multiple variants: :code:`Command("item", re.compile(r"item_(\\d+)"))` +4. Handle commands in public chats intended for other bots: :code:`Command("command", ignore_mention=True)` +5. Use :class:`aiogram.types.bot_command.BotCommand` object as command reference :code:`Command(BotCommand(command="command", description="My awesome command")` .. warning:: Command cannot include spaces or any whitespace + +.. autoclass:: aiogram.filters.command.Command + :members: __init__ + :member-order: bysource + :undoc-members: False + +When filter is passed the :class:`aiogram.filters.command.CommandObject` will be passed to the handler argument :code:`command` + +.. autoclass:: aiogram.filters.command.CommandObject + :members: + :member-order: bysource + :undoc-members: False + Allowed handlers ================ diff --git a/docs/dispatcher/filters/content_types.rst b/docs/dispatcher/filters/content_types.rst deleted file mode 100644 index c28e6b8a..00000000 --- a/docs/dispatcher/filters/content_types.rst +++ /dev/null @@ -1,34 +0,0 @@ -================== -ContentTypesFilter -================== - -.. autoclass:: aiogram.dispatcher.filters.content_types.ContentTypesFilter - :members: - :member-order: bysource - :undoc-members: False - -Can be imported: - -- :code:`from aiogram.dispatcher.filters.content_types import ContentTypesFilter` -- :code:`from aiogram.dispatcher.filters import ContentTypesFilter` -- :code:`from aiogram.filters import ContentTypesFilter` - -Or used from filters factory by passing corresponding arguments to handler registration line - -Usage -===== - -1. Single content type: :code:`ContentTypesFilter(content_types=["sticker"])` or :code:`ContentTypesFilter(content_types="sticker")` -2. Multiple content types: :code:`ContentTypesFilter(content_types=["sticker", "photo"])` -3. Recommended: With usage of `ContentType` helper: :code:`ContentTypesFilter(content_types=[ContentType.PHOTO])` -4. Any content type: :code:`ContentTypesFilter(content_types=[ContentType.ANY])` - -Allowed handlers -================ - -Allowed update types for this filter: - -- :code:`message` -- :code:`edited_message` -- :code:`channel_post` -- :code:`edited_channel_post` diff --git a/docs/dispatcher/filters/exception.rst b/docs/dispatcher/filters/exception.rst index 6e296658..88954363 100644 --- a/docs/dispatcher/filters/exception.rst +++ b/docs/dispatcher/filters/exception.rst @@ -4,12 +4,12 @@ Exceptions This filters can be helpful for handling errors from the text messages. -.. autoclass:: aiogram.dispatcher.filters.exception.ExceptionTypeFilter +.. autoclass:: aiogram.filters.exception.ExceptionTypeFilter :members: :member-order: bysource :undoc-members: False -.. autoclass:: aiogram.dispatcher.filters.exception.ExceptionMessageFilter +.. autoclass:: aiogram.filters.exception.ExceptionMessageFilter :members: :member-order: bysource :undoc-members: False diff --git a/docs/dispatcher/filters/index.rst b/docs/dispatcher/filters/index.rst index 106e0b0c..795cb4f3 100644 --- a/docs/dispatcher/filters/index.rst +++ b/docs/dispatcher/filters/index.rst @@ -1,11 +1,14 @@ +.. _Filtering events: + ================ Filtering events ================ Filters is needed for routing updates to the specific handler. Searching of handler is always stops on first match set of filters are pass. +By default, all handlers has empty set of filters, so all updates will be passed to first handler that has empty set of filters. -*aiogram* has some builtin useful filters. +*aiogram* has some builtin useful filters or you can write own filters. Builtin filters =============== @@ -16,90 +19,86 @@ Here is list of builtin filters: :maxdepth: 1 command - content_types - text chat_member_updated - exception magic_filters magic_data + callback_data + exception -Own filters specification +Writing own filters ========================= Filters can be: - Asynchronous function (:code:`async def my_filter(*args, **kwargs): pass`) - - Synchronous function (:code:`def my_filter(*args, **kwargs): pass`) - - Anonymous function (:code:`lambda event: True`) - - Any awaitable object - -- Subclass of :class:`aiogram.dispatcher.filters.base.BaseFilter` - +- Subclass of :class:`aiogram.filters.base.Filter` - Instances of :ref:`MagicFilter ` -Filters should return bool or dict. +and should return bool or dict. If the dictionary is passed as result of filter - resulted data will be propagated to the next filters and handler as keywords arguments. -Writing bound filters -===================== +Base class for own filters +-------------------------- -.. autoclass:: aiogram.dispatcher.filters.base.BaseFilter - :members: __call__ +.. autoclass:: aiogram.filters.base.Filter + :members: __call__,update_handler_flags :member-order: bysource :undoc-members: False +Own filter example +------------------ + For example if you need to make simple text filter: -.. code-block:: python +.. literalinclude:: ../../../examples/own_filter.py - from aiogram.dispatcher.filters import BaseFilter +.. _combining-filters: + +Combining Filters +================= + +In general, all filters can be combined in two ways - class MyText(BaseFilter): - my_text: str +Recommended way +--------------- - async def __call__(self, message: Message) -> bool: - return message.text == self.my_text - - - router.message.bind_filter(MyText) - - @router.message(my_text="hello") - async def my_handler(message: Message): ... - -.. note:: - - Bound filters is always recursive propagates to the nested routers but will be available - in nested routers only after attaching routers so that's mean you will need to - include routers before registering handlers. - -Resolving filters with default value -==================================== - -Bound Filters with only default arguments will be automatically applied with default values -to each handler in the router and nested routers to which this filter is bound. - -For example, although we do not specify :code:`chat_type` in the handler filters, -but since the filter has a default value, the filter will be applied to the handler -with a default value :code:`private`: +If you specify multiple filters in a row, it will be checked with an "and" condition: .. code-block:: python - class ChatType(BaseFilter): - chat_type: str = "private" - - async def __call__(self, message: Message , event_chat: Chat) -> bool: - if event_chat: - return event_chat.type == chat_type - else: - return False + @.message(F.text.startswith("show"), F.text.endswith("example")) - router.message.bind_filter(ChatType) +Also, if you want to use two alternative ways to run the same handler ("or" condition) +you can register the handler twice or more times as you like - @router.message() - async def my_handler(message: Message): ... +.. code-block:: python + + @.message(F.text == "hi") + @.message(CommandStart()) + + +Also sometimes you will need to invert the filter result, for example you have an *IsAdmin* filter +and you want to check if the user is not an admin + +.. code-block:: python + + @.message(~IsAdmin()) + + +Another possible way +-------------------- + +An alternative way is to combine using special functions (:func:`and_f`, :func:`or_f`, :func:`invert_f` from :code:`aiogram.filters` module): + +.. code-block:: python + + and_f(F.text.startswith("show"), F.text.endswith("example")) + or_f(F.text(text="hi"), CommandStart()) + invert_f(IsAdmin()) + and_f(, or_f(, )) diff --git a/docs/dispatcher/filters/magic_data.rst b/docs/dispatcher/filters/magic_data.rst index 72cf2433..68637e06 100644 --- a/docs/dispatcher/filters/magic_data.rst +++ b/docs/dispatcher/filters/magic_data.rst @@ -1,25 +1,24 @@ -==== +========= MagicData -==== +========= -.. autoclass:: aiogram.dispatcher.filters.magic_data.MagicData +Usage +===== + +#. :code:`MagicData(F.event.from_user.id == F.config.admin_id)` (Note that :code:`config` should be passed from middleware) + +Explanation +=========== + +.. autoclass:: aiogram.filters.magic_data.MagicData :members: :member-order: bysource :undoc-members: False Can be imported: -- :code:`from aiogram.dispatcher.filters.magic_data import MagicData` -- :code:`from aiogram.dispatcher.filters import MagicData` - :code:`from aiogram.filters import MagicData` -Or used from filters factory by passing corresponding arguments to handler registration line - -Usage -===== - -#. :code:`magic_data=F.event.from_user.id == F.config.admin_id` (Note that :code:`config` should be passed from middleware) - Allowed handlers ================ @@ -31,4 +30,13 @@ Allowed update types for this filter: - :code:`channel_post` - :code:`edited_channel_post` - :code:`inline_query` +- :code:`chosen_inline_result` - :code:`callback_query` +- :code:`shipping_query` +- :code:`pre_checkout_query` +- :code:`poll` +- :code:`poll_answer` +- :code:`my_chat_member` +- :code:`chat_member` +- :code:`chat_join_request` +- :code:`error` diff --git a/docs/dispatcher/filters/magic_filters.rst b/docs/dispatcher/filters/magic_filters.rst index 3117aeb3..47e01ef4 100644 --- a/docs/dispatcher/filters/magic_filters.rst +++ b/docs/dispatcher/filters/magic_filters.rst @@ -53,6 +53,7 @@ Equals F.text == 'hello' # lambda message: message.text == 'hello' F.from_user.id == 42 # lambda message: message.from_user.id == 42 + F.text != 'spam' # lambda message: message.text != 'spam' Is one of --------- @@ -61,9 +62,8 @@ Can be used as method named :code:`in_` or as matmul operator :code:`@` with any .. code-block:: python - F.from_user.id.in_(42, 1000, 123123) # lambda query: query.from_user.id in {42, 1000, 123123} - F.data.in_('foo', 'bar', 'baz') # lambda query: query.data in {'foo', 'bar', 'baz'} - F.text @ {'foo', 'bar'} # lambda message: message.text in {'foo', 'bar'} + F.from_user.id.in_({42, 1000, 123123}) # lambda query: query.from_user.id in {42, 1000, 123123} + F.data.in_({'foo', 'bar', 'baz'}) # lambda query: query.data in {'foo', 'bar', 'baz'} Contains -------- @@ -105,7 +105,7 @@ Any of available operation can be inverted by bitwise inversion - :code:`~` .. code-block:: python - ~(F.text == 'spam') # lambda message: message.text != 'spam' + ~F.text # lambda message: not message.text ~F.text.startswith('spam') # lambda message: not message.text.startswith('spam') Combining @@ -117,7 +117,7 @@ All operations can be combined via bitwise and/or operators - :code:`&`/:code:`| (F.from_user.id == 42) & (F.text == 'admin') F.text.startswith('a') | F.text.endswith('b') - (F.from_user.id @ {42, 777, 911}) & (F.text.startswith('!') | F.text.startswith('/')) & F.text.contains('ban') + (F.from_user.id.in_({42, 777, 911})) & (F.text.startswith('!') | F.text.startswith('/')) & F.text.contains('ban') Attribute modifiers - string manipulations @@ -130,7 +130,7 @@ Can be used only with string attributes. .. code-block:: python F.text.lower() == 'test' # lambda message: message.text.lower() == 'test' - F.text.upper().in_('FOO', 'BAR') # lambda message: message.text.upper() in {'FOO', 'BAR'} + F.text.upper().in_({'FOO', 'BAR'}) # lambda message: message.text.upper() in {'FOO', 'BAR'} F.text.len() == 5 # lambda message: len(message.text) == 5 @@ -157,7 +157,7 @@ Usage in *aiogram* @router.message(F.text == 'hello') @router.inline_query(F.data == 'button:1') @router.message(F.text.startswith('foo')) - @router.message(F.content_type.in_('text', 'sticker')) + @router.message(F.content_type.in_({'text', 'sticker'})) @router.message(F.text.regexp(r'\d+')) ... diff --git a/docs/dispatcher/filters/text.rst b/docs/dispatcher/filters/text.rst deleted file mode 100644 index 9aa7b096..00000000 --- a/docs/dispatcher/filters/text.rst +++ /dev/null @@ -1,38 +0,0 @@ -==== -Text -==== - -.. autoclass:: aiogram.dispatcher.filters.text.Text - :members: - :member-order: bysource - :undoc-members: False - -Can be imported: - -- :code:`from aiogram.dispatcher.filters.text import Text` -- :code:`from aiogram.dispatcher.filters import Text` -- :code:`from aiogram.filters import Text` - -Or used from filters factory by passing corresponding arguments to handler registration line - -Usage -===== - -#. Text equals with the specified value: :code:`Text(text="text") # value == 'text'` -#. Text starts with the specified value: :code:`Text(text_startswith="text") # value.startswith('text')` -#. Text ends with the specified value: :code:`Text(text_endswith="text") # value.endswith('text')` -#. Text contains the specified value: :code:`Text(text_contains="text") # value in 'text'` -#. Any of previous listed filters can be list, set or tuple of strings that's mean any of listed value should be equals/startswith/endswith/contains: :code:`Text(text=["text", "spam"])` -#. Ignore case can be combined with any previous listed filter: :code:`Text(text="Text", text_ignore_case=True) # value.lower() == 'text'.lower()` - -Allowed handlers -================ - -Allowed update types for this filter: - -- :code:`message` -- :code:`edited_message` -- :code:`channel_post` -- :code:`edited_channel_post` -- :code:`inline_query` -- :code:`callback_query` diff --git a/docs/dispatcher/finite_state_machine/index.rst b/docs/dispatcher/finite_state_machine/index.rst index 4971fae1..91cca40a 100644 --- a/docs/dispatcher/finite_state_machine/index.rst +++ b/docs/dispatcher/finite_state_machine/index.rst @@ -1,3 +1,5 @@ +.. _Finite State Machine: + ==================== Finite State Machine ==================== @@ -36,70 +38,49 @@ Step by step Before handle any states you will need to specify what kind of states you want to handle .. literalinclude:: ../../../examples/finite_state_machine.py - :language: python - :linenos: - :lineno-start: 15 - :lines: 15-18 + :pyobject: Form And then write handler for each state separately from the start of dialog Here is dialog can be started only via command :code:`/start`, so lets handle it and make transition user to state :code:`Form.name` .. literalinclude:: ../../../examples/finite_state_machine.py - :language: python - :linenos: - :lineno-start: 21 - :lines: 21-27 + :pyobject: command_start After that you will need to save some data to the storage and make transition to next step. .. literalinclude:: ../../../examples/finite_state_machine.py - :language: python - :linenos: - :lineno-start: 48 - :lines: 48-63 + :pyobject: process_name At the next steps user can make different answers, it can be `yes`, `no` or any other Handle :code:`yes` and soon we need to handle :code:`Form.language` state .. literalinclude:: ../../../examples/finite_state_machine.py - :language: python - :linenos: - :lineno-start: 77 - :lines: 77-84 + :pyobject: process_like_write_bots Handle :code:`no` .. literalinclude:: ../../../examples/finite_state_machine.py - :language: python - :linenos: - :lineno-start: 66 - :lines: 66-74 + :pyobject: process_dont_like_write_bots And handle any other answers .. literalinclude:: ../../../examples/finite_state_machine.py - :language: python - :linenos: - :lineno-start: 87 - :lines: 87-89 + :pyobject: process_unknown_write_bots All possible cases of `like_bots` step was covered, let's implement finally step .. literalinclude:: ../../../examples/finite_state_machine.py - :language: python - :linenos: - :lineno-start: 92 - :lines: 92-102 + :pyobject: process_language + +.. literalinclude:: ../../../examples/finite_state_machine.py + :pyobject: show_summary And now you have covered all steps from the image, but you can make possibility to cancel conversation, lets do that via command or text .. literalinclude:: ../../../examples/finite_state_machine.py - :language: python - :linenos: - :lineno-start: 30 - :lines: 30-45 + :pyobject: cancel_handler Complete example ---------------- @@ -108,12 +89,45 @@ 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 .. _wiki: https://en.wikipedia.org/wiki/Finite-state_machine diff --git a/docs/dispatcher/finite_state_machine/scene.rst b/docs/dispatcher/finite_state_machine/scene.rst new file mode 100644 index 00000000..20d98421 --- /dev/null +++ b/docs/dispatcher/finite_state_machine/scene.rst @@ -0,0 +1,315 @@ +.. _Scenes: + +============= +Scenes Wizard +============= + +.. versionadded:: 3.2 + +.. warning:: + + This feature is experimental and may be changed in future versions. + +**aiogram's** basics API is easy to use and powerful, +allowing the implementation of simple interactions such as triggering a command or message +for a response. +However, certain tasks require a dialogue between the user and the bot. +This is where Scenes come into play. + +Understanding Scenes +==================== + +A Scene in **aiogram** is like an abstract, isolated namespace or room that a user can be +ushered into via the code. When a user is within a Scene, most other global commands or +message handlers are bypassed, unless they are specifically designed to function outside of the Scenes. +This helps in creating an experience of focused interactions. +Scenes provide a structure for more complex interactions, +effectively isolating and managing contexts for different stages of the conversation. +They allow you to control and manage the flow of the conversation in a more organized manner. + +Scene Lifecycle +--------------- + +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. + +Scene Listeners +--------------- + +Scenes have their own hooks which are command or message listeners that only act while +the user is within the Scene. +These hooks react to user actions while the user is 'inside' the Scene, +providing the responses or actions appropriate for that context. +When the user is ushered from one Scene to another, the actions and responses change +accordingly as the user is now interacting with the set of listeners inside the new Scene. +These 'Scene-specific' hooks or listeners, detached from the global listening context, +allow for more streamlined and organized bot-user interactions. + + +Scene Interactions +------------------ + +Each Scene is like a self-contained world, with interactions defined within the scope of that Scene. +As such, only the handlers defined within the specific Scene will react to user's input during +the lifecycle of that Scene. + + +Scene Benefits +-------------- + +Scenes can help manage more complex interaction workflows and enable more interactive and dynamic +dialogs between the user and the bot. +This offers great flexibility in handling multi-step interactions or conversations with the users. + +How to use Scenes +================= + +For example we have a quiz bot, which asks the user a series of questions and then displays the results. + +Lets start with the data models, in this example simple data models are used to represent +the questions and answers, in real life you would probably use a database to store the data. + +.. literalinclude:: ../../../examples/quiz_scene.py + :language: python + :lines: 25-101 + :caption: Questions list + +Then, we need to create a Scene class that will represent the quiz game scene: + +.. note:: + + Keyword argument passed into class definition describes the scene name - is the same as state of the scene. + +.. literalinclude:: ../../../examples/quiz_scene.py + :language: python + :pyobject: QuizScene + :emphasize-lines: 1 + :lines: -7 + :caption: Quiz Scene + + +Also we need to define a handler that helps to start the quiz game: + +.. literalinclude:: ../../../examples/quiz_scene.py + :language: python + :caption: Start command handler + :lines: 260-262 + +Once the scene is defined, we need to register it in the SceneRegistry: + +.. literalinclude:: ../../../examples/quiz_scene.py + :language: python + :pyobject: create_dispatcher + :caption: Registering the scene + +So, now we can implement the quiz game logic, each question is sent to the user one by one, +and the user's answer is checked at the end of all questions. + +Now we need to write an entry point for the question handler: + +.. literalinclude:: ../../../examples/quiz_scene.py + :language: python + :caption: Question handler entry point + :pyobject: QuizScene.on_enter + + +Once scene is entered, we should expect the user's answer, so we need to write a handler for it, +this handler should expect the text message, save the answer and retake +the question handler for the next question: + +.. literalinclude:: ../../../examples/quiz_scene.py + :language: python + :caption: Answer handler + :pyobject: QuizScene.answer + +When user answer with unknown message, we should expect the text message again: + +.. literalinclude:: ../../../examples/quiz_scene.py + :language: python + :caption: Unknown message handler + :pyobject: QuizScene.unknown_message + +When all questions are answered, we should show the results to the user, as you can see in the code below, +we use `await self.wizard.exit()` to exit from the scene when questions list is over in the `QuizScene.on_enter` handler. + +Thats means that we need to write an exit handler to show the results to the user: + +.. literalinclude:: ../../../examples/quiz_scene.py + :language: python + :caption: Show results handler + :pyobject: QuizScene.on_exit + +Also we can implement a actions to exit from the quiz game or go back to the previous question: + +.. literalinclude:: ../../../examples/quiz_scene.py + :language: python + :caption: Exit handler + :pyobject: QuizScene.exit + +.. literalinclude:: ../../../examples/quiz_scene.py + :language: python + :caption: Back handler + :pyobject: QuizScene.back + +Now we can run the bot and test the quiz game: + +.. literalinclude:: ../../../examples/quiz_scene.py + :language: python + :caption: Run the bot + :lines: 291- + +Complete them all + +.. literalinclude:: ../../../examples/quiz_scene.py + :language: python + :caption: Quiz Example + + +Components +========== + +- :class:`aiogram.fsm.scene.Scene` - represents a scene, contains handlers +- :class:`aiogram.fsm.scene.SceneRegistry` - container for all scenes in the bot, used to register scenes and resolve them by name +- :class:`aiogram.fsm.scene.ScenesManager` - manages scenes for each user, used to enter, leave and resolve current scene for user +- :class:`aiogram.fsm.scene.SceneConfig` - scene configuration, used to configure scene +- :class:`aiogram.fsm.scene.SceneWizard` - scene wizard, used to interact with user in scene from active scene handler +- Markers - marker for scene handlers, used to mark scene handlers + + +.. autoclass:: aiogram.fsm.scene.Scene + :members: + +.. autoclass:: aiogram.fsm.scene.SceneRegistry + :members: + +.. autoclass:: aiogram.fsm.scene.ScenesManager + :members: + +.. autoclass:: aiogram.fsm.scene.SceneConfig + :members: + +.. autoclass:: aiogram.fsm.scene.SceneWizard + :members: + +Markers +------- + +Markers are similar to the Router event registering mechanism, +but they are used to mark scene handlers in the Scene class. + +It can be imported from :code:`from aiogram.fsm.scene import on` and should be used as decorator. + +Allowed event types: + +- message +- edited_message +- channel_post +- edited_channel_post +- inline_query +- chosen_inline_result +- callback_query +- shipping_query +- pre_checkout_query +- poll +- poll_answer +- my_chat_member +- chat_member +- chat_join_request + +Each event type can be filtered in the same way as in the Router. + +Also each event type can be marked as scene entry point, exit point or leave point. + +If you want to mark the scene can be entered from message or inline query, +you should use :code:`on.message` or :code:`on.inline_query` marker: + +.. code-block:: python + + class MyScene(Scene, name="my_scene"): + @on.message.enter() + async def on_enter(self, message: types.Message): + pass + + @on.callback_query.enter() + async def on_enter(self, callback_query: types.CallbackQuery): + pass + + +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 b730a77f..ef39c4c3 100644 --- a/docs/dispatcher/finite_state_machine/storages.rst +++ b/docs/dispatcher/finite_state_machine/storages.rst @@ -8,24 +8,38 @@ Storages out of the box MemoryStorage ------------- -.. autoclass:: aiogram.dispatcher.fsm.storage.memory.MemoryStorage +.. autoclass:: aiogram.fsm.storage.memory.MemoryStorage :members: __init__ :member-order: bysource RedisStorage ------------ -.. autoclass:: aiogram.dispatcher.fsm.storage.redis.RedisStorage +.. autoclass:: aiogram.fsm.storage.redis.RedisStorage :members: __init__, from_url :member-order: bysource -Keys inside storage can be customized via key builders: +MongoStorage +------------ -.. autoclass:: aiogram.dispatcher.fsm.storage.redis.KeyBuilder +.. 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 + +KeyBuilder +------------ + +Keys inside Redis and Mongo storages can be customized via key builders: + +.. autoclass:: aiogram.fsm.storage.base.KeyBuilder :members: :member-order: bysource -.. autoclass:: aiogram.dispatcher.fsm.storage.redis.DefaultKeyBuilder +.. autoclass:: aiogram.fsm.storage.base.DefaultKeyBuilder :members: :member-order: bysource @@ -33,6 +47,6 @@ Keys inside storage can be customized via key builders: Writing own storages ==================== -.. autoclass:: aiogram.dispatcher.fsm.storage.base.BaseStorage +.. autoclass:: aiogram.fsm.storage.base.BaseStorage :members: :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/flags.rst b/docs/dispatcher/flags.rst index f4e5e118..b958de1d 100644 --- a/docs/dispatcher/flags.rst +++ b/docs/dispatcher/flags.rst @@ -1,3 +1,5 @@ +.. _flags: + ===== Flags ===== @@ -42,7 +44,7 @@ Via filters .. code-block:: python - class Command(BaseFilter): + class Command(Filter): ... def update_handler_flags(self, flags: Dict[str, Any]) -> None: @@ -54,8 +56,9 @@ Via filters Use in middlewares ================== -.. automodule:: aiogram.dispatcher.flags.getter - :members: +.. automodule:: aiogram.dispatcher.flags + :members: extract_flags, get_flag, check_flags + Example in middlewares ---------------------- diff --git a/docs/dispatcher/index.rst b/docs/dispatcher/index.rst index c684ba36..6832380c 100644 --- a/docs/dispatcher/index.rst +++ b/docs/dispatcher/index.rst @@ -15,13 +15,23 @@ With dispatcher you can do: Dispatcher is also separated into two entities - Router and Dispatcher. Dispatcher is subclass of router and should be always is root router. +Telegram supports two ways of receiving updates: + +- :ref:`Webhook ` - you should configure your web server to receive updates from Telegram; +- :ref:`Long polling ` - you should request updates from Telegram. + +So, you can use both of them with *aiogram*. + .. toctree:: - observer router dispatcher - class_based_handlers/index + dependency_injection filters/index - middlewares + long_polling finite_state_machine/index + middlewares + errors flags + webhook + class_based_handlers/index diff --git a/docs/dispatcher/long_polling.rst b/docs/dispatcher/long_polling.rst new file mode 100644 index 00000000..c261ed35 --- /dev/null +++ b/docs/dispatcher/long_polling.rst @@ -0,0 +1,32 @@ +.. _long-polling: + +############ +Long-polling +############ + +Long-polling is a technology that allows a Telegram server to send updates in case +when you don't have dedicated IP address or port to receive webhooks for example +on a developer machine. + +To use long-polling mode you should use :meth:`aiogram.dispatcher.dispatcher.Dispatcher.start_polling` +or :meth:`aiogram.dispatcher.dispatcher.Dispatcher.run_polling` methods. + +.. note:: + + You can use polling from only one polling process per single Bot token, + in other case Telegram server will return an error. + +.. note:: + + If you will need to scale your bot, you should use webhooks instead of long-polling. + +.. note:: + + If you will use multibot mode, you should use webhook mode for all bots. + +Example +======= + +This example will show you how to create simple echo bot based on long-polling. + +.. literalinclude:: ../../examples/echo_bot.py diff --git a/docs/dispatcher/middlewares.rst b/docs/dispatcher/middlewares.rst index 55875eb2..c63c6709 100644 --- a/docs/dispatcher/middlewares.rst +++ b/docs/dispatcher/middlewares.rst @@ -1,3 +1,5 @@ +.. _middlewares: + =========== Middlewares =========== @@ -57,7 +59,8 @@ Examples .. danger:: - Middleware should always call :code:`await handler(event, data)` to propagate event for next middleware/handler + Middleware should always call :code:`await handler(event, data)` to propagate event for next middleware/handler. + If you want to stop processing event in middleware you should not call :code:`await handler(event, data)`. Class-based diff --git a/docs/dispatcher/observer.rst b/docs/dispatcher/observer.rst deleted file mode 100644 index 9276dcc4..00000000 --- a/docs/dispatcher/observer.rst +++ /dev/null @@ -1,26 +0,0 @@ -######## -Observer -######## - -Observer is used for filtering and handling different events. That is part of internal API with some public methods and is recommended to don't use methods is not listed here. - -In `aiogram` framework is available two variants of observer: - -- `EventObserver <#eventobserver>`__ -- `TelegramEventObserver <#telegrameventobserver>`__ - - -EventObserver -============= - -.. autoclass:: aiogram.dispatcher.event.event.EventObserver - :members: register, trigger, __call__ - :member-order: bysource - - -TelegramEventObserver -===================== - -.. autoclass:: aiogram.dispatcher.event.telegram.TelegramEventObserver - :members: register, trigger, __call__, bind_filter, middleware, outer_middleware - :member-order: bysource diff --git a/docs/dispatcher/router.rst b/docs/dispatcher/router.rst index a7abeb69..317f4e8d 100644 --- a/docs/dispatcher/router.rst +++ b/docs/dispatcher/router.rst @@ -1,12 +1,30 @@ +.. _Router: + ###### Router ###### +Usage: + +.. code-block:: python + + from aiogram import Router + from aiogram.types import Message + + my_router = Router(name=__name__) + + @my_router.message() + async def message_handler(message: Message) -> Any: + await message.answer('Hello from my router!') + + .. autoclass:: aiogram.dispatcher.router.Router - :members: __init__, include_router + :members: __init__, include_router, include_routers, resolve_used_update_types :show-inheritance: +.. _Event observers: + Event observers =============== @@ -19,19 +37,6 @@ Here is the list of available observers and examples of how to register handlers In these examples only decorator-style registering handlers are used, but if you don't like @decorators just use :obj:`.register(...)` method instead. -Update ------- - -.. code-block:: python - - @router.update() - async def message_handler(update: types.Update) -> Any: pass - -.. note:: - - By default Router already has an update handler which route all event types to another observers. - - Message ------- @@ -44,8 +49,8 @@ Message (For example text, sticker and document are always of different content types of message) - Recommended way to check field availability before usage or use - :class:`aiogram.dispatcher.filters.content_types.ContentTypesFilter` + Recommended way to check field availability before usage, for example via :ref:`magic filter `: + :code:`F.text` to handle text, :code:`F.sticker` to handle stickers only and etc. .. code-block:: python @@ -85,7 +90,7 @@ Inline query .. code-block:: python @router.inline_query() - async def inline_query_handler(inline_query: types.Message) -> Any: pass + async def inline_query_handler(inline_query: types.InlineQuery) -> Any: pass Chosen inline query ------------------- @@ -135,33 +140,99 @@ Poll answer @router.poll_answer() async def poll_answer_handler(poll_answer: types.PollAnswer) -> Any: pass + +My chat member +-------------- + +.. code-block:: python + + @router.my_chat_member() + async def my_chat_member_handler(my_chat_member: types.ChatMemberUpdated) -> Any: pass + + +Chat member +----------- + +.. code-block:: python + + @router.chat_member() + async def chat_member_handler(chat_member: types.ChatMemberUpdated) -> Any: pass + + +Chat join request +----------------- + +.. code-block:: python + + @router.chat_join_request() + async def chat_join_request_handler(chat_join_request: types.ChatJoinRequest) -> Any: pass + + +Message reaction +---------------- + +.. code-block:: python + + @router.message_reaction() + async def message_reaction_handler(message_reaction: types.MessageReactionUpdated) -> Any: pass + + +Message reaction count +---------------------- + +.. code-block:: python + + @router.message_reaction_count() + async def message_reaction_count_handler(message_reaction_count: types.MessageReactionCountUpdated) -> Any: pass + + +Chat boost +---------- + +.. code-block:: python + + @router.chat_boost() + async def chat_boost_handler(chat_boost: types.ChatBoostUpdated) -> Any: pass + + +Remove chat boost +----------------- + +.. code-block:: python + + @router.removed_chat_boost() + async def removed_chat_boost_handler(removed_chat_boost: types.ChatBoostRemoved) -> Any: pass + + Errors ------ .. code-block:: python @router.errors() - async def error_handler(exception: Exception) -> Any: pass + async def error_handler(exception: types.ErrorEvent) -> Any: pass -Is useful for handling errors from other handlers +Is useful for handling errors from other handlers, error event described :ref:`here ` + +.. _Nested routers: + Nested routers ============== .. warning:: Routers by the way can be nested to an another routers with some limitations: - - 1. Router **CAN NOT** include itself - 1. Routers **CAN NOT** be used for circular including (router 1 include router 2, router 2 include router 3, router 3 include router 1) + 1. Router **CAN NOT** include itself + 1. Routers **CAN NOT** be used for circular including (router 1 include router 2, router 2 include router 3, router 3 include router 1) Example: .. code-block:: python - :caption: module_2.py - :name: module_2 + :caption: module_1.py + :name: module_1 router2 = Router() @@ -170,8 +241,8 @@ Example: .. code-block:: python - :caption: module_12.py - :name: module_1 + :caption: module_2.py + :name: module_2 from module_2 import router2 @@ -180,6 +251,22 @@ Example: router1.include_router(router2) +Update +------ + +.. code-block:: python + + @dispatcher.update() + async def message_handler(update: types.Update) -> Any: pass + +.. warning:: + + The only root Router (Dispatcher) can handle this type of event. + +.. note:: + + Dispatcher already has default handler for this event type, so you can use it for handling all updates that are not handled by any other handlers. + How it works? ------------- diff --git a/docs/dispatcher/webhook.rst b/docs/dispatcher/webhook.rst new file mode 100644 index 00000000..26c58f36 --- /dev/null +++ b/docs/dispatcher/webhook.rst @@ -0,0 +1,138 @@ +.. _webhook: + +####### +Webhook +####### + +Telegram Bot API supports webhook. +If you set webhook for your bot, Telegram will send updates to the specified url. +You can use :meth:`aiogram.methods.set_webhook.SetWebhook` method to specify a url +and receive incoming updates on it. + +.. note:: + + If you use webhook, you can't use long polling at the same time. + +Before start i'll recommend you to read `official Telegram's documentation about webhook `_ + +After you read it, you can start to read this section. + +Generally to use webhook with aiogram you should use any async web framework. +By out of the box aiogram has an aiohttp integration, so we'll use it. + +.. note:: + + You can use any async web framework you want, but you should write your own integration if you don't use aiohttp. + + +aiohttp integration +=================== + +Out of the box aiogram has aiohttp integration, so you can use it. + +Here is available few ways to do it using different implementations of the webhook controller: + +- :class:`aiogram.webhook.aiohttp_server.BaseRequestHandler` - Abstract class for aiohttp webhook controller +- :class:`aiogram.webhook.aiohttp_server.SimpleRequestHandler` - Simple webhook controller, uses single Bot instance +- :class:`aiogram.webhook.aiohttp_server.TokenBasedRequestHandler` - Token based webhook controller, uses multiple Bot instances and tokens + +You can use it as is or inherit from it and override some methods. + +.. autoclass:: aiogram.webhook.aiohttp_server.BaseRequestHandler + :members: __init__, register, close, resolve_bot, verify_secret, handle + +.. autoclass:: aiogram.webhook.aiohttp_server.SimpleRequestHandler + :members: __init__, register, close, resolve_bot, verify_secret, handle + +.. autoclass:: aiogram.webhook.aiohttp_server.TokenBasedRequestHandler + :members: __init__, register, close, resolve_bot, verify_secret, handle + +Security +-------- + +Telegram supports two methods to verify incoming requests that they are from Telegram: + +Using a secret token +~~~~~~~~~~~~~~~~~~~~ + +When you set webhook, you can specify a secret token and then use it to verify incoming requests. + +Using IP filtering +~~~~~~~~~~~~~~~~~~ + +You can specify a list of IP addresses from which you expect incoming requests, and then use it to verify incoming requests. + +It can be acy using firewall rules or nginx configuration or middleware on application level. + +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 + :members: __init__, allow, allow_ip, default, check + +Examples +-------- + +Behind reverse proxy +~~~~~~~~~~~~~~~~~~~~ + +In this example we'll use aiohttp as web framework and nginx as reverse proxy. + +.. literalinclude:: ../../examples/echo_bot_webhook.py + +When you use nginx as reverse proxy, you should set `proxy_pass` to your aiohttp server address. + +.. code-block:: nginx + + location /webhook { + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_redirect off; + proxy_buffering off; + proxy_pass http://127.0.0.1:8080; + } + + +Without reverse proxy (not recommended) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In case without using reverse proxy, you can use aiohttp's ssl context. + +Also this example contains usage with self-signed certificate. + +.. literalinclude:: ../../examples/echo_bot_webhook_ssl.py + + +With using other web framework +============================== + +You can pass incoming request to aiogram's webhook controller from any web framework you want. + +Read more about it in :meth:`aiogram.dispatcher.dispatcher.Dispatcher.feed_webhook_update` +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(bot, update) + + +.. note:: + + If you want to use reply into webhook, you should check that result of the :code:`feed_update` + methods is an instance of API method and build :code:`multipart/form-data` + or :code:`application/json` response body manually. diff --git a/docs/index.rst b/docs/index.rst index 2d007e88..a923cab1 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -5,6 +5,15 @@ Simple usage .. literalinclude:: ../examples/echo_bot.py + +Usage without dispatcher +------------------------ + +Just only interact with Bot API, without handling events + +.. literalinclude:: ../examples/without_dispatcher.py + + Contents ======== @@ -12,7 +21,9 @@ Contents :maxdepth: 3 install + migration_2_to_3 api/index dispatcher/index utils/index changelog + contributing diff --git a/docs/install.rst b/docs/install.rst index 7dbf3cf8..5559c181 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -2,9 +2,6 @@ Installation ############ -Stable (2.x) -============ - From PyPI --------- @@ -15,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 --pre aiogram +Development build +================= From GitHub ----------- @@ -35,10 +27,3 @@ From GitHub .. code-block:: bash pip install https://github.com/aiogram/aiogram/archive/refs/heads/dev-3.x.zip - -From AUR --------- - -.. code-block:: bash - - yay -S python-aiogram3 diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/bot.po b/docs/locale/uk_UA/LC_MESSAGES/api/bot.po new file mode 100644 index 00000000..648499eb --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/bot.po @@ -0,0 +1,166 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/bot.rst:3 +msgid "Bot" +msgstr "" + +#: ../../api/bot.rst:5 +msgid "" +"Bot instance can be created from :code:`aiogram.Bot` (:code:`from aiogram" +" import Bot`) and you can't use methods without instance of bot with " +"configured token." +msgstr "" + +#: ../../api/bot.rst:8 +msgid "" +"This class has aliases for all methods and named in " +":code:`lower_camel_case`." +msgstr "" + +#: ../../api/bot.rst:10 +msgid "" +"For example :code:`sendMessage` named :code:`send_message` and has the " +"same specification with all class-based methods." +msgstr "" + +#: ../../api/bot.rst:14 +msgid "" +"A full list of methods can be found in the appropriate section of the " +"documentation" +msgstr "" + +#: aiogram.client.bot.Bot:1 of +msgid "Bases: :py:class:`object`" +msgstr "" + +#: aiogram.client.bot.Bot.__init__:1 of +msgid "Bot class" +msgstr "" + +#: ../../api/bot.rst +msgid "Parameters" +msgstr "" + +#: aiogram.client.bot.Bot.__init__:3 of +msgid "Telegram Bot token `Obtained from @BotFather `_" +msgstr "" + +#: aiogram.client.bot.Bot.__init__:4 of +msgid "" +"HTTP Client session (For example AiohttpSession). If not specified it " +"will be automatically created." +msgstr "" + +#: aiogram.client.bot.Bot.__init__:6 of +msgid "" +"Default bot properties. If specified it will be propagated into the API " +"methods at runtime." +msgstr "" + +#: ../../api/bot.rst +msgid "Raises" +msgstr "" + +#: aiogram.client.bot.Bot.__init__:8 of +msgid "When token has invalid format this exception will be raised" +msgstr "" + +#: aiogram.client.bot.Bot.id:1 of +msgid "Get bot ID from token" +msgstr "" + +#: ../../api/bot.rst +msgid "Returns" +msgstr "" + +#: aiogram.client.bot.Bot.context:1 of +msgid "Generate bot context" +msgstr "" + +#: aiogram.client.bot.Bot.context:3 of +msgid "close session on exit" +msgstr "" + +#: aiogram.client.bot.Bot.me:1 of +msgid "Cached alias for getMe method" +msgstr "" + +#: aiogram.client.bot.Bot.download_file:1 of +msgid "Download file by file_path to destination." +msgstr "" + +#: aiogram.client.bot.Bot.download:3 aiogram.client.bot.Bot.download_file:3 of +msgid "" +"If you want to automatically create destination (:class:`io.BytesIO`) use" +" default value of destination and handle result of this method." +msgstr "" + +#: aiogram.client.bot.Bot.download_file:6 of +msgid "" +"File path on Telegram server (You can get it from " +":obj:`aiogram.types.File`)" +msgstr "" + +#: aiogram.client.bot.Bot.download:7 aiogram.client.bot.Bot.download_file:7 of +msgid "" +"Filename, file path or instance of :class:`io.IOBase`. For e.g. " +":class:`io.BytesIO`, defaults to None" +msgstr "" + +#: aiogram.client.bot.Bot.download:8 aiogram.client.bot.Bot.download_file:8 of +msgid "Total timeout in seconds, defaults to 30" +msgstr "" + +#: aiogram.client.bot.Bot.download:9 aiogram.client.bot.Bot.download_file:9 of +msgid "File chunks size, defaults to 64 kb" +msgstr "" + +#: aiogram.client.bot.Bot.download:10 aiogram.client.bot.Bot.download_file:10 +#: of +msgid "" +"Go to start of file when downloading is finished. Used only for " +"destination with :class:`typing.BinaryIO` type, defaults to True" +msgstr "" + +#: aiogram.client.bot.Bot.download:1 of +msgid "Download file by file_id or Downloadable object to destination." +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/download_file.po b/docs/locale/uk_UA/LC_MESSAGES/api/download_file.po new file mode 100644 index 00000000..c841be44 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/download_file.po @@ -0,0 +1,219 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: 2022-12-13 23:33+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.10.3\n" + +#: ../../api/download_file.rst:3 +msgid "How to download file?" +msgstr "Як завантажити файл?" + +#: ../../api/download_file.rst:6 +msgid "Download file manually" +msgstr "Завантаження файла вручну" + +#: ../../api/download_file.rst:8 +msgid "" +"First, you must get the `file_id` of the file you want to download. " +"Information about files sent to the bot is contained in `Message " +"`__." +msgstr "" +"По-перше, ви повинні отримати `file_id` файлу, який ви хочете " +"завантажити. Інформація про файли, надіслані боту, міститься в `Message " +"`__." + +#: ../../api/download_file.rst:11 +msgid "For example, download the document that came to the bot." +msgstr "Наприклад, завантажте документ, який прийшов боту." + +#: ../../api/download_file.rst:17 +msgid "" +"Then use the `getFile `__ method to get " +"`file_path`." +msgstr "" +"Потім скористайтеся методом `getFile `__, щоб " +"отримати `file_path`." + +#: ../../api/download_file.rst:24 +msgid "" +"After that, use the `download_file <#download-file>`__ method from the " +"bot object." +msgstr "" +"Після цього скористайтеся методом `download_file <#download-file>`__ з " +"об’єкта бота." + +#: ../../api/download_file.rst:27 +msgid "download_file(...)" +msgstr "download_file(...)" + +#: ../../api/download_file.rst:29 +msgid "Download file by `file_path` to destination." +msgstr "Завантажує файл за `file_path` у вказане місце." + +#: ../../api/download_file.rst:31 ../../api/download_file.rst:81 +msgid "" +"If you want to automatically create destination (:obj:`io.BytesIO`) use " +"default value of destination and handle result of this method." +msgstr "" +"Якщо ви хочете автоматично створити місце призначення (io.BytesIO), " +"використовуйте значення призначення за замовчуванням і обробіть результат" +" цього методу." + +#: aiogram.client.bot.Bot.download_file:1 of +msgid "Download file by file_path to destination." +msgstr "Завантажує файл з file_path у вказане місце." + +#: aiogram.client.bot.Bot.download:3 aiogram.client.bot.Bot.download_file:3 of +msgid "" +"If you want to automatically create destination (:class:`io.BytesIO`) use" +" default value of destination and handle result of this method." +msgstr "" +"Якщо ви хочете автоматично створити місце призначення (io.BytesIO), " +"використовуйте значення призначення за замовчуванням і обробіть результат" +" цього методу." + +#: aiogram.client.bot.Bot.download aiogram.client.bot.Bot.download_file of +msgid "Parameters" +msgstr "Параметри" + +#: aiogram.client.bot.Bot.download_file:6 of +msgid "" +"File path on Telegram server (You can get it from " +":obj:`aiogram.types.File`)" +msgstr "" +"Шлях до файлу на сервері Telegram (Ви можете отримати його з " +":obj:`aiogram.types.File`)" + +#: aiogram.client.bot.Bot.download:7 aiogram.client.bot.Bot.download_file:7 of +msgid "" +"Filename, file path or instance of :class:`io.IOBase`. For e.g. " +":class:`io.BytesIO`, defaults to None" +msgstr "" +"Ім’я файлу, шлях до файлу або екземпляр :class:`io.IOBase`. Для напр. " +":class:`io.BytesIO`, за замовчуванням немає" + +#: aiogram.client.bot.Bot.download:8 aiogram.client.bot.Bot.download_file:8 of +msgid "Total timeout in seconds, defaults to 30" +msgstr "Загальний час очікування в секундах, за замовчуванням 30" + +#: aiogram.client.bot.Bot.download:9 aiogram.client.bot.Bot.download_file:9 of +msgid "File chunks size, defaults to 64 kb" +msgstr "Розмір фрагментів файлу, за замовчуванням 64 Кб" + +#: aiogram.client.bot.Bot.download:10 aiogram.client.bot.Bot.download_file:10 +#: of +msgid "" +"Go to start of file when downloading is finished. Used only for " +"destination with :class:`typing.BinaryIO` type, defaults to True" +msgstr "" +"Перейти до початку файлу, коли завантаження завершиться. Використовується" +" лише для призначення з типом :class:`typing.BinaryIO`, за замовчуванням " +"значення True" + +#: ../../api/download_file.rst:38 +msgid "" +"There are two options where you can download the file: to **disk** or to " +"**binary I/O object**." +msgstr "" +"Існує два варіанти завантаження файлу: на **disk** або на **binary I/O " +"object**." + +#: ../../api/download_file.rst:41 +msgid "Download file to disk" +msgstr "Завантаження файлу на диск" + +#: ../../api/download_file.rst:43 +msgid "" +"To download file to disk, you must specify the file name or path where to" +" download the file. In this case, the function will return nothing." +msgstr "" +"Щоб завантажити файл на диск, необхідно вказати ім'я файлу або шлях, куди" +" його завантажити. У цьому випадку функція нічого не поверне." + +#: ../../api/download_file.rst:51 +msgid "Download file to binary I/O object" +msgstr "Завантаження файлу в оперативну пам'ять" + +#: ../../api/download_file.rst:53 +msgid "" +"To download file to binary I/O object, you must specify an object with " +"the :obj:`typing.BinaryIO` type or use the default (:obj:`None`) value." +msgstr "" +"Щоб завантажити файл до оперативної пам'яті, ви повинні вказати об’єкт із" +" типом :obj:`typing.BinaryIO` або використати значення за замовчуванням " +"(:obj:`None`)." + +#: ../../api/download_file.rst:56 +msgid "In the first case, the function will return your object:" +msgstr "У першому випадку функція поверне ваш об’єкт:" + +#: ../../api/download_file.rst:64 +msgid "" +"If you leave the default value, an :obj:`io.BytesIO` object will be " +"created and returned." +msgstr "" +"Якщо залишити значення за замовчуванням, буде створено та повернено " +"об’єкт :obj:`io.BytesIO`." + +#: ../../api/download_file.rst:72 +msgid "Download file in short way" +msgstr "Завантаження файла коротким шляхом" + +#: ../../api/download_file.rst:74 +msgid "" +"Getting `file_path` manually every time is boring, so you should use the " +"`download <#download>`__ method." +msgstr "" +"Щоразу добувати `file_path` вручну нудно, тому вам слід використовувати " +"метод `download <#download>`__." + +#: ../../api/download_file.rst:77 +msgid "download(...)" +msgstr "download(...)" + +#: ../../api/download_file.rst:79 +msgid "Download file by `file_id` or `Downloadable` object to destination." +msgstr "Завантажує файл за `file_id` або `Downloadable` об’єктом у вказане місце." + +#: aiogram.client.bot.Bot.download:1 of +msgid "Download file by file_id or Downloadable object to destination." +msgstr "Завантажує файл за file_id або Downloadable об’єктом у вказане місце." + +#: aiogram.client.bot.Bot.download:6 of +msgid "file_id or Downloadable object" +msgstr "file_id або Downloadable об’єкт" + +#: ../../api/download_file.rst:88 +msgid "" +"It differs from `download_file <#download-file>`__ **only** in that it " +"accepts `file_id` or an `Downloadable` object (object that contains the " +"`file_id` attribute) instead of `file_path`." +msgstr "" +"Він відрізняється від `download_file <#download-file>`__ **лише** тим, що" +" приймає `file_id` або `Downloadable` об’єкт (об’єкт, який містить " +"атрибут `file_id`) замість `file_path`." + +#: ../../api/download_file.rst:91 +msgid "" +"You can download a file to `disk <#download-file-to-disk>`__ or to a " +"`binary I/O <#download-file-to-binary-io-object>`__ object in the same " +"way." +msgstr "" +"Ви можете завантажити файл на `disk <#download-file-to-disk>`__ або в " +"`binary I/O object <#download-file-to-binary-io-object>`__ так само." + +#: ../../api/download_file.rst:93 +msgid "Example:" +msgstr "Приклад:" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/bot_command_scope_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/bot_command_scope_type.po new file mode 100644 index 00000000..e2dbf236 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/bot_command_scope_type.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/enums/bot_command_scope_type.rst:3 +msgid "BotCommandScopeType" +msgstr "" + +#: aiogram.enums.bot_command_scope_type.BotCommandScopeType:1 of +msgid "This object represents the scope to which bot commands are applied." +msgstr "Цей об’єкт представляє область, до якої застосовуються команди бота." + +#: aiogram.enums.bot_command_scope_type.BotCommandScopeType:3 of +msgid "Source: https://core.telegram.org/bots/api#botcommandscope" +msgstr "Джерело: https://core.telegram.org/bots/api#botcommandscope" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_action.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_action.po new file mode 100644 index 00000000..b73fa4b6 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_action.po @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/enums/chat_action.rst:3 +msgid "ChatAction" +msgstr "" + +#: aiogram.enums.chat_action.ChatAction:1 of +msgid "This object represents bot actions." +msgstr "Цей об’єкт представляє дії бота." + +#: aiogram.enums.chat_action.ChatAction:3 of +msgid "Choose one, depending on what the user is about to receive:" +msgstr "Виберіть один залежно від того, що користувач збирається отримати:" + +#: aiogram.enums.chat_action.ChatAction:5 of +msgid "typing for text messages," +msgstr "typing для текстових повідомлень," + +#: aiogram.enums.chat_action.ChatAction:6 of +msgid "upload_photo for photos," +msgstr "upload_photo для фотографій," + +#: aiogram.enums.chat_action.ChatAction:7 of +msgid "record_video or upload_video for videos," +msgstr "record_video або upload_video для відео," + +#: aiogram.enums.chat_action.ChatAction:8 of +msgid "record_voice or upload_voice for voice notes," +msgstr "record_voice або upload_voice для голосових повідомлень," + +#: aiogram.enums.chat_action.ChatAction:9 of +msgid "upload_document for general files," +msgstr "upload_document для загальних файлів," + +#: aiogram.enums.chat_action.ChatAction:10 of +msgid "choose_sticker for stickers," +msgstr "choose_sticker для наклейок," + +#: aiogram.enums.chat_action.ChatAction:11 of +msgid "find_location for location data," +msgstr "find_location для данних про місце знаходження," + +#: aiogram.enums.chat_action.ChatAction:12 of +msgid "record_video_note or upload_video_note for video notes." +msgstr "record_video_note або upload_video_note для відео кружків." + +#: aiogram.enums.chat_action.ChatAction:14 of +msgid "Source: https://core.telegram.org/bots/api#sendchataction" +msgstr "Джерело: https://core.telegram.org/bots/api#sendchataction" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_boost_source_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_boost_source_type.po new file mode 100644 index 00000000..d4ec3c48 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_boost_source_type.po @@ -0,0 +1,33 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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/chat_boost_source_type.rst:3 +msgid "ChatBoostSourceType" +msgstr "" + +#: aiogram.enums.chat_boost_source_type.ChatBoostSourceType:1 of +msgid "This object represents a type of chat boost source." +msgstr "" + +#: aiogram.enums.chat_boost_source_type.ChatBoostSourceType:3 of +msgid "Source: https://core.telegram.org/bots/api#chatboostsource" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_member_status.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_member_status.po new file mode 100644 index 00000000..645348ca --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_member_status.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/enums/chat_member_status.rst:3 +msgid "ChatMemberStatus" +msgstr "" + +#: aiogram.enums.chat_member_status.ChatMemberStatus:1 of +msgid "This object represents chat member status." +msgstr "Цей об’єкт представляє статус учасника чату." + +#: aiogram.enums.chat_member_status.ChatMemberStatus:3 of +msgid "Source: https://core.telegram.org/bots/api#chatmember" +msgstr "Джерело: https://core.telegram.org/bots/api#chatmember" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_type.po new file mode 100644 index 00000000..adcfba27 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_type.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/enums/chat_type.rst:3 +msgid "ChatType" +msgstr "" + +#: aiogram.enums.chat_type.ChatType:1 of +msgid "This object represents a chat type" +msgstr "Цей об’єкт представляє тип чату." + +#: aiogram.enums.chat_type.ChatType:3 of +msgid "Source: https://core.telegram.org/bots/api#chat" +msgstr "Джерело: https://core.telegram.org/bots/api#chat" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/content_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/content_type.po new file mode 100644 index 00000000..6360494b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/content_type.po @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/enums/content_type.rst:3 +msgid "ContentType" +msgstr "" + +#: aiogram.enums.content_type.ContentType:1 of +msgid "This object represents a type of content in message" +msgstr "Цей об’єкт представляє тип вмісту в повідомленні." diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/currency.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/currency.po new file mode 100644 index 00000000..b7a6d732 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/currency.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-08-06 16:52+0300\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" + +#: ../../api/enums/currency.rst:3 +msgid "Currency" +msgstr "" + +#: aiogram.enums.currency.Currency:1 of +msgid "Currencies supported by Telegram Bot API" +msgstr "" + +#: aiogram.enums.currency.Currency:3 of +msgid "Source: https://core.telegram.org/bots/payments#supported-currencies" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/dice_emoji.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/dice_emoji.po new file mode 100644 index 00000000..1d5a2903 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/dice_emoji.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/enums/dice_emoji.rst:3 +msgid "DiceEmoji" +msgstr "" + +#: aiogram.enums.dice_emoji.DiceEmoji:1 of +msgid "Emoji on which the dice throw animation is based" +msgstr "Емоджі, на яких базується анімація кидка кубика." + +#: aiogram.enums.dice_emoji.DiceEmoji:3 of +msgid "Source: https://core.telegram.org/bots/api#dice" +msgstr "Джерело: https://core.telegram.org/bots/api#dice" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/encrypted_passport_element.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/encrypted_passport_element.po new file mode 100644 index 00000000..c9fd2760 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/encrypted_passport_element.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-07-30 18:31+0300\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" + +#: ../../api/enums/encrypted_passport_element.rst:3 +msgid "EncryptedPassportElement" +msgstr "" + +#: aiogram.enums.encrypted_passport_element.EncryptedPassportElement:1 of +msgid "This object represents type of encrypted passport element." +msgstr "" + +#: aiogram.enums.encrypted_passport_element.EncryptedPassportElement:3 of +msgid "Source: https://core.telegram.org/bots/api#encryptedpassportelement" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/index.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/index.po new file mode 100644 index 00000000..78c7f5b5 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/index.po @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22: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" + +#: ../../api/enums/index.rst:3 +msgid "Enums" +msgstr "" + +#: ../../api/enums/index.rst:5 +msgid "Here is list of all available enums:" +msgstr "Ось список усіх доступних переліків:" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/inline_query_result_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/inline_query_result_type.po new file mode 100644 index 00000000..0a534fc6 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/inline_query_result_type.po @@ -0,0 +1,31 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+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" + +#: ../../api/enums/inline_query_result_type.rst:3 +msgid "InlineQueryResultType" +msgstr "" + +#: aiogram.enums.inline_query_result_type.InlineQueryResultType:1 of +msgid "Type of inline query result" +msgstr "" + +#: aiogram.enums.inline_query_result_type.InlineQueryResultType:3 of +#, fuzzy +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresult" +msgstr "Джерело: https://core.telegram.org/bots/api#maskposition" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/input_media_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/input_media_type.po new file mode 100644 index 00000000..395d9a97 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/input_media_type.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/enums/input_media_type.rst:3 +msgid "InputMediaType" +msgstr "" + +#: aiogram.enums.input_media_type.InputMediaType:1 of +msgid "This object represents input media type" +msgstr "Цей об’єкт представляє тип вхідного медіа." + +#: aiogram.enums.input_media_type.InputMediaType:3 of +msgid "Source: https://core.telegram.org/bots/api#inputmedia" +msgstr "Джерело: https://core.telegram.org/bots/api#inputmedia" 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/keyboard_button_poll_type_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/keyboard_button_poll_type_type.po new file mode 100644 index 00000000..b6706f6d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/keyboard_button_poll_type_type.po @@ -0,0 +1,35 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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/keyboard_button_poll_type_type.rst:3 +msgid "KeyboardButtonPollTypeType" +msgstr "" + +#: aiogram.enums.keyboard_button_poll_type_type.KeyboardButtonPollTypeType:1 of +msgid "" +"This object represents type of a poll, which is allowed to be created and" +" sent when the corresponding button is pressed." +msgstr "" + +#: aiogram.enums.keyboard_button_poll_type_type.KeyboardButtonPollTypeType:3 of +msgid "Source: https://core.telegram.org/bots/api#keyboardbuttonpolltype" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/mask_position_point.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/mask_position_point.po new file mode 100644 index 00000000..4b9b9262 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/mask_position_point.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/enums/mask_position_point.rst:3 +msgid "MaskPositionPoint" +msgstr "" + +#: aiogram.enums.mask_position_point.MaskPositionPoint:1 of +msgid "The part of the face relative to which the mask should be placed." +msgstr "Частина обличчя, щодо якої слід розмістити маску." + +#: aiogram.enums.mask_position_point.MaskPositionPoint:3 of +msgid "Source: https://core.telegram.org/bots/api#maskposition" +msgstr "Джерело: https://core.telegram.org/bots/api#maskposition" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/menu_button_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/menu_button_type.po new file mode 100644 index 00000000..bf4d119e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/menu_button_type.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/enums/menu_button_type.rst:3 +msgid "MenuButtonType" +msgstr "" + +#: aiogram.enums.menu_button_type.MenuButtonType:1 of +msgid "This object represents an type of Menu button" +msgstr "Цей об’єкт представляє тип кнопки меню." + +#: aiogram.enums.menu_button_type.MenuButtonType:3 of +msgid "Source: https://core.telegram.org/bots/api#menubuttondefault" +msgstr "Джерело: https://core.telegram.org/bots/api#menubuttondefault" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/message_entity_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/message_entity_type.po new file mode 100644 index 00000000..d8b6068c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/message_entity_type.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/enums/message_entity_type.rst:3 +msgid "MessageEntityType" +msgstr "" + +#: aiogram.enums.message_entity_type.MessageEntityType:1 of +msgid "This object represents type of message entity" +msgstr "Цей об’єкт представляє тип сутності повідомлення." + +#: aiogram.enums.message_entity_type.MessageEntityType:3 of +msgid "Source: https://core.telegram.org/bots/api#messageentity" +msgstr "Джерело: https://core.telegram.org/bots/api#messageentity" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/message_origin_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/message_origin_type.po new file mode 100644 index 00000000..92ad2aac --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/message_origin_type.po @@ -0,0 +1,33 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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/message_origin_type.rst:3 +msgid "MessageOriginType" +msgstr "" + +#: aiogram.enums.message_origin_type.MessageOriginType:1 of +msgid "This object represents origin of a message." +msgstr "" + +#: aiogram.enums.message_origin_type.MessageOriginType:3 of +msgid "Source: https://core.telegram.org/bots/api#messageorigin" +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/parse_mode.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/parse_mode.po new file mode 100644 index 00000000..e1d8448b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/parse_mode.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/enums/parse_mode.rst:3 +msgid "ParseMode" +msgstr "" + +#: aiogram.enums.parse_mode.ParseMode:1 of +msgid "Formatting options" +msgstr "Параметри форматування." + +#: aiogram.enums.parse_mode.ParseMode:3 of +msgid "Source: https://core.telegram.org/bots/api#formatting-options" +msgstr "Джерело: https://core.telegram.org/bots/api#formatting-options" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/passport_element_error_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/passport_element_error_type.po new file mode 100644 index 00000000..285d6c8a --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/passport_element_error_type.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-07-30 18:31+0300\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" + +#: ../../api/enums/passport_element_error_type.rst:3 +msgid "PassportElementErrorType" +msgstr "" + +#: aiogram.enums.passport_element_error_type.PassportElementErrorType:1 of +msgid "This object represents a passport element error type." +msgstr "" + +#: aiogram.enums.passport_element_error_type.PassportElementErrorType:3 of +msgid "Source: https://core.telegram.org/bots/api#passportelementerror" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/poll_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/poll_type.po new file mode 100644 index 00000000..9d931e48 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/poll_type.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/enums/poll_type.rst:3 +msgid "PollType" +msgstr "" + +#: aiogram.enums.poll_type.PollType:1 of +msgid "This object represents poll type" +msgstr "Цей об'єкт представляє тип опитування." + +#: aiogram.enums.poll_type.PollType:3 of +msgid "Source: https://core.telegram.org/bots/api#poll" +msgstr "Джерело: https://core.telegram.org/bots/api#poll" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/reaction_type_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/reaction_type_type.po new file mode 100644 index 00000000..d1d557eb --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/reaction_type_type.po @@ -0,0 +1,33 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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/reaction_type_type.rst:3 +msgid "ReactionTypeType" +msgstr "" + +#: aiogram.enums.reaction_type_type.ReactionTypeType:1 of +msgid "This object represents reaction type." +msgstr "" + +#: aiogram.enums.reaction_type_type.ReactionTypeType:3 of +msgid "Source: https://core.telegram.org/bots/api#reactiontype" +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/sticker_format.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_format.po new file mode 100644 index 00000000..57a8b198 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_format.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+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" + +#: ../../api/enums/sticker_format.rst:3 +msgid "StickerFormat" +msgstr "" + +#: aiogram.enums.sticker_format.StickerFormat:1 of +msgid "Format of the sticker" +msgstr "" + +#: aiogram.enums.sticker_format.StickerFormat:3 of +msgid "Source: https://core.telegram.org/bots/api#createnewstickerset" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_type.po new file mode 100644 index 00000000..ff70ad15 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_type.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 23:19+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" + +#: ../../api/enums/sticker_type.rst:3 +msgid "StickerType" +msgstr "" + +#: aiogram.enums.sticker_type.StickerType:1 of +msgid "The part of the face relative to which the mask should be placed." +msgstr "Частина обличчя, щодо якої слід розмістити маску." + +#: aiogram.enums.sticker_type.StickerType:3 of +msgid "Source: https://core.telegram.org/bots/api#maskposition" +msgstr "Джерело: https://core.telegram.org/bots/api#maskposition" 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 new file mode 100644 index 00000000..62b9ba19 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/topic_icon_color.po @@ -0,0 +1,34 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/enums/topic_icon_color.rst:3 +msgid "TopicIconColor" +msgstr "" + +#: aiogram.enums.topic_icon_color.TopicIconColor:1 of +msgid "Color of the topic icon in RGB format." +msgstr "Колір значка теми у форматі RGB." + +#: aiogram.enums.topic_icon_color.TopicIconColor:3 of +msgid "" +"Source: " +"https://github.com/telegramdesktop/tdesktop/blob/991fe491c5ae62705d77aa8fdd44a79caf639c45/Telegram/SourceFiles/data/data_forum_topic.cpp#L51-L56" +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/enums/update_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/update_type.po new file mode 100644 index 00000000..7485bd4d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/update_type.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/enums/update_type.rst:3 +msgid "UpdateType" +msgstr "" + +#: aiogram.enums.update_type.UpdateType:1 of +msgid "This object represents the complete list of allowed update types" +msgstr "Цей об’єкт представляє повний список дозволених типів оновлення." + +#: aiogram.enums.update_type.UpdateType:3 of +msgid "Source: https://core.telegram.org/bots/api#update" +msgstr "Джерело: https://core.telegram.org/bots/api#update" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/index.po b/docs/locale/uk_UA/LC_MESSAGES/api/index.po new file mode 100644 index 00000000..6e2cb17f --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/index.po @@ -0,0 +1,38 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"PO-Revision-Date: 2022-12-13 18:47+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.10.3\n" +"X-Generator: Poedit 3.2.2\n" + +#: ../../api/index.rst:3 +msgid "Bot API" +msgstr "Бот API" + +#: ../../api/index.rst:5 +msgid "" +"**aiogram** now is fully support of `Telegram Bot API `_" +msgstr "" +"**aiogram** наразі повністю підтримує `Telegram Bot API `_" + +#: ../../api/index.rst:7 +msgid "" +"All methods and types is fully autogenerated from Telegram Bot API docs " +"by parser with code-generator." +msgstr "" +"Усі методи та типи повністю автоматично згенеровані з документації " +"Telegram Bot API за допомогою парсера з генератором коду." 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 new file mode 100644 index 00000000..bd805c10 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/add_sticker_to_set.po @@ -0,0 +1,161 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/add_sticker_to_set.rst:3 +msgid "addStickerToSet" +msgstr "" + +#: ../../api/methods/add_sticker_to_set.rst:5 +msgid "Returns: :obj:`bool`" +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. 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 +msgid "Source: https://core.telegram.org/bots/api#addstickertoset" +msgstr "" + +#: ../../docstring aiogram.methods.add_sticker_to_set.AddStickerToSet.user_id:1 +#: of +msgid "User identifier of sticker set owner" +msgstr "" + +#: ../../docstring aiogram.methods.add_sticker_to_set.AddStickerToSet.name:1 of +msgid "Sticker set name" +msgstr "" + +#: ../../docstring aiogram.methods.add_sticker_to_set.AddStickerToSet.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 " +"isn't changed." +msgstr "" + +#: ../../api/methods/add_sticker_to_set.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/add_sticker_to_set.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/add_sticker_to_set.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/add_sticker_to_set.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../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:31 +msgid "alias: :code:`from aiogram.methods import AddStickerToSet`" +msgstr "" + +#: ../../api/methods/add_sticker_to_set.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/add_sticker_to_set.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#~ msgid "" +#~ "Use this method to add a new " +#~ "sticker to a set created by the" +#~ " bot. You **must** use exactly one" +#~ " of the fields *png_sticker*, " +#~ "*tgs_sticker*, or *webm_sticker*. Animated " +#~ "stickers can be added to animated " +#~ "sticker sets and only to them. " +#~ "Animated sticker sets can have up " +#~ "to 50 stickers. Static sticker sets " +#~ "can have up to 120 stickers. " +#~ "Returns :code:`True` on success." +#~ msgstr "" + +#~ msgid "One or more emoji corresponding to the sticker" +#~ msgstr "" + +#~ msgid "" +#~ "**PNG** image with the sticker, must " +#~ "be up to 512 kilobytes in size," +#~ " dimensions must not exceed 512px, " +#~ "and either width or height must be" +#~ " exactly 512px. 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 " +#~ "» `" +#~ msgstr "" + +#~ msgid "" +#~ "**TGS** animation with the sticker, " +#~ "uploaded using multipart/form-data. See " +#~ "`https://core.telegram.org/stickers#animated-sticker-" +#~ "requirements `_`https://core.telegram.org/stickers" +#~ "#animated-sticker-requirements " +#~ "`_ for technical requirements" +#~ msgstr "" + +#~ msgid "" +#~ "**WEBM** video with the sticker, " +#~ "uploaded using multipart/form-data. See " +#~ "`https://core.telegram.org/stickers#video-sticker-" +#~ "requirements `_`https://core.telegram.org/stickers" +#~ "#video-sticker-requirements " +#~ "`_ for technical requirements" +#~ msgstr "" + +#~ msgid "" +#~ "A JSON-serialized object for position" +#~ " 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_callback_query.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/answer_callback_query.po new file mode 100644 index 00000000..2370aa3c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/answer_callback_query.po @@ -0,0 +1,141 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/answer_callback_query.rst:3 +msgid "answerCallbackQuery" +msgstr "" + +#: ../../api/methods/answer_callback_query.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.answer_callback_query.AnswerCallbackQuery:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.answer_callback_query.AnswerCallbackQuery:3 of +msgid "" +"Alternatively, the user can be redirected to the specified Game URL. For " +"this option to work, you must first create a game for your bot via " +"`@BotFather `_ and accept the terms. Otherwise, " +"you may use links like :code:`t.me/your_bot?start=XXXX` that open your " +"bot with a parameter." +msgstr "" + +#: aiogram.methods.answer_callback_query.AnswerCallbackQuery:5 of +msgid "Source: https://core.telegram.org/bots/api#answercallbackquery" +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_callback_query.AnswerCallbackQuery.callback_query_id:1 +#: of +msgid "Unique identifier for the query to be answered" +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_callback_query.AnswerCallbackQuery.text:1 of +msgid "" +"Text of the notification. If not specified, nothing will be shown to the " +"user, 0-200 characters" +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_callback_query.AnswerCallbackQuery.show_alert:1 of +msgid "" +"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*." +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_callback_query.AnswerCallbackQuery.url:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_callback_query.AnswerCallbackQuery.cache_time:1 of +msgid "" +"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." +msgstr "" + +#: ../../api/methods/answer_callback_query.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/answer_callback_query.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/answer_callback_query.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/answer_callback_query.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/answer_callback_query.rst:29 +msgid "" +":code:`from aiogram.methods.answer_callback_query import " +"AnswerCallbackQuery`" +msgstr "" + +#: ../../api/methods/answer_callback_query.rst:30 +msgid "alias: :code:`from aiogram.methods import AnswerCallbackQuery`" +msgstr "" + +#: ../../api/methods/answer_callback_query.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/answer_callback_query.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/answer_callback_query.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/answer_callback_query.rst:50 +msgid ":meth:`aiogram.types.callback_query.CallbackQuery.answer`" +msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/answer_inline_query.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/answer_inline_query.po new file mode 100644 index 00000000..329640c8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/answer_inline_query.po @@ -0,0 +1,164 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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: 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" + +#: ../../api/methods/answer_inline_query.rst:3 +msgid "answerInlineQuery" +msgstr "" + +#: ../../api/methods/answer_inline_query.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.answer_inline_query.AnswerInlineQuery:1 of +msgid "" +"Use this method to send answers to an inline query. On success, " +":code:`True` is returned." +msgstr "" + +#: aiogram.methods.answer_inline_query.AnswerInlineQuery:3 of +msgid "No more than **50** results per query are allowed." +msgstr "" + +#: aiogram.methods.answer_inline_query.AnswerInlineQuery:5 of +msgid "Source: https://core.telegram.org/bots/api#answerinlinequery" +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_inline_query.AnswerInlineQuery.inline_query_id:1 of +msgid "Unique identifier for the answered query" +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_inline_query.AnswerInlineQuery.results:1 of +msgid "A JSON-serialized array of results for the inline query" +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_inline_query.AnswerInlineQuery.cache_time:1 of +msgid "" +"The maximum amount of time in seconds that the result of the inline query" +" may be cached on the server. Defaults to 300." +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_inline_query.AnswerInlineQuery.is_personal:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_inline_query.AnswerInlineQuery.next_offset:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_inline_query.AnswerInlineQuery.button:1 of +msgid "" +"A JSON-serialized object describing a button to be shown above inline " +"query results" +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_inline_query.AnswerInlineQuery.switch_pm_parameter:1 +#: of +msgid "" +"`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." +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_inline_query.AnswerInlineQuery.switch_pm_parameter:3 +#: aiogram.methods.answer_inline_query.AnswerInlineQuery.switch_pm_text:3 of +msgid "https://core.telegram.org/bots/api-changelog#april-21-2023" +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_inline_query.AnswerInlineQuery.switch_pm_text:1 of +msgid "" +"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*" +msgstr "" + +#: ../../api/methods/answer_inline_query.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/answer_inline_query.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/answer_inline_query.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/answer_inline_query.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/answer_inline_query.rst:29 +msgid ":code:`from aiogram.methods.answer_inline_query import AnswerInlineQuery`" +msgstr "" + +#: ../../api/methods/answer_inline_query.rst:30 +msgid "alias: :code:`from aiogram.methods import AnswerInlineQuery`" +msgstr "" + +#: ../../api/methods/answer_inline_query.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/answer_inline_query.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/answer_inline_query.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/answer_inline_query.rst:50 +msgid ":meth:`aiogram.types.inline_query.InlineQuery.answer`" +msgstr "" + +#~ msgid "" +#~ "`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." +#~ msgstr "" + +#~ msgid "" +#~ "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" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/answer_pre_checkout_query.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/answer_pre_checkout_query.po new file mode 100644 index 00000000..0686720e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/answer_pre_checkout_query.po @@ -0,0 +1,108 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-08-06 16:52+0300\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" + +#: ../../api/methods/answer_pre_checkout_query.rst:3 +msgid "answerPreCheckoutQuery" +msgstr "" + +#: ../../api/methods/answer_pre_checkout_query.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.answer_pre_checkout_query.AnswerPreCheckoutQuery:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.answer_pre_checkout_query.AnswerPreCheckoutQuery:3 of +msgid "Source: https://core.telegram.org/bots/api#answerprecheckoutquery" +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_pre_checkout_query.AnswerPreCheckoutQuery.pre_checkout_query_id:1 +#: of +msgid "Unique identifier for the query to be answered" +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_pre_checkout_query.AnswerPreCheckoutQuery.ok:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_pre_checkout_query.AnswerPreCheckoutQuery.error_message:1 +#: of +msgid "" +"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." +msgstr "" + +#: ../../api/methods/answer_pre_checkout_query.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/answer_pre_checkout_query.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/answer_pre_checkout_query.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/answer_pre_checkout_query.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/answer_pre_checkout_query.rst:30 +msgid "" +":code:`from aiogram.methods.answer_pre_checkout_query import " +"AnswerPreCheckoutQuery`" +msgstr "" + +#: ../../api/methods/answer_pre_checkout_query.rst:31 +msgid "alias: :code:`from aiogram.methods import AnswerPreCheckoutQuery`" +msgstr "" + +#: ../../api/methods/answer_pre_checkout_query.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/answer_pre_checkout_query.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/answer_pre_checkout_query.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/answer_pre_checkout_query.rst:51 +msgid ":meth:`aiogram.types.pre_checkout_query.PreCheckoutQuery.answer`" +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 new file mode 100644 index 00000000..2994cd5c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/answer_shipping_query.po @@ -0,0 +1,122 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/answer_shipping_query.rst:3 +msgid "answerShippingQuery" +msgstr "" + +#: ../../api/methods/answer_shipping_query.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.answer_shipping_query.AnswerShippingQuery:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.answer_shipping_query.AnswerShippingQuery:3 of +msgid "Source: https://core.telegram.org/bots/api#answershippingquery" +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_shipping_query.AnswerShippingQuery.shipping_query_id:1 +#: of +msgid "Unique identifier for the query to be answered" +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_shipping_query.AnswerShippingQuery.ok:1 of +msgid "" +"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)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_shipping_query.AnswerShippingQuery.shipping_options:1 +#: of +msgid "" +"Required if *ok* is :code:`True`. A JSON-serialized array of available " +"shipping options." +msgstr "" + +#: ../../docstring +#: 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, " +"delivery to your desired address is unavailable'). Telegram will display " +"this message to the user." +msgstr "" + +#: ../../api/methods/answer_shipping_query.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/answer_shipping_query.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/answer_shipping_query.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/answer_shipping_query.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/answer_shipping_query.rst:30 +msgid "" +":code:`from aiogram.methods.answer_shipping_query import " +"AnswerShippingQuery`" +msgstr "" + +#: ../../api/methods/answer_shipping_query.rst:31 +msgid "alias: :code:`from aiogram.methods import AnswerShippingQuery`" +msgstr "" + +#: ../../api/methods/answer_shipping_query.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/answer_shipping_query.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/answer_shipping_query.rst:49 +msgid "As shortcut from received object" +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/answer_web_app_query.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/answer_web_app_query.po new file mode 100644 index 00000000..8fd685be --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/answer_web_app_query.po @@ -0,0 +1,82 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/methods/answer_web_app_query.rst:3 +msgid "answerWebAppQuery" +msgstr "" + +#: ../../api/methods/answer_web_app_query.rst:5 +msgid "Returns: :obj:`SentWebAppMessage`" +msgstr "" + +#: aiogram.methods.answer_web_app_query.AnswerWebAppQuery:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.answer_web_app_query.AnswerWebAppQuery:3 of +msgid "Source: https://core.telegram.org/bots/api#answerwebappquery" +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_web_app_query.AnswerWebAppQuery.web_app_query_id:1 of +msgid "Unique identifier for the query to be answered" +msgstr "" + +#: ../../docstring +#: aiogram.methods.answer_web_app_query.AnswerWebAppQuery.result:1 of +msgid "A JSON-serialized object describing the message to be sent" +msgstr "" + +#: ../../api/methods/answer_web_app_query.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/answer_web_app_query.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/answer_web_app_query.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/answer_web_app_query.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/answer_web_app_query.rst:29 +msgid ":code:`from aiogram.methods.answer_web_app_query import AnswerWebAppQuery`" +msgstr "" + +#: ../../api/methods/answer_web_app_query.rst:30 +msgid "alias: :code:`from aiogram.methods import AnswerWebAppQuery`" +msgstr "" + +#: ../../api/methods/answer_web_app_query.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/answer_web_app_query.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/approve_chat_join_request.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/approve_chat_join_request.po new file mode 100644 index 00000000..93504319 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/approve_chat_join_request.po @@ -0,0 +1,93 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/approve_chat_join_request.rst:3 +msgid "approveChatJoinRequest" +msgstr "" + +#: ../../api/methods/approve_chat_join_request.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.approve_chat_join_request.ApproveChatJoinRequest:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.approve_chat_join_request.ApproveChatJoinRequest:3 of +msgid "Source: https://core.telegram.org/bots/api#approvechatjoinrequest" +msgstr "" + +#: ../../docstring +#: aiogram.methods.approve_chat_join_request.ApproveChatJoinRequest.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.approve_chat_join_request.ApproveChatJoinRequest.user_id:1 +#: of +msgid "Unique identifier of the target user" +msgstr "" + +#: ../../api/methods/approve_chat_join_request.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/approve_chat_join_request.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/approve_chat_join_request.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/approve_chat_join_request.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/approve_chat_join_request.rst:29 +msgid "" +":code:`from aiogram.methods.approve_chat_join_request import " +"ApproveChatJoinRequest`" +msgstr "" + +#: ../../api/methods/approve_chat_join_request.rst:30 +msgid "alias: :code:`from aiogram.methods import ApproveChatJoinRequest`" +msgstr "" + +#: ../../api/methods/approve_chat_join_request.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/approve_chat_join_request.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/approve_chat_join_request.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/approve_chat_join_request.rst:50 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.approve`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/ban_chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/ban_chat_member.po new file mode 100644 index 00000000..ed3552d1 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/ban_chat_member.po @@ -0,0 +1,108 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-10-08 19:04+0300\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" + +#: ../../api/methods/ban_chat_member.rst:3 +msgid "banChatMember" +msgstr "" + +#: ../../api/methods/ban_chat_member.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.ban_chat_member.BanChatMember:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.ban_chat_member.BanChatMember:3 of +msgid "Source: https://core.telegram.org/bots/api#banchatmember" +msgstr "" + +#: ../../docstring aiogram.methods.ban_chat_member.BanChatMember.chat_id:1 of +msgid "" +"Unique identifier for the target group or username of the target " +"supergroup or channel (in the format :code:`@channelusername`)" +msgstr "" + +#: ../../docstring aiogram.methods.ban_chat_member.BanChatMember.user_id:1 of +msgid "Unique identifier of the target user" +msgstr "" + +#: ../../docstring aiogram.methods.ban_chat_member.BanChatMember.until_date:1 +#: of +msgid "" +"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." +msgstr "" + +#: ../../docstring +#: aiogram.methods.ban_chat_member.BanChatMember.revoke_messages:1 of +msgid "" +"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." +msgstr "" + +#: ../../api/methods/ban_chat_member.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/ban_chat_member.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/ban_chat_member.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/ban_chat_member.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/ban_chat_member.rst:30 +msgid ":code:`from aiogram.methods.ban_chat_member import BanChatMember`" +msgstr "" + +#: ../../api/methods/ban_chat_member.rst:31 +msgid "alias: :code:`from aiogram.methods import BanChatMember`" +msgstr "" + +#: ../../api/methods/ban_chat_member.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/ban_chat_member.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/ban_chat_member.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/ban_chat_member.rst:51 +msgid ":meth:`aiogram.types.chat.Chat.ban`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/ban_chat_sender_chat.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/ban_chat_sender_chat.po new file mode 100644 index 00000000..410a0c8e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/ban_chat_sender_chat.po @@ -0,0 +1,93 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/ban_chat_sender_chat.rst:3 +msgid "banChatSenderChat" +msgstr "" + +#: ../../api/methods/ban_chat_sender_chat.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.ban_chat_sender_chat.BanChatSenderChat:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.ban_chat_sender_chat.BanChatSenderChat:3 of +msgid "Source: https://core.telegram.org/bots/api#banchatsenderchat" +msgstr "" + +#: ../../docstring +#: aiogram.methods.ban_chat_sender_chat.BanChatSenderChat.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.ban_chat_sender_chat.BanChatSenderChat.sender_chat_id:1 of +msgid "Unique identifier of the target sender chat" +msgstr "" + +#: ../../api/methods/ban_chat_sender_chat.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/ban_chat_sender_chat.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/ban_chat_sender_chat.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/ban_chat_sender_chat.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/ban_chat_sender_chat.rst:29 +msgid ":code:`from aiogram.methods.ban_chat_sender_chat import BanChatSenderChat`" +msgstr "" + +#: ../../api/methods/ban_chat_sender_chat.rst:30 +msgid "alias: :code:`from aiogram.methods import BanChatSenderChat`" +msgstr "" + +#: ../../api/methods/ban_chat_sender_chat.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/ban_chat_sender_chat.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/ban_chat_sender_chat.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/ban_chat_sender_chat.rst:50 +msgid ":meth:`aiogram.types.chat.Chat.ban_sender_chat`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/close.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/close.po new file mode 100644 index 00000000..cfdf34fc --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/close.po @@ -0,0 +1,71 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/methods/close.rst:3 +msgid "close" +msgstr "" + +#: ../../api/methods/close.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.close.Close:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.close.Close:3 of +msgid "Source: https://core.telegram.org/bots/api#close" +msgstr "" + +#: ../../api/methods/close.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/close.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/close.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/close.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/close.rst:29 +msgid ":code:`from aiogram.methods.close import Close`" +msgstr "" + +#: ../../api/methods/close.rst:30 +msgid "alias: :code:`from aiogram.methods import Close`" +msgstr "" + +#: ../../api/methods/close.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/close.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/close_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/close_forum_topic.po new file mode 100644 index 00000000..cf6aa076 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/close_forum_topic.po @@ -0,0 +1,82 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-06 14:18+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" + +#: ../../api/methods/close_forum_topic.rst:3 +msgid "closeForumTopic" +msgstr "" + +#: ../../api/methods/close_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.close_forum_topic.CloseForumTopic:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.close_forum_topic.CloseForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#closeforumtopic" +msgstr "" + +#: ../../docstring aiogram.methods.close_forum_topic.CloseForumTopic.chat_id:1 +#: of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.close_forum_topic.CloseForumTopic.message_thread_id:1 of +msgid "Unique identifier for the target message thread of the forum topic" +msgstr "" + +#: ../../api/methods/close_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/close_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/close_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/close_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/close_forum_topic.rst:29 +msgid ":code:`from aiogram.methods.close_forum_topic import CloseForumTopic`" +msgstr "" + +#: ../../api/methods/close_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import CloseForumTopic`" +msgstr "" + +#: ../../api/methods/close_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/close_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/close_general_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/close_general_forum_topic.po new file mode 100644 index 00000000..f67c10fd --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/close_general_forum_topic.po @@ -0,0 +1,80 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22: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" + +#: ../../api/methods/close_general_forum_topic.rst:3 +msgid "closeGeneralForumTopic" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.close_general_forum_topic.CloseGeneralForumTopic:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.close_general_forum_topic.CloseGeneralForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#closegeneralforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.close_general_forum_topic.CloseGeneralForumTopic.chat_id:1 +#: of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:29 +msgid "" +":code:`from aiogram.methods.close_general_forum_topic import " +"CloseGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import CloseGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +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 new file mode 100644 index 00000000..8239d253 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/copy_message.po @@ -0,0 +1,247 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/copy_message.rst:3 +msgid "copyMessage" +msgstr "" + +#: ../../api/methods/copy_message.rst:5 +msgid "Returns: :obj:`MessageId`" +msgstr "" + +#: aiogram.methods.copy_message.CopyMessage:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.copy_message.CopyMessage:3 of +msgid "Source: https://core.telegram.org/bots/api#copymessage" +msgstr "" + +#: ../../docstring aiogram.methods.copy_message.CopyMessage.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.copy_message.CopyMessage.from_chat_id:1 of +msgid "" +"Unique identifier for the chat where the original message was sent (or " +"channel username in the format :code:`@channelusername`)" +msgstr "" + +#: ../../docstring aiogram.methods.copy_message.CopyMessage.message_id:1 of +msgid "Message identifier in the chat specified in *from_chat_id*" +msgstr "" + +#: ../../docstring aiogram.methods.copy_message.CopyMessage.message_thread_id:1 +#: of +msgid "" +"Unique identifier for the target message thread (topic) of the forum; for" +" 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 " +"specified, the original caption is kept" +msgstr "" + +#: ../../docstring aiogram.methods.copy_message.CopyMessage.parse_mode:1 of +msgid "" +"Mode for parsing entities in the new caption. See `formatting options " +"`_ for more " +"details." +msgstr "" + +#: ../../docstring aiogram.methods.copy_message.CopyMessage.caption_entities:1 +#: of +msgid "" +"A JSON-serialized list of special entities that appear in the new " +"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 "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring aiogram.methods.copy_message.CopyMessage.protect_content:1 +#: of +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" +msgstr "" + +#: ../../docstring aiogram.methods.copy_message.CopyMessage.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 "" + +#: ../../docstring +#: aiogram.methods.copy_message.CopyMessage.allow_sending_without_reply:1 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.copy_message.CopyMessage.allow_sending_without_reply:3 +#: aiogram.methods.copy_message.CopyMessage.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring +#: aiogram.methods.copy_message.CopyMessage.reply_to_message_id:1 of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/copy_message.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/copy_message.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/copy_message.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/copy_message.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/copy_message.rst:30 +msgid ":code:`from aiogram.methods.copy_message import CopyMessage`" +msgstr "" + +#: ../../api/methods/copy_message.rst:31 +msgid "alias: :code:`from aiogram.methods import CopyMessage`" +msgstr "" + +#: ../../api/methods/copy_message.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/copy_message.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/copy_message.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/copy_message.rst:51 +msgid ":meth:`aiogram.types.message.Message.copy_to`" +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 "" +#~ "Use this method to copy messages " +#~ "of any kind. Service 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 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 new file mode 100644 index 00000000..1958cf78 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/copy_messages.po @@ -0,0 +1,155 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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/copy_messages.rst:3 +msgid "copyMessages" +msgstr "" + +#: ../../api/methods/copy_messages.rst:5 +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, " +"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 "" + +#: aiogram.methods.copy_messages.CopyMessages:3 of +msgid "Source: https://core.telegram.org/bots/api#copymessages" +msgstr "" + +#: ../../docstring aiogram.methods.copy_messages.CopyMessages.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.copy_messages.CopyMessages.from_chat_id:1 of +msgid "" +"Unique identifier for the chat where the original messages were sent (or " +"channel username in the format :code:`@channelusername`)" +msgstr "" + +#: ../../docstring aiogram.methods.copy_messages.CopyMessages.message_ids:1 of +msgid "" +"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 +#: aiogram.methods.copy_messages.CopyMessages.message_thread_id:1 of +msgid "" +"Unique identifier for the target message thread (topic) of the forum; for" +" forum supergroups only" +msgstr "" + +#: ../../docstring +#: aiogram.methods.copy_messages.CopyMessages.disable_notification:1 of +msgid "" +"Sends the messages `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring aiogram.methods.copy_messages.CopyMessages.protect_content:1 +#: of +msgid "Protects the contents of the sent messages from forwarding and saving" +msgstr "" + +#: ../../docstring aiogram.methods.copy_messages.CopyMessages.remove_caption:1 +#: of +msgid "Pass :code:`True` to copy the messages without their captions" +msgstr "" + +#: ../../api/methods/copy_messages.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/copy_messages.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/copy_messages.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/copy_messages.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/copy_messages.rst:30 +msgid ":code:`from aiogram.methods.copy_messages import CopyMessages`" +msgstr "" + +#: ../../api/methods/copy_messages.rst:31 +msgid "alias: :code:`from aiogram.methods import CopyMessages`" +msgstr "" + +#: ../../api/methods/copy_messages.rst:34 +msgid "With specific bot" +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_invite_link.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_chat_invite_link.po new file mode 100644 index 00000000..7099e1d3 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_chat_invite_link.po @@ -0,0 +1,118 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/create_chat_invite_link.rst:3 +msgid "createChatInviteLink" +msgstr "" + +#: ../../api/methods/create_chat_invite_link.rst:5 +msgid "Returns: :obj:`ChatInviteLink`" +msgstr "" + +#: aiogram.methods.create_chat_invite_link.CreateChatInviteLink:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.create_chat_invite_link.CreateChatInviteLink:3 of +msgid "Source: https://core.telegram.org/bots/api#createchatinvitelink" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_chat_invite_link.CreateChatInviteLink.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.create_chat_invite_link.CreateChatInviteLink.name:1 of +msgid "Invite link name; 0-32 characters" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_chat_invite_link.CreateChatInviteLink.expire_date:1 +#: of +msgid "Point in time (Unix timestamp) when the link will expire" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_chat_invite_link.CreateChatInviteLink.member_limit:1 +#: of +msgid "" +"The maximum number of users that can be members of the chat " +"simultaneously after joining the chat via this invite link; 1-99999" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_chat_invite_link.CreateChatInviteLink.creates_join_request:1 +#: of +msgid "" +":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" +msgstr "" + +#: ../../api/methods/create_chat_invite_link.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/create_chat_invite_link.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/create_chat_invite_link.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/create_chat_invite_link.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/create_chat_invite_link.rst:29 +msgid "" +":code:`from aiogram.methods.create_chat_invite_link import " +"CreateChatInviteLink`" +msgstr "" + +#: ../../api/methods/create_chat_invite_link.rst:30 +msgid "alias: :code:`from aiogram.methods import CreateChatInviteLink`" +msgstr "" + +#: ../../api/methods/create_chat_invite_link.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/create_chat_invite_link.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/create_chat_invite_link.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/create_chat_invite_link.rst:50 +msgid ":meth:`aiogram.types.chat.Chat.create_invite_link`" +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_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_forum_topic.po new file mode 100644 index 00000000..20e71139 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_forum_topic.po @@ -0,0 +1,106 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/create_forum_topic.rst:3 +msgid "createForumTopic" +msgstr "" + +#: ../../api/methods/create_forum_topic.rst:5 +msgid "Returns: :obj:`ForumTopic`" +msgstr "" + +#: aiogram.methods.create_forum_topic.CreateForumTopic:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.create_forum_topic.CreateForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#createforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_forum_topic.CreateForumTopic.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../docstring aiogram.methods.create_forum_topic.CreateForumTopic.name:1 +#: of +msgid "Topic name, 1-128 characters" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_forum_topic.CreateForumTopic.icon_color:1 of +msgid "" +"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)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_forum_topic.CreateForumTopic.icon_custom_emoji_id:1 +#: of +msgid "" +"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." +msgstr "" + +#: ../../api/methods/create_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/create_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/create_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/create_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/create_forum_topic.rst:29 +msgid ":code:`from aiogram.methods.create_forum_topic import CreateForumTopic`" +msgstr "" + +#: ../../api/methods/create_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import CreateForumTopic`" +msgstr "" + +#: ../../api/methods/create_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/create_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#~ msgid "" +#~ "Color of the topic icon in RGB " +#~ "format. Currently, must be one of " +#~ "0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, " +#~ "0xFF93B2, or 0xFB6F5F" +#~ 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 new file mode 100644 index 00000000..07acfa33 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_invoice_link.po @@ -0,0 +1,322 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/create_invoice_link.rst:3 +msgid "createInvoiceLink" +msgstr "" + +#: ../../api/methods/create_invoice_link.rst:5 +msgid "Returns: :obj:`str`" +msgstr "" + +#: aiogram.methods.create_invoice_link.CreateInvoiceLink:1 of +msgid "" +"Use this method to create a link for an invoice. Returns the created " +"invoice link as *String* on success." +msgstr "" + +#: aiogram.methods.create_invoice_link.CreateInvoiceLink:3 of +msgid "Source: https://core.telegram.org/bots/api#createinvoicelink" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_invoice_link.CreateInvoiceLink.title:1 of +msgid "Product name, 1-32 characters" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_invoice_link.CreateInvoiceLink.description:1 of +msgid "Product description, 1-255 characters" +msgstr "" + +#: ../../docstring +#: 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 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.). 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 +#: aiogram.methods.create_invoice_link.CreateInvoiceLink.max_tip_amount:1 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 "" + +#: ../../docstring +#: aiogram.methods.create_invoice_link.CreateInvoiceLink.suggested_tip_amounts:1 +#: 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 "" + +#: ../../docstring +#: aiogram.methods.create_invoice_link.CreateInvoiceLink.provider_data:1 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 "" + +#: ../../docstring +#: aiogram.methods.create_invoice_link.CreateInvoiceLink.photo_url:1 of +msgid "" +"URL of the product photo for the invoice. Can be a photo of the goods or " +"a marketing image for a service." +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_invoice_link.CreateInvoiceLink.photo_size:1 of +msgid "Photo size in bytes" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_invoice_link.CreateInvoiceLink.photo_width:1 of +msgid "Photo width" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_invoice_link.CreateInvoiceLink.photo_height:1 of +msgid "Photo height" +msgstr "" + +#: ../../docstring +#: 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. 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. 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. Ignored for payments in `Telegram Stars " +"`_." +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_invoice_link.CreateInvoiceLink.need_shipping_address:1 +#: of +msgid "" +"Pass :code:`True` if you require the user's shipping address to complete " +"the order. Ignored for payments in `Telegram Stars " +"`_." +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_invoice_link.CreateInvoiceLink.send_phone_number_to_provider:1 +#: of +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.create_invoice_link.CreateInvoiceLink.send_email_to_provider:1 +#: of +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.create_invoice_link.CreateInvoiceLink.is_flexible:1 of +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:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/create_invoice_link.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/create_invoice_link.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/create_invoice_link.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/create_invoice_link.rst:30 +msgid ":code:`from aiogram.methods.create_invoice_link import CreateInvoiceLink`" +msgstr "" + +#: ../../api/methods/create_invoice_link.rst:31 +msgid "alias: :code:`from aiogram.methods import CreateInvoiceLink`" +msgstr "" + +#: ../../api/methods/create_invoice_link.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../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 new file mode 100644 index 00000000..b1e1e2b6 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_new_sticker_set.po @@ -0,0 +1,196 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/create_new_sticker_set.rst:3 +msgid "createNewStickerSet" +msgstr "" + +#: ../../api/methods/create_new_sticker_set.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet:3 of +msgid "Source: https://core.telegram.org/bots/api#createnewstickerset" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.user_id:1 of +msgid "User identifier of created sticker set owner" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.name:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.title:1 of +msgid "Sticker set title, 1-64 characters" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.stickers:1 of +msgid "" +"A JSON-serialized list of 1-50 initial stickers to be added to the " +"sticker set" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.sticker_type:1 of +msgid "" +"Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. " +"By default, a regular sticker set is created." +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.needs_repainting:1 +#: of +msgid "" +"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" +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_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:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/create_new_sticker_set.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/create_new_sticker_set.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../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:31 +msgid "alias: :code:`from aiogram.methods import CreateNewStickerSet`" +msgstr "" + +#: ../../api/methods/create_new_sticker_set.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/create_new_sticker_set.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#~ msgid "" +#~ "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. You " +#~ "**must** use exactly one of the " +#~ "fields *png_sticker*, *tgs_sticker*, or " +#~ "*webm_sticker*. Returns :code:`True` on " +#~ "success." +#~ msgstr "" + +#~ msgid "One or more emoji corresponding to the sticker" +#~ msgstr "" + +#~ msgid "" +#~ "**PNG** image with the sticker, must " +#~ "be up to 512 kilobytes in size," +#~ " dimensions must not exceed 512px, " +#~ "and either width or height must be" +#~ " exactly 512px. 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 " +#~ "» `" +#~ msgstr "" + +#~ msgid "" +#~ "**TGS** animation with the sticker, " +#~ "uploaded using multipart/form-data. See " +#~ "`https://core.telegram.org/stickers#animated-sticker-" +#~ "requirements `_`https://core.telegram.org/stickers" +#~ "#animated-sticker-requirements " +#~ "`_ for technical requirements" +#~ msgstr "" + +#~ msgid "" +#~ "**WEBM** video with the sticker, " +#~ "uploaded using multipart/form-data. See " +#~ "`https://core.telegram.org/stickers#video-sticker-" +#~ "requirements `_`https://core.telegram.org/stickers" +#~ "#video-sticker-requirements " +#~ "`_ for technical requirements" +#~ msgstr "" + +#~ msgid "" +#~ "Type of stickers in the set, pass" +#~ " 'regular' or 'mask'. Custom emoji " +#~ "sticker sets can't be created via " +#~ "the Bot API at the moment. By " +#~ "default, a regular sticker set is " +#~ "created." +#~ msgstr "" + +#~ msgid "" +#~ "A JSON-serialized object for position" +#~ " where the mask should be placed " +#~ "on faces" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/decline_chat_join_request.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/decline_chat_join_request.po new file mode 100644 index 00000000..9d632f5d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/decline_chat_join_request.po @@ -0,0 +1,93 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/decline_chat_join_request.rst:3 +msgid "declineChatJoinRequest" +msgstr "" + +#: ../../api/methods/decline_chat_join_request.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.decline_chat_join_request.DeclineChatJoinRequest:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.decline_chat_join_request.DeclineChatJoinRequest:3 of +msgid "Source: https://core.telegram.org/bots/api#declinechatjoinrequest" +msgstr "" + +#: ../../docstring +#: aiogram.methods.decline_chat_join_request.DeclineChatJoinRequest.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.decline_chat_join_request.DeclineChatJoinRequest.user_id:1 +#: of +msgid "Unique identifier of the target user" +msgstr "" + +#: ../../api/methods/decline_chat_join_request.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/decline_chat_join_request.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/decline_chat_join_request.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/decline_chat_join_request.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/decline_chat_join_request.rst:29 +msgid "" +":code:`from aiogram.methods.decline_chat_join_request import " +"DeclineChatJoinRequest`" +msgstr "" + +#: ../../api/methods/decline_chat_join_request.rst:30 +msgid "alias: :code:`from aiogram.methods import DeclineChatJoinRequest`" +msgstr "" + +#: ../../api/methods/decline_chat_join_request.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/decline_chat_join_request.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/decline_chat_join_request.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/decline_chat_join_request.rst:50 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.decline`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_chat_photo.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_chat_photo.po new file mode 100644 index 00000000..758102ab --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_chat_photo.po @@ -0,0 +1,85 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/delete_chat_photo.rst:3 +msgid "deleteChatPhoto" +msgstr "" + +#: ../../api/methods/delete_chat_photo.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.delete_chat_photo.DeleteChatPhoto:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.delete_chat_photo.DeleteChatPhoto:3 of +msgid "Source: https://core.telegram.org/bots/api#deletechatphoto" +msgstr "" + +#: ../../docstring aiogram.methods.delete_chat_photo.DeleteChatPhoto.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/delete_chat_photo.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/delete_chat_photo.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/delete_chat_photo.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/delete_chat_photo.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/delete_chat_photo.rst:29 +msgid ":code:`from aiogram.methods.delete_chat_photo import DeleteChatPhoto`" +msgstr "" + +#: ../../api/methods/delete_chat_photo.rst:30 +msgid "alias: :code:`from aiogram.methods import DeleteChatPhoto`" +msgstr "" + +#: ../../api/methods/delete_chat_photo.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/delete_chat_photo.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/delete_chat_photo.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/delete_chat_photo.rst:50 +msgid ":meth:`aiogram.types.chat.Chat.delete_photo`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_chat_sticker_set.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_chat_sticker_set.po new file mode 100644 index 00000000..3b5e8332 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_chat_sticker_set.po @@ -0,0 +1,89 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/delete_chat_sticker_set.rst:3 +msgid "deleteChatStickerSet" +msgstr "" + +#: ../../api/methods/delete_chat_sticker_set.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.delete_chat_sticker_set.DeleteChatStickerSet:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.delete_chat_sticker_set.DeleteChatStickerSet:3 of +msgid "Source: https://core.telegram.org/bots/api#deletechatstickerset" +msgstr "" + +#: ../../docstring +#: aiogram.methods.delete_chat_sticker_set.DeleteChatStickerSet.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../api/methods/delete_chat_sticker_set.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/delete_chat_sticker_set.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/delete_chat_sticker_set.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/delete_chat_sticker_set.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/delete_chat_sticker_set.rst:29 +msgid "" +":code:`from aiogram.methods.delete_chat_sticker_set import " +"DeleteChatStickerSet`" +msgstr "" + +#: ../../api/methods/delete_chat_sticker_set.rst:30 +msgid "alias: :code:`from aiogram.methods import DeleteChatStickerSet`" +msgstr "" + +#: ../../api/methods/delete_chat_sticker_set.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/delete_chat_sticker_set.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/delete_chat_sticker_set.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/delete_chat_sticker_set.rst:50 +msgid ":meth:`aiogram.types.chat.Chat.delete_sticker_set`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_forum_topic.po new file mode 100644 index 00000000..4d2c0306 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_forum_topic.po @@ -0,0 +1,82 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-06 14:18+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" + +#: ../../api/methods/delete_forum_topic.rst:3 +msgid "deleteForumTopic" +msgstr "" + +#: ../../api/methods/delete_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.delete_forum_topic.DeleteForumTopic:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.delete_forum_topic.DeleteForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#deleteforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.delete_forum_topic.DeleteForumTopic.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.delete_forum_topic.DeleteForumTopic.message_thread_id:1 of +msgid "Unique identifier for the target message thread of the forum topic" +msgstr "" + +#: ../../api/methods/delete_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/delete_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/delete_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/delete_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/delete_forum_topic.rst:29 +msgid ":code:`from aiogram.methods.delete_forum_topic import DeleteForumTopic`" +msgstr "" + +#: ../../api/methods/delete_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import DeleteForumTopic`" +msgstr "" + +#: ../../api/methods/delete_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/delete_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_message.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_message.po new file mode 100644 index 00000000..d2a793d3 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_message.po @@ -0,0 +1,138 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/delete_message.rst:3 +msgid "deleteMessage" +msgstr "" + +#: ../../api/methods/delete_message.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.delete_message.DeleteMessage:1 of +msgid "" +"Use this method to delete a message, including service messages, with the" +" following limitations:" +msgstr "" + +#: aiogram.methods.delete_message.DeleteMessage:3 of +msgid "A message can only be deleted if it was sent less than 48 hours ago." +msgstr "" + +#: aiogram.methods.delete_message.DeleteMessage:5 of +msgid "" +"Service messages about a supergroup, channel, or forum topic creation " +"can't be deleted." +msgstr "" + +#: aiogram.methods.delete_message.DeleteMessage:7 of +msgid "" +"A dice message in a private chat can only be deleted if it was sent more " +"than 24 hours ago." +msgstr "" + +#: aiogram.methods.delete_message.DeleteMessage:9 of +msgid "" +"Bots can delete outgoing messages in private chats, groups, and " +"supergroups." +msgstr "" + +#: aiogram.methods.delete_message.DeleteMessage:11 of +msgid "Bots can delete incoming messages in private chats." +msgstr "" + +#: aiogram.methods.delete_message.DeleteMessage:13 of +msgid "" +"Bots granted *can_post_messages* permissions can delete outgoing messages" +" in channels." +msgstr "" + +#: aiogram.methods.delete_message.DeleteMessage:15 of +msgid "" +"If the bot is an administrator of a group, it can delete any message " +"there." +msgstr "" + +#: aiogram.methods.delete_message.DeleteMessage:17 of +msgid "" +"If the bot has *can_delete_messages* permission in a supergroup or a " +"channel, it can delete any message there." +msgstr "" + +#: aiogram.methods.delete_message.DeleteMessage:19 of +msgid "Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.delete_message.DeleteMessage:21 of +msgid "Source: https://core.telegram.org/bots/api#deletemessage" +msgstr "" + +#: ../../docstring aiogram.methods.delete_message.DeleteMessage.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.delete_message.DeleteMessage.message_id:1 of +msgid "Identifier of the message to delete" +msgstr "" + +#: ../../api/methods/delete_message.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/delete_message.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/delete_message.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/delete_message.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/delete_message.rst:29 +msgid ":code:`from aiogram.methods.delete_message import DeleteMessage`" +msgstr "" + +#: ../../api/methods/delete_message.rst:30 +msgid "alias: :code:`from aiogram.methods import DeleteMessage`" +msgstr "" + +#: ../../api/methods/delete_message.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/delete_message.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/delete_message.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/delete_message.rst:50 +msgid ":meth:`aiogram.types.message.Message.delete`" +msgstr "" + +#: ../../api/methods/delete_message.rst:51 +msgid ":meth:`aiogram.types.chat.Chat.delete_message`" +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 new file mode 100644 index 00000000..bc9ece9f --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_messages.po @@ -0,0 +1,93 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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/delete_messages.rst:3 +msgid "deleteMessages" +msgstr "" + +#: ../../api/methods/delete_messages.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.delete_messages.DeleteMessages:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.delete_messages.DeleteMessages:3 of +msgid "Source: https://core.telegram.org/bots/api#deletemessages" +msgstr "" + +#: ../../docstring aiogram.methods.delete_messages.DeleteMessages.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.delete_messages.DeleteMessages.message_ids:1 +#: of +msgid "" +"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 "" + +#: ../../api/methods/delete_messages.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/delete_messages.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/delete_messages.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/delete_messages.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/delete_messages.rst:30 +msgid ":code:`from aiogram.methods.delete_messages import DeleteMessages`" +msgstr "" + +#: ../../api/methods/delete_messages.rst:31 +msgid "alias: :code:`from aiogram.methods import DeleteMessages`" +msgstr "" + +#: ../../api/methods/delete_messages.rst:34 +msgid "With specific bot" +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/delete_my_commands.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_my_commands.po new file mode 100644 index 00000000..aaf9cc3a --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_my_commands.po @@ -0,0 +1,86 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/methods/delete_my_commands.rst:3 +msgid "deleteMyCommands" +msgstr "" + +#: ../../api/methods/delete_my_commands.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.delete_my_commands.DeleteMyCommands:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.delete_my_commands.DeleteMyCommands:3 of +msgid "Source: https://core.telegram.org/bots/api#deletemycommands" +msgstr "" + +#: ../../docstring aiogram.methods.delete_my_commands.DeleteMyCommands.scope:1 +#: of +msgid "" +"A JSON-serialized object, describing scope of users for which the " +"commands are relevant. Defaults to " +":class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`." +msgstr "" + +#: ../../docstring +#: aiogram.methods.delete_my_commands.DeleteMyCommands.language_code:1 of +msgid "" +"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" +msgstr "" + +#: ../../api/methods/delete_my_commands.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/delete_my_commands.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/delete_my_commands.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/delete_my_commands.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/delete_my_commands.rst:29 +msgid ":code:`from aiogram.methods.delete_my_commands import DeleteMyCommands`" +msgstr "" + +#: ../../api/methods/delete_my_commands.rst:30 +msgid "alias: :code:`from aiogram.methods import DeleteMyCommands`" +msgstr "" + +#: ../../api/methods/delete_my_commands.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/delete_my_commands.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_sticker_from_set.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_sticker_from_set.po new file mode 100644 index 00000000..e14f9081 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_sticker_from_set.po @@ -0,0 +1,83 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/delete_sticker_from_set.rst:3 +msgid "deleteStickerFromSet" +msgstr "" + +#: ../../api/methods/delete_sticker_from_set.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet:1 of +msgid "" +"Use this method to delete a sticker from a set created by the bot. " +"Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet:3 of +msgid "Source: https://core.telegram.org/bots/api#deletestickerfromset" +msgstr "" + +#: ../../docstring +#: aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet.sticker:1 of +msgid "File identifier of the sticker" +msgstr "" + +#: ../../api/methods/delete_sticker_from_set.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/delete_sticker_from_set.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/delete_sticker_from_set.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/delete_sticker_from_set.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/delete_sticker_from_set.rst:29 +msgid "" +":code:`from aiogram.methods.delete_sticker_from_set import " +"DeleteStickerFromSet`" +msgstr "" + +#: ../../api/methods/delete_sticker_from_set.rst:30 +msgid "alias: :code:`from aiogram.methods import DeleteStickerFromSet`" +msgstr "" + +#: ../../api/methods/delete_sticker_from_set.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/delete_sticker_from_set.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/delete_sticker_from_set.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/delete_sticker_from_set.rst:50 +msgid ":meth:`aiogram.types.sticker.Sticker.delete_from_set`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_sticker_set.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_sticker_set.po new file mode 100644 index 00000000..b0d56a23 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_sticker_set.po @@ -0,0 +1,73 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+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" + +#: ../../api/methods/delete_sticker_set.rst:3 +msgid "deleteStickerSet" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.delete_sticker_set.DeleteStickerSet:1 of +msgid "" +"Use this method to delete a sticker set that was created by the bot. " +"Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.delete_sticker_set.DeleteStickerSet:3 of +msgid "Source: https://core.telegram.org/bots/api#deletestickerset" +msgstr "" + +#: ../../docstring aiogram.methods.delete_sticker_set.DeleteStickerSet.name:1 +#: of +msgid "Sticker set name" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:29 +msgid ":code:`from aiogram.methods.delete_sticker_set import DeleteStickerSet`" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:30 +msgid "alias: :code:`from aiogram.methods import DeleteStickerSet`" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_webhook.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_webhook.po new file mode 100644 index 00000000..bdd1e2ec --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_webhook.po @@ -0,0 +1,74 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/methods/delete_webhook.rst:3 +msgid "deleteWebhook" +msgstr "" + +#: ../../api/methods/delete_webhook.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.delete_webhook.DeleteWebhook:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.delete_webhook.DeleteWebhook:3 of +msgid "Source: https://core.telegram.org/bots/api#deletewebhook" +msgstr "" + +#: ../../docstring +#: aiogram.methods.delete_webhook.DeleteWebhook.drop_pending_updates:1 of +msgid "Pass :code:`True` to drop all pending updates" +msgstr "" + +#: ../../api/methods/delete_webhook.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/delete_webhook.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/delete_webhook.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/delete_webhook.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/delete_webhook.rst:29 +msgid ":code:`from aiogram.methods.delete_webhook import DeleteWebhook`" +msgstr "" + +#: ../../api/methods/delete_webhook.rst:30 +msgid "alias: :code:`from aiogram.methods import DeleteWebhook`" +msgstr "" + +#: ../../api/methods/delete_webhook.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/delete_webhook.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_chat_invite_link.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_chat_invite_link.po new file mode 100644 index 00000000..6efd01b1 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_chat_invite_link.po @@ -0,0 +1,118 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/edit_chat_invite_link.rst:3 +msgid "editChatInviteLink" +msgstr "" + +#: ../../api/methods/edit_chat_invite_link.rst:5 +msgid "Returns: :obj:`ChatInviteLink`" +msgstr "" + +#: aiogram.methods.edit_chat_invite_link.EditChatInviteLink:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.edit_chat_invite_link.EditChatInviteLink:3 of +msgid "Source: https://core.telegram.org/bots/api#editchatinvitelink" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_chat_invite_link.EditChatInviteLink.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_invite_link.EditChatInviteLink.invite_link:1 of +msgid "The invite link to edit" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_chat_invite_link.EditChatInviteLink.name:1 of +msgid "Invite link name; 0-32 characters" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_chat_invite_link.EditChatInviteLink.expire_date:1 of +msgid "Point in time (Unix timestamp) when the link will expire" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_chat_invite_link.EditChatInviteLink.member_limit:1 of +msgid "" +"The maximum number of users that can be members of the chat " +"simultaneously after joining the chat via this invite link; 1-99999" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_chat_invite_link.EditChatInviteLink.creates_join_request:1 +#: of +msgid "" +":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" +msgstr "" + +#: ../../api/methods/edit_chat_invite_link.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/edit_chat_invite_link.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/edit_chat_invite_link.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/edit_chat_invite_link.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/edit_chat_invite_link.rst:29 +msgid "" +":code:`from aiogram.methods.edit_chat_invite_link import " +"EditChatInviteLink`" +msgstr "" + +#: ../../api/methods/edit_chat_invite_link.rst:30 +msgid "alias: :code:`from aiogram.methods import EditChatInviteLink`" +msgstr "" + +#: ../../api/methods/edit_chat_invite_link.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/edit_chat_invite_link.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/edit_chat_invite_link.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/edit_chat_invite_link.rst:50 +msgid ":meth:`aiogram.types.chat.Chat.edit_invite_link`" +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 new file mode 100644 index 00000000..53da9563 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po @@ -0,0 +1,107 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/edit_forum_topic.rst:3 +msgid "editForumTopic" +msgstr "" + +#: ../../api/methods/edit_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.edit_forum_topic.EditForumTopic:1 of +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 the *can_manage_topics* administrator rights, unless it is the " +"creator of the topic. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.edit_forum_topic.EditForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#editforumtopic" +msgstr "" + +#: ../../docstring aiogram.methods.edit_forum_topic.EditForumTopic.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_forum_topic.EditForumTopic.message_thread_id:1 of +msgid "Unique identifier for the target message thread of the forum topic" +msgstr "" + +#: ../../docstring aiogram.methods.edit_forum_topic.EditForumTopic.name:1 of +msgid "" +"New topic name, 0-128 characters. If not specified or empty, the current " +"name of the topic will be kept" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_forum_topic.EditForumTopic.icon_custom_emoji_id:1 of +msgid "" +"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" +msgstr "" + +#: ../../api/methods/edit_forum_topic.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/edit_forum_topic.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/edit_forum_topic.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/edit_forum_topic.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/edit_forum_topic.rst:30 +msgid ":code:`from aiogram.methods.edit_forum_topic import EditForumTopic`" +msgstr "" + +#: ../../api/methods/edit_forum_topic.rst:31 +msgid "alias: :code:`from aiogram.methods import EditForumTopic`" +msgstr "" + +#: ../../api/methods/edit_forum_topic.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../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 new file mode 100644 index 00000000..28e36aed --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_general_forum_topic.po @@ -0,0 +1,94 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/edit_general_forum_topic.rst:3 +msgid "editGeneralForumTopic" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.edit_general_forum_topic.EditGeneralForumTopic:1 of +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 the *can_manage_topics* administrator rights. Returns" +" :code:`True` on success." +msgstr "" + +#: aiogram.methods.edit_general_forum_topic.EditGeneralForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#editgeneralforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_general_forum_topic.EditGeneralForumTopic.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_general_forum_topic.EditGeneralForumTopic.name:1 of +msgid "New topic name, 1-128 characters" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../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:31 +msgid "alias: :code:`from aiogram.methods import EditGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../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 new file mode 100644 index 00000000..a509fa97 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_caption.po @@ -0,0 +1,165 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/edit_message_caption.rst:3 +msgid "editMessageCaption" +msgstr "" + +#: ../../api/methods/edit_message_caption.rst:5 +msgid "Returns: :obj:`Union[Message, bool]`" +msgstr "" + +#: aiogram.methods.edit_message_caption.EditMessageCaption:1 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. 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 "" +"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`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_caption.EditMessageCaption.message_id:1 of +msgid "" +"Required if *inline_message_id* is not specified. Identifier of the " +"message to edit" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_caption.EditMessageCaption.inline_message_id:1 +#: of +msgid "" +"Required if *chat_id* and *message_id* are not specified. Identifier of " +"the inline message" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_caption.EditMessageCaption.caption:1 of +msgid "New caption of the message, 0-1024 characters after entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_caption.EditMessageCaption.parse_mode:1 of +msgid "" +"Mode for parsing entities in the message caption. See `formatting options" +" `_ for more " +"details." +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_caption.EditMessageCaption.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.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 "" +"A JSON-serialized object for an `inline keyboard " +"`_." +msgstr "" + +#: ../../api/methods/edit_message_caption.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/edit_message_caption.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/edit_message_caption.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/edit_message_caption.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/edit_message_caption.rst:30 +msgid "" +":code:`from aiogram.methods.edit_message_caption import " +"EditMessageCaption`" +msgstr "" + +#: ../../api/methods/edit_message_caption.rst:31 +msgid "alias: :code:`from aiogram.methods import EditMessageCaption`" +msgstr "" + +#: ../../api/methods/edit_message_caption.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/edit_message_caption.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/edit_message_caption.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/edit_message_caption.rst:51 +msgid ":meth:`aiogram.types.message.Message.edit_caption`" +msgstr "" + +#~ msgid "" +#~ "A JSON-serialized object for an " +#~ "`inline keyboard `_." +#~ 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 new file mode 100644 index 00000000..46f82076 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_live_location.po @@ -0,0 +1,180 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/edit_message_live_location.rst:3 +msgid "editMessageLiveLocation" +msgstr "" + +#: ../../api/methods/edit_message_live_location.rst:5 +msgid "Returns: :obj:`Union[Message, bool]`" +msgstr "" + +#: aiogram.methods.edit_message_live_location.EditMessageLiveLocation:1 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 " +"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." +msgstr "" + +#: aiogram.methods.edit_message_live_location.EditMessageLiveLocation:3 of +msgid "Source: https://core.telegram.org/bots/api#editmessagelivelocation" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_live_location.EditMessageLiveLocation.latitude:1 +#: of +msgid "Latitude of new location" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_live_location.EditMessageLiveLocation.longitude:1 +#: of +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 +msgid "" +"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`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_live_location.EditMessageLiveLocation.message_id:1 +#: of +msgid "" +"Required if *inline_message_id* is not specified. Identifier of the " +"message to edit" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_live_location.EditMessageLiveLocation.inline_message_id:1 +#: of +msgid "" +"Required if *chat_id* and *message_id* are not specified. Identifier of " +"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 +msgid "The radius of uncertainty for the location, measured in meters; 0-1500" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_live_location.EditMessageLiveLocation.heading:1 +#: of +msgid "" +"Direction in which the user is moving, in degrees. Must be between 1 and " +"360 if specified." +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_live_location.EditMessageLiveLocation.proximity_alert_radius:1 +#: of +msgid "" +"The maximum distance for proximity alerts about approaching another chat " +"member, in meters. Must be between 1 and 100000 if specified." +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_live_location.EditMessageLiveLocation.reply_markup:1 +#: of +msgid "" +"A JSON-serialized object for a new `inline keyboard " +"`_." +msgstr "" + +#: ../../api/methods/edit_message_live_location.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/edit_message_live_location.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/edit_message_live_location.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/edit_message_live_location.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../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:31 +msgid "alias: :code:`from aiogram.methods import EditMessageLiveLocation`" +msgstr "" + +#: ../../api/methods/edit_message_live_location.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/edit_message_live_location.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/edit_message_live_location.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/edit_message_live_location.rst:51 +msgid ":meth:`aiogram.types.message.Message.edit_live_location`" +msgstr "" + +#~ msgid "" +#~ "A JSON-serialized object for a new" +#~ " `inline keyboard `_." +#~ msgstr "" + +#~ msgid "As message method" +#~ 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 new file mode 100644 index 00000000..33f724d6 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_media.po @@ -0,0 +1,156 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/edit_message_media.rst:3 +msgid "editMessageMedia" +msgstr "" + +#: ../../api/methods/edit_message_media.rst:5 +msgid "Returns: :obj:`Union[Message, bool]`" +msgstr "" + +#: aiogram.methods.edit_message_media.EditMessageMedia:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.edit_message_media.EditMessageMedia:3 of +msgid "Source: https://core.telegram.org/bots/api#editmessagemedia" +msgstr "" + +#: ../../docstring aiogram.methods.edit_message_media.EditMessageMedia.media:1 +#: of +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 "" +"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`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_media.EditMessageMedia.message_id:1 of +msgid "" +"Required if *inline_message_id* is not specified. Identifier of the " +"message to edit" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_media.EditMessageMedia.inline_message_id:1 of +msgid "" +"Required if *chat_id* and *message_id* are not specified. Identifier of " +"the inline message" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_media.EditMessageMedia.reply_markup:1 of +msgid "" +"A JSON-serialized object for a new `inline keyboard " +"`_." +msgstr "" + +#: ../../api/methods/edit_message_media.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/edit_message_media.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/edit_message_media.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/edit_message_media.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/edit_message_media.rst:30 +msgid ":code:`from aiogram.methods.edit_message_media import EditMessageMedia`" +msgstr "" + +#: ../../api/methods/edit_message_media.rst:31 +msgid "alias: :code:`from aiogram.methods import EditMessageMedia`" +msgstr "" + +#: ../../api/methods/edit_message_media.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/edit_message_media.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/edit_message_media.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/edit_message_media.rst:51 +msgid ":meth:`aiogram.types.message.Message.edit_media`" +msgstr "" + +#~ msgid "" +#~ "A JSON-serialized object for a new" +#~ " `inline keyboard `_." +#~ 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 new file mode 100644 index 00000000..c6a1aafb --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_reply_markup.po @@ -0,0 +1,143 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/edit_message_reply_markup.rst:3 +msgid "editMessageReplyMarkup" +msgstr "" + +#: ../../api/methods/edit_message_reply_markup.rst:5 +msgid "Returns: :obj:`Union[Message, bool]`" +msgstr "" + +#: aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup:1 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. 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 +msgid "" +"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`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup.message_id:1 +#: of +msgid "" +"Required if *inline_message_id* is not specified. Identifier of the " +"message to edit" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup.inline_message_id:1 +#: of +msgid "" +"Required if *chat_id* and *message_id* are not specified. Identifier of " +"the inline message" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup.reply_markup:1 +#: of +msgid "" +"A JSON-serialized object for an `inline keyboard " +"`_." +msgstr "" + +#: ../../api/methods/edit_message_reply_markup.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/edit_message_reply_markup.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/edit_message_reply_markup.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/edit_message_reply_markup.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/edit_message_reply_markup.rst:30 +msgid "" +":code:`from aiogram.methods.edit_message_reply_markup import " +"EditMessageReplyMarkup`" +msgstr "" + +#: ../../api/methods/edit_message_reply_markup.rst:31 +msgid "alias: :code:`from aiogram.methods import EditMessageReplyMarkup`" +msgstr "" + +#: ../../api/methods/edit_message_reply_markup.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/edit_message_reply_markup.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/edit_message_reply_markup.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/edit_message_reply_markup.rst:51 +msgid ":meth:`aiogram.types.message.Message.edit_reply_markup`" +msgstr "" + +#: ../../api/methods/edit_message_reply_markup.rst:52 +msgid ":meth:`aiogram.types.message.Message.delete_reply_markup`" +msgstr "" + +#~ msgid "" +#~ "A JSON-serialized object for an " +#~ "`inline keyboard `_." +#~ 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 new file mode 100644 index 00000000..7f70442b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_text.po @@ -0,0 +1,171 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/edit_message_text.rst:3 +msgid "editMessageText" +msgstr "" + +#: ../../api/methods/edit_message_text.rst:5 +msgid "Returns: :obj:`Union[Message, bool]`" +msgstr "" + +#: aiogram.methods.edit_message_text.EditMessageText:1 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. 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 +msgid "Source: https://core.telegram.org/bots/api#editmessagetext" +msgstr "" + +#: ../../docstring aiogram.methods.edit_message_text.EditMessageText.text:1 of +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 "" +"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`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_text.EditMessageText.message_id:1 of +msgid "" +"Required if *inline_message_id* is not specified. Identifier of the " +"message to edit" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_text.EditMessageText.inline_message_id:1 of +msgid "" +"Required if *chat_id* and *message_id* are not specified. Identifier of " +"the inline message" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_text.EditMessageText.parse_mode:1 of +msgid "" +"Mode for parsing entities in the message text. See `formatting options " +"`_ for more " +"details." +msgstr "" + +#: ../../docstring aiogram.methods.edit_message_text.EditMessageText.entities:1 +#: of +msgid "" +"A JSON-serialized list of special entities that appear in message text, " +"which can be specified instead of *parse_mode*" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_text.EditMessageText.link_preview_options:1 of +msgid "Link preview generation options for the message" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_text.EditMessageText.reply_markup:1 of +msgid "" +"A JSON-serialized object for an `inline keyboard " +"`_." +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_text.EditMessageText.disable_web_page_preview:1 +#: of +msgid "Disables link previews for links in this message" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_message_text.EditMessageText.disable_web_page_preview:3 +#: of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../api/methods/edit_message_text.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/edit_message_text.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/edit_message_text.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/edit_message_text.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/edit_message_text.rst:30 +msgid ":code:`from aiogram.methods.edit_message_text import EditMessageText`" +msgstr "" + +#: ../../api/methods/edit_message_text.rst:31 +msgid "alias: :code:`from aiogram.methods import EditMessageText`" +msgstr "" + +#: ../../api/methods/edit_message_text.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/edit_message_text.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/edit_message_text.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/edit_message_text.rst:51 +msgid ":meth:`aiogram.types.message.Message.edit_text`" +msgstr "" + +#~ msgid "" +#~ "A JSON-serialized object for an " +#~ "`inline keyboard `_." +#~ 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/export_chat_invite_link.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/export_chat_invite_link.po new file mode 100644 index 00000000..3615e48d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/export_chat_invite_link.po @@ -0,0 +1,101 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/export_chat_invite_link.rst:3 +msgid "exportChatInviteLink" +msgstr "" + +#: ../../api/methods/export_chat_invite_link.rst:5 +msgid "Returns: :obj:`str`" +msgstr "" + +#: aiogram.methods.export_chat_invite_link.ExportChatInviteLink:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.export_chat_invite_link.ExportChatInviteLink:3 of +msgid "" +"Note: Each administrator in a chat generates their own invite links. Bots" +" can't use invite links generated by other administrators. If you want " +"your bot to work with invite links, it will need to generate its own link" +" using " +":class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or " +"by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your " +"bot needs to generate a new primary invite link replacing its previous " +"one, use " +":class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` " +"again." +msgstr "" + +#: aiogram.methods.export_chat_invite_link.ExportChatInviteLink:5 of +msgid "Source: https://core.telegram.org/bots/api#exportchatinvitelink" +msgstr "" + +#: ../../docstring +#: aiogram.methods.export_chat_invite_link.ExportChatInviteLink.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/export_chat_invite_link.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/export_chat_invite_link.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/export_chat_invite_link.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/export_chat_invite_link.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/export_chat_invite_link.rst:29 +msgid "" +":code:`from aiogram.methods.export_chat_invite_link import " +"ExportChatInviteLink`" +msgstr "" + +#: ../../api/methods/export_chat_invite_link.rst:30 +msgid "alias: :code:`from aiogram.methods import ExportChatInviteLink`" +msgstr "" + +#: ../../api/methods/export_chat_invite_link.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/export_chat_invite_link.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/export_chat_invite_link.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/export_chat_invite_link.rst:50 +msgid ":meth:`aiogram.types.chat.Chat.export_invite_link`" +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 new file mode 100644 index 00000000..66b3e9ac --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/forward_message.po @@ -0,0 +1,129 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/forward_message.rst:3 +msgid "forwardMessage" +msgstr "" + +#: ../../api/methods/forward_message.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.forward_message.ForwardMessage:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.forward_message.ForwardMessage:3 of +msgid "Source: https://core.telegram.org/bots/api#forwardmessage" +msgstr "" + +#: ../../docstring aiogram.methods.forward_message.ForwardMessage.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.forward_message.ForwardMessage.from_chat_id:1 of +msgid "" +"Unique identifier for the chat where the original message was sent (or " +"channel username in the format :code:`@channelusername`)" +msgstr "" + +#: ../../docstring aiogram.methods.forward_message.ForwardMessage.message_id:1 +#: of +msgid "Message identifier in the chat specified in *from_chat_id*" +msgstr "" + +#: ../../docstring +#: aiogram.methods.forward_message.ForwardMessage.message_thread_id:1 of +msgid "" +"Unique identifier for the target message thread (topic) of the forum; for" +" 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 "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring +#: aiogram.methods.forward_message.ForwardMessage.protect_content:1 of +msgid "Protects the contents of the forwarded message from forwarding and saving" +msgstr "" + +#: ../../api/methods/forward_message.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/forward_message.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/forward_message.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/forward_message.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/forward_message.rst:30 +msgid ":code:`from aiogram.methods.forward_message import ForwardMessage`" +msgstr "" + +#: ../../api/methods/forward_message.rst:31 +msgid "alias: :code:`from aiogram.methods import ForwardMessage`" +msgstr "" + +#: ../../api/methods/forward_message.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/forward_message.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/forward_message.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/forward_message.rst:51 +msgid ":meth:`aiogram.types.message.Message.forward`" +msgstr "" + +#~ msgid "As message method" +#~ msgstr "" + +#~ msgid "" +#~ "Use this method to forward messages " +#~ "of any kind. Service messages can't " +#~ "be forwarded. On success, the sent " +#~ ":class:`aiogram.types.message.Message` is returned." +#~ msgstr "" 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 new file mode 100644 index 00000000..f83918c4 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/forward_messages.po @@ -0,0 +1,126 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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/forward_messages.rst:3 +msgid "forwardMessages" +msgstr "" + +#: ../../api/methods/forward_messages.rst:5 +msgid "Returns: :obj:`list[MessageId]`" +msgstr "" + +#: aiogram.methods.forward_messages.ForwardMessages:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.forward_messages.ForwardMessages:3 of +msgid "Source: https://core.telegram.org/bots/api#forwardmessages" +msgstr "" + +#: ../../docstring aiogram.methods.forward_messages.ForwardMessages.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.forward_messages.ForwardMessages.from_chat_id:1 of +msgid "" +"Unique identifier for the chat where the original messages were sent (or " +"channel username in the format :code:`@channelusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.forward_messages.ForwardMessages.message_ids:1 of +msgid "" +"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 +#: aiogram.methods.forward_messages.ForwardMessages.message_thread_id:1 of +msgid "" +"Unique identifier for the target message thread (topic) of the forum; for" +" forum supergroups only" +msgstr "" + +#: ../../docstring +#: aiogram.methods.forward_messages.ForwardMessages.disable_notification:1 of +msgid "" +"Sends the messages `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring +#: aiogram.methods.forward_messages.ForwardMessages.protect_content:1 of +msgid "Protects the contents of the forwarded messages from forwarding and saving" +msgstr "" + +#: ../../api/methods/forward_messages.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/forward_messages.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/forward_messages.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/forward_messages.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/forward_messages.rst:30 +msgid ":code:`from aiogram.methods.forward_messages import ForwardMessages`" +msgstr "" + +#: ../../api/methods/forward_messages.rst:31 +msgid "alias: :code:`from aiogram.methods import ForwardMessages`" +msgstr "" + +#: ../../api/methods/forward_messages.rst:34 +msgid "With specific bot" +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 new file mode 100644 index 00000000..0e3004cd --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat.po @@ -0,0 +1,90 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/get_chat.rst:3 +msgid "getChat" +msgstr "" + +#: ../../api/methods/get_chat.rst:5 +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_full_info.ChatFullInfo` object on success." +msgstr "" + +#: aiogram.methods.get_chat.GetChat:3 of +msgid "Source: https://core.telegram.org/bots/api#getchat" +msgstr "" + +#: ../../docstring aiogram.methods.get_chat.GetChat.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup or channel (in the format :code:`@channelusername`)" +msgstr "" + +#: ../../api/methods/get_chat.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_chat.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_chat.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_chat.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_chat.rst:30 +msgid ":code:`from aiogram.methods.get_chat import GetChat`" +msgstr "" + +#: ../../api/methods/get_chat.rst:31 +msgid "alias: :code:`from aiogram.methods import GetChat`" +msgstr "" + +#: ../../api/methods/get_chat.rst:34 +msgid "With specific bot" +msgstr "" + +#~ msgid "" +#~ "Use this method to get up to " +#~ "date information about the chat (current" +#~ " name of the user for one-" +#~ "on-one conversations, current username of" +#~ " a user, group or channel, etc.). " +#~ "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 new file mode 100644 index 00000000..fbff4913 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_administrators.po @@ -0,0 +1,88 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/get_chat_administrators.rst:3 +msgid "getChatAdministrators" +msgstr "" + +#: ../../api/methods/get_chat_administrators.rst:5 +msgid "Returns: :obj:`list[ResultChatMemberUnion]`" +msgstr "" + +#: aiogram.methods.get_chat_administrators.GetChatAdministrators:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.get_chat_administrators.GetChatAdministrators:3 of +msgid "Source: https://core.telegram.org/bots/api#getchatadministrators" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_chat_administrators.GetChatAdministrators.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup or channel (in the format :code:`@channelusername`)" +msgstr "" + +#: ../../api/methods/get_chat_administrators.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_chat_administrators.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_chat_administrators.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_chat_administrators.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_chat_administrators.rst:30 +msgid "" +":code:`from aiogram.methods.get_chat_administrators import " +"GetChatAdministrators`" +msgstr "" + +#: ../../api/methods/get_chat_administrators.rst:31 +msgid "alias: :code:`from aiogram.methods import GetChatAdministrators`" +msgstr "" + +#: ../../api/methods/get_chat_administrators.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/get_chat_administrators.rst:44 +msgid "As shortcut from received object" +msgstr "" + +#: ../../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 new file mode 100644 index 00000000..f30482e6 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po @@ -0,0 +1,100 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/get_chat_member.rst:3 +msgid "getChatMember" +msgstr "" + +#: ../../api/methods/get_chat_member.rst:5 +msgid "Returns: :obj:`ResultChatMemberUnion`" +msgstr "" + +#: aiogram.methods.get_chat_member.GetChatMember:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.get_chat_member.GetChatMember:3 of +msgid "Source: https://core.telegram.org/bots/api#getchatmember" +msgstr "" + +#: ../../docstring aiogram.methods.get_chat_member.GetChatMember.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup or channel (in the format :code:`@channelusername`)" +msgstr "" + +#: ../../docstring aiogram.methods.get_chat_member.GetChatMember.user_id:1 of +msgid "Unique identifier of the target user" +msgstr "" + +#: ../../api/methods/get_chat_member.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_chat_member.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_chat_member.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_chat_member.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_chat_member.rst:30 +msgid ":code:`from aiogram.methods.get_chat_member import GetChatMember`" +msgstr "" + +#: ../../api/methods/get_chat_member.rst:31 +msgid "alias: :code:`from aiogram.methods import GetChatMember`" +msgstr "" + +#: ../../api/methods/get_chat_member.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/get_chat_member.rst:44 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/get_chat_member.rst:46 +msgid ":meth:`aiogram.types.chat.Chat.get_member`" +msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. The " +#~ "method is guaranteed to work for " +#~ "other users, only if the bot is" +#~ " an administrator in the chat. " +#~ "Returns a :class:`aiogram.types.chat_member.ChatMember`" +#~ " 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_member_count.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member_count.po new file mode 100644 index 00000000..6fc48c9f --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member_count.po @@ -0,0 +1,81 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/get_chat_member_count.rst:3 +msgid "getChatMemberCount" +msgstr "" + +#: ../../api/methods/get_chat_member_count.rst:5 +msgid "Returns: :obj:`int`" +msgstr "" + +#: aiogram.methods.get_chat_member_count.GetChatMemberCount:1 of +msgid "" +"Use this method to get the number of members in a chat. Returns *Int* on " +"success." +msgstr "" + +#: aiogram.methods.get_chat_member_count.GetChatMemberCount:3 of +msgid "Source: https://core.telegram.org/bots/api#getchatmembercount" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_chat_member_count.GetChatMemberCount.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup or channel (in the format :code:`@channelusername`)" +msgstr "" + +#: ../../api/methods/get_chat_member_count.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_chat_member_count.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_chat_member_count.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_chat_member_count.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_chat_member_count.rst:29 +msgid "" +":code:`from aiogram.methods.get_chat_member_count import " +"GetChatMemberCount`" +msgstr "" + +#: ../../api/methods/get_chat_member_count.rst:30 +msgid "alias: :code:`from aiogram.methods import GetChatMemberCount`" +msgstr "" + +#: ../../api/methods/get_chat_member_count.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/get_chat_member_count.rst:43 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/get_chat_member_count.rst:45 +msgid ":meth:`aiogram.types.chat.Chat.get_member_count`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_members_count.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_members_count.po new file mode 100644 index 00000000..e747a5f4 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_members_count.po @@ -0,0 +1,72 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/get_chat_members_count.rst:3 +msgid "getChatMembersCount" +msgstr "" + +#: ../../api/methods/get_chat_members_count.rst:5 +msgid "Returns: :obj:`int`" +msgstr "" + +#: ../../api/methods/get_chat_members_count.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_chat_members_count.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_chat_members_count.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_chat_members_count.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_chat_members_count.rst:29 +msgid "" +":code:`from aiogram.methods.get_chat_members_count import " +"GetChatMembersCount`" +msgstr "" + +#: ../../api/methods/get_chat_members_count.rst:30 +msgid "alias: :code:`from aiogram.methods import GetChatMembersCount`" +msgstr "" + +#: ../../api/methods/get_chat_members_count.rst:33 +msgid "With specific bot" +msgstr "" + +#~ msgid "" +#~ "Use this method to get the number" +#~ " of members in a chat. Returns " +#~ "*Int* on success." +#~ msgstr "" + +#~ msgid "Source: https://core.telegram.org/bots/api#getchatmembercount" +#~ msgstr "" + +#~ msgid "" +#~ "Unique identifier for the target chat" +#~ " or username of the target supergroup" +#~ " or channel (in the format " +#~ ":code:`@channelusername`)" +#~ 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 new file mode 100644 index 00000000..25d977f4 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_menu_button.po @@ -0,0 +1,80 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.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:`ResultMenuButtonUnion`" +msgstr "" + +#: aiogram.methods.get_chat_menu_button.GetChatMenuButton:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.get_chat_menu_button.GetChatMenuButton:3 of +msgid "Source: https://core.telegram.org/bots/api#getchatmenubutton" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_chat_menu_button.GetChatMenuButton.chat_id:1 of +msgid "" +"Unique identifier for the target private chat. If not specified, default " +"bot's menu button will be returned" +msgstr "" + +#: ../../api/methods/get_chat_menu_button.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_chat_menu_button.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_chat_menu_button.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_chat_menu_button.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../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:31 +msgid "alias: :code:`from aiogram.methods import GetChatMenuButton`" +msgstr "" + +#: ../../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 new file mode 100644 index 00000000..8dccedec --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_custom_emoji_stickers.po @@ -0,0 +1,84 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.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]`" +msgstr "" + +#: aiogram.methods.get_custom_emoji_stickers.GetCustomEmojiStickers:1 of +msgid "" +"Use this method to get information about custom emoji stickers by their " +"identifiers. Returns an Array of :class:`aiogram.types.sticker.Sticker` " +"objects." +msgstr "" + +#: aiogram.methods.get_custom_emoji_stickers.GetCustomEmojiStickers:3 of +msgid "Source: https://core.telegram.org/bots/api#getcustomemojistickers" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_custom_emoji_stickers.GetCustomEmojiStickers.custom_emoji_ids:1 +#: of +msgid "" +"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:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_custom_emoji_stickers.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_custom_emoji_stickers.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_custom_emoji_stickers.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../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:31 +msgid "alias: :code:`from aiogram.methods import GetCustomEmojiStickers`" +msgstr "" + +#: ../../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_file.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_file.po new file mode 100644 index 00000000..bb0d8947 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_file.po @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/methods/get_file.rst:3 +msgid "getFile" +msgstr "" + +#: ../../api/methods/get_file.rst:5 +msgid "Returns: :obj:`File`" +msgstr "" + +#: aiogram.methods.get_file.GetFile:1 of +msgid "" +"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. **Note:** This function may not preserve the original file name " +"and MIME type. You should save the file's MIME type and name (if " +"available) when the File object is received." +msgstr "" + +#: aiogram.methods.get_file.GetFile:4 of +msgid "Source: https://core.telegram.org/bots/api#getfile" +msgstr "" + +#: ../../docstring aiogram.methods.get_file.GetFile.file_id:1 of +msgid "File identifier to get information about" +msgstr "" + +#: ../../api/methods/get_file.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_file.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_file.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_file.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_file.rst:29 +msgid ":code:`from aiogram.methods.get_file import GetFile`" +msgstr "" + +#: ../../api/methods/get_file.rst:30 +msgid "alias: :code:`from aiogram.methods import GetFile`" +msgstr "" + +#: ../../api/methods/get_file.rst:33 +msgid "With specific bot" +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 new file mode 100644 index 00000000..adc14b9d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_forum_topic_icon_stickers.po @@ -0,0 +1,70 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.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]`" +msgstr "" + +#: aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers:3 of +msgid "Source: https://core.telegram.org/bots/api#getforumtopiciconstickers" +msgstr "" + +#: ../../api/methods/get_forum_topic_icon_stickers.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_forum_topic_icon_stickers.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_forum_topic_icon_stickers.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_forum_topic_icon_stickers.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../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:31 +msgid "alias: :code:`from aiogram.methods import GetForumTopicIconStickers`" +msgstr "" + +#: ../../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 new file mode 100644 index 00000000..b879e1ca --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_game_high_scores.po @@ -0,0 +1,103 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.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]`" +msgstr "" + +#: aiogram.methods.get_game_high_scores.GetGameHighScores:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.get_game_high_scores.GetGameHighScores:3 of +msgid "" +"This method will currently return scores for the target user, plus two of" +" their closest neighbors on each side. Will also return the top three " +"users if the user and their neighbors are not among them. Please note " +"that this behavior is subject to change." +msgstr "" + +#: aiogram.methods.get_game_high_scores.GetGameHighScores:5 of +msgid "Source: https://core.telegram.org/bots/api#getgamehighscores" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_game_high_scores.GetGameHighScores.user_id:1 of +msgid "Target user id" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_game_high_scores.GetGameHighScores.chat_id:1 of +msgid "" +"Required if *inline_message_id* is not specified. Unique identifier for " +"the target chat" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_game_high_scores.GetGameHighScores.message_id:1 of +msgid "" +"Required if *inline_message_id* is not specified. Identifier of the sent " +"message" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_game_high_scores.GetGameHighScores.inline_message_id:1 +#: of +msgid "" +"Required if *chat_id* and *message_id* are not specified. Identifier of " +"the inline message" +msgstr "" + +#: ../../api/methods/get_game_high_scores.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_game_high_scores.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_game_high_scores.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_game_high_scores.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../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:31 +msgid "alias: :code:`from aiogram.methods import GetGameHighScores`" +msgstr "" + +#: ../../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_me.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_me.po new file mode 100644 index 00000000..5bcb644a --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_me.po @@ -0,0 +1,65 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/methods/get_me.rst:3 +msgid "getMe" +msgstr "" + +#: ../../api/methods/get_me.rst:5 +msgid "Returns: :obj:`User`" +msgstr "" + +#: aiogram.methods.get_me.GetMe:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.get_me.GetMe:3 of +msgid "Source: https://core.telegram.org/bots/api#getme" +msgstr "" + +#: ../../api/methods/get_me.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_me.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_me.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_me.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_me.rst:29 +msgid ":code:`from aiogram.methods.get_me import GetMe`" +msgstr "" + +#: ../../api/methods/get_me.rst:30 +msgid "alias: :code:`from aiogram.methods import GetMe`" +msgstr "" + +#: ../../api/methods/get_me.rst:33 +msgid "With specific bot" +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 new file mode 100644 index 00000000..f1d5cc1b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_commands.po @@ -0,0 +1,80 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.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]`" +msgstr "" + +#: aiogram.methods.get_my_commands.GetMyCommands:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.get_my_commands.GetMyCommands:3 of +msgid "Source: https://core.telegram.org/bots/api#getmycommands" +msgstr "" + +#: ../../docstring aiogram.methods.get_my_commands.GetMyCommands.scope:1 of +msgid "" +"A JSON-serialized object, describing scope of users. Defaults to " +":class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`." +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_my_commands.GetMyCommands.language_code:1 of +msgid "A two-letter ISO 639-1 language code or an empty string" +msgstr "" + +#: ../../api/methods/get_my_commands.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_my_commands.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_my_commands.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_my_commands.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_my_commands.rst:30 +msgid ":code:`from aiogram.methods.get_my_commands import GetMyCommands`" +msgstr "" + +#: ../../api/methods/get_my_commands.rst:31 +msgid "alias: :code:`from aiogram.methods import GetMyCommands`" +msgstr "" + +#: ../../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_my_default_administrator_rights.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_default_administrator_rights.po new file mode 100644 index 00000000..58861170 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_default_administrator_rights.po @@ -0,0 +1,79 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/methods/get_my_default_administrator_rights.rst:3 +msgid "getMyDefaultAdministratorRights" +msgstr "" + +#: ../../api/methods/get_my_default_administrator_rights.rst:5 +msgid "Returns: :obj:`ChatAdministratorRights`" +msgstr "" + +#: aiogram.methods.get_my_default_administrator_rights.GetMyDefaultAdministratorRights:1 +#: of +msgid "" +"Use this method to get the current default administrator rights of the " +"bot. Returns " +":class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` " +"on success." +msgstr "" + +#: aiogram.methods.get_my_default_administrator_rights.GetMyDefaultAdministratorRights:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#getmydefaultadministratorrights" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_my_default_administrator_rights.GetMyDefaultAdministratorRights.for_channels:1 +#: of +msgid "" +"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." +msgstr "" + +#: ../../api/methods/get_my_default_administrator_rights.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_my_default_administrator_rights.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_my_default_administrator_rights.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_my_default_administrator_rights.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_my_default_administrator_rights.rst:29 +msgid "" +":code:`from aiogram.methods.get_my_default_administrator_rights import " +"GetMyDefaultAdministratorRights`" +msgstr "" + +#: ../../api/methods/get_my_default_administrator_rights.rst:30 +msgid "alias: :code:`from aiogram.methods import GetMyDefaultAdministratorRights`" +msgstr "" + +#: ../../api/methods/get_my_default_administrator_rights.rst:33 +msgid "With specific bot" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_description.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_description.po new file mode 100644 index 00000000..b7ae81ab --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_description.po @@ -0,0 +1,70 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+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" + +#: ../../api/methods/get_my_description.rst:3 +msgid "getMyDescription" +msgstr "" + +#: ../../api/methods/get_my_description.rst:5 +msgid "Returns: :obj:`BotDescription`" +msgstr "" + +#: aiogram.methods.get_my_description.GetMyDescription:1 of +msgid "" +"Use this method to get the current bot description for the given user " +"language. Returns :class:`aiogram.types.bot_description.BotDescription` " +"on success." +msgstr "" + +#: aiogram.methods.get_my_description.GetMyDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#getmydescription" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_my_description.GetMyDescription.language_code:1 of +msgid "A two-letter ISO 639-1 language code or an empty string" +msgstr "" + +#: ../../api/methods/get_my_description.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_my_description.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_my_description.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_my_description.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_my_description.rst:29 +msgid ":code:`from aiogram.methods.get_my_description import GetMyDescription`" +msgstr "" + +#: ../../api/methods/get_my_description.rst:30 +msgid "alias: :code:`from aiogram.methods import GetMyDescription`" +msgstr "" + +#: ../../api/methods/get_my_description.rst:33 +msgid "With specific bot" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_name.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_name.po new file mode 100644 index 00000000..0437b444 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_name.po @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, 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: 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" + +#: ../../api/methods/get_my_name.rst:3 +msgid "getMyName" +msgstr "" + +#: ../../api/methods/get_my_name.rst:5 +msgid "Returns: :obj:`BotName`" +msgstr "" + +#: aiogram.methods.get_my_name.GetMyName:1 of +msgid "" +"Use this method to get the current bot name for the given user language. " +"Returns :class:`aiogram.types.bot_name.BotName` on success." +msgstr "" + +#: aiogram.methods.get_my_name.GetMyName:3 of +msgid "Source: https://core.telegram.org/bots/api#getmyname" +msgstr "" + +#: ../../docstring aiogram.methods.get_my_name.GetMyName.language_code:1 of +msgid "A two-letter ISO 639-1 language code or an empty string" +msgstr "" + +#: ../../api/methods/get_my_name.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_my_name.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_my_name.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_my_name.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_my_name.rst:29 +msgid ":code:`from aiogram.methods.get_my_name import GetMyName`" +msgstr "" + +#: ../../api/methods/get_my_name.rst:30 +msgid "alias: :code:`from aiogram.methods import GetMyName`" +msgstr "" + +#: ../../api/methods/get_my_name.rst:33 +msgid "With specific bot" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_short_description.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_short_description.po new file mode 100644 index 00000000..0d4e2e77 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_short_description.po @@ -0,0 +1,74 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+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" + +#: ../../api/methods/get_my_short_description.rst:3 +msgid "getMyShortDescription" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:5 +msgid "Returns: :obj:`BotShortDescription`" +msgstr "" + +#: aiogram.methods.get_my_short_description.GetMyShortDescription:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.get_my_short_description.GetMyShortDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#getmyshortdescription" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_my_short_description.GetMyShortDescription.language_code:1 +#: of +msgid "A two-letter ISO 639-1 language code or an empty string" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:29 +msgid "" +":code:`from aiogram.methods.get_my_short_description import " +"GetMyShortDescription`" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:30 +msgid "alias: :code:`from aiogram.methods import GetMyShortDescription`" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:33 +msgid "With specific bot" +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_sticker_set.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_sticker_set.po new file mode 100644 index 00000000..3b71c37d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_sticker_set.po @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/methods/get_sticker_set.rst:3 +msgid "getStickerSet" +msgstr "" + +#: ../../api/methods/get_sticker_set.rst:5 +msgid "Returns: :obj:`StickerSet`" +msgstr "" + +#: aiogram.methods.get_sticker_set.GetStickerSet:1 of +msgid "" +"Use this method to get a sticker set. On success, a " +":class:`aiogram.types.sticker_set.StickerSet` object is returned." +msgstr "" + +#: aiogram.methods.get_sticker_set.GetStickerSet:3 of +msgid "Source: https://core.telegram.org/bots/api#getstickerset" +msgstr "" + +#: ../../docstring aiogram.methods.get_sticker_set.GetStickerSet.name:1 of +msgid "Name of the sticker set" +msgstr "" + +#: ../../api/methods/get_sticker_set.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_sticker_set.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_sticker_set.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_sticker_set.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_sticker_set.rst:29 +msgid ":code:`from aiogram.methods.get_sticker_set import GetStickerSet`" +msgstr "" + +#: ../../api/methods/get_sticker_set.rst:30 +msgid "alias: :code:`from aiogram.methods import GetStickerSet`" +msgstr "" + +#: ../../api/methods/get_sticker_set.rst:33 +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 new file mode 100644 index 00000000..d662c7a0 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_updates.po @@ -0,0 +1,165 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/get_updates.rst:3 +msgid "getUpdates" +msgstr "" + +#: ../../api/methods/get_updates.rst:5 +msgid "Returns: :obj:`list[Update]`" +msgstr "" + +#: aiogram.methods.get_updates.GetUpdates:1 of +msgid "" +"Use this method to receive incoming updates using long polling (`wiki " +"`_). Returns " +"an Array of :class:`aiogram.types.update.Update` objects." +msgstr "" + +#: aiogram.methods.get_updates.GetUpdates:3 of +msgid "**Notes**" +msgstr "" + +#: aiogram.methods.get_updates.GetUpdates:5 of +msgid "**1.** This method will not work if an outgoing webhook is set up." +msgstr "" + +#: aiogram.methods.get_updates.GetUpdates:7 of +msgid "" +"**2.** In order to avoid getting duplicate updates, recalculate *offset* " +"after each server response." +msgstr "" + +#: aiogram.methods.get_updates.GetUpdates:9 of +msgid "Source: https://core.telegram.org/bots/api#getupdates" +msgstr "" + +#: ../../docstring aiogram.methods.get_updates.GetUpdates.offset:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring aiogram.methods.get_updates.GetUpdates.limit:1 of +msgid "" +"Limits the number of updates to be retrieved. Values between 1-100 are " +"accepted. Defaults to 100." +msgstr "" + +#: ../../docstring aiogram.methods.get_updates.GetUpdates.timeout:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring aiogram.methods.get_updates.GetUpdates.allowed_updates:1 of +msgid "" +"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." +msgstr "" + +#: ../../api/methods/get_updates.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_updates.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_updates.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_updates.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_updates.rst:30 +msgid ":code:`from aiogram.methods.get_updates import GetUpdates`" +msgstr "" + +#: ../../api/methods/get_updates.rst:31 +msgid "alias: :code:`from aiogram.methods import GetUpdates`" +msgstr "" + +#: ../../api/methods/get_updates.rst:34 +msgid "With specific bot" +msgstr "" + +#~ msgid "" +#~ "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 forgotten." +#~ msgstr "" + +#~ msgid "" +#~ "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" +#~ " :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* " +#~ "(default). If not specified, the " +#~ "previous setting will be used." +#~ msgstr "" + +#~ msgid "" +#~ "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* " +#~ "(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/get_user_chat_boosts.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_user_chat_boosts.po new file mode 100644 index 00000000..8ac2b8ae --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_user_chat_boosts.po @@ -0,0 +1,80 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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_user_chat_boosts.rst:3 +msgid "getUserChatBoosts" +msgstr "" + +#: ../../api/methods/get_user_chat_boosts.rst:5 +msgid "Returns: :obj:`UserChatBoosts`" +msgstr "" + +#: aiogram.methods.get_user_chat_boosts.GetUserChatBoosts:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.get_user_chat_boosts.GetUserChatBoosts:3 of +msgid "Source: https://core.telegram.org/bots/api#getuserchatboosts" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_user_chat_boosts.GetUserChatBoosts.chat_id:1 of +msgid "" +"Unique identifier for the chat or username of the channel (in the format " +":code:`@channelusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_user_chat_boosts.GetUserChatBoosts.user_id:1 of +msgid "Unique identifier of the target user" +msgstr "" + +#: ../../api/methods/get_user_chat_boosts.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_user_chat_boosts.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_user_chat_boosts.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_user_chat_boosts.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_user_chat_boosts.rst:30 +msgid ":code:`from aiogram.methods.get_user_chat_boosts import GetUserChatBoosts`" +msgstr "" + +#: ../../api/methods/get_user_chat_boosts.rst:31 +msgid "alias: :code:`from aiogram.methods import GetUserChatBoosts`" +msgstr "" + +#: ../../api/methods/get_user_chat_boosts.rst:34 +msgid "With specific bot" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_user_profile_photos.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_user_profile_photos.po new file mode 100644 index 00000000..bbbeffbc --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_user_profile_photos.po @@ -0,0 +1,93 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/get_user_profile_photos.rst:3 +msgid "getUserProfilePhotos" +msgstr "" + +#: ../../api/methods/get_user_profile_photos.rst:5 +msgid "Returns: :obj:`UserProfilePhotos`" +msgstr "" + +#: aiogram.methods.get_user_profile_photos.GetUserProfilePhotos:1 of +msgid "" +"Use this method to get a list of profile pictures for a user. Returns a " +":class:`aiogram.types.user_profile_photos.UserProfilePhotos` object." +msgstr "" + +#: aiogram.methods.get_user_profile_photos.GetUserProfilePhotos:3 of +msgid "Source: https://core.telegram.org/bots/api#getuserprofilephotos" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_user_profile_photos.GetUserProfilePhotos.user_id:1 of +msgid "Unique identifier of the target user" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_user_profile_photos.GetUserProfilePhotos.offset:1 of +msgid "" +"Sequential number of the first photo to be returned. By default, all " +"photos are returned." +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_user_profile_photos.GetUserProfilePhotos.limit:1 of +msgid "" +"Limits the number of photos to be retrieved. Values between 1-100 are " +"accepted. Defaults to 100." +msgstr "" + +#: ../../api/methods/get_user_profile_photos.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_user_profile_photos.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_user_profile_photos.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_user_profile_photos.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_user_profile_photos.rst:29 +msgid "" +":code:`from aiogram.methods.get_user_profile_photos import " +"GetUserProfilePhotos`" +msgstr "" + +#: ../../api/methods/get_user_profile_photos.rst:30 +msgid "alias: :code:`from aiogram.methods import GetUserProfilePhotos`" +msgstr "" + +#: ../../api/methods/get_user_profile_photos.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/get_user_profile_photos.rst:43 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/get_user_profile_photos.rst:45 +msgid ":meth:`aiogram.types.user.User.get_profile_photos`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_webhook_info.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_webhook_info.po new file mode 100644 index 00000000..da85d1b4 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_webhook_info.po @@ -0,0 +1,67 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/methods/get_webhook_info.rst:3 +msgid "getWebhookInfo" +msgstr "" + +#: ../../api/methods/get_webhook_info.rst:5 +msgid "Returns: :obj:`WebhookInfo`" +msgstr "" + +#: aiogram.methods.get_webhook_info.GetWebhookInfo:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.get_webhook_info.GetWebhookInfo:3 of +msgid "Source: https://core.telegram.org/bots/api#getwebhookinfo" +msgstr "" + +#: ../../api/methods/get_webhook_info.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_webhook_info.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_webhook_info.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_webhook_info.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_webhook_info.rst:29 +msgid ":code:`from aiogram.methods.get_webhook_info import GetWebhookInfo`" +msgstr "" + +#: ../../api/methods/get_webhook_info.rst:30 +msgid "alias: :code:`from aiogram.methods import GetWebhookInfo`" +msgstr "" + +#: ../../api/methods/get_webhook_info.rst:33 +msgid "With specific bot" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/hide_general_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/hide_general_forum_topic.po new file mode 100644 index 00000000..500edf6d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/hide_general_forum_topic.po @@ -0,0 +1,79 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22: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" + +#: ../../api/methods/hide_general_forum_topic.rst:3 +msgid "hideGeneralForumTopic" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.hide_general_forum_topic.HideGeneralForumTopic:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.hide_general_forum_topic.HideGeneralForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#hidegeneralforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.hide_general_forum_topic.HideGeneralForumTopic.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:29 +msgid "" +":code:`from aiogram.methods.hide_general_forum_topic import " +"HideGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import HideGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/index.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/index.po new file mode 100644 index 00000000..eb6e82bb --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/index.po @@ -0,0 +1,58 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/methods/index.rst:3 +msgid "Methods" +msgstr "" + +#: ../../api/methods/index.rst:5 +msgid "Here is list of all available API methods:" +msgstr "" + +#: ../../api/methods/index.rst:10 +msgid "Getting updates" +msgstr "" + +#: ../../api/methods/index.rst:22 +msgid "Available methods" +msgstr "" + +#: ../../api/methods/index.rst:91 +msgid "Updating messages" +msgstr "" + +#: ../../api/methods/index.rst:104 +msgid "Stickers" +msgstr "" + +#: ../../api/methods/index.rst:120 +msgid "Inline mode" +msgstr "" + +#: ../../api/methods/index.rst:129 +msgid "Payments" +msgstr "" + +#: ../../api/methods/index.rst:140 +msgid "Telegram Passport" +msgstr "" + +#: ../../api/methods/index.rst:148 +msgid "Games" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/kick_chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/kick_chat_member.po new file mode 100644 index 00000000..d61507e4 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/kick_chat_member.po @@ -0,0 +1,108 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/kick_chat_member.rst:3 +msgid "kickChatMember" +msgstr "" + +#: ../../api/methods/kick_chat_member.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: ../../api/methods/kick_chat_member.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/kick_chat_member.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/kick_chat_member.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/kick_chat_member.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/kick_chat_member.rst:29 +msgid ":code:`from aiogram.methods.kick_chat_member import KickChatMember`" +msgstr "" + +#: ../../api/methods/kick_chat_member.rst:30 +msgid "alias: :code:`from aiogram.methods import KickChatMember`" +msgstr "" + +#: ../../api/methods/kick_chat_member.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/kick_chat_member.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "Source: https://core.telegram.org/bots/api#banchatmember" +#~ msgstr "" + +#~ msgid "" +#~ "Unique identifier for the target group" +#~ " or username of the target supergroup" +#~ " or channel (in the format " +#~ ":code:`@channelusername`)" +#~ msgstr "" + +#~ msgid "Unique identifier of the target user" +#~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/leave_chat.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/leave_chat.po new file mode 100644 index 00000000..bef135f1 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/leave_chat.po @@ -0,0 +1,82 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/leave_chat.rst:3 +msgid "leaveChat" +msgstr "" + +#: ../../api/methods/leave_chat.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.leave_chat.LeaveChat:1 of +msgid "" +"Use this method for your bot to leave a group, supergroup or channel. " +"Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.leave_chat.LeaveChat:3 of +msgid "Source: https://core.telegram.org/bots/api#leavechat" +msgstr "" + +#: ../../docstring aiogram.methods.leave_chat.LeaveChat.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup or channel (in the format :code:`@channelusername`)" +msgstr "" + +#: ../../api/methods/leave_chat.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/leave_chat.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/leave_chat.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/leave_chat.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/leave_chat.rst:29 +msgid ":code:`from aiogram.methods.leave_chat import LeaveChat`" +msgstr "" + +#: ../../api/methods/leave_chat.rst:30 +msgid "alias: :code:`from aiogram.methods import LeaveChat`" +msgstr "" + +#: ../../api/methods/leave_chat.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/leave_chat.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/leave_chat.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/leave_chat.rst:50 +msgid ":meth:`aiogram.types.chat.Chat.leave`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/log_out.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/log_out.po new file mode 100644 index 00000000..49f02be5 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/log_out.po @@ -0,0 +1,72 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/methods/log_out.rst:3 +msgid "logOut" +msgstr "" + +#: ../../api/methods/log_out.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.log_out.LogOut:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.log_out.LogOut:3 of +msgid "Source: https://core.telegram.org/bots/api#logout" +msgstr "" + +#: ../../api/methods/log_out.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/log_out.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/log_out.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/log_out.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/log_out.rst:29 +msgid ":code:`from aiogram.methods.log_out import LogOut`" +msgstr "" + +#: ../../api/methods/log_out.rst:30 +msgid "alias: :code:`from aiogram.methods import LogOut`" +msgstr "" + +#: ../../api/methods/log_out.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/log_out.rst:40 +msgid "As reply into Webhook in handler" +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 new file mode 100644 index 00000000..99a25088 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/pin_chat_message.po @@ -0,0 +1,112 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/pin_chat_message.rst:3 +msgid "pinChatMessage" +msgstr "" + +#: ../../api/methods/pin_chat_message.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.pin_chat_message.PinChatMessage:1 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" +" 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." +msgstr "" + +#: aiogram.methods.pin_chat_message.PinChatMessage:3 of +msgid "Source: https://core.telegram.org/bots/api#pinchatmessage" +msgstr "" + +#: ../../docstring aiogram.methods.pin_chat_message.PinChatMessage.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.pin_chat_message.PinChatMessage.message_id:1 +#: of +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 "" +"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 "" + +#: ../../api/methods/pin_chat_message.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/pin_chat_message.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/pin_chat_message.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/pin_chat_message.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/pin_chat_message.rst:30 +msgid ":code:`from aiogram.methods.pin_chat_message import PinChatMessage`" +msgstr "" + +#: ../../api/methods/pin_chat_message.rst:31 +msgid "alias: :code:`from aiogram.methods import PinChatMessage`" +msgstr "" + +#: ../../api/methods/pin_chat_message.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/pin_chat_message.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/pin_chat_message.rst:49 +msgid "As shortcut from received object" +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 new file mode 100644 index 00000000..e7afbfd6 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/promote_chat_member.po @@ -0,0 +1,284 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/promote_chat_member.rst:3 +msgid "promoteChatMember" +msgstr "" + +#: ../../api/methods/promote_chat_member.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.promote_chat_member.PromoteChatMember:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.promote_chat_member.PromoteChatMember:3 of +msgid "Source: https://core.telegram.org/bots/api#promotechatmember" +msgstr "" + +#: ../../docstring +#: aiogram.methods.promote_chat_member.PromoteChatMember.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.promote_chat_member.PromoteChatMember.user_id:1 of +msgid "Unique identifier of the target user" +msgstr "" + +#: ../../docstring +#: aiogram.methods.promote_chat_member.PromoteChatMember.is_anonymous:1 of +msgid "Pass :code:`True` if the administrator's presence in the chat is hidden" +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, get" +" boost list, see hidden supergroup and channel members, report spam " +"messages and ignore slow mode. Implied by any other administrator " +"privilege." +msgstr "" + +#: ../../docstring +#: aiogram.methods.promote_chat_member.PromoteChatMember.can_delete_messages:1 +#: of +msgid "Pass :code:`True` if the administrator can delete messages of other users" +msgstr "" + +#: ../../docstring +#: aiogram.methods.promote_chat_member.PromoteChatMember.can_manage_video_chats:1 +#: of +msgid "Pass :code:`True` if the administrator can manage video chats" +msgstr "" + +#: ../../docstring +#: aiogram.methods.promote_chat_member.PromoteChatMember.can_restrict_members:1 +#: of +msgid "" +"Pass :code:`True` if the administrator can restrict, ban or unban chat " +"members, or access supergroup statistics" +msgstr "" + +#: ../../docstring +#: aiogram.methods.promote_chat_member.PromoteChatMember.can_promote_members:1 +#: of +msgid "" +"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)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.promote_chat_member.PromoteChatMember.can_change_info:1 of +msgid "" +"Pass :code:`True` if the administrator can change chat title, photo and " +"other settings" +msgstr "" + +#: ../../docstring +#: aiogram.methods.promote_chat_member.PromoteChatMember.can_invite_users:1 of +msgid "Pass :code:`True` if the administrator can invite new users to the chat" +msgstr "" + +#: ../../docstring +#: aiogram.methods.promote_chat_member.PromoteChatMember.can_post_stories:1 of +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, post stories to the chat page, pin chat stories, and access the " +"chat's story archive" +msgstr "" + +#: ../../docstring +#: aiogram.methods.promote_chat_member.PromoteChatMember.can_delete_stories:1 +#: of +msgid "" +"Pass :code:`True` if the administrator can delete stories posted by other" +" 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; for supergroups only" +msgstr "" + +#: ../../api/methods/promote_chat_member.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/promote_chat_member.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/promote_chat_member.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/promote_chat_member.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/promote_chat_member.rst:30 +msgid ":code:`from aiogram.methods.promote_chat_member import PromoteChatMember`" +msgstr "" + +#: ../../api/methods/promote_chat_member.rst:31 +msgid "alias: :code:`from aiogram.methods import PromoteChatMember`" +msgstr "" + +#: ../../api/methods/promote_chat_member.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/promote_chat_member.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/promote_chat_member.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/promote_chat_member.rst:51 +msgid ":meth:`aiogram.types.chat.Chat.promote`" +msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can add new administrators with a " +#~ "subset of their own privileges or " +#~ "demote administrators that he has " +#~ "promoted, directly or indirectly (promoted " +#~ "by administrators that were appointed by" +#~ " him)" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can access the chat event log, " +#~ "chat statistics, message statistics in " +#~ "channels, see channel members, see " +#~ "anonymous administrators in supergroups and" +#~ " ignore slow mode. Implied by any " +#~ "other administrator privilege" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can create channel posts, 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 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/reopen_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/reopen_forum_topic.po new file mode 100644 index 00000000..09b013b4 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/reopen_forum_topic.po @@ -0,0 +1,82 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-06 14:18+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" + +#: ../../api/methods/reopen_forum_topic.rst:3 +msgid "reopenForumTopic" +msgstr "" + +#: ../../api/methods/reopen_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.reopen_forum_topic.ReopenForumTopic:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.reopen_forum_topic.ReopenForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#reopenforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.reopen_forum_topic.ReopenForumTopic.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.reopen_forum_topic.ReopenForumTopic.message_thread_id:1 of +msgid "Unique identifier for the target message thread of the forum topic" +msgstr "" + +#: ../../api/methods/reopen_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/reopen_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/reopen_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/reopen_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/reopen_forum_topic.rst:29 +msgid ":code:`from aiogram.methods.reopen_forum_topic import ReopenForumTopic`" +msgstr "" + +#: ../../api/methods/reopen_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import ReopenForumTopic`" +msgstr "" + +#: ../../api/methods/reopen_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/reopen_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/reopen_general_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/reopen_general_forum_topic.po new file mode 100644 index 00000000..cd6c41db --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/reopen_general_forum_topic.po @@ -0,0 +1,81 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22: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" + +#: ../../api/methods/reopen_general_forum_topic.rst:3 +msgid "reopenGeneralForumTopic" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.reopen_general_forum_topic.ReopenGeneralForumTopic:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.reopen_general_forum_topic.ReopenGeneralForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#reopengeneralforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.reopen_general_forum_topic.ReopenGeneralForumTopic.chat_id:1 +#: of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:29 +msgid "" +":code:`from aiogram.methods.reopen_general_forum_topic import " +"ReopenGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import ReopenGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:40 +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/restrict_chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/restrict_chat_member.po new file mode 100644 index 00000000..beed5bec --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/restrict_chat_member.po @@ -0,0 +1,127 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-10-08 19:04+0300\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" + +#: ../../api/methods/restrict_chat_member.rst:3 +msgid "restrictChatMember" +msgstr "" + +#: ../../api/methods/restrict_chat_member.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.restrict_chat_member.RestrictChatMember:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.restrict_chat_member.RestrictChatMember:3 of +msgid "Source: https://core.telegram.org/bots/api#restrictchatmember" +msgstr "" + +#: ../../docstring +#: aiogram.methods.restrict_chat_member.RestrictChatMember.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.restrict_chat_member.RestrictChatMember.user_id:1 of +msgid "Unique identifier of the target user" +msgstr "" + +#: ../../docstring +#: aiogram.methods.restrict_chat_member.RestrictChatMember.permissions:1 of +msgid "A JSON-serialized object for new user permissions" +msgstr "" + +#: ../../docstring +#: aiogram.methods.restrict_chat_member.RestrictChatMember.use_independent_chat_permissions:1 +#: of +msgid "" +"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." +msgstr "" + +#: ../../docstring +#: aiogram.methods.restrict_chat_member.RestrictChatMember.until_date:1 of +msgid "" +"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" +msgstr "" + +#: ../../api/methods/restrict_chat_member.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/restrict_chat_member.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/restrict_chat_member.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/restrict_chat_member.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/restrict_chat_member.rst:30 +msgid "" +":code:`from aiogram.methods.restrict_chat_member import " +"RestrictChatMember`" +msgstr "" + +#: ../../api/methods/restrict_chat_member.rst:31 +msgid "alias: :code:`from aiogram.methods import RestrictChatMember`" +msgstr "" + +#: ../../api/methods/restrict_chat_member.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/restrict_chat_member.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/restrict_chat_member.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/restrict_chat_member.rst:51 +msgid ":meth:`aiogram.types.chat.Chat.restrict`" +msgstr "" + +#~ msgid "" +#~ "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" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/revoke_chat_invite_link.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/revoke_chat_invite_link.po new file mode 100644 index 00000000..b7fee507 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/revoke_chat_invite_link.po @@ -0,0 +1,94 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/revoke_chat_invite_link.rst:3 +msgid "revokeChatInviteLink" +msgstr "" + +#: ../../api/methods/revoke_chat_invite_link.rst:5 +msgid "Returns: :obj:`ChatInviteLink`" +msgstr "" + +#: aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink:3 of +msgid "Source: https://core.telegram.org/bots/api#revokechatinvitelink" +msgstr "" + +#: ../../docstring +#: aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink.chat_id:1 of +msgid "" +"Unique identifier of the target chat or username of the target channel " +"(in the format :code:`@channelusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink.invite_link:1 +#: of +msgid "The invite link to revoke" +msgstr "" + +#: ../../api/methods/revoke_chat_invite_link.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/revoke_chat_invite_link.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/revoke_chat_invite_link.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/revoke_chat_invite_link.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/revoke_chat_invite_link.rst:29 +msgid "" +":code:`from aiogram.methods.revoke_chat_invite_link import " +"RevokeChatInviteLink`" +msgstr "" + +#: ../../api/methods/revoke_chat_invite_link.rst:30 +msgid "alias: :code:`from aiogram.methods import RevokeChatInviteLink`" +msgstr "" + +#: ../../api/methods/revoke_chat_invite_link.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/revoke_chat_invite_link.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/revoke_chat_invite_link.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/revoke_chat_invite_link.rst:50 +msgid ":meth:`aiogram.types.chat.Chat.revoke_invite_link`" +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 new file mode 100644 index 00000000..1a021d25 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_animation.po @@ -0,0 +1,273 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_animation.rst:3 +msgid "sendAnimation" +msgstr "" + +#: ../../api/methods/send_animation.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_animation.SendAnimation:1 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.methods.send_animation.SendAnimation:3 of +msgid "Source: https://core.telegram.org/bots/api#sendanimation" +msgstr "" + +#: ../../docstring aiogram.methods.send_animation.SendAnimation.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.send_animation.SendAnimation.animation:1 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 "" + +#: ../../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 "" +"Unique identifier for the target message thread (topic) of the forum; for" +" forum supergroups only" +msgstr "" + +#: ../../docstring aiogram.methods.send_animation.SendAnimation.duration:1 of +msgid "Duration of sent animation in seconds" +msgstr "" + +#: ../../docstring aiogram.methods.send_animation.SendAnimation.width:1 of +msgid "Animation width" +msgstr "" + +#: ../../docstring aiogram.methods.send_animation.SendAnimation.height:1 of +msgid "Animation height" +msgstr "" + +#: ../../docstring aiogram.methods.send_animation.SendAnimation.thumbnail:1 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 "" + +#: ../../docstring aiogram.methods.send_animation.SendAnimation.caption:1 of +msgid "" +"Animation caption (may also be used when resending animation by " +"*file_id*), 0-1024 characters after entities parsing" +msgstr "" + +#: ../../docstring aiogram.methods.send_animation.SendAnimation.parse_mode:1 of +msgid "" +"Mode for parsing entities in the animation caption. See `formatting " +"options `_ for " +"more details." +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_animation.SendAnimation.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_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 "" +"Pass :code:`True` if the animation needs to be covered with a spoiler " +"animation" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_animation.SendAnimation.disable_notification:1 of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_animation.SendAnimation.protect_content:1 of +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" +msgstr "" + +#: ../../docstring aiogram.methods.send_animation.SendAnimation.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 "" + +#: ../../docstring +#: aiogram.methods.send_animation.SendAnimation.allow_sending_without_reply:1 +#: of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_animation.SendAnimation.allow_sending_without_reply:3 +#: aiogram.methods.send_animation.SendAnimation.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_animation.SendAnimation.reply_to_message_id:1 of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_animation.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_animation.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_animation.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_animation.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_animation.rst:30 +msgid ":code:`from aiogram.methods.send_animation import SendAnimation`" +msgstr "" + +#: ../../api/methods/send_animation.rst:31 +msgid "alias: :code:`from aiogram.methods import SendAnimation`" +msgstr "" + +#: ../../api/methods/send_animation.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_animation.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_animation.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_animation.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_animation`" +msgstr "" + +#: ../../api/methods/send_animation.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_animation`" +msgstr "" + +#: ../../api/methods/send_animation.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_animation`" +msgstr "" + +#: ../../api/methods/send_animation.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm`" +msgstr "" + +#: ../../api/methods/send_animation.rst:55 +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 " +#~ "keyboard `_, " +#~ "`custom reply keyboard " +#~ "`_, instructions " +#~ "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 new file mode 100644 index 00000000..06a45597 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_audio.po @@ -0,0 +1,253 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_audio.rst:3 +msgid "sendAudio" +msgstr "" + +#: ../../api/methods/send_audio.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_audio.SendAudio:1 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.methods.send_audio.SendAudio:4 of +msgid "Source: https://core.telegram.org/bots/api#sendaudio" +msgstr "" + +#: ../../docstring aiogram.methods.send_audio.SendAudio.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.send_audio.SendAudio.audio:1 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 "" + +#: ../../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" +" forum supergroups only" +msgstr "" + +#: ../../docstring aiogram.methods.send_audio.SendAudio.caption:1 of +msgid "Audio caption, 0-1024 characters after entities parsing" +msgstr "" + +#: ../../docstring aiogram.methods.send_audio.SendAudio.parse_mode:1 of +msgid "" +"Mode for parsing entities in the audio caption. See `formatting options " +"`_ for more " +"details." +msgstr "" + +#: ../../docstring aiogram.methods.send_audio.SendAudio.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_audio.SendAudio.duration:1 of +msgid "Duration of the audio in seconds" +msgstr "" + +#: ../../docstring aiogram.methods.send_audio.SendAudio.performer:1 of +msgid "Performer" +msgstr "" + +#: ../../docstring aiogram.methods.send_audio.SendAudio.title:1 of +msgid "Track name" +msgstr "" + +#: ../../docstring aiogram.methods.send_audio.SendAudio.thumbnail:1 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 "" + +#: ../../docstring aiogram.methods.send_audio.SendAudio.disable_notification:1 +#: of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring aiogram.methods.send_audio.SendAudio.protect_content:1 of +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 "" + +#: ../../docstring aiogram.methods.send_audio.SendAudio.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 "" + +#: ../../docstring +#: aiogram.methods.send_audio.SendAudio.allow_sending_without_reply:1 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_audio.SendAudio.allow_sending_without_reply:3 +#: aiogram.methods.send_audio.SendAudio.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring aiogram.methods.send_audio.SendAudio.reply_to_message_id:1 +#: of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_audio.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_audio.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_audio.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_audio.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_audio.rst:30 +msgid ":code:`from aiogram.methods.send_audio import SendAudio`" +msgstr "" + +#: ../../api/methods/send_audio.rst:31 +msgid "alias: :code:`from aiogram.methods import SendAudio`" +msgstr "" + +#: ../../api/methods/send_audio.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_audio.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_audio.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_audio.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_audio`" +msgstr "" + +#: ../../api/methods/send_audio.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_audio`" +msgstr "" + +#: ../../api/methods/send_audio.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_audio`" +msgstr "" + +#: ../../api/methods/send_audio.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm`" +msgstr "" + +#: ../../api/methods/send_audio.rst:55 +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 " +#~ "keyboard `_, " +#~ "`custom reply keyboard " +#~ "`_, instructions " +#~ "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 new file mode 100644 index 00000000..2577ab74 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_chat_action.po @@ -0,0 +1,132 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_chat_action.rst:3 +msgid "sendChatAction" +msgstr "" + +#: ../../api/methods/send_chat_action.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.send_chat_action.SendChatAction:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.send_chat_action.SendChatAction:3 of +msgid "" +"Example: The `ImageBot `_ needs some time to " +"process a request and upload the image. Instead of sending a text message" +" along the lines of 'Retrieving image, please wait…', the bot may use " +":class:`aiogram.methods.send_chat_action.SendChatAction` with *action* = " +"*upload_photo*. The user will see a 'sending photo' status for the bot." +msgstr "" + +#: aiogram.methods.send_chat_action.SendChatAction:5 of +msgid "" +"We only recommend using this method when a response from the bot will " +"take a **noticeable** amount of time to arrive." +msgstr "" + +#: aiogram.methods.send_chat_action.SendChatAction:7 of +msgid "Source: https://core.telegram.org/bots/api#sendchataction" +msgstr "" + +#: ../../docstring aiogram.methods.send_chat_action.SendChatAction.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.send_chat_action.SendChatAction.action:1 of +msgid "" +"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 " +"`_." +msgstr "" + +#: ../../docstring +#: 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 "" + +#: ../../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:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_chat_action.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_chat_action.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_chat_action.rst:30 +msgid ":code:`from aiogram.methods.send_chat_action import SendChatAction`" +msgstr "" + +#: ../../api/methods/send_chat_action.rst:31 +msgid "alias: :code:`from aiogram.methods import SendChatAction`" +msgstr "" + +#: ../../api/methods/send_chat_action.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_chat_action.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_chat_action.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../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 new file mode 100644 index 00000000..2a81ebd9 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_contact.po @@ -0,0 +1,221 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_contact.rst:3 +msgid "sendContact" +msgstr "" + +#: ../../api/methods/send_contact.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_contact.SendContact:1 of +msgid "" +"Use this method to send phone contacts. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.methods.send_contact.SendContact:3 of +msgid "Source: https://core.telegram.org/bots/api#sendcontact" +msgstr "" + +#: ../../docstring aiogram.methods.send_contact.SendContact.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.send_contact.SendContact.phone_number:1 of +msgid "Contact's phone number" +msgstr "" + +#: ../../docstring aiogram.methods.send_contact.SendContact.first_name:1 of +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 "" +"Unique identifier for the target message thread (topic) of the forum; for" +" forum supergroups only" +msgstr "" + +#: ../../docstring aiogram.methods.send_contact.SendContact.last_name:1 of +msgid "Contact's last name" +msgstr "" + +#: ../../docstring aiogram.methods.send_contact.SendContact.vcard:1 of +msgid "" +"Additional data about the contact in the form of a `vCard " +"`_, 0-2048 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_contact.SendContact.disable_notification:1 of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring aiogram.methods.send_contact.SendContact.protect_content:1 +#: of +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" +msgstr "" + +#: ../../docstring aiogram.methods.send_contact.SendContact.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 "" + +#: ../../docstring +#: aiogram.methods.send_contact.SendContact.allow_sending_without_reply:1 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_contact.SendContact.allow_sending_without_reply:3 +#: aiogram.methods.send_contact.SendContact.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_contact.SendContact.reply_to_message_id:1 of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_contact.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_contact.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_contact.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_contact.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_contact.rst:30 +msgid ":code:`from aiogram.methods.send_contact import SendContact`" +msgstr "" + +#: ../../api/methods/send_contact.rst:31 +msgid "alias: :code:`from aiogram.methods import SendContact`" +msgstr "" + +#: ../../api/methods/send_contact.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_contact.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_contact.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_contact.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_contact`" +msgstr "" + +#: ../../api/methods/send_contact.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_contact`" +msgstr "" + +#: ../../api/methods/send_contact.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_contact`" +msgstr "" + +#: ../../api/methods/send_contact.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm`" +msgstr "" + +#: ../../api/methods/send_contact.rst:55 +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 " +#~ "keyboard `_, " +#~ "`custom reply keyboard " +#~ "`_, instructions " +#~ "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 new file mode 100644 index 00000000..aa7b7808 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_dice.po @@ -0,0 +1,194 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_dice.rst:3 +msgid "sendDice" +msgstr "" + +#: ../../api/methods/send_dice.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_dice.SendDice:1 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.methods.send_dice.SendDice:3 of +msgid "Source: https://core.telegram.org/bots/api#senddice" +msgstr "" + +#: ../../docstring aiogram.methods.send_dice.SendDice.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.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" +" forum supergroups only" +msgstr "" + +#: ../../docstring aiogram.methods.send_dice.SendDice.emoji:1 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 "" + +#: ../../docstring aiogram.methods.send_dice.SendDice.disable_notification:1 of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring aiogram.methods.send_dice.SendDice.protect_content:1 of +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 "" + +#: ../../docstring aiogram.methods.send_dice.SendDice.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 "" + +#: ../../docstring +#: aiogram.methods.send_dice.SendDice.allow_sending_without_reply:1 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_dice.SendDice.allow_sending_without_reply:3 +#: aiogram.methods.send_dice.SendDice.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring aiogram.methods.send_dice.SendDice.reply_to_message_id:1 of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_dice.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_dice.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_dice.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_dice.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_dice.rst:30 +msgid ":code:`from aiogram.methods.send_dice import SendDice`" +msgstr "" + +#: ../../api/methods/send_dice.rst:31 +msgid "alias: :code:`from aiogram.methods import SendDice`" +msgstr "" + +#: ../../api/methods/send_dice.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_dice.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_dice.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_dice.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_dice`" +msgstr "" + +#: ../../api/methods/send_dice.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_dice`" +msgstr "" + +#: ../../api/methods/send_dice.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_dice`" +msgstr "" + +#: ../../api/methods/send_dice.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm`" +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 new file mode 100644 index 00000000..267cb594 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_document.po @@ -0,0 +1,253 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_document.rst:3 +msgid "sendDocument" +msgstr "" + +#: ../../api/methods/send_document.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_document.SendDocument:1 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.methods.send_document.SendDocument:3 of +msgid "Source: https://core.telegram.org/bots/api#senddocument" +msgstr "" + +#: ../../docstring aiogram.methods.send_document.SendDocument.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.send_document.SendDocument.document:1 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 "" + +#: ../../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 "" +"Unique identifier for the target message thread (topic) of the forum; for" +" forum supergroups only" +msgstr "" + +#: ../../docstring aiogram.methods.send_document.SendDocument.thumbnail:1 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 "" + +#: ../../docstring aiogram.methods.send_document.SendDocument.caption:1 of +msgid "" +"Document caption (may also be used when resending documents by " +"*file_id*), 0-1024 characters after entities parsing" +msgstr "" + +#: ../../docstring aiogram.methods.send_document.SendDocument.parse_mode:1 of +msgid "" +"Mode for parsing entities in the document caption. See `formatting " +"options `_ for " +"more details." +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_document.SendDocument.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_document.SendDocument.disable_content_type_detection:1 +#: of +msgid "" +"Disables automatic server-side content type detection for files uploaded " +"using multipart/form-data" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_document.SendDocument.disable_notification:1 of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring aiogram.methods.send_document.SendDocument.protect_content:1 +#: of +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" +msgstr "" + +#: ../../docstring aiogram.methods.send_document.SendDocument.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 "" + +#: ../../docstring +#: aiogram.methods.send_document.SendDocument.allow_sending_without_reply:1 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_document.SendDocument.allow_sending_without_reply:3 +#: aiogram.methods.send_document.SendDocument.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_document.SendDocument.reply_to_message_id:1 of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_document.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_document.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_document.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_document.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_document.rst:30 +msgid ":code:`from aiogram.methods.send_document import SendDocument`" +msgstr "" + +#: ../../api/methods/send_document.rst:31 +msgid "alias: :code:`from aiogram.methods import SendDocument`" +msgstr "" + +#: ../../api/methods/send_document.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_document.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_document.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_document.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_document`" +msgstr "" + +#: ../../api/methods/send_document.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_document`" +msgstr "" + +#: ../../api/methods/send_document.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_document`" +msgstr "" + +#: ../../api/methods/send_document.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm`" +msgstr "" + +#: ../../api/methods/send_document.rst:55 +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 " +#~ "keyboard `_, " +#~ "`custom reply keyboard " +#~ "`_, instructions " +#~ "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 new file mode 100644 index 00000000..0d2188a6 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_game.po @@ -0,0 +1,187 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_game.rst:3 +msgid "sendGame" +msgstr "" + +#: ../../api/methods/send_game.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_game.SendGame:1 of +msgid "" +"Use this method to send a game. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.methods.send_game.SendGame:3 of +msgid "Source: https://core.telegram.org/bots/api#sendgame" +msgstr "" + +#: ../../docstring aiogram.methods.send_game.SendGame.chat_id:1 of +msgid "Unique identifier for the target chat" +msgstr "" + +#: ../../docstring aiogram.methods.send_game.SendGame.game_short_name:1 of +msgid "" +"Short name of the game, serves as the unique identifier for the game. Set" +" 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" +" forum supergroups only" +msgstr "" + +#: ../../docstring aiogram.methods.send_game.SendGame.disable_notification:1 of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring aiogram.methods.send_game.SendGame.protect_content:1 of +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 "" + +#: ../../docstring aiogram.methods.send_game.SendGame.reply_markup:1 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 "" + +#: ../../docstring +#: aiogram.methods.send_game.SendGame.allow_sending_without_reply:1 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_game.SendGame.allow_sending_without_reply:3 +#: aiogram.methods.send_game.SendGame.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring aiogram.methods.send_game.SendGame.reply_to_message_id:1 of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_game.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_game.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_game.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_game.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_game.rst:30 +msgid ":code:`from aiogram.methods.send_game import SendGame`" +msgstr "" + +#: ../../api/methods/send_game.rst:31 +msgid "alias: :code:`from aiogram.methods import SendGame`" +msgstr "" + +#: ../../api/methods/send_game.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_game.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_game.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_game.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_game`" +msgstr "" + +#: ../../api/methods/send_game.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_game`" +msgstr "" + +#: ../../api/methods/send_game.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_game`" +msgstr "" + +#: ../../api/methods/send_game.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm`" +msgstr "" + +#: ../../api/methods/send_game.rst:55 +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 `_. If empty, one 'Play " +#~ "game_title' button will be shown. If " +#~ "not empty, the first button must " +#~ "launch the game." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_gift.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_gift.po new file mode 100644 index 00000000..d6b4c0bd --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_gift.po @@ -0,0 +1,115 @@ +# 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_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 new file mode 100644 index 00000000..5ec56610 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_invoice.po @@ -0,0 +1,405 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_invoice.rst:3 +msgid "sendInvoice" +msgstr "" + +#: ../../api/methods/send_invoice.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_invoice.SendInvoice:1 of +msgid "" +"Use this method to send invoices. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.methods.send_invoice.SendInvoice:3 of +msgid "Source: https://core.telegram.org/bots/api#sendinvoice" +msgstr "" + +#: ../../docstring aiogram.methods.send_invoice.SendInvoice.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.send_invoice.SendInvoice.title:1 of +msgid "Product name, 1-32 characters" +msgstr "" + +#: ../../docstring aiogram.methods.send_invoice.SendInvoice.description:1 of +msgid "Product description, 1-255 characters" +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 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.). Must " +"contain exactly one item for payments in `Telegram Stars " +"`_." +msgstr "" + +#: ../../docstring aiogram.methods.send_invoice.SendInvoice.message_thread_id:1 +#: of +msgid "" +"Unique identifier for the target message thread (topic) of the forum; for" +" 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 " +"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 "" + +#: ../../docstring +#: aiogram.methods.send_invoice.SendInvoice.suggested_tip_amounts:1 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 "" + +#: ../../docstring aiogram.methods.send_invoice.SendInvoice.start_parameter:1 +#: 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 "" + +#: ../../docstring aiogram.methods.send_invoice.SendInvoice.provider_data:1 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 "" + +#: ../../docstring aiogram.methods.send_invoice.SendInvoice.photo_url:1 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 "" + +#: ../../docstring aiogram.methods.send_invoice.SendInvoice.photo_size:1 of +msgid "Photo size in bytes" +msgstr "" + +#: ../../docstring aiogram.methods.send_invoice.SendInvoice.photo_width:1 of +msgid "Photo width" +msgstr "" + +#: ../../docstring aiogram.methods.send_invoice.SendInvoice.photo_height:1 of +msgid "Photo height" +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. 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. 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. 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. 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 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 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. " +"Ignored for payments in `Telegram Stars `_." +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_invoice.SendInvoice.disable_notification:1 of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring aiogram.methods.send_invoice.SendInvoice.protect_content:1 +#: of +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" +msgstr "" + +#: ../../docstring aiogram.methods.send_invoice.SendInvoice.reply_markup:1 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 "" + +#: ../../docstring +#: aiogram.methods.send_invoice.SendInvoice.allow_sending_without_reply:1 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_invoice.SendInvoice.allow_sending_without_reply:3 +#: aiogram.methods.send_invoice.SendInvoice.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_invoice.SendInvoice.reply_to_message_id:1 of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_invoice.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_invoice.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_invoice.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_invoice.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_invoice.rst:30 +msgid ":code:`from aiogram.methods.send_invoice import SendInvoice`" +msgstr "" + +#: ../../api/methods/send_invoice.rst:31 +msgid "alias: :code:`from aiogram.methods import SendInvoice`" +msgstr "" + +#: ../../api/methods/send_invoice.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_invoice.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_invoice.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_invoice.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_invoice`" +msgstr "" + +#: ../../api/methods/send_invoice.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_invoice`" +msgstr "" + +#: ../../api/methods/send_invoice.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice`" +msgstr "" + +#: ../../api/methods/send_invoice.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm`" +msgstr "" + +#: ../../api/methods/send_invoice.rst:55 +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 `_. If empty, one 'Pay " +#~ ":code:`total price`' button will be " +#~ "shown. If not empty, the first " +#~ "button must be a Pay button." +#~ 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 "" 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 new file mode 100644 index 00000000..ae398456 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_location.po @@ -0,0 +1,245 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_location.rst:3 +msgid "sendLocation" +msgstr "" + +#: ../../api/methods/send_location.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_location.SendLocation:1 of +msgid "" +"Use this method to send point on the map. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.methods.send_location.SendLocation:3 of +msgid "Source: https://core.telegram.org/bots/api#sendlocation" +msgstr "" + +#: ../../docstring aiogram.methods.send_location.SendLocation.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.send_location.SendLocation.latitude:1 of +msgid "Latitude of the location" +msgstr "" + +#: ../../docstring aiogram.methods.send_location.SendLocation.longitude:1 of +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 "" +"Unique identifier for the target message thread (topic) of the forum; for" +" forum supergroups only" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_location.SendLocation.horizontal_accuracy:1 of +msgid "The radius of uncertainty for the location, measured in meters; 0-1500" +msgstr "" + +#: ../../docstring aiogram.methods.send_location.SendLocation.live_period:1 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 "" + +#: ../../docstring aiogram.methods.send_location.SendLocation.heading:1 of +msgid "" +"For live locations, a direction in which the user is moving, in degrees. " +"Must be between 1 and 360 if specified." +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_location.SendLocation.proximity_alert_radius:1 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 "" + +#: ../../docstring +#: aiogram.methods.send_location.SendLocation.disable_notification:1 of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring aiogram.methods.send_location.SendLocation.protect_content:1 +#: of +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" +msgstr "" + +#: ../../docstring aiogram.methods.send_location.SendLocation.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 "" + +#: ../../docstring +#: aiogram.methods.send_location.SendLocation.allow_sending_without_reply:1 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_location.SendLocation.allow_sending_without_reply:3 +#: aiogram.methods.send_location.SendLocation.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_location.SendLocation.reply_to_message_id:1 of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_location.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_location.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_location.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_location.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_location.rst:30 +msgid ":code:`from aiogram.methods.send_location import SendLocation`" +msgstr "" + +#: ../../api/methods/send_location.rst:31 +msgid "alias: :code:`from aiogram.methods import SendLocation`" +msgstr "" + +#: ../../api/methods/send_location.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_location.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_location.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_location.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_location`" +msgstr "" + +#: ../../api/methods/send_location.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_location`" +msgstr "" + +#: ../../api/methods/send_location.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_location`" +msgstr "" + +#: ../../api/methods/send_location.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm`" +msgstr "" + +#: ../../api/methods/send_location.rst:55 +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 " +#~ "keyboard `_, " +#~ "`custom reply keyboard " +#~ "`_, instructions " +#~ "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 new file mode 100644 index 00000000..f03a00a3 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_media_group.po @@ -0,0 +1,185 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_media_group.rst:3 +msgid "sendMediaGroup" +msgstr "" + +#: ../../api/methods/send_media_group.rst:5 +msgid "Returns: :obj:`list[Message]`" +msgstr "" + +#: aiogram.methods.send_media_group.SendMediaGroup:1 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.methods.send_media_group.SendMediaGroup:3 of +msgid "Source: https://core.telegram.org/bots/api#sendmediagroup" +msgstr "" + +#: ../../docstring aiogram.methods.send_media_group.SendMediaGroup.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.send_media_group.SendMediaGroup.media:1 of +msgid "" +"A JSON-serialized array describing messages to be sent, must include 2-10" +" 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 "" +"Unique identifier for the target message thread (topic) of the forum; for" +" forum supergroups only" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_media_group.SendMediaGroup.disable_notification:1 of +msgid "" +"Sends messages `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_media_group.SendMediaGroup.protect_content:1 of +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" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_media_group.SendMediaGroup.allow_sending_without_reply:1 +#: of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_media_group.SendMediaGroup.allow_sending_without_reply:3 +#: aiogram.methods.send_media_group.SendMediaGroup.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_media_group.SendMediaGroup.reply_to_message_id:1 of +msgid "If the messages are a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_media_group.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_media_group.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_media_group.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_media_group.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_media_group.rst:30 +msgid ":code:`from aiogram.methods.send_media_group import SendMediaGroup`" +msgstr "" + +#: ../../api/methods/send_media_group.rst:31 +msgid "alias: :code:`from aiogram.methods import SendMediaGroup`" +msgstr "" + +#: ../../api/methods/send_media_group.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_media_group.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_media_group.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_media_group.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_media_group`" +msgstr "" + +#: ../../api/methods/send_media_group.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_media_group`" +msgstr "" + +#: ../../api/methods/send_media_group.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group`" +msgstr "" + +#: ../../api/methods/send_media_group.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm`" +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 new file mode 100644 index 00000000..f4550d78 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_message.po @@ -0,0 +1,231 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_message.rst:3 +msgid "sendMessage" +msgstr "" + +#: ../../api/methods/send_message.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_message.SendMessage:1 of +msgid "" +"Use this method to send text messages. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.methods.send_message.SendMessage:3 of +msgid "Source: https://core.telegram.org/bots/api#sendmessage" +msgstr "" + +#: ../../docstring aiogram.methods.send_message.SendMessage.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.send_message.SendMessage.text:1 of +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 "" +"Unique identifier for the target message thread (topic) of the forum; for" +" forum supergroups only" +msgstr "" + +#: ../../docstring aiogram.methods.send_message.SendMessage.parse_mode:1 of +msgid "" +"Mode for parsing entities in the message text. See `formatting options " +"`_ for more " +"details." +msgstr "" + +#: ../../docstring aiogram.methods.send_message.SendMessage.entities:1 of +msgid "" +"A JSON-serialized list of special entities that appear in message text, " +"which can be specified instead of *parse_mode*" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_message.SendMessage.link_preview_options:1 of +msgid "Link preview generation options for the message" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_message.SendMessage.disable_notification:1 of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring aiogram.methods.send_message.SendMessage.protect_content:1 +#: of +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" +msgstr "" + +#: ../../docstring aiogram.methods.send_message.SendMessage.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 "" + +#: ../../docstring +#: aiogram.methods.send_message.SendMessage.allow_sending_without_reply:1 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_message.SendMessage.allow_sending_without_reply:3 +#: aiogram.methods.send_message.SendMessage.disable_web_page_preview:3 +#: aiogram.methods.send_message.SendMessage.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_message.SendMessage.disable_web_page_preview:1 of +msgid "Disables link previews for links in this message" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_message.SendMessage.reply_to_message_id:1 of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_message.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_message.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_message.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_message.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_message.rst:30 +msgid ":code:`from aiogram.methods.send_message import SendMessage`" +msgstr "" + +#: ../../api/methods/send_message.rst:31 +msgid "alias: :code:`from aiogram.methods import SendMessage`" +msgstr "" + +#: ../../api/methods/send_message.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_message.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_message.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_message.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer`" +msgstr "" + +#: ../../api/methods/send_message.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply`" +msgstr "" + +#: ../../api/methods/send_message.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer`" +msgstr "" + +#: ../../api/methods/send_message.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_pm`" +msgstr "" + +#: ../../api/methods/send_message.rst:55 +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 " +#~ "keyboard `_, " +#~ "`custom reply keyboard " +#~ "`_, instructions " +#~ "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 new file mode 100644 index 00000000..c24e0fea --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_photo.po @@ -0,0 +1,229 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_photo.rst:3 +msgid "sendPhoto" +msgstr "" + +#: ../../api/methods/send_photo.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_photo.SendPhoto:1 of +msgid "" +"Use this method to send photos. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.methods.send_photo.SendPhoto:3 of +msgid "Source: https://core.telegram.org/bots/api#sendphoto" +msgstr "" + +#: ../../docstring aiogram.methods.send_photo.SendPhoto.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.send_photo.SendPhoto.photo:1 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 "" + +#: ../../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" +" forum supergroups only" +msgstr "" + +#: ../../docstring aiogram.methods.send_photo.SendPhoto.caption:1 of +msgid "" +"Photo caption (may also be used when resending photos by *file_id*), " +"0-1024 characters after entities parsing" +msgstr "" + +#: ../../docstring aiogram.methods.send_photo.SendPhoto.parse_mode:1 of +msgid "" +"Mode for parsing entities in the photo caption. See `formatting options " +"`_ for more " +"details." +msgstr "" + +#: ../../docstring aiogram.methods.send_photo.SendPhoto.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_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 " +"animation" +msgstr "" + +#: ../../docstring aiogram.methods.send_photo.SendPhoto.disable_notification:1 +#: of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring aiogram.methods.send_photo.SendPhoto.protect_content:1 of +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 "" + +#: ../../docstring aiogram.methods.send_photo.SendPhoto.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 "" + +#: ../../docstring +#: aiogram.methods.send_photo.SendPhoto.allow_sending_without_reply:1 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_photo.SendPhoto.allow_sending_without_reply:3 +#: aiogram.methods.send_photo.SendPhoto.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring aiogram.methods.send_photo.SendPhoto.reply_to_message_id:1 +#: of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_photo.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_photo.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_photo.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_photo.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_photo.rst:30 +msgid ":code:`from aiogram.methods.send_photo import SendPhoto`" +msgstr "" + +#: ../../api/methods/send_photo.rst:31 +msgid "alias: :code:`from aiogram.methods import SendPhoto`" +msgstr "" + +#: ../../api/methods/send_photo.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_photo.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_photo.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_photo.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_photo`" +msgstr "" + +#: ../../api/methods/send_photo.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_photo`" +msgstr "" + +#: ../../api/methods/send_photo.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_photo`" +msgstr "" + +#: ../../api/methods/send_photo.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm`" +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 new file mode 100644 index 00000000..844a4b13 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_poll.po @@ -0,0 +1,291 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_poll.rst:3 +msgid "sendPoll" +msgstr "" + +#: ../../api/methods/send_poll.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_poll.SendPoll:1 of +msgid "" +"Use this method to send a native poll. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.methods.send_poll.SendPoll:3 of +msgid "Source: https://core.telegram.org/bots/api#sendpoll" +msgstr "" + +#: ../../docstring aiogram.methods.send_poll.SendPoll.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.send_poll.SendPoll.question:1 of +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 "" +"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 +msgid "" +"Unique identifier for the target message thread (topic) of the forum; for" +" 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 "" + +#: ../../docstring aiogram.methods.send_poll.SendPoll.type:1 of +msgid "Poll type, 'quiz' or 'regular', defaults to 'regular'" +msgstr "" + +#: ../../docstring aiogram.methods.send_poll.SendPoll.allows_multiple_answers:1 +#: of +msgid "" +":code:`True`, if the poll allows multiple answers, ignored for polls in " +"quiz mode, defaults to :code:`False`" +msgstr "" + +#: ../../docstring aiogram.methods.send_poll.SendPoll.correct_option_id:1 of +msgid "" +"0-based identifier of the correct answer option, required for polls in " +"quiz mode" +msgstr "" + +#: ../../docstring aiogram.methods.send_poll.SendPoll.explanation:1 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 "" + +#: ../../docstring aiogram.methods.send_poll.SendPoll.explanation_parse_mode:1 +#: of +msgid "" +"Mode for parsing entities in the explanation. See `formatting options " +"`_ for more " +"details." +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. It can be specified instead of *explanation_parse_mode*" +msgstr "" + +#: ../../docstring aiogram.methods.send_poll.SendPoll.open_period:1 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 "" + +#: ../../docstring aiogram.methods.send_poll.SendPoll.close_date:1 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 "" + +#: ../../docstring aiogram.methods.send_poll.SendPoll.is_closed:1 of +msgid "" +"Pass :code:`True` if the poll needs to be immediately closed. This can be" +" useful for poll preview." +msgstr "" + +#: ../../docstring aiogram.methods.send_poll.SendPoll.disable_notification:1 of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring aiogram.methods.send_poll.SendPoll.protect_content:1 of +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 "" + +#: ../../docstring aiogram.methods.send_poll.SendPoll.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 "" + +#: ../../docstring +#: aiogram.methods.send_poll.SendPoll.allow_sending_without_reply:1 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_poll.SendPoll.allow_sending_without_reply:3 +#: aiogram.methods.send_poll.SendPoll.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring aiogram.methods.send_poll.SendPoll.reply_to_message_id:1 of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_poll.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_poll.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_poll.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_poll.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_poll.rst:30 +msgid ":code:`from aiogram.methods.send_poll import SendPoll`" +msgstr "" + +#: ../../api/methods/send_poll.rst:31 +msgid "alias: :code:`from aiogram.methods import SendPoll`" +msgstr "" + +#: ../../api/methods/send_poll.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_poll.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_poll.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_poll.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_poll`" +msgstr "" + +#: ../../api/methods/send_poll.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_poll`" +msgstr "" + +#: ../../api/methods/send_poll.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_poll`" +msgstr "" + +#: ../../api/methods/send_poll.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm`" +msgstr "" + +#: ../../api/methods/send_poll.rst:55 +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 " +#~ "keyboard `_, " +#~ "`custom reply keyboard " +#~ "`_, instructions " +#~ "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 new file mode 100644 index 00000000..c1326c45 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_sticker.po @@ -0,0 +1,248 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_sticker.rst:3 +msgid "sendSticker" +msgstr "" + +#: ../../api/methods/send_sticker.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_sticker.SendSticker:1 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.methods.send_sticker.SendSticker:3 of +msgid "Source: https://core.telegram.org/bots/api#sendsticker" +msgstr "" + +#: ../../docstring aiogram.methods.send_sticker.SendSticker.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.send_sticker.SendSticker.sticker:1 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 "" + +#: ../../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 +#: of +msgid "" +"Unique identifier for the target message thread (topic) of the forum; for" +" forum supergroups only" +msgstr "" + +#: ../../docstring aiogram.methods.send_sticker.SendSticker.emoji:1 of +msgid "Emoji associated with the sticker; only for just uploaded stickers" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_sticker.SendSticker.disable_notification:1 of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring aiogram.methods.send_sticker.SendSticker.protect_content:1 +#: of +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" +msgstr "" + +#: ../../docstring aiogram.methods.send_sticker.SendSticker.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 "" + +#: ../../docstring +#: aiogram.methods.send_sticker.SendSticker.allow_sending_without_reply:1 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_sticker.SendSticker.allow_sending_without_reply:3 +#: aiogram.methods.send_sticker.SendSticker.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_sticker.SendSticker.reply_to_message_id:1 of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_sticker.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_sticker.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_sticker.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_sticker.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_sticker.rst:30 +msgid ":code:`from aiogram.methods.send_sticker import SendSticker`" +msgstr "" + +#: ../../api/methods/send_sticker.rst:31 +msgid "alias: :code:`from aiogram.methods import SendSticker`" +msgstr "" + +#: ../../api/methods/send_sticker.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_sticker.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_sticker.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_sticker.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_sticker`" +msgstr "" + +#: ../../api/methods/send_sticker.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_sticker`" +msgstr "" + +#: ../../api/methods/send_sticker.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker`" +msgstr "" + +#: ../../api/methods/send_sticker.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm`" +msgstr "" + +#: ../../api/methods/send_sticker.rst:55 +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 " +#~ "keyboard `_, " +#~ "`custom reply keyboard " +#~ "`_, instructions " +#~ "to remove reply keyboard or to " +#~ "force a reply from the user." +#~ 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 file from the Internet, or " +#~ "upload a new one using multipart" +#~ "/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 new file mode 100644 index 00000000..458e9390 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_venue.po @@ -0,0 +1,236 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_venue.rst:3 +msgid "sendVenue" +msgstr "" + +#: ../../api/methods/send_venue.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_venue.SendVenue:1 of +msgid "" +"Use this method to send information about a venue. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.methods.send_venue.SendVenue:3 of +msgid "Source: https://core.telegram.org/bots/api#sendvenue" +msgstr "" + +#: ../../docstring aiogram.methods.send_venue.SendVenue.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.send_venue.SendVenue.latitude:1 of +msgid "Latitude of the venue" +msgstr "" + +#: ../../docstring aiogram.methods.send_venue.SendVenue.longitude:1 of +msgid "Longitude of the venue" +msgstr "" + +#: ../../docstring aiogram.methods.send_venue.SendVenue.title:1 of +msgid "Name of the venue" +msgstr "" + +#: ../../docstring aiogram.methods.send_venue.SendVenue.address:1 of +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" +" forum supergroups only" +msgstr "" + +#: ../../docstring aiogram.methods.send_venue.SendVenue.foursquare_id:1 of +msgid "Foursquare identifier of the venue" +msgstr "" + +#: ../../docstring aiogram.methods.send_venue.SendVenue.foursquare_type:1 of +msgid "" +"Foursquare type of the venue, if known. (For example, " +"'arts_entertainment/default', 'arts_entertainment/aquarium' or " +"'food/icecream'.)" +msgstr "" + +#: ../../docstring aiogram.methods.send_venue.SendVenue.google_place_id:1 of +msgid "Google Places identifier of the venue" +msgstr "" + +#: ../../docstring aiogram.methods.send_venue.SendVenue.google_place_type:1 of +msgid "" +"Google Places type of the venue. (See `supported types " +"`_.)" +msgstr "" + +#: ../../docstring aiogram.methods.send_venue.SendVenue.disable_notification:1 +#: of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring aiogram.methods.send_venue.SendVenue.protect_content:1 of +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 "" + +#: ../../docstring aiogram.methods.send_venue.SendVenue.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 "" + +#: ../../docstring +#: aiogram.methods.send_venue.SendVenue.allow_sending_without_reply:1 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_venue.SendVenue.allow_sending_without_reply:3 +#: aiogram.methods.send_venue.SendVenue.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring aiogram.methods.send_venue.SendVenue.reply_to_message_id:1 +#: of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_venue.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_venue.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_venue.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_venue.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_venue.rst:30 +msgid ":code:`from aiogram.methods.send_venue import SendVenue`" +msgstr "" + +#: ../../api/methods/send_venue.rst:31 +msgid "alias: :code:`from aiogram.methods import SendVenue`" +msgstr "" + +#: ../../api/methods/send_venue.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_venue.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_venue.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_venue.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_venue`" +msgstr "" + +#: ../../api/methods/send_venue.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_venue`" +msgstr "" + +#: ../../api/methods/send_venue.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_venue`" +msgstr "" + +#: ../../api/methods/send_venue.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm`" +msgstr "" + +#: ../../api/methods/send_venue.rst:55 +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 " +#~ "keyboard `_, " +#~ "`custom reply keyboard " +#~ "`_, instructions " +#~ "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 new file mode 100644 index 00000000..45d99121 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video.po @@ -0,0 +1,284 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_video.rst:3 +msgid "sendVideo" +msgstr "" + +#: ../../api/methods/send_video.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_video.SendVideo:1 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.methods.send_video.SendVideo:3 of +msgid "Source: https://core.telegram.org/bots/api#sendvideo" +msgstr "" + +#: ../../docstring aiogram.methods.send_video.SendVideo.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.send_video.SendVideo.video:1 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 "" + +#: ../../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" +" forum supergroups only" +msgstr "" + +#: ../../docstring aiogram.methods.send_video.SendVideo.duration:1 of +msgid "Duration of sent video in seconds" +msgstr "" + +#: ../../docstring aiogram.methods.send_video.SendVideo.width:1 of +msgid "Video width" +msgstr "" + +#: ../../docstring aiogram.methods.send_video.SendVideo.height:1 of +msgid "Video height" +msgstr "" + +#: ../../docstring aiogram.methods.send_video.SendVideo.thumbnail:1 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 "" + +#: ../../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*), " +"0-1024 characters after entities parsing" +msgstr "" + +#: ../../docstring aiogram.methods.send_video.SendVideo.parse_mode:1 of +msgid "" +"Mode for parsing entities in the video caption. See `formatting options " +"`_ for more " +"details." +msgstr "" + +#: ../../docstring aiogram.methods.send_video.SendVideo.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_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 " +"animation" +msgstr "" + +#: ../../docstring aiogram.methods.send_video.SendVideo.supports_streaming:1 of +msgid "Pass :code:`True` if the uploaded video is suitable for streaming" +msgstr "" + +#: ../../docstring aiogram.methods.send_video.SendVideo.disable_notification:1 +#: of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring aiogram.methods.send_video.SendVideo.protect_content:1 of +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 "" + +#: ../../docstring aiogram.methods.send_video.SendVideo.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 "" + +#: ../../docstring +#: aiogram.methods.send_video.SendVideo.allow_sending_without_reply:1 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_video.SendVideo.allow_sending_without_reply:3 +#: aiogram.methods.send_video.SendVideo.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring aiogram.methods.send_video.SendVideo.reply_to_message_id:1 +#: of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_video.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_video.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_video.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_video.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_video.rst:30 +msgid ":code:`from aiogram.methods.send_video import SendVideo`" +msgstr "" + +#: ../../api/methods/send_video.rst:31 +msgid "alias: :code:`from aiogram.methods import SendVideo`" +msgstr "" + +#: ../../api/methods/send_video.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_video.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_video.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_video.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_video`" +msgstr "" + +#: ../../api/methods/send_video.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_video`" +msgstr "" + +#: ../../api/methods/send_video.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_video`" +msgstr "" + +#: ../../api/methods/send_video.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm`" +msgstr "" + +#: ../../api/methods/send_video.rst:55 +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 " +#~ "keyboard `_, " +#~ "`custom reply keyboard " +#~ "`_, instructions " +#~ "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 new file mode 100644 index 00000000..8495ce62 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video_note.po @@ -0,0 +1,236 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_video_note.rst:3 +msgid "sendVideoNote" +msgstr "" + +#: ../../api/methods/send_video_note.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_video_note.SendVideoNote:1 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.methods.send_video_note.SendVideoNote:3 of +msgid "Source: https://core.telegram.org/bots/api#sendvideonote" +msgstr "" + +#: ../../docstring aiogram.methods.send_video_note.SendVideoNote.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.send_video_note.SendVideoNote.video_note:1 +#: 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 "" + +#: ../../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 "" +"Unique identifier for the target message thread (topic) of the forum; for" +" forum supergroups only" +msgstr "" + +#: ../../docstring aiogram.methods.send_video_note.SendVideoNote.duration:1 of +msgid "Duration of sent video in seconds" +msgstr "" + +#: ../../docstring aiogram.methods.send_video_note.SendVideoNote.length:1 of +msgid "Video width and height, i.e. diameter of the video message" +msgstr "" + +#: ../../docstring aiogram.methods.send_video_note.SendVideoNote.thumbnail:1 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 "" + +#: ../../docstring +#: aiogram.methods.send_video_note.SendVideoNote.disable_notification:1 of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_video_note.SendVideoNote.protect_content:1 of +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" +msgstr "" + +#: ../../docstring aiogram.methods.send_video_note.SendVideoNote.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 "" + +#: ../../docstring +#: aiogram.methods.send_video_note.SendVideoNote.allow_sending_without_reply:1 +#: of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_video_note.SendVideoNote.allow_sending_without_reply:3 +#: aiogram.methods.send_video_note.SendVideoNote.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_video_note.SendVideoNote.reply_to_message_id:1 of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_video_note.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_video_note.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_video_note.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_video_note.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_video_note.rst:30 +msgid ":code:`from aiogram.methods.send_video_note import SendVideoNote`" +msgstr "" + +#: ../../api/methods/send_video_note.rst:31 +msgid "alias: :code:`from aiogram.methods import SendVideoNote`" +msgstr "" + +#: ../../api/methods/send_video_note.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_video_note.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_video_note.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_video_note.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_video_note`" +msgstr "" + +#: ../../api/methods/send_video_note.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_video_note`" +msgstr "" + +#: ../../api/methods/send_video_note.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note`" +msgstr "" + +#: ../../api/methods/send_video_note.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm`" +msgstr "" + +#: ../../api/methods/send_video_note.rst:55 +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 " +#~ "keyboard `_, " +#~ "`custom reply keyboard " +#~ "`_, instructions " +#~ "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 new file mode 100644 index 00000000..a053c60e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_voice.po @@ -0,0 +1,253 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/send_voice.rst:3 +msgid "sendVoice" +msgstr "" + +#: ../../api/methods/send_voice.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_voice.SendVoice:1 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.methods.send_voice.SendVoice:3 of +msgid "Source: https://core.telegram.org/bots/api#sendvoice" +msgstr "" + +#: ../../docstring aiogram.methods.send_voice.SendVoice.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.send_voice.SendVoice.voice:1 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 "" + +#: ../../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" +" forum supergroups only" +msgstr "" + +#: ../../docstring aiogram.methods.send_voice.SendVoice.caption:1 of +msgid "Voice message caption, 0-1024 characters after entities parsing" +msgstr "" + +#: ../../docstring aiogram.methods.send_voice.SendVoice.parse_mode:1 of +msgid "" +"Mode for parsing entities in the voice message caption. See `formatting " +"options `_ for " +"more details." +msgstr "" + +#: ../../docstring aiogram.methods.send_voice.SendVoice.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_voice.SendVoice.duration:1 of +msgid "Duration of the voice message in seconds" +msgstr "" + +#: ../../docstring aiogram.methods.send_voice.SendVoice.disable_notification:1 +#: of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring aiogram.methods.send_voice.SendVoice.protect_content:1 of +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 "" + +#: ../../docstring aiogram.methods.send_voice.SendVoice.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 "" + +#: ../../docstring +#: aiogram.methods.send_voice.SendVoice.allow_sending_without_reply:1 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_voice.SendVoice.allow_sending_without_reply:3 +#: aiogram.methods.send_voice.SendVoice.reply_to_message_id:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring aiogram.methods.send_voice.SendVoice.reply_to_message_id:1 +#: of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/methods/send_voice.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_voice.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_voice.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_voice.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_voice.rst:30 +msgid ":code:`from aiogram.methods.send_voice import SendVoice`" +msgstr "" + +#: ../../api/methods/send_voice.rst:31 +msgid "alias: :code:`from aiogram.methods import SendVoice`" +msgstr "" + +#: ../../api/methods/send_voice.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_voice.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_voice.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_voice.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_voice`" +msgstr "" + +#: ../../api/methods/send_voice.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_voice`" +msgstr "" + +#: ../../api/methods/send_voice.rst:53 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_voice`" +msgstr "" + +#: ../../api/methods/send_voice.rst:54 +msgid ":meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm`" +msgstr "" + +#: ../../api/methods/send_voice.rst:55 +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 " +#~ "keyboard `_, " +#~ "`custom reply keyboard " +#~ "`_, instructions " +#~ "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_administrator_custom_title.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_administrator_custom_title.po new file mode 100644 index 00000000..ee28db9b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_administrator_custom_title.po @@ -0,0 +1,102 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/set_chat_administrator_custom_title.rst:3 +msgid "setChatAdministratorCustomTitle" +msgstr "" + +#: ../../api/methods/set_chat_administrator_custom_title.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_chat_administrator_custom_title.SetChatAdministratorCustomTitle:1 +#: of +msgid "" +"Use this method to set a custom title for an administrator in a " +"supergroup promoted by the bot. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_chat_administrator_custom_title.SetChatAdministratorCustomTitle:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#setchatadministratorcustomtitle" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_chat_administrator_custom_title.SetChatAdministratorCustomTitle.chat_id:1 +#: of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_chat_administrator_custom_title.SetChatAdministratorCustomTitle.user_id:1 +#: of +msgid "Unique identifier of the target user" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_chat_administrator_custom_title.SetChatAdministratorCustomTitle.custom_title:1 +#: of +msgid "" +"New custom title for the administrator; 0-16 characters, emoji are not " +"allowed" +msgstr "" + +#: ../../api/methods/set_chat_administrator_custom_title.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_chat_administrator_custom_title.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_chat_administrator_custom_title.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_chat_administrator_custom_title.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_chat_administrator_custom_title.rst:29 +msgid "" +":code:`from aiogram.methods.set_chat_administrator_custom_title import " +"SetChatAdministratorCustomTitle`" +msgstr "" + +#: ../../api/methods/set_chat_administrator_custom_title.rst:30 +msgid "alias: :code:`from aiogram.methods import SetChatAdministratorCustomTitle`" +msgstr "" + +#: ../../api/methods/set_chat_administrator_custom_title.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_chat_administrator_custom_title.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/set_chat_administrator_custom_title.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/set_chat_administrator_custom_title.rst:50 +msgid ":meth:`aiogram.types.chat.Chat.set_administrator_custom_title`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_description.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_description.po new file mode 100644 index 00000000..3c42acee --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_description.po @@ -0,0 +1,92 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/set_chat_description.rst:3 +msgid "setChatDescription" +msgstr "" + +#: ../../api/methods/set_chat_description.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_chat_description.SetChatDescription:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.set_chat_description.SetChatDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#setchatdescription" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_chat_description.SetChatDescription.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.set_chat_description.SetChatDescription.description:1 of +msgid "New chat description, 0-255 characters" +msgstr "" + +#: ../../api/methods/set_chat_description.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_chat_description.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_chat_description.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_chat_description.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_chat_description.rst:29 +msgid "" +":code:`from aiogram.methods.set_chat_description import " +"SetChatDescription`" +msgstr "" + +#: ../../api/methods/set_chat_description.rst:30 +msgid "alias: :code:`from aiogram.methods import SetChatDescription`" +msgstr "" + +#: ../../api/methods/set_chat_description.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_chat_description.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/set_chat_description.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/set_chat_description.rst:50 +msgid ":meth:`aiogram.types.chat.Chat.set_description`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_menu_button.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_menu_button.po new file mode 100644 index 00000000..b40236df --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_menu_button.po @@ -0,0 +1,82 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/methods/set_chat_menu_button.rst:3 +msgid "setChatMenuButton" +msgstr "" + +#: ../../api/methods/set_chat_menu_button.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_chat_menu_button.SetChatMenuButton:1 of +msgid "" +"Use this method to change the bot's menu button in a private chat, or the" +" default menu button. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_chat_menu_button.SetChatMenuButton:3 of +msgid "Source: https://core.telegram.org/bots/api#setchatmenubutton" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_chat_menu_button.SetChatMenuButton.chat_id:1 of +msgid "" +"Unique identifier for the target private chat. If not specified, default " +"bot's menu button will be changed" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_chat_menu_button.SetChatMenuButton.menu_button:1 of +msgid "" +"A JSON-serialized object for the bot's new menu button. Defaults to " +":class:`aiogram.types.menu_button_default.MenuButtonDefault`" +msgstr "" + +#: ../../api/methods/set_chat_menu_button.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_chat_menu_button.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_chat_menu_button.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_chat_menu_button.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_chat_menu_button.rst:29 +msgid ":code:`from aiogram.methods.set_chat_menu_button import SetChatMenuButton`" +msgstr "" + +#: ../../api/methods/set_chat_menu_button.rst:30 +msgid "alias: :code:`from aiogram.methods import SetChatMenuButton`" +msgstr "" + +#: ../../api/methods/set_chat_menu_button.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_chat_menu_button.rst:40 +msgid "As reply into Webhook in handler" +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 new file mode 100644 index 00000000..b4f95788 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_permissions.po @@ -0,0 +1,105 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-02-12 00:22+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" + +#: ../../api/methods/set_chat_permissions.rst:3 +msgid "setChatPermissions" +msgstr "" + +#: ../../api/methods/set_chat_permissions.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_chat_permissions.SetChatPermissions:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.set_chat_permissions.SetChatPermissions:3 of +msgid "Source: https://core.telegram.org/bots/api#setchatpermissions" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_chat_permissions.SetChatPermissions.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_chat_permissions.SetChatPermissions.permissions:1 of +msgid "A JSON-serialized object for new default chat permissions" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_chat_permissions.SetChatPermissions.use_independent_chat_permissions:1 +#: of +msgid "" +"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." +msgstr "" + +#: ../../api/methods/set_chat_permissions.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_chat_permissions.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_chat_permissions.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_chat_permissions.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_chat_permissions.rst:29 +msgid "" +":code:`from aiogram.methods.set_chat_permissions import " +"SetChatPermissions`" +msgstr "" + +#: ../../api/methods/set_chat_permissions.rst:30 +msgid "alias: :code:`from aiogram.methods import SetChatPermissions`" +msgstr "" + +#: ../../api/methods/set_chat_permissions.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_chat_permissions.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/set_chat_permissions.rst:48 +msgid "As shortcut from received object" +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_chat_photo.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_photo.po new file mode 100644 index 00000000..ab0cc9a7 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_photo.po @@ -0,0 +1,84 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/set_chat_photo.rst:3 +msgid "setChatPhoto" +msgstr "" + +#: ../../api/methods/set_chat_photo.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_chat_photo.SetChatPhoto:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.set_chat_photo.SetChatPhoto:3 of +msgid "Source: https://core.telegram.org/bots/api#setchatphoto" +msgstr "" + +#: ../../docstring aiogram.methods.set_chat_photo.SetChatPhoto.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.set_chat_photo.SetChatPhoto.photo:1 of +msgid "New chat photo, uploaded using multipart/form-data" +msgstr "" + +#: ../../api/methods/set_chat_photo.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_chat_photo.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_chat_photo.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_chat_photo.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_chat_photo.rst:29 +msgid ":code:`from aiogram.methods.set_chat_photo import SetChatPhoto`" +msgstr "" + +#: ../../api/methods/set_chat_photo.rst:30 +msgid "alias: :code:`from aiogram.methods import SetChatPhoto`" +msgstr "" + +#: ../../api/methods/set_chat_photo.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_chat_photo.rst:43 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/set_chat_photo.rst:45 +msgid ":meth:`aiogram.types.chat.Chat.set_photo`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_sticker_set.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_sticker_set.po new file mode 100644 index 00000000..b5441109 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_sticker_set.po @@ -0,0 +1,92 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/set_chat_sticker_set.rst:3 +msgid "setChatStickerSet" +msgstr "" + +#: ../../api/methods/set_chat_sticker_set.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_chat_sticker_set.SetChatStickerSet:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.set_chat_sticker_set.SetChatStickerSet:3 of +msgid "Source: https://core.telegram.org/bots/api#setchatstickerset" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_chat_sticker_set.SetChatStickerSet.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_chat_sticker_set.SetChatStickerSet.sticker_set_name:1 of +msgid "Name of the sticker set to be set as the group sticker set" +msgstr "" + +#: ../../api/methods/set_chat_sticker_set.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_chat_sticker_set.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_chat_sticker_set.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_chat_sticker_set.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_chat_sticker_set.rst:29 +msgid ":code:`from aiogram.methods.set_chat_sticker_set import SetChatStickerSet`" +msgstr "" + +#: ../../api/methods/set_chat_sticker_set.rst:30 +msgid "alias: :code:`from aiogram.methods import SetChatStickerSet`" +msgstr "" + +#: ../../api/methods/set_chat_sticker_set.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_chat_sticker_set.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/set_chat_sticker_set.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/set_chat_sticker_set.rst:50 +msgid ":meth:`aiogram.types.chat.Chat.set_sticker_set`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_title.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_title.po new file mode 100644 index 00000000..da3c936e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_title.po @@ -0,0 +1,91 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/set_chat_title.rst:3 +msgid "setChatTitle" +msgstr "" + +#: ../../api/methods/set_chat_title.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_chat_title.SetChatTitle:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.set_chat_title.SetChatTitle:3 of +msgid "Source: https://core.telegram.org/bots/api#setchattitle" +msgstr "" + +#: ../../docstring aiogram.methods.set_chat_title.SetChatTitle.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.set_chat_title.SetChatTitle.title:1 of +msgid "New chat title, 1-128 characters" +msgstr "" + +#: ../../api/methods/set_chat_title.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_chat_title.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_chat_title.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_chat_title.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_chat_title.rst:29 +msgid ":code:`from aiogram.methods.set_chat_title import SetChatTitle`" +msgstr "" + +#: ../../api/methods/set_chat_title.rst:30 +msgid "alias: :code:`from aiogram.methods import SetChatTitle`" +msgstr "" + +#: ../../api/methods/set_chat_title.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_chat_title.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/set_chat_title.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/set_chat_title.rst:50 +msgid ":meth:`aiogram.types.chat.Chat.set_title`" +msgstr "" + +#~ msgid "New chat title, 1-255 characters" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_custom_emoji_sticker_set_thumbnail.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_custom_emoji_sticker_set_thumbnail.po new file mode 100644 index 00000000..afadc9a2 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_custom_emoji_sticker_set_thumbnail.po @@ -0,0 +1,90 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+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" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:3 +msgid "setCustomEmojiStickerSetThumbnail" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_custom_emoji_sticker_set_thumbnail.SetCustomEmojiStickerSetThumbnail:1 +#: of +msgid "" +"Use this method to set the thumbnail of a custom emoji sticker set. " +"Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_custom_emoji_sticker_set_thumbnail.SetCustomEmojiStickerSetThumbnail:3 +#: of +msgid "" +"Source: " +"https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_custom_emoji_sticker_set_thumbnail.SetCustomEmojiStickerSetThumbnail.name:1 +#: of +msgid "Sticker set name" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_custom_emoji_sticker_set_thumbnail.SetCustomEmojiStickerSetThumbnail.custom_emoji_id:1 +#: of +msgid "" +"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." +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:29 +msgid "" +":code:`from aiogram.methods.set_custom_emoji_sticker_set_thumbnail import" +" SetCustomEmojiStickerSetThumbnail`" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:30 +msgid "" +"alias: :code:`from aiogram.methods import " +"SetCustomEmojiStickerSetThumbnail`" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_game_score.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_game_score.po new file mode 100644 index 00000000..215ab0ab --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_game_score.po @@ -0,0 +1,112 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/methods/set_game_score.rst:3 +msgid "setGameScore" +msgstr "" + +#: ../../api/methods/set_game_score.rst:5 +msgid "Returns: :obj:`Union[Message, bool]`" +msgstr "" + +#: aiogram.methods.set_game_score.SetGameScore:1 of +msgid "" +"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`." +msgstr "" + +#: aiogram.methods.set_game_score.SetGameScore:3 of +msgid "Source: https://core.telegram.org/bots/api#setgamescore" +msgstr "" + +#: ../../docstring aiogram.methods.set_game_score.SetGameScore.user_id:1 of +msgid "User identifier" +msgstr "" + +#: ../../docstring aiogram.methods.set_game_score.SetGameScore.score:1 of +msgid "New score, must be non-negative" +msgstr "" + +#: ../../docstring aiogram.methods.set_game_score.SetGameScore.force:1 of +msgid "" +"Pass :code:`True` if the high score is allowed to decrease. This can be " +"useful when fixing mistakes or banning cheaters" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_game_score.SetGameScore.disable_edit_message:1 of +msgid "" +"Pass :code:`True` if the game message should not be automatically edited " +"to include the current scoreboard" +msgstr "" + +#: ../../docstring aiogram.methods.set_game_score.SetGameScore.chat_id:1 of +msgid "" +"Required if *inline_message_id* is not specified. Unique identifier for " +"the target chat" +msgstr "" + +#: ../../docstring aiogram.methods.set_game_score.SetGameScore.message_id:1 of +msgid "" +"Required if *inline_message_id* is not specified. Identifier of the sent " +"message" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_game_score.SetGameScore.inline_message_id:1 of +msgid "" +"Required if *chat_id* and *message_id* are not specified. Identifier of " +"the inline message" +msgstr "" + +#: ../../api/methods/set_game_score.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_game_score.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_game_score.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_game_score.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_game_score.rst:29 +msgid ":code:`from aiogram.methods.set_game_score import SetGameScore`" +msgstr "" + +#: ../../api/methods/set_game_score.rst:30 +msgid "alias: :code:`from aiogram.methods import SetGameScore`" +msgstr "" + +#: ../../api/methods/set_game_score.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_game_score.rst:40 +msgid "As reply into Webhook in handler" +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 new file mode 100644 index 00000000..748073fa --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_message_reaction.po @@ -0,0 +1,136 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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_message_reaction.rst:3 +msgid "setMessageReaction" +msgstr "" + +#: ../../api/methods/set_message_reaction.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_message_reaction.SetMessageReaction:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.set_message_reaction.SetMessageReaction:3 of +msgid "Source: https://core.telegram.org/bots/api#setmessagereaction" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_message_reaction.SetMessageReaction.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.set_message_reaction.SetMessageReaction.message_id:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_message_reaction.SetMessageReaction.reaction:1 of +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 "" + +#: ../../docstring +#: aiogram.methods.set_message_reaction.SetMessageReaction.is_big:1 of +msgid "Pass :code:`True` to set the reaction with a big animation" +msgstr "" + +#: ../../api/methods/set_message_reaction.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_message_reaction.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_message_reaction.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_message_reaction.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_message_reaction.rst:30 +msgid "" +":code:`from aiogram.methods.set_message_reaction import " +"SetMessageReaction`" +msgstr "" + +#: ../../api/methods/set_message_reaction.rst:31 +msgid "alias: :code:`from aiogram.methods import SetMessageReaction`" +msgstr "" + +#: ../../api/methods/set_message_reaction.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_message_reaction.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/set_message_reaction.rst:49 +msgid "As shortcut from received object" +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_my_commands.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_commands.po new file mode 100644 index 00000000..8a9400fb --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_commands.po @@ -0,0 +1,100 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-06 14:18+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" + +#: ../../api/methods/set_my_commands.rst:3 +msgid "setMyCommands" +msgstr "" + +#: ../../api/methods/set_my_commands.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_my_commands.SetMyCommands:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.set_my_commands.SetMyCommands:3 of +msgid "Source: https://core.telegram.org/bots/api#setmycommands" +msgstr "" + +#: ../../docstring aiogram.methods.set_my_commands.SetMyCommands.commands:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring aiogram.methods.set_my_commands.SetMyCommands.scope:1 of +msgid "" +"A JSON-serialized object, describing scope of users for which the " +"commands are relevant. Defaults to " +":class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`." +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_my_commands.SetMyCommands.language_code:1 of +msgid "" +"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" +msgstr "" + +#: ../../api/methods/set_my_commands.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_my_commands.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_my_commands.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_my_commands.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_my_commands.rst:29 +msgid ":code:`from aiogram.methods.set_my_commands import SetMyCommands`" +msgstr "" + +#: ../../api/methods/set_my_commands.rst:30 +msgid "alias: :code:`from aiogram.methods import SetMyCommands`" +msgstr "" + +#: ../../api/methods/set_my_commands.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_my_commands.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#~ msgid "" +#~ "Use this method to change the list" +#~ " of the bot's commands. See " +#~ "`https://core.telegram.org/bots#commands " +#~ "`_`https://core.telegram.org/bots#commands" +#~ " `_ for more" +#~ " details about bot commands. Returns " +#~ ":code:`True` on success." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_default_administrator_rights.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_default_administrator_rights.po new file mode 100644 index 00000000..1eff9f9a --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_default_administrator_rights.po @@ -0,0 +1,102 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+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" + +#: ../../api/methods/set_my_default_administrator_rights.rst:3 +msgid "setMyDefaultAdministratorRights" +msgstr "" + +#: ../../api/methods/set_my_default_administrator_rights.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_my_default_administrator_rights.SetMyDefaultAdministratorRights:1 +#: of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.set_my_default_administrator_rights.SetMyDefaultAdministratorRights:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#setmydefaultadministratorrights" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_my_default_administrator_rights.SetMyDefaultAdministratorRights.rights:1 +#: of +msgid "" +"A JSON-serialized object describing new default administrator rights. If " +"not specified, the default administrator rights will be cleared." +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_my_default_administrator_rights.SetMyDefaultAdministratorRights.for_channels:1 +#: of +msgid "" +"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." +msgstr "" + +#: ../../api/methods/set_my_default_administrator_rights.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_my_default_administrator_rights.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_my_default_administrator_rights.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_my_default_administrator_rights.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_my_default_administrator_rights.rst:29 +msgid "" +":code:`from aiogram.methods.set_my_default_administrator_rights import " +"SetMyDefaultAdministratorRights`" +msgstr "" + +#: ../../api/methods/set_my_default_administrator_rights.rst:30 +msgid "alias: :code:`from aiogram.methods import SetMyDefaultAdministratorRights`" +msgstr "" + +#: ../../api/methods/set_my_default_administrator_rights.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_my_default_administrator_rights.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_description.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_description.po new file mode 100644 index 00000000..b266de07 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_description.po @@ -0,0 +1,83 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+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" + +#: ../../api/methods/set_my_description.rst:3 +msgid "setMyDescription" +msgstr "" + +#: ../../api/methods/set_my_description.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_my_description.SetMyDescription:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.set_my_description.SetMyDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#setmydescription" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_my_description.SetMyDescription.description:1 of +msgid "" +"New bot description; 0-512 characters. Pass an empty string to remove the" +" dedicated description for the given language." +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_my_description.SetMyDescription.language_code:1 of +msgid "" +"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." +msgstr "" + +#: ../../api/methods/set_my_description.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_my_description.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_my_description.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_my_description.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_my_description.rst:29 +msgid ":code:`from aiogram.methods.set_my_description import SetMyDescription`" +msgstr "" + +#: ../../api/methods/set_my_description.rst:30 +msgid "alias: :code:`from aiogram.methods import SetMyDescription`" +msgstr "" + +#: ../../api/methods/set_my_description.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_my_description.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_name.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_name.po new file mode 100644 index 00000000..b5befc8d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_name.po @@ -0,0 +1,78 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, 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: 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" + +#: ../../api/methods/set_my_name.rst:3 +msgid "setMyName" +msgstr "" + +#: ../../api/methods/set_my_name.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_my_name.SetMyName:1 of +msgid "Use this method to change the bot's name. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_my_name.SetMyName:3 of +msgid "Source: https://core.telegram.org/bots/api#setmyname" +msgstr "" + +#: ../../docstring aiogram.methods.set_my_name.SetMyName.name:1 of +msgid "" +"New bot name; 0-64 characters. Pass an empty string to remove the " +"dedicated name for the given language." +msgstr "" + +#: ../../docstring aiogram.methods.set_my_name.SetMyName.language_code:1 of +msgid "" +"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." +msgstr "" + +#: ../../api/methods/set_my_name.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_my_name.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_my_name.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_my_name.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_my_name.rst:29 +msgid ":code:`from aiogram.methods.set_my_name import SetMyName`" +msgstr "" + +#: ../../api/methods/set_my_name.rst:30 +msgid "alias: :code:`from aiogram.methods import SetMyName`" +msgstr "" + +#: ../../api/methods/set_my_name.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_my_name.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_short_description.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_short_description.po new file mode 100644 index 00000000..eb4e343b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_short_description.po @@ -0,0 +1,88 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+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" + +#: ../../api/methods/set_my_short_description.rst:3 +msgid "setMyShortDescription" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_my_short_description.SetMyShortDescription:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.set_my_short_description.SetMyShortDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#setmyshortdescription" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_my_short_description.SetMyShortDescription.short_description:1 +#: of +msgid "" +"New short description for the bot; 0-120 characters. Pass an empty string" +" to remove the dedicated short description for the given language." +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_my_short_description.SetMyShortDescription.language_code:1 +#: of +msgid "" +"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." +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:29 +msgid "" +":code:`from aiogram.methods.set_my_short_description import " +"SetMyShortDescription`" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:30 +msgid "alias: :code:`from aiogram.methods import SetMyShortDescription`" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_passport_data_errors.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_passport_data_errors.po new file mode 100644 index 00000000..5fb2b563 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_passport_data_errors.po @@ -0,0 +1,87 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/methods/set_passport_data_errors.rst:3 +msgid "setPassportDataErrors" +msgstr "" + +#: ../../api/methods/set_passport_data_errors.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_passport_data_errors.SetPassportDataErrors:1 of +msgid "" +"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. Use " +"this if the data submitted by the user doesn't satisfy the standards your" +" service requires for any reason. For example, if a birthday date seems " +"invalid, a submitted document is blurry, a scan shows evidence of " +"tampering, etc. Supply some details in the error message to make sure the" +" user knows how to correct the issues." +msgstr "" + +#: aiogram.methods.set_passport_data_errors.SetPassportDataErrors:4 of +msgid "Source: https://core.telegram.org/bots/api#setpassportdataerrors" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_passport_data_errors.SetPassportDataErrors.user_id:1 of +msgid "User identifier" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_passport_data_errors.SetPassportDataErrors.errors:1 of +msgid "A JSON-serialized array describing the errors" +msgstr "" + +#: ../../api/methods/set_passport_data_errors.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_passport_data_errors.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_passport_data_errors.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_passport_data_errors.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_passport_data_errors.rst:29 +msgid "" +":code:`from aiogram.methods.set_passport_data_errors import " +"SetPassportDataErrors`" +msgstr "" + +#: ../../api/methods/set_passport_data_errors.rst:30 +msgid "alias: :code:`from aiogram.methods import SetPassportDataErrors`" +msgstr "" + +#: ../../api/methods/set_passport_data_errors.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_passport_data_errors.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_emoji_list.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_emoji_list.po new file mode 100644 index 00000000..ad3536b3 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_emoji_list.po @@ -0,0 +1,81 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+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" + +#: ../../api/methods/set_sticker_emoji_list.rst:3 +msgid "setStickerEmojiList" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_sticker_emoji_list.SetStickerEmojiList:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.set_sticker_emoji_list.SetStickerEmojiList:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickeremojilist" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_emoji_list.SetStickerEmojiList.sticker:1 of +msgid "File identifier of the sticker" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_emoji_list.SetStickerEmojiList.emoji_list:1 of +msgid "A JSON-serialized list of 1-20 emoji associated with the sticker" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:29 +msgid "" +":code:`from aiogram.methods.set_sticker_emoji_list import " +"SetStickerEmojiList`" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:30 +msgid "alias: :code:`from aiogram.methods import SetStickerEmojiList`" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_keywords.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_keywords.po new file mode 100644 index 00000000..22dfb120 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_keywords.po @@ -0,0 +1,83 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+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" + +#: ../../api/methods/set_sticker_keywords.rst:3 +msgid "setStickerKeywords" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_sticker_keywords.SetStickerKeywords:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.set_sticker_keywords.SetStickerKeywords:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickerkeywords" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_keywords.SetStickerKeywords.sticker:1 of +msgid "File identifier of the sticker" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_keywords.SetStickerKeywords.keywords:1 of +msgid "" +"A JSON-serialized list of 0-20 search keywords for the sticker with total" +" length of up to 64 characters" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:29 +msgid "" +":code:`from aiogram.methods.set_sticker_keywords import " +"SetStickerKeywords`" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:30 +msgid "alias: :code:`from aiogram.methods import SetStickerKeywords`" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_mask_position.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_mask_position.po new file mode 100644 index 00000000..8efc08ba --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_mask_position.po @@ -0,0 +1,86 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+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" + +#: ../../api/methods/set_sticker_mask_position.rst:3 +msgid "setStickerMaskPosition" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_sticker_mask_position.SetStickerMaskPosition:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.set_sticker_mask_position.SetStickerMaskPosition:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickermaskposition" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_mask_position.SetStickerMaskPosition.sticker:1 +#: of +msgid "File identifier of the sticker" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_mask_position.SetStickerMaskPosition.mask_position:1 +#: of +msgid "" +"A JSON-serialized object with the position where the mask should be " +"placed on faces. Omit the parameter to remove the mask position." +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:29 +msgid "" +":code:`from aiogram.methods.set_sticker_mask_position import " +"SetStickerMaskPosition`" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:30 +msgid "alias: :code:`from aiogram.methods import SetStickerMaskPosition`" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_position_in_set.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_position_in_set.po new file mode 100644 index 00000000..c7ef9e7e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_position_in_set.po @@ -0,0 +1,90 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/set_sticker_position_in_set.rst:3 +msgid "setStickerPositionInSet" +msgstr "" + +#: ../../api/methods/set_sticker_position_in_set.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet:1 of +msgid "" +"Use this method to move a sticker in a set created by the bot to a " +"specific position. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickerpositioninset" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet.sticker:1 +#: of +msgid "File identifier of the sticker" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet.position:1 +#: of +msgid "New sticker position in the set, zero-based" +msgstr "" + +#: ../../api/methods/set_sticker_position_in_set.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_sticker_position_in_set.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_sticker_position_in_set.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_position_in_set.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_sticker_position_in_set.rst:29 +msgid "" +":code:`from aiogram.methods.set_sticker_position_in_set import " +"SetStickerPositionInSet`" +msgstr "" + +#: ../../api/methods/set_sticker_position_in_set.rst:30 +msgid "alias: :code:`from aiogram.methods import SetStickerPositionInSet`" +msgstr "" + +#: ../../api/methods/set_sticker_position_in_set.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_sticker_position_in_set.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/set_sticker_position_in_set.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/set_sticker_position_in_set.rst:50 +msgid ":meth:`aiogram.types.sticker.Sticker.set_position_in_set`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumb.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumb.po new file mode 100644 index 00000000..786b6309 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumb.po @@ -0,0 +1,136 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-06-01 20:49+0300\n" +"PO-Revision-Date: 2023-09-14 17:37+0300\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: uk\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" +"X-Generator: Poedit 3.3.2\n" + +#: ../../api/methods/set_sticker_set_thumb.rst:3 +msgid "setStickerSetThumb" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumb.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "Повертає: :obj:`bool`" + +#: aiogram.methods.set_sticker_set_thumb.SetStickerSetThumbnail:1 of +msgid "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." +msgstr "Використовуйте цей метод, щоб встановити мініатюру звичайного або маскового набору стікерів. Формат файлу мініатюри повинен відповідати формату стікерів у наборі. Повертає :code:`True` при успіху." + +#: aiogram.methods.set_sticker_set_thumb.SetStickerSetThumbnail:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickersetthumbnail" +msgstr "Джерело: https://core.telegram.org/bots/api#setstickersetthumbnail" + +#: ../../docstring +#: aiogram.methods.set_sticker_set_thumb.SetStickerSetThumbnail.name:1 of +msgid "Sticker set name" +msgstr "Назва набору стікерів" + +#: ../../docstring +#: aiogram.methods.set_sticker_set_thumb.SetStickerSetThumbnail.user_id:1 of +msgid "User identifier of the sticker set owner" +msgstr "Ідентифікатор користувача власника набору стікерів " + +#: ../../docstring +#: aiogram.methods.set_sticker_set_thumb.SetStickerSetThumbnail.thumbnail:1 of +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 "Зображення у форматі **.WEBP** або **.PNG** з мініатюрою має бути розміром до 128 кілобайт і мати ширину та висоту рівно 100 пікселів, або анімацією у форматі **.TGS** з мініатюрою розміром до 32 кілобайт (див. `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ технічні вимоги до анімованих наліпок), або **WEBM** відео з мініатюрою розміром до 32 кілобайт; дивіться `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ технічні вимоги до відео наліпок. Передайте *file_id* як рядок, щоб надіслати файл, який вже існує на серверах Telegram, передайте HTTP URL як рядок, щоб Telegram отримав файл з Інтернету, або завантажте новий файл за допомогою мультичастини/форма-даних. :ref:`Додаткова інформація про надсилання файлів \" `. Ескізи анімованих і відео-наборів наклейок не можуть бути завантажені через HTTP URL. Якщо цей параметр не вказано, то мініатюру буде вилучено, а замість неї буде використано першу наліпку." + +#: ../../api/methods/set_sticker_set_thumb.rst:14 +msgid "Usage" +msgstr "Використання" + +#: ../../api/methods/set_sticker_set_thumb.rst:17 +msgid "As bot method" +msgstr "Як метод в bot" + +#: ../../api/methods/set_sticker_set_thumb.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumb.rst:27 +msgid "Imports:" +msgstr "Імпорти:" + +#: ../../api/methods/set_sticker_set_thumb.rst:29 +msgid ":code:`from aiogram.methods.set_sticker_set_thumb import SetStickerSetThumb`" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumb.rst:30 +msgid "alias: :code:`from aiogram.methods import SetStickerSetThumb`" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumb.rst:33 +msgid "With specific bot" +msgstr "З конкретним bot" + +#: ../../api/methods/set_sticker_set_thumb.rst:40 +msgid "As reply into Webhook in handler" +msgstr "Як відповідь у Webhook в обробнику" + +#~ msgid "" +#~ "Use this method to set the " +#~ "thumbnail of a sticker set. Animated " +#~ "thumbnails can be set for animated " +#~ "sticker sets only. Video thumbnails can" +#~ " be set only for video sticker " +#~ "sets only. Returns :code:`True` on " +#~ "success." +#~ msgstr "" + +#~ msgid "Source: https://core.telegram.org/bots/api#setstickersetthumb" +#~ msgstr "" + +#~ msgid "Sticker set name" +#~ msgstr "" + +#~ msgid "User identifier of the sticker set owner" +#~ msgstr "" + +#~ msgid "" +#~ "A **PNG** image with the thumbnail, " +#~ "must be up to 128 kilobytes in " +#~ "size and have width and height " +#~ "exactly 100px, or a **TGS** animation" +#~ " with the 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 sticker set " +#~ "thumbnails can't be uploaded via HTTP" +#~ " URL." +#~ 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 new file mode 100644 index 00000000..875a35cb --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumbnail.po @@ -0,0 +1,154 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, 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-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.13.1\n" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:3 +msgid "setStickerSetThumbnail" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_sticker_set_thumbnail.SetStickerSetThumbnail:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.set_sticker_set_thumbnail.SetStickerSetThumbnail:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickersetthumbnail" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_set_thumbnail.SetStickerSetThumbnail.name:1 of +msgid "Sticker set name" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_set_thumbnail.SetStickerSetThumbnail.user_id:1 +#: of +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 +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#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:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../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:31 +msgid "alias: :code:`from aiogram.methods import SetStickerSetThumbnail`" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../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_sticker_set_title.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_title.po new file mode 100644 index 00000000..fb27fdfc --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_title.po @@ -0,0 +1,80 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+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" + +#: ../../api/methods/set_sticker_set_title.rst:3 +msgid "setStickerSetTitle" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_sticker_set_title.SetStickerSetTitle:1 of +msgid "" +"Use this method to set the title of a created sticker set. Returns " +":code:`True` on success." +msgstr "" + +#: aiogram.methods.set_sticker_set_title.SetStickerSetTitle:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickersettitle" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_set_title.SetStickerSetTitle.name:1 of +msgid "Sticker set name" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_set_title.SetStickerSetTitle.title:1 of +msgid "Sticker set title, 1-64 characters" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:29 +msgid "" +":code:`from aiogram.methods.set_sticker_set_title import " +"SetStickerSetTitle`" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:30 +msgid "alias: :code:`from aiogram.methods import SetStickerSetTitle`" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:40 +msgid "As reply into Webhook in handler" +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 new file mode 100644 index 00000000..be21c6bd --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_webhook.po @@ -0,0 +1,205 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/set_webhook.rst:3 +msgid "setWebhook" +msgstr "" + +#: ../../api/methods/set_webhook.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_webhook.SetWebhook:1 of +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 " +"(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 +msgid "**Notes**" +msgstr "" + +#: aiogram.methods.set_webhook.SetWebhook:6 of +msgid "" +"**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." +msgstr "" + +#: aiogram.methods.set_webhook.SetWebhook:8 of +msgid "" +"**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." +msgstr "" + +#: aiogram.methods.set_webhook.SetWebhook:10 of +msgid "" +"**3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**. " +"If you're having any trouble setting up webhooks, please check out this " +"`amazing guide to webhooks `_." +msgstr "" + +#: aiogram.methods.set_webhook.SetWebhook:13 of +msgid "Source: https://core.telegram.org/bots/api#setwebhook" +msgstr "" + +#: ../../docstring aiogram.methods.set_webhook.SetWebhook.url:1 of +msgid "" +"HTTPS URL to send updates to. Use an empty string to remove webhook " +"integration" +msgstr "" + +#: ../../docstring aiogram.methods.set_webhook.SetWebhook.certificate:1 of +msgid "" +"Upload your public key certificate so that the root certificate in use " +"can be checked. See our `self-signed guide " +"`_ for details." +msgstr "" + +#: ../../docstring aiogram.methods.set_webhook.SetWebhook.ip_address:1 of +msgid "" +"The fixed IP address which will be used to send webhook requests instead " +"of the IP address resolved through DNS" +msgstr "" + +#: ../../docstring aiogram.methods.set_webhook.SetWebhook.max_connections:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring aiogram.methods.set_webhook.SetWebhook.allowed_updates:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_webhook.SetWebhook.drop_pending_updates:1 of +msgid "Pass :code:`True` to drop all pending updates" +msgstr "" + +#: ../../docstring aiogram.methods.set_webhook.SetWebhook.secret_token:1 of +msgid "" +"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." +msgstr "" + +#: ../../api/methods/set_webhook.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_webhook.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_webhook.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_webhook.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_webhook.rst:30 +msgid ":code:`from aiogram.methods.set_webhook import SetWebhook`" +msgstr "" + +#: ../../api/methods/set_webhook.rst:31 +msgid "alias: :code:`from aiogram.methods import SetWebhook`" +msgstr "" + +#: ../../api/methods/set_webhook.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_webhook.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#~ msgid "" +#~ "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" +#~ " :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* " +#~ "(default). If not specified, the " +#~ "previous setting will be used." +#~ msgstr "" + +#~ msgid "" +#~ "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* " +#~ "(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 new file mode 100644 index 00000000..f4cec80d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/stop_message_live_location.po @@ -0,0 +1,131 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/stop_message_live_location.rst:3 +msgid "stopMessageLiveLocation" +msgstr "" + +#: ../../api/methods/stop_message_live_location.rst:5 +msgid "Returns: :obj:`Union[Message, bool]`" +msgstr "" + +#: aiogram.methods.stop_message_live_location.StopMessageLiveLocation:1 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 " +"message, the edited :class:`aiogram.types.message.Message` is returned, " +"otherwise :code:`True` is returned." +msgstr "" + +#: aiogram.methods.stop_message_live_location.StopMessageLiveLocation:3 of +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 +msgid "" +"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`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.stop_message_live_location.StopMessageLiveLocation.message_id:1 +#: of +msgid "" +"Required if *inline_message_id* is not specified. Identifier of the " +"message with live location to stop" +msgstr "" + +#: ../../docstring +#: aiogram.methods.stop_message_live_location.StopMessageLiveLocation.inline_message_id:1 +#: of +msgid "" +"Required if *chat_id* and *message_id* are not specified. Identifier of " +"the inline message" +msgstr "" + +#: ../../docstring +#: aiogram.methods.stop_message_live_location.StopMessageLiveLocation.reply_markup:1 +#: of +msgid "" +"A JSON-serialized object for a new `inline keyboard " +"`_." +msgstr "" + +#: ../../api/methods/stop_message_live_location.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/stop_message_live_location.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/stop_message_live_location.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/stop_message_live_location.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../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:31 +msgid "alias: :code:`from aiogram.methods import StopMessageLiveLocation`" +msgstr "" + +#: ../../api/methods/stop_message_live_location.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/stop_message_live_location.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/stop_message_live_location.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/stop_message_live_location.rst:51 +msgid ":meth:`aiogram.types.message.Message.stop_live_location`" +msgstr "" + +#~ msgid "" +#~ "A JSON-serialized object for a new" +#~ " `inline keyboard `_." +#~ msgstr "" + +#~ msgid "As message method" +#~ 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 new file mode 100644 index 00000000..ee32a02e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/stop_poll.po @@ -0,0 +1,91 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/stop_poll.rst:3 +msgid "stopPoll" +msgstr "" + +#: ../../api/methods/stop_poll.rst:5 +msgid "Returns: :obj:`Poll`" +msgstr "" + +#: aiogram.methods.stop_poll.StopPoll:1 of +msgid "" +"Use this method to stop a poll which was sent by the bot. On success, the" +" stopped :class:`aiogram.types.poll.Poll` is returned." +msgstr "" + +#: aiogram.methods.stop_poll.StopPoll:3 of +msgid "Source: https://core.telegram.org/bots/api#stoppoll" +msgstr "" + +#: ../../docstring aiogram.methods.stop_poll.StopPoll.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.stop_poll.StopPoll.message_id:1 of +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:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/stop_poll.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/stop_poll.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/stop_poll.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/stop_poll.rst:30 +msgid ":code:`from aiogram.methods.stop_poll import StopPoll`" +msgstr "" + +#: ../../api/methods/stop_poll.rst:31 +msgid "alias: :code:`from aiogram.methods import StopPoll`" +msgstr "" + +#: ../../api/methods/stop_poll.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../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/unban_chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unban_chat_member.po new file mode 100644 index 00000000..1485077b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unban_chat_member.po @@ -0,0 +1,99 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/unban_chat_member.rst:3 +msgid "unbanChatMember" +msgstr "" + +#: ../../api/methods/unban_chat_member.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.unban_chat_member.UnbanChatMember:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.unban_chat_member.UnbanChatMember:3 of +msgid "Source: https://core.telegram.org/bots/api#unbanchatmember" +msgstr "" + +#: ../../docstring aiogram.methods.unban_chat_member.UnbanChatMember.chat_id:1 +#: of +msgid "" +"Unique identifier for the target group or username of the target " +"supergroup or channel (in the format :code:`@channelusername`)" +msgstr "" + +#: ../../docstring aiogram.methods.unban_chat_member.UnbanChatMember.user_id:1 +#: of +msgid "Unique identifier of the target user" +msgstr "" + +#: ../../docstring +#: aiogram.methods.unban_chat_member.UnbanChatMember.only_if_banned:1 of +msgid "Do nothing if the user is not banned" +msgstr "" + +#: ../../api/methods/unban_chat_member.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/unban_chat_member.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/unban_chat_member.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/unban_chat_member.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/unban_chat_member.rst:29 +msgid ":code:`from aiogram.methods.unban_chat_member import UnbanChatMember`" +msgstr "" + +#: ../../api/methods/unban_chat_member.rst:30 +msgid "alias: :code:`from aiogram.methods import UnbanChatMember`" +msgstr "" + +#: ../../api/methods/unban_chat_member.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/unban_chat_member.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/unban_chat_member.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/unban_chat_member.rst:50 +msgid ":meth:`aiogram.types.chat.Chat.unban`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/unban_chat_sender_chat.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unban_chat_sender_chat.po new file mode 100644 index 00000000..093786e8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unban_chat_sender_chat.po @@ -0,0 +1,93 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/unban_chat_sender_chat.rst:3 +msgid "unbanChatSenderChat" +msgstr "" + +#: ../../api/methods/unban_chat_sender_chat.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.unban_chat_sender_chat.UnbanChatSenderChat:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.unban_chat_sender_chat.UnbanChatSenderChat:3 of +msgid "Source: https://core.telegram.org/bots/api#unbanchatsenderchat" +msgstr "" + +#: ../../docstring +#: aiogram.methods.unban_chat_sender_chat.UnbanChatSenderChat.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.unban_chat_sender_chat.UnbanChatSenderChat.sender_chat_id:1 +#: of +msgid "Unique identifier of the target sender chat" +msgstr "" + +#: ../../api/methods/unban_chat_sender_chat.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/unban_chat_sender_chat.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/unban_chat_sender_chat.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/unban_chat_sender_chat.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/unban_chat_sender_chat.rst:29 +msgid "" +":code:`from aiogram.methods.unban_chat_sender_chat import " +"UnbanChatSenderChat`" +msgstr "" + +#: ../../api/methods/unban_chat_sender_chat.rst:30 +msgid "alias: :code:`from aiogram.methods import UnbanChatSenderChat`" +msgstr "" + +#: ../../api/methods/unban_chat_sender_chat.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/unban_chat_sender_chat.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/unban_chat_sender_chat.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/unban_chat_sender_chat.rst:50 +msgid ":meth:`aiogram.types.chat.Chat.unban_sender_chat`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/unhide_general_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unhide_general_forum_topic.po new file mode 100644 index 00000000..3432fdfb --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unhide_general_forum_topic.po @@ -0,0 +1,80 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22: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" + +#: ../../api/methods/unhide_general_forum_topic.rst:3 +msgid "unhideGeneralForumTopic" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.unhide_general_forum_topic.UnhideGeneralForumTopic:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.unhide_general_forum_topic.UnhideGeneralForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#unhidegeneralforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.unhide_general_forum_topic.UnhideGeneralForumTopic.chat_id:1 +#: of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:29 +msgid "" +":code:`from aiogram.methods.unhide_general_forum_topic import " +"UnhideGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import UnhideGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/unpin_all_chat_messages.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unpin_all_chat_messages.po new file mode 100644 index 00000000..879d0ae4 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unpin_all_chat_messages.po @@ -0,0 +1,88 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 00:47+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" + +#: ../../api/methods/unpin_all_chat_messages.rst:3 +msgid "unpinAllChatMessages" +msgstr "" + +#: ../../api/methods/unpin_all_chat_messages.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.unpin_all_chat_messages.UnpinAllChatMessages:1 of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.unpin_all_chat_messages.UnpinAllChatMessages:3 of +msgid "Source: https://core.telegram.org/bots/api#unpinallchatmessages" +msgstr "" + +#: ../../docstring +#: aiogram.methods.unpin_all_chat_messages.UnpinAllChatMessages.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/unpin_all_chat_messages.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/unpin_all_chat_messages.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/unpin_all_chat_messages.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/unpin_all_chat_messages.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/unpin_all_chat_messages.rst:29 +msgid "" +":code:`from aiogram.methods.unpin_all_chat_messages import " +"UnpinAllChatMessages`" +msgstr "" + +#: ../../api/methods/unpin_all_chat_messages.rst:30 +msgid "alias: :code:`from aiogram.methods import UnpinAllChatMessages`" +msgstr "" + +#: ../../api/methods/unpin_all_chat_messages.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/unpin_all_chat_messages.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/unpin_all_chat_messages.rst:48 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/unpin_all_chat_messages.rst:50 +msgid ":meth:`aiogram.types.chat.Chat.unpin_all_messages`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/unpin_all_forum_topic_messages.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unpin_all_forum_topic_messages.po new file mode 100644 index 00000000..bbc5d5ac --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unpin_all_forum_topic_messages.po @@ -0,0 +1,88 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-06 14:18+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" + +#: ../../api/methods/unpin_all_forum_topic_messages.rst:3 +msgid "unpinAllForumTopicMessages" +msgstr "" + +#: ../../api/methods/unpin_all_forum_topic_messages.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.unpin_all_forum_topic_messages.UnpinAllForumTopicMessages:1 +#: of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.unpin_all_forum_topic_messages.UnpinAllForumTopicMessages:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#unpinallforumtopicmessages" +msgstr "" + +#: ../../docstring +#: aiogram.methods.unpin_all_forum_topic_messages.UnpinAllForumTopicMessages.chat_id:1 +#: of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.unpin_all_forum_topic_messages.UnpinAllForumTopicMessages.message_thread_id:1 +#: of +msgid "Unique identifier for the target message thread of the forum topic" +msgstr "" + +#: ../../api/methods/unpin_all_forum_topic_messages.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/unpin_all_forum_topic_messages.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/unpin_all_forum_topic_messages.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/unpin_all_forum_topic_messages.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/unpin_all_forum_topic_messages.rst:29 +msgid "" +":code:`from aiogram.methods.unpin_all_forum_topic_messages import " +"UnpinAllForumTopicMessages`" +msgstr "" + +#: ../../api/methods/unpin_all_forum_topic_messages.rst:30 +msgid "alias: :code:`from aiogram.methods import UnpinAllForumTopicMessages`" +msgstr "" + +#: ../../api/methods/unpin_all_forum_topic_messages.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/unpin_all_forum_topic_messages.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/unpin_all_general_forum_topic_messages.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unpin_all_general_forum_topic_messages.po new file mode 100644 index 00000000..b4154aa5 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unpin_all_general_forum_topic_messages.po @@ -0,0 +1,94 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-08-26 23:17+0300\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" + +#: ../../api/methods/unpin_all_general_forum_topic_messages.rst:3 +msgid "unpinAllGeneralForumTopicMessages" +msgstr "" + +#: ../../api/methods/unpin_all_general_forum_topic_messages.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.unpin_all_general_forum_topic_messages.UnpinAllGeneralForumTopicMessages:1 +#: of +msgid "" +"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." +msgstr "" + +#: aiogram.methods.unpin_all_general_forum_topic_messages.UnpinAllGeneralForumTopicMessages:3 +#: of +msgid "" +"Source: " +"https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages" +msgstr "" + +#: ../../docstring +#: aiogram.methods.unpin_all_general_forum_topic_messages.UnpinAllGeneralForumTopicMessages.chat_id:1 +#: of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../api/methods/unpin_all_general_forum_topic_messages.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/unpin_all_general_forum_topic_messages.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/unpin_all_general_forum_topic_messages.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/unpin_all_general_forum_topic_messages.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/unpin_all_general_forum_topic_messages.rst:30 +msgid "" +":code:`from aiogram.methods.unpin_all_general_forum_topic_messages import" +" UnpinAllGeneralForumTopicMessages`" +msgstr "" + +#: ../../api/methods/unpin_all_general_forum_topic_messages.rst:31 +msgid "" +"alias: :code:`from aiogram.methods import " +"UnpinAllGeneralForumTopicMessages`" +msgstr "" + +#: ../../api/methods/unpin_all_general_forum_topic_messages.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/unpin_all_general_forum_topic_messages.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/unpin_all_general_forum_topic_messages.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/unpin_all_general_forum_topic_messages.rst:51 +msgid ":meth:`aiogram.types.chat.Chat.unpin_all_general_forum_topic_messages`" +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 new file mode 100644 index 00000000..b31a1397 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unpin_chat_message.po @@ -0,0 +1,117 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/unpin_chat_message.rst:3 +msgid "unpinChatMessage" +msgstr "" + +#: ../../api/methods/unpin_chat_message.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.unpin_chat_message.UnpinChatMessage:1 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 " +"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." +msgstr "" + +#: aiogram.methods.unpin_chat_message.UnpinChatMessage:3 of +msgid "Source: https://core.telegram.org/bots/api#unpinchatmessage" +msgstr "" + +#: ../../docstring +#: aiogram.methods.unpin_chat_message.UnpinChatMessage.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.unpin_chat_message.UnpinChatMessage.business_connection_id:1 +#: of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be unpinned" +msgstr "" + +#: ../../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:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/unpin_chat_message.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/unpin_chat_message.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/unpin_chat_message.rst:30 +msgid ":code:`from aiogram.methods.unpin_chat_message import UnpinChatMessage`" +msgstr "" + +#: ../../api/methods/unpin_chat_message.rst:31 +msgid "alias: :code:`from aiogram.methods import UnpinChatMessage`" +msgstr "" + +#: ../../api/methods/unpin_chat_message.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/unpin_chat_message.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/unpin_chat_message.rst:49 +msgid "As shortcut from received object" +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 new file mode 100644 index 00000000..78c391b1 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/upload_sticker_file.po @@ -0,0 +1,118 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/methods/upload_sticker_file.rst:3 +msgid "uploadStickerFile" +msgstr "" + +#: ../../api/methods/upload_sticker_file.rst:5 +msgid "Returns: :obj:`File`" +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`, " +":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 "" + +#: aiogram.methods.upload_sticker_file.UploadStickerFile:3 of +msgid "Source: https://core.telegram.org/bots/api#uploadstickerfile" +msgstr "" + +#: ../../docstring +#: aiogram.methods.upload_sticker_file.UploadStickerFile.user_id:1 of +msgid "User identifier of sticker file owner" +msgstr "" + +#: ../../docstring +#: aiogram.methods.upload_sticker_file.UploadStickerFile.sticker:1 of +msgid "" +"A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See " +"`https://core.telegram.org/stickers " +"`_`https://core.telegram.org/stickers" +" `_ for technical requirements. " +":ref:`More information on Sending Files » `" +msgstr "" + +#: ../../docstring +#: aiogram.methods.upload_sticker_file.UploadStickerFile.sticker_format:1 of +msgid "Format of the sticker, must be one of 'static', 'animated', 'video'" +msgstr "" + +#: ../../api/methods/upload_sticker_file.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/upload_sticker_file.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/upload_sticker_file.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/upload_sticker_file.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/upload_sticker_file.rst:30 +msgid ":code:`from aiogram.methods.upload_sticker_file import UploadStickerFile`" +msgstr "" + +#: ../../api/methods/upload_sticker_file.rst:31 +msgid "alias: :code:`from aiogram.methods import UploadStickerFile`" +msgstr "" + +#: ../../api/methods/upload_sticker_file.rst:34 +msgid "With specific bot" +msgstr "" + +#~ msgid "" +#~ "Use this method to upload a .PNG" +#~ " file with a sticker for later " +#~ "use in *createNewStickerSet* and " +#~ "*addStickerToSet* methods (can be used " +#~ "multiple times). Returns the uploaded " +#~ ":class:`aiogram.types.file.File` on success." +#~ msgstr "" + +#~ msgid "" +#~ "**PNG** image with the sticker, must " +#~ "be up to 512 kilobytes in size," +#~ " dimensions must not exceed 512px, " +#~ "and either width or height must be" +#~ " 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/session/aiohttp.po b/docs/locale/uk_UA/LC_MESSAGES/api/session/aiohttp.po new file mode 100644 index 00000000..c0e0ef80 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/session/aiohttp.po @@ -0,0 +1,97 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/session/aiohttp.rst:3 +msgid "aiohttp" +msgstr "" + +#: ../../api/session/aiohttp.rst:5 +msgid "" +"AiohttpSession represents a wrapper-class around `ClientSession` from " +"`aiohttp `_" +msgstr "" + +#: ../../api/session/aiohttp.rst:7 +msgid "Currently `AiohttpSession` is a default session used in `aiogram.Bot`" +msgstr "" + +#: ../../api/session/aiohttp.rst:12 +msgid "Usage example" +msgstr "" + +#: ../../api/session/aiohttp.rst:24 +msgid "Proxy requests in AiohttpSession" +msgstr "" + +#: ../../api/session/aiohttp.rst:26 +msgid "" +"In order to use AiohttpSession with proxy connector you have to install " +"`aiohttp-socks `_" +msgstr "" + +#: ../../api/session/aiohttp.rst:28 +msgid "Binding session to bot:" +msgstr "" + +#: ../../api/session/aiohttp.rst:41 +msgid "" +"Only following protocols are supported: http(tunneling), socks4(a), " +"socks5 as aiohttp_socks `documentation `_ claims." +msgstr "" + +#: ../../api/session/aiohttp.rst:46 +msgid "Authorization" +msgstr "" + +#: ../../api/session/aiohttp.rst:48 +msgid "" +"Proxy authorization credentials can be specified in proxy URL or come as " +"an instance of :obj:`aiohttp.BasicAuth` containing login and password." +msgstr "" + +#: ../../api/session/aiohttp.rst:51 +msgid "Consider examples:" +msgstr "" + +#: ../../api/session/aiohttp.rst:62 +msgid "or simply include your basic auth credential in URL" +msgstr "" + +#: ../../api/session/aiohttp.rst:71 +msgid "" +"Aiogram prefers `BasicAuth` over username and password in URL, so if " +"proxy URL contains login and password and `BasicAuth` object is passed at" +" the same time aiogram will use login and password from `BasicAuth` " +"instance." +msgstr "" + +#: ../../api/session/aiohttp.rst:77 +msgid "Proxy chains" +msgstr "" + +#: ../../api/session/aiohttp.rst:79 +msgid "" +"Since `aiohttp-socks `_ supports" +" proxy chains, you're able to use them in aiogram" +msgstr "" + +#: ../../api/session/aiohttp.rst:81 +msgid "Example of chain proxies:" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/session/base.po b/docs/locale/uk_UA/LC_MESSAGES/api/session/base.po new file mode 100644 index 00000000..8ce40880 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/session/base.po @@ -0,0 +1,78 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-07-30 18:31+0300\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" + +#: ../../api/session/base.rst:3 +msgid "Base" +msgstr "" + +#: ../../api/session/base.rst:5 +msgid "Abstract session for all client sessions" +msgstr "" + +#: aiogram.client.session.base.BaseSession:1 of +msgid "This is base class for all HTTP sessions in aiogram." +msgstr "" + +#: aiogram.client.session.base.BaseSession:3 of +msgid "If you want to create your own session, you must inherit from this class." +msgstr "" + +#: aiogram.client.session.base.BaseSession.check_response:1 of +msgid "Check response status" +msgstr "" + +#: aiogram.client.session.base.BaseSession.close:1 of +msgid "Close client session" +msgstr "" + +#: aiogram.client.session.base.BaseSession.make_request:1 of +msgid "Make request to Telegram Bot API" +msgstr "" + +#: aiogram.client.session.base.BaseSession.make_request of +msgid "Parameters" +msgstr "" + +#: aiogram.client.session.base.BaseSession.make_request:3 of +msgid "Bot instance" +msgstr "" + +#: aiogram.client.session.base.BaseSession.make_request:4 of +msgid "Method instance" +msgstr "" + +#: aiogram.client.session.base.BaseSession.make_request:5 of +msgid "Request timeout" +msgstr "" + +#: aiogram.client.session.base.BaseSession.make_request of +msgid "Returns" +msgstr "" + +#: aiogram.client.session.base.BaseSession.make_request of +msgid "Raises" +msgstr "" + +#: aiogram.client.session.base.BaseSession.prepare_value:1 of +msgid "Prepare value before send" +msgstr "" + +#: aiogram.client.session.base.BaseSession.stream_content:1 of +msgid "Stream reader" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/session/custom_server.po b/docs/locale/uk_UA/LC_MESSAGES/api/session/custom_server.po new file mode 100644 index 00000000..b5db8d60 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/session/custom_server.po @@ -0,0 +1,96 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/session/custom_server.rst:2 +msgid "Use Custom API server" +msgstr "" + +#: aiogram.client.telegram.TelegramAPIServer:1 of +msgid "Base config for API Endpoints" +msgstr "" + +#: aiogram.client.telegram.TelegramAPIServer.api_url:1 of +msgid "Generate URL for API methods" +msgstr "" + +#: aiogram.client.telegram.TelegramAPIServer.api_url +#: aiogram.client.telegram.TelegramAPIServer.file_url +#: aiogram.client.telegram.TelegramAPIServer.from_base of +msgid "Parameters" +msgstr "" + +#: aiogram.client.telegram.TelegramAPIServer.api_url:3 +#: aiogram.client.telegram.TelegramAPIServer.file_url:3 of +msgid "Bot token" +msgstr "" + +#: aiogram.client.telegram.TelegramAPIServer.api_url:4 of +msgid "API method name (case insensitive)" +msgstr "" + +#: aiogram.client.telegram.TelegramAPIServer.api_url +#: aiogram.client.telegram.TelegramAPIServer.file_url +#: aiogram.client.telegram.TelegramAPIServer.from_base of +msgid "Returns" +msgstr "" + +#: aiogram.client.telegram.TelegramAPIServer.api_url:5 +#: aiogram.client.telegram.TelegramAPIServer.file_url:5 of +msgid "URL" +msgstr "" + +#: ../../docstring aiogram.client.telegram.TelegramAPIServer.base:1 +#: aiogram.client.telegram.TelegramAPIServer.from_base:3 of +msgid "Base URL" +msgstr "" + +#: ../../docstring aiogram.client.telegram.TelegramAPIServer.file:1 of +msgid "Files URL" +msgstr "" + +#: aiogram.client.telegram.TelegramAPIServer.file_url:1 of +msgid "Generate URL for downloading files" +msgstr "" + +#: aiogram.client.telegram.TelegramAPIServer.file_url:4 of +msgid "file path" +msgstr "" + +#: aiogram.client.telegram.TelegramAPIServer.from_base:1 of +msgid "Use this method to auto-generate TelegramAPIServer instance from base URL" +msgstr "" + +#: aiogram.client.telegram.TelegramAPIServer.from_base:4 of +msgid "instance of :class:`TelegramAPIServer`" +msgstr "" + +#: ../../docstring aiogram.client.telegram.TelegramAPIServer.is_local:1 of +msgid "" +"Mark this server is in `local mode " +"`_." +msgstr "" + +#: ../../docstring aiogram.client.telegram.TelegramAPIServer.wrap_local_file:1 +#: of +msgid "Callback to wrap files path in local mode" +msgstr "" + +#: ../../api/session/custom_server.rst:7 +msgid "For example, if you want to use self-hosted API server:" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/session/index.po b/docs/locale/uk_UA/LC_MESSAGES/api/session/index.po new file mode 100644 index 00000000..c61e72d8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/session/index.po @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/session/index.rst:3 +msgid "Client session" +msgstr "" + +#: ../../api/session/index.rst:5 +msgid "Client sessions is used for interacting with API server." +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/session/middleware.po b/docs/locale/uk_UA/LC_MESSAGES/api/session/middleware.po new file mode 100644 index 00000000..a0bc20b5 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/session/middleware.po @@ -0,0 +1,96 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-16 02:34+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.13.1\n" + +#: ../../api/session/middleware.rst:3 +msgid "Client session middlewares" +msgstr "" + +#: ../../api/session/middleware.rst:5 +msgid "" +"In some cases you may want to add some middlewares to the client session " +"to customize the behavior of the client." +msgstr "" + +#: ../../api/session/middleware.rst:7 +msgid "Some useful cases that is:" +msgstr "" + +#: ../../api/session/middleware.rst:9 +msgid "Log the outgoing requests" +msgstr "" + +#: ../../api/session/middleware.rst:10 +msgid "Customize the request parameters" +msgstr "" + +#: ../../api/session/middleware.rst:11 +msgid "Handle rate limiting errors and retry the request" +msgstr "" + +#: ../../api/session/middleware.rst:12 +msgid "others ..." +msgstr "" + +#: ../../api/session/middleware.rst:14 +msgid "" +"So, you can do it using client session middlewares. A client session " +"middleware is a function (or callable class) that receives the request " +"and the next middleware to call. The middleware can modify the request " +"and then call the next middleware to continue the request processing." +msgstr "" + +#: ../../api/session/middleware.rst:19 +msgid "How to register client session middleware?" +msgstr "" + +#: ../../api/session/middleware.rst:22 +msgid "Register using register method" +msgstr "" + +#: ../../api/session/middleware.rst:29 +msgid "Register using decorator" +msgstr "" + +#: ../../api/session/middleware.rst:44 +msgid "Example" +msgstr "" + +#: ../../api/session/middleware.rst:47 +msgid "Class based session middleware" +msgstr "" + +#: ../../api/session/middleware.rst:56 +msgid "" +"this middleware is already implemented inside aiogram, so, if you want to" +" use it you can just import it :code:`from " +"aiogram.client.session.middlewares.request_logging import RequestLogging`" +msgstr "" + +#: ../../api/session/middleware.rst:61 +msgid "Function based session middleware" +msgstr "" + +#~ msgid "" +#~ "this middlewware is already implemented " +#~ "inside aiogram, so, if you want to" +#~ " use it you can just import it" +#~ " :code:`from " +#~ "aiogram.client.session.middlewares.request_logging import " +#~ "RequestLogging`" +#~ 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 new file mode 100644 index 00000000..0b113fe6 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/animation.po @@ -0,0 +1,92 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/animation.rst:3 +msgid "Animation" +msgstr "" + +#: aiogram.types.animation.Animation:1 of +msgid "" +"This object represents an animation file (GIF or H.264/MPEG-4 AVC video " +"without sound)." +msgstr "" + +#: aiogram.types.animation.Animation:3 of +msgid "Source: https://core.telegram.org/bots/api#animation" +msgstr "" + +#: ../../docstring aiogram.types.animation.Animation.file_id:1 of +msgid "Identifier for this file, which can be used to download or reuse the file" +msgstr "" + +#: ../../docstring aiogram.types.animation.Animation.file_unique_id:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring aiogram.types.animation.Animation.width:1 of +msgid "Video width as defined by the sender" +msgstr "" + +#: ../../docstring aiogram.types.animation.Animation.height:1 of +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 the sender" +msgstr "" + +#: ../../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 the sender" +msgstr "" + +#: ../../docstring aiogram.types.animation.Animation.mime_type:1 of +msgid "*Optional*. MIME type of the file as defined by the sender" +msgstr "" + +#: ../../docstring aiogram.types.animation.Animation.file_size:1 of +msgid "" +"*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." +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 new file mode 100644 index 00000000..22f46b2d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/audio.po @@ -0,0 +1,94 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/audio.rst:3 +msgid "Audio" +msgstr "" + +#: aiogram.types.audio.Audio:1 of +msgid "" +"This object represents an audio file to be treated as music by the " +"Telegram clients." +msgstr "" + +#: aiogram.types.audio.Audio:3 of +msgid "Source: https://core.telegram.org/bots/api#audio" +msgstr "" + +#: ../../docstring aiogram.types.audio.Audio.file_id:1 of +msgid "Identifier for this file, which can be used to download or reuse the file" +msgstr "" + +#: ../../docstring aiogram.types.audio.Audio.file_unique_id:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring aiogram.types.audio.Audio.duration:1 of +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 the sender or by audio " +"tags" +msgstr "" + +#: ../../docstring aiogram.types.audio.Audio.title:1 of +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 the sender" +msgstr "" + +#: ../../docstring aiogram.types.audio.Audio.mime_type:1 of +msgid "*Optional*. MIME type of the file as defined by the sender" +msgstr "" + +#: ../../docstring aiogram.types.audio.Audio.file_size:1 of +msgid "" +"*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." +msgstr "" + +#: ../../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/bot_command.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command.po new file mode 100644 index 00000000..8a4ec997 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command.po @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/bot_command.rst:3 +msgid "BotCommand" +msgstr "" + +#: aiogram.types.bot_command.BotCommand:1 of +msgid "This object represents a bot command." +msgstr "" + +#: aiogram.types.bot_command.BotCommand:3 of +msgid "Source: https://core.telegram.org/bots/api#botcommand" +msgstr "" + +#: ../../docstring aiogram.types.bot_command.BotCommand.command:1 of +msgid "" +"Text of the command; 1-32 characters. Can contain only lowercase English " +"letters, digits and underscores." +msgstr "" + +#: ../../docstring aiogram.types.bot_command.BotCommand.description:1 of +msgid "Description of the command; 1-256 characters." +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope.po new file mode 100644 index 00000000..ae5cc0bc --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope.po @@ -0,0 +1,60 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/bot_command_scope.rst:3 +msgid "BotCommandScope" +msgstr "" + +#: aiogram.types.bot_command_scope.BotCommandScope:1 of +msgid "" +"This object represents the scope to which bot commands are applied. " +"Currently, the following 7 scopes are supported:" +msgstr "" + +#: aiogram.types.bot_command_scope.BotCommandScope:3 of +msgid ":class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`" +msgstr "" + +#: aiogram.types.bot_command_scope.BotCommandScope:4 of +msgid ":class:`aiogram.types.bot_command_scope_all_private_chats.BotCommandScopeAllPrivateChats`" +msgstr "" + +#: aiogram.types.bot_command_scope.BotCommandScope:5 of +msgid ":class:`aiogram.types.bot_command_scope_all_group_chats.BotCommandScopeAllGroupChats`" +msgstr "" + +#: aiogram.types.bot_command_scope.BotCommandScope:6 of +msgid ":class:`aiogram.types.bot_command_scope_all_chat_administrators.BotCommandScopeAllChatAdministrators`" +msgstr "" + +#: aiogram.types.bot_command_scope.BotCommandScope:7 of +msgid ":class:`aiogram.types.bot_command_scope_chat.BotCommandScopeChat`" +msgstr "" + +#: aiogram.types.bot_command_scope.BotCommandScope:8 of +msgid ":class:`aiogram.types.bot_command_scope_chat_administrators.BotCommandScopeChatAdministrators`" +msgstr "" + +#: aiogram.types.bot_command_scope.BotCommandScope:9 of +msgid ":class:`aiogram.types.bot_command_scope_chat_member.BotCommandScopeChatMember`" +msgstr "" + +#: aiogram.types.bot_command_scope.BotCommandScope:11 of +msgid "Source: https://core.telegram.org/bots/api#botcommandscope" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_all_chat_administrators.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_all_chat_administrators.po new file mode 100644 index 00000000..35e5dc6c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_all_chat_administrators.po @@ -0,0 +1,43 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/bot_command_scope_all_chat_administrators.rst:3 +msgid "BotCommandScopeAllChatAdministrators" +msgstr "" + +#: aiogram.types.bot_command_scope_all_chat_administrators.BotCommandScopeAllChatAdministrators:1 +#: of +msgid "" +"Represents the `scope " +"`_ of bot commands, " +"covering all group and supergroup chat administrators." +msgstr "" + +#: aiogram.types.bot_command_scope_all_chat_administrators.BotCommandScopeAllChatAdministrators:3 +#: of +msgid "" +"Source: " +"https://core.telegram.org/bots/api#botcommandscopeallchatadministrators" +msgstr "" + +#: ../../docstring +#: aiogram.types.bot_command_scope_all_chat_administrators.BotCommandScopeAllChatAdministrators.type:1 +#: of +msgid "Scope type, must be *all_chat_administrators*" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_all_group_chats.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_all_group_chats.po new file mode 100644 index 00000000..550a1103 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_all_group_chats.po @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/bot_command_scope_all_group_chats.rst:3 +msgid "BotCommandScopeAllGroupChats" +msgstr "" + +#: aiogram.types.bot_command_scope_all_group_chats.BotCommandScopeAllGroupChats:1 +#: of +msgid "" +"Represents the `scope " +"`_ of bot commands, " +"covering all group and supergroup chats." +msgstr "" + +#: aiogram.types.bot_command_scope_all_group_chats.BotCommandScopeAllGroupChats:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#botcommandscopeallgroupchats" +msgstr "" + +#: ../../docstring +#: aiogram.types.bot_command_scope_all_group_chats.BotCommandScopeAllGroupChats.type:1 +#: of +msgid "Scope type, must be *all_group_chats*" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_all_private_chats.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_all_private_chats.po new file mode 100644 index 00000000..0b2610c3 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_all_private_chats.po @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/bot_command_scope_all_private_chats.rst:3 +msgid "BotCommandScopeAllPrivateChats" +msgstr "" + +#: aiogram.types.bot_command_scope_all_private_chats.BotCommandScopeAllPrivateChats:1 +#: of +msgid "" +"Represents the `scope " +"`_ of bot commands, " +"covering all private chats." +msgstr "" + +#: aiogram.types.bot_command_scope_all_private_chats.BotCommandScopeAllPrivateChats:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#botcommandscopeallprivatechats" +msgstr "" + +#: ../../docstring +#: aiogram.types.bot_command_scope_all_private_chats.BotCommandScopeAllPrivateChats.type:1 +#: of +msgid "Scope type, must be *all_private_chats*" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_chat.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_chat.po new file mode 100644 index 00000000..2114f522 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_chat.po @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/bot_command_scope_chat.rst:3 +msgid "BotCommandScopeChat" +msgstr "" + +#: aiogram.types.bot_command_scope_chat.BotCommandScopeChat:1 of +msgid "" +"Represents the `scope " +"`_ of bot commands, " +"covering a specific chat." +msgstr "" + +#: aiogram.types.bot_command_scope_chat.BotCommandScopeChat:3 of +msgid "Source: https://core.telegram.org/bots/api#botcommandscopechat" +msgstr "" + +#: ../../docstring +#: aiogram.types.bot_command_scope_chat.BotCommandScopeChat.type:1 of +msgid "Scope type, must be *chat*" +msgstr "" + +#: ../../docstring +#: aiogram.types.bot_command_scope_chat.BotCommandScopeChat.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_chat_administrators.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_chat_administrators.po new file mode 100644 index 00000000..92ab15bc --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_chat_administrators.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/bot_command_scope_chat_administrators.rst:3 +msgid "BotCommandScopeChatAdministrators" +msgstr "" + +#: aiogram.types.bot_command_scope_chat_administrators.BotCommandScopeChatAdministrators:1 +#: of +msgid "" +"Represents the `scope " +"`_ of bot commands, " +"covering all administrators of a specific group or supergroup chat." +msgstr "" + +#: aiogram.types.bot_command_scope_chat_administrators.BotCommandScopeChatAdministrators:3 +#: of +msgid "" +"Source: " +"https://core.telegram.org/bots/api#botcommandscopechatadministrators" +msgstr "" + +#: ../../docstring +#: aiogram.types.bot_command_scope_chat_administrators.BotCommandScopeChatAdministrators.type:1 +#: of +msgid "Scope type, must be *chat_administrators*" +msgstr "" + +#: ../../docstring +#: aiogram.types.bot_command_scope_chat_administrators.BotCommandScopeChatAdministrators.chat_id:1 +#: of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_chat_member.po new file mode 100644 index 00000000..e09566eb --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_chat_member.po @@ -0,0 +1,53 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/bot_command_scope_chat_member.rst:3 +msgid "BotCommandScopeChatMember" +msgstr "" + +#: aiogram.types.bot_command_scope_chat_member.BotCommandScopeChatMember:1 of +msgid "" +"Represents the `scope " +"`_ of bot commands, " +"covering a specific member of a group or supergroup chat." +msgstr "" + +#: aiogram.types.bot_command_scope_chat_member.BotCommandScopeChatMember:3 of +msgid "Source: https://core.telegram.org/bots/api#botcommandscopechatmember" +msgstr "" + +#: ../../docstring +#: aiogram.types.bot_command_scope_chat_member.BotCommandScopeChatMember.type:1 +#: of +msgid "Scope type, must be *chat_member*" +msgstr "" + +#: ../../docstring +#: aiogram.types.bot_command_scope_chat_member.BotCommandScopeChatMember.chat_id:1 +#: of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.types.bot_command_scope_chat_member.BotCommandScopeChatMember.user_id:1 +#: of +msgid "Unique identifier of the target user" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_default.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_default.po new file mode 100644 index 00000000..d4f81fde --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_command_scope_default.po @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/bot_command_scope_default.rst:3 +msgid "BotCommandScopeDefault" +msgstr "" + +#: aiogram.types.bot_command_scope_default.BotCommandScopeDefault:1 of +msgid "" +"Represents the default `scope " +"`_ of bot commands. " +"Default commands are used if no commands with a `narrower scope " +"`_ are " +"specified for the user." +msgstr "" + +#: aiogram.types.bot_command_scope_default.BotCommandScopeDefault:3 of +msgid "Source: https://core.telegram.org/bots/api#botcommandscopedefault" +msgstr "" + +#: ../../docstring +#: aiogram.types.bot_command_scope_default.BotCommandScopeDefault.type:1 of +msgid "Scope type, must be *default*" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_description.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_description.po new file mode 100644 index 00000000..2f295229 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_description.po @@ -0,0 +1,35 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+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" + +#: ../../api/types/bot_description.rst:3 +msgid "BotDescription" +msgstr "" + +#: aiogram.types.bot_description.BotDescription:1 of +msgid "This object represents the bot's description." +msgstr "" + +#: aiogram.types.bot_description.BotDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#botdescription" +msgstr "" + +#: ../../docstring aiogram.types.bot_description.BotDescription.description:1 +#: of +msgid "The bot's description" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_name.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_name.po new file mode 100644 index 00000000..64e89253 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_name.po @@ -0,0 +1,34 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, 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: 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" + +#: ../../api/types/bot_name.rst:3 +msgid "BotName" +msgstr "" + +#: aiogram.types.bot_name.BotName:1 of +msgid "This object represents the bot's name." +msgstr "" + +#: aiogram.types.bot_name.BotName:3 of +msgid "Source: https://core.telegram.org/bots/api#botname" +msgstr "" + +#: ../../docstring aiogram.types.bot_name.BotName.name:1 of +msgid "The bot's name" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_short_description.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_short_description.po new file mode 100644 index 00000000..8855dc52 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_short_description.po @@ -0,0 +1,36 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+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" + +#: ../../api/types/bot_short_description.rst:3 +msgid "BotShortDescription" +msgstr "" + +#: aiogram.types.bot_short_description.BotShortDescription:1 of +msgid "This object represents the bot's short description." +msgstr "" + +#: aiogram.types.bot_short_description.BotShortDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#botshortdescription" +msgstr "" + +#: ../../docstring +#: aiogram.types.bot_short_description.BotShortDescription.short_description:1 +#: of +msgid "The bot's short description" +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/callback_game.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/callback_game.po new file mode 100644 index 00000000..f564ef56 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/callback_game.po @@ -0,0 +1,32 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/callback_game.rst:3 +msgid "CallbackGame" +msgstr "" + +#: aiogram.types.callback_game.CallbackGame:1 of +msgid "" +"A placeholder, currently holds no information. Use `BotFather " +"`_ to set up your game." +msgstr "" + +#: aiogram.types.callback_game.CallbackGame:3 of +msgid "Source: https://core.telegram.org/bots/api#callbackgame" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/callback_query.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/callback_query.po new file mode 100644 index 00000000..19b3d3fb --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/callback_query.po @@ -0,0 +1,198 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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.13.1\n" + +#: ../../api/types/callback_query.rst:3 +msgid "CallbackQuery" +msgstr "" + +#: aiogram.types.callback_query.CallbackQuery:1 of +msgid "" +"This object represents an incoming callback query from a callback button " +"in an `inline keyboard `_. If the button that originated the query was attached to a " +"message sent by the bot, the field *message* will be present. If the " +"button was attached to a message sent via the bot (in `inline mode " +"`_), the field " +"*inline_message_id* will be present. Exactly one of the fields *data* or " +"*game_short_name* will be present." +msgstr "" + +#: aiogram.types.callback_query.CallbackQuery:3 of +msgid "" +"**NOTE:** After the user presses a callback button, Telegram clients will" +" display a progress bar until you call " +":class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery`. It " +"is, therefore, necessary to react by calling " +":class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery` even " +"if no notification to the user is needed (e.g., without specifying any of" +" the optional parameters)." +msgstr "" + +#: aiogram.types.callback_query.CallbackQuery:5 of +msgid "Source: https://core.telegram.org/bots/api#callbackquery" +msgstr "" + +#: ../../docstring aiogram.types.callback_query.CallbackQuery.id:1 of +msgid "Unique identifier for this query" +msgstr "" + +#: ../../docstring aiogram.types.callback_query.CallbackQuery.from_user:1 of +msgid "Sender" +msgstr "" + +#: ../../docstring aiogram.types.callback_query.CallbackQuery.chat_instance:1 +#: of +msgid "" +"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`." +msgstr "" + +#: ../../docstring aiogram.types.callback_query.CallbackQuery.message:1 of +msgid "" +"*Optional*. Message sent by the bot with the callback button that " +"originated the query" +msgstr "" + +#: ../../docstring +#: aiogram.types.callback_query.CallbackQuery.inline_message_id:1 of +msgid "" +"*Optional*. Identifier of the message sent via the bot in inline mode, " +"that originated the query." +msgstr "" + +#: ../../docstring aiogram.types.callback_query.CallbackQuery.data:1 of +msgid "" +"*Optional*. Data associated with the callback button. Be aware that the " +"message originated the query can contain no callback buttons with this " +"data." +msgstr "" + +#: ../../docstring aiogram.types.callback_query.CallbackQuery.game_short_name:1 +#: of +msgid "" +"*Optional*. Short name of a `Game " +"`_ to be returned, serves as " +"the unique identifier for the game" +msgstr "" + +#: aiogram.types.callback_query.CallbackQuery.answer:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.callback_query.CallbackQuery.answer:4 of +msgid ":code:`callback_query_id`" +msgstr "" + +#: aiogram.types.callback_query.CallbackQuery.answer:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.callback_query.CallbackQuery.answer:8 of +msgid "" +"Alternatively, the user can be redirected to the specified Game URL. For " +"this option to work, you must first create a game for your bot via " +"`@BotFather `_ and accept the terms. Otherwise, " +"you may use links like :code:`t.me/your_bot?start=XXXX` that open your " +"bot with a parameter." +msgstr "" + +#: aiogram.types.callback_query.CallbackQuery.answer:10 of +msgid "Source: https://core.telegram.org/bots/api#answercallbackquery" +msgstr "" + +#: aiogram.types.callback_query.CallbackQuery.answer of +msgid "Parameters" +msgstr "" + +#: aiogram.types.callback_query.CallbackQuery.answer:12 of +msgid "" +"Text of the notification. If not specified, nothing will be shown to the " +"user, 0-200 characters" +msgstr "" + +#: aiogram.types.callback_query.CallbackQuery.answer:13 of +msgid "" +"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*." +msgstr "" + +#: aiogram.types.callback_query.CallbackQuery.answer:14 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.callback_query.CallbackQuery.answer:15 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.callback_query.CallbackQuery.answer of +msgid "Returns" +msgstr "" + +#: aiogram.types.callback_query.CallbackQuery.answer:16 of +msgid "" +"instance of method " +":class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery`" +msgstr "" + +#~ msgid "" +#~ "This object represents an incoming " +#~ "callback query from a callback button" +#~ " in an `inline keyboard " +#~ "`_. If the " +#~ "button that originated the query was " +#~ "attached to a message sent by the" +#~ " bot, the field *message* will be " +#~ "present. If the button was attached " +#~ "to a message sent via the bot " +#~ "(in `inline mode `_), the field *inline_message_id*" +#~ " will be present. Exactly one of " +#~ "the fields *data* or *game_short_name* " +#~ "will be present." +#~ msgstr "" + +#~ msgid "Answer to callback query" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Message with the callback " +#~ "button that originated the query. Note" +#~ " that message content and message " +#~ "date will not be available if the" +#~ " message is too old" +#~ 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 new file mode 100644 index 00000000..b12fe62a --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po @@ -0,0 +1,1607 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/chat.rst:3 +msgid "Chat" +msgstr "" + +#: aiogram.types.chat.Chat:1 of +msgid "This object represents a chat." +msgstr "" + +#: aiogram.types.chat.Chat:3 of +msgid "Source: https://core.telegram.org/bots/api#chat" +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.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.Chat.type:1 of +msgid "" +"Type of the chat, can be either 'private', 'group', 'supergroup' or " +"'channel'" +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.title:1 of +msgid "*Optional*. Title, for supergroups, channels and group chats" +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.username:1 of +msgid "" +"*Optional*. Username, for private chats, supergroups and channels if " +"available" +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.first_name:1 of +msgid "*Optional*. First name of the other party in a private chat" +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.last_name:1 of +msgid "*Optional*. Last name of the other party in a private chat" +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.is_forum:1 of +msgid "" +"*Optional*. :code:`True`, if the supergroup chat is a forum (has `topics " +"`_ enabled)" +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.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 +msgid "" +"*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`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.available_reactions:1 of +msgid "" +"*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`." +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 " +"reply header and link preview background. Returned only in " +":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.birthdate:1 of +msgid "" +"*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 " +"the other party in a private chat. Returned only in " +":class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.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. Returned only in " +":class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.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. " +"Returned only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.has_hidden_members:1 of +msgid "" +"*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`." +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 " +"messages; available only to chat administrators. 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.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.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.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. Returned only " +"in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.location:1 of +msgid "" +"*Optional*. For supergroups, the location to which the supergroup is " +"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 " +"used for private links like t.me/c/chat_id/message_id" +msgstr "" + +#: aiogram.types.chat.Chat.shifted_id:4 of +msgid "" +"Currently supergroup/channel IDs have 10-digit ID after \"-100\" prefix " +"removed. However, these IDs might become 11-digit in future. So, first we" +" remove \"-100\" prefix and count remaining number length. Then we " +"multiple -1 * 10 ^ (number_length + 2) Finally, self.id is substracted " +"from that number" +msgstr "" + +#: aiogram.types.chat.Chat.full_name:1 of +msgid "Get full name of the Chat." +msgstr "" + +#: aiogram.types.chat.Chat.full_name:3 of +msgid "" +"For private chat it is first_name + last_name. For other chat types it is" +" title." +msgstr "" + +#: aiogram.types.chat.Chat.ban_sender_chat:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.ban_chat_sender_chat.BanChatSenderChat` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.ban:4 aiogram.types.chat.Chat.ban_sender_chat:4 +#: aiogram.types.chat.Chat.create_invite_link:4 +#: aiogram.types.chat.Chat.delete_message:4 +#: aiogram.types.chat.Chat.delete_photo:4 +#: aiogram.types.chat.Chat.delete_sticker_set:4 aiogram.types.chat.Chat.do:4 +#: aiogram.types.chat.Chat.edit_invite_link:4 +#: aiogram.types.chat.Chat.export_invite_link:4 +#: aiogram.types.chat.Chat.get_administrators:4 +#: aiogram.types.chat.Chat.get_member:4 +#: aiogram.types.chat.Chat.get_member_count:4 aiogram.types.chat.Chat.leave:4 +#: aiogram.types.chat.Chat.pin_message:4 aiogram.types.chat.Chat.promote:4 +#: aiogram.types.chat.Chat.restrict:4 +#: aiogram.types.chat.Chat.revoke_invite_link:4 +#: aiogram.types.chat.Chat.set_administrator_custom_title:4 +#: aiogram.types.chat.Chat.set_description:4 +#: aiogram.types.chat.Chat.set_permissions:4 +#: aiogram.types.chat.Chat.set_photo:4 +#: aiogram.types.chat.Chat.set_sticker_set:4 +#: aiogram.types.chat.Chat.set_title:4 aiogram.types.chat.Chat.unban:4 +#: aiogram.types.chat.Chat.unban_sender_chat:4 +#: aiogram.types.chat.Chat.unpin_all_general_forum_topic_messages:4 +#: aiogram.types.chat.Chat.unpin_all_messages:4 +#: aiogram.types.chat.Chat.unpin_message:4 of +msgid ":code:`chat_id`" +msgstr "" + +#: aiogram.types.chat.Chat.ban_sender_chat:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.ban_sender_chat:8 of +msgid "Source: https://core.telegram.org/bots/api#banchatsenderchat" +msgstr "" + +#: ../../api/types/chat.rst +msgid "Parameters" +msgstr "" + +#: aiogram.types.chat.Chat.ban_sender_chat:10 +#: aiogram.types.chat.Chat.unban_sender_chat:10 of +msgid "Unique identifier of the target sender chat" +msgstr "" + +#: ../../api/types/chat.rst +msgid "Returns" +msgstr "" + +#: aiogram.types.chat.Chat.ban_sender_chat:11 of +msgid "" +"instance of method " +":class:`aiogram.methods.ban_chat_sender_chat.BanChatSenderChat`" +msgstr "" + +#: aiogram.types.chat.Chat.unban_sender_chat:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.unban_chat_sender_chat.UnbanChatSenderChat` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.unban_sender_chat:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.unban_sender_chat:8 of +msgid "Source: https://core.telegram.org/bots/api#unbanchatsenderchat" +msgstr "" + +#: aiogram.types.chat.Chat.unban_sender_chat:11 of +msgid "" +"instance of method " +":class:`aiogram.methods.unban_chat_sender_chat.UnbanChatSenderChat`" +msgstr "" + +#: aiogram.types.chat.Chat.get_administrators:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.get_chat_administrators.GetChatAdministrators` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.get_administrators:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.get_administrators:8 of +msgid "Source: https://core.telegram.org/bots/api#getchatadministrators" +msgstr "" + +#: aiogram.types.chat.Chat.get_administrators:10 of +msgid "" +"instance of method " +":class:`aiogram.methods.get_chat_administrators.GetChatAdministrators`" +msgstr "" + +#: aiogram.types.chat.Chat.delete_message:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.delete_message.DeleteMessage`" +" will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.delete_message:6 of +msgid "" +"Use this method to delete a message, including service messages, with the" +" following limitations:" +msgstr "" + +#: aiogram.types.chat.Chat.delete_message:8 of +msgid "A message can only be deleted if it was sent less than 48 hours ago." +msgstr "" + +#: aiogram.types.chat.Chat.delete_message:10 of +msgid "" +"Service messages about a supergroup, channel, or forum topic creation " +"can't be deleted." +msgstr "" + +#: aiogram.types.chat.Chat.delete_message:12 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.chat.Chat.delete_message:14 of +msgid "" +"Bots can delete outgoing messages in private chats, groups, and " +"supergroups." +msgstr "" + +#: aiogram.types.chat.Chat.delete_message:16 of +msgid "Bots can delete incoming messages in private chats." +msgstr "" + +#: aiogram.types.chat.Chat.delete_message:18 of +msgid "" +"Bots granted *can_post_messages* permissions can delete outgoing messages" +" in channels." +msgstr "" + +#: aiogram.types.chat.Chat.delete_message:20 of +msgid "" +"If the bot is an administrator of a group, it can delete any message " +"there." +msgstr "" + +#: aiogram.types.chat.Chat.delete_message:22 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.chat.Chat.delete_message:24 of +msgid "Returns :code:`True` on success." +msgstr "" + +#: aiogram.types.chat.Chat.delete_message:26 of +msgid "Source: https://core.telegram.org/bots/api#deletemessage" +msgstr "" + +#: aiogram.types.chat.Chat.delete_message:28 of +msgid "Identifier of the message to delete" +msgstr "" + +#: aiogram.types.chat.Chat.delete_message:29 of +msgid "instance of method :class:`aiogram.methods.delete_message.DeleteMessage`" +msgstr "" + +#: aiogram.types.chat.Chat.revoke_invite_link:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.revoke_invite_link:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.revoke_invite_link:8 of +msgid "Source: https://core.telegram.org/bots/api#revokechatinvitelink" +msgstr "" + +#: aiogram.types.chat.Chat.revoke_invite_link:10 of +msgid "The invite link to revoke" +msgstr "" + +#: aiogram.types.chat.Chat.revoke_invite_link:11 of +msgid "" +"instance of method " +":class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`" +msgstr "" + +#: aiogram.types.chat.Chat.edit_invite_link:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.edit_chat_invite_link.EditChatInviteLink` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.edit_invite_link:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.edit_invite_link:8 of +msgid "Source: https://core.telegram.org/bots/api#editchatinvitelink" +msgstr "" + +#: aiogram.types.chat.Chat.edit_invite_link:10 of +msgid "The invite link to edit" +msgstr "" + +#: aiogram.types.chat.Chat.create_invite_link:10 +#: aiogram.types.chat.Chat.edit_invite_link:11 of +msgid "Invite link name; 0-32 characters" +msgstr "" + +#: aiogram.types.chat.Chat.create_invite_link:11 +#: aiogram.types.chat.Chat.edit_invite_link:12 of +msgid "Point in time (Unix timestamp) when the link will expire" +msgstr "" + +#: aiogram.types.chat.Chat.create_invite_link:12 +#: aiogram.types.chat.Chat.edit_invite_link:13 of +msgid "" +"The maximum number of users that can be members of the chat " +"simultaneously after joining the chat via this invite link; 1-99999" +msgstr "" + +#: aiogram.types.chat.Chat.create_invite_link:13 +#: aiogram.types.chat.Chat.edit_invite_link:14 of +msgid "" +":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" +msgstr "" + +#: aiogram.types.chat.Chat.edit_invite_link:15 of +msgid "" +"instance of method " +":class:`aiogram.methods.edit_chat_invite_link.EditChatInviteLink`" +msgstr "" + +#: aiogram.types.chat.Chat.create_invite_link:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.create_chat_invite_link.CreateChatInviteLink` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.create_invite_link:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.create_invite_link:8 of +msgid "Source: https://core.telegram.org/bots/api#createchatinvitelink" +msgstr "" + +#: aiogram.types.chat.Chat.create_invite_link:14 of +msgid "" +"instance of method " +":class:`aiogram.methods.create_chat_invite_link.CreateChatInviteLink`" +msgstr "" + +#: aiogram.types.chat.Chat.export_invite_link:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.export_invite_link:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.export_invite_link:8 of +msgid "" +"Note: Each administrator in a chat generates their own invite links. Bots" +" can't use invite links generated by other administrators. If you want " +"your bot to work with invite links, it will need to generate its own link" +" using " +":class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or " +"by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your " +"bot needs to generate a new primary invite link replacing its previous " +"one, use " +":class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` " +"again." +msgstr "" + +#: aiogram.types.chat.Chat.export_invite_link:10 of +msgid "Source: https://core.telegram.org/bots/api#exportchatinvitelink" +msgstr "" + +#: aiogram.types.chat.Chat.export_invite_link:12 of +msgid "" +"instance of method " +":class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink`" +msgstr "" + +#: aiogram.types.chat.Chat.do:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.send_chat_action.SendChatAction` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.do:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.do:8 of +msgid "" +"Example: The `ImageBot `_ needs some time to " +"process a request and upload the image. Instead of sending a text message" +" along the lines of 'Retrieving image, please wait…', the bot may use " +":class:`aiogram.methods.send_chat_action.SendChatAction` with *action* = " +"*upload_photo*. The user will see a 'sending photo' status for the bot." +msgstr "" + +#: aiogram.types.chat.Chat.do:10 of +msgid "" +"We only recommend using this method when a response from the bot will " +"take a **noticeable** amount of time to arrive." +msgstr "" + +#: aiogram.types.chat.Chat.do:12 of +msgid "Source: https://core.telegram.org/bots/api#sendchataction" +msgstr "" + +#: aiogram.types.chat.Chat.do:14 of +msgid "" +"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 " +"`_." +msgstr "" + +#: aiogram.types.chat.Chat.do:15 of +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`" +msgstr "" + +#: aiogram.types.chat.Chat.delete_sticker_set:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.delete_chat_sticker_set.DeleteChatStickerSet` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.delete_sticker_set:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.delete_sticker_set:8 of +msgid "Source: https://core.telegram.org/bots/api#deletechatstickerset" +msgstr "" + +#: aiogram.types.chat.Chat.delete_sticker_set:10 of +msgid "" +"instance of method " +":class:`aiogram.methods.delete_chat_sticker_set.DeleteChatStickerSet`" +msgstr "" + +#: aiogram.types.chat.Chat.set_sticker_set:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.set_chat_sticker_set.SetChatStickerSet` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.set_sticker_set:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.set_sticker_set:8 of +msgid "Source: https://core.telegram.org/bots/api#setchatstickerset" +msgstr "" + +#: aiogram.types.chat.Chat.set_sticker_set:10 of +msgid "Name of the sticker set to be set as the group sticker set" +msgstr "" + +#: aiogram.types.chat.Chat.set_sticker_set:11 of +msgid "" +"instance of method " +":class:`aiogram.methods.set_chat_sticker_set.SetChatStickerSet`" +msgstr "" + +#: aiogram.types.chat.Chat.get_member:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.get_chat_member.GetChatMember` will automatically" +" fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.get_member:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.get_member:8 of +msgid "Source: https://core.telegram.org/bots/api#getchatmember" +msgstr "" + +#: aiogram.types.chat.Chat.ban:10 aiogram.types.chat.Chat.get_member:10 +#: aiogram.types.chat.Chat.promote:10 aiogram.types.chat.Chat.restrict:10 +#: aiogram.types.chat.Chat.set_administrator_custom_title:10 +#: aiogram.types.chat.Chat.unban:10 of +msgid "Unique identifier of the target user" +msgstr "" + +#: aiogram.types.chat.Chat.get_member:11 of +msgid "instance of method :class:`aiogram.methods.get_chat_member.GetChatMember`" +msgstr "" + +#: aiogram.types.chat.Chat.get_member_count:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.get_chat_member_count.GetChatMemberCount` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.get_member_count:6 of +msgid "" +"Use this method to get the number of members in a chat. Returns *Int* on " +"success." +msgstr "" + +#: aiogram.types.chat.Chat.get_member_count:8 of +msgid "Source: https://core.telegram.org/bots/api#getchatmembercount" +msgstr "" + +#: aiogram.types.chat.Chat.get_member_count:10 of +msgid "" +"instance of method " +":class:`aiogram.methods.get_chat_member_count.GetChatMemberCount`" +msgstr "" + +#: aiogram.types.chat.Chat.leave:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.leave_chat.LeaveChat` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.leave:6 of +msgid "" +"Use this method for your bot to leave a group, supergroup or channel. " +"Returns :code:`True` on success." +msgstr "" + +#: aiogram.types.chat.Chat.leave:8 of +msgid "Source: https://core.telegram.org/bots/api#leavechat" +msgstr "" + +#: aiogram.types.chat.Chat.leave:10 of +msgid "instance of method :class:`aiogram.methods.leave_chat.LeaveChat`" +msgstr "" + +#: aiogram.types.chat.Chat.unpin_all_messages:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.unpin_all_chat_messages.UnpinAllChatMessages` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.unpin_all_messages:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.unpin_all_messages:8 of +msgid "Source: https://core.telegram.org/bots/api#unpinallchatmessages" +msgstr "" + +#: aiogram.types.chat.Chat.unpin_all_messages:10 of +msgid "" +"instance of method " +":class:`aiogram.methods.unpin_all_chat_messages.UnpinAllChatMessages`" +msgstr "" + +#: aiogram.types.chat.Chat.unpin_message:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.unpin_chat_message.UnpinChatMessage` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.unpin_message:6 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 " +"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." +msgstr "" + +#: aiogram.types.chat.Chat.unpin_message:8 of +msgid "Source: https://core.telegram.org/bots/api#unpinchatmessage" +msgstr "" + +#: aiogram.types.chat.Chat.unpin_message:10 of +msgid "" +"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 "" + +#: aiogram.types.chat.Chat.pin_message:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.pin_chat_message.PinChatMessage` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.pin_message:6 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" +" 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." +msgstr "" + +#: aiogram.types.chat.Chat.pin_message:8 of +msgid "Source: https://core.telegram.org/bots/api#pinchatmessage" +msgstr "" + +#: aiogram.types.chat.Chat.pin_message:10 of +msgid "Identifier of a message to pin" +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:13 of +msgid "" +"instance of method " +":class:`aiogram.methods.pin_chat_message.PinChatMessage`" +msgstr "" + +#: aiogram.types.chat.Chat.set_administrator_custom_title:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.set_chat_administrator_custom_title.SetChatAdministratorCustomTitle`" +" will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.set_administrator_custom_title:6 of +msgid "" +"Use this method to set a custom title for an administrator in a " +"supergroup promoted by the bot. Returns :code:`True` on success." +msgstr "" + +#: aiogram.types.chat.Chat.set_administrator_custom_title:8 of +msgid "Source: https://core.telegram.org/bots/api#setchatadministratorcustomtitle" +msgstr "" + +#: aiogram.types.chat.Chat.set_administrator_custom_title:11 of +msgid "" +"New custom title for the administrator; 0-16 characters, emoji are not " +"allowed" +msgstr "" + +#: aiogram.types.chat.Chat.set_administrator_custom_title:12 of +msgid "" +"instance of method " +":class:`aiogram.methods.set_chat_administrator_custom_title.SetChatAdministratorCustomTitle`" +msgstr "" + +#: aiogram.types.chat.Chat.set_permissions:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.set_chat_permissions.SetChatPermissions` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.set_permissions:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.set_permissions:8 of +msgid "Source: https://core.telegram.org/bots/api#setchatpermissions" +msgstr "" + +#: aiogram.types.chat.Chat.set_permissions:10 of +msgid "A JSON-serialized object for new default chat permissions" +msgstr "" + +#: aiogram.types.chat.Chat.restrict:12 +#: aiogram.types.chat.Chat.set_permissions:11 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.set_permissions:12 of +msgid "" +"instance of method " +":class:`aiogram.methods.set_chat_permissions.SetChatPermissions`" +msgstr "" + +#: aiogram.types.chat.Chat.promote:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.promote_chat_member.PromoteChatMember` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.promote:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.promote:8 of +msgid "Source: https://core.telegram.org/bots/api#promotechatmember" +msgstr "" + +#: aiogram.types.chat.Chat.promote:11 of +msgid "Pass :code:`True` if the administrator's presence in the chat is hidden" +msgstr "" + +#: aiogram.types.chat.Chat.promote:12 of +msgid "" +"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 +msgid "Pass :code:`True` if the administrator can delete messages of other users" +msgstr "" + +#: aiogram.types.chat.Chat.promote:14 of +msgid "Pass :code:`True` if the administrator can manage video chats" +msgstr "" + +#: aiogram.types.chat.Chat.promote:15 of +msgid "" +"Pass :code:`True` if the administrator can restrict, ban or unban chat " +"members, or access supergroup statistics" +msgstr "" + +#: aiogram.types.chat.Chat.promote:16 of +msgid "" +"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)" +msgstr "" + +#: aiogram.types.chat.Chat.promote:17 of +msgid "" +"Pass :code:`True` if the administrator can change chat title, photo and " +"other settings" +msgstr "" + +#: aiogram.types.chat.Chat.promote:18 of +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 stories to the chat" +msgstr "" + +#: aiogram.types.chat.Chat.promote:20 of +msgid "" +"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 delete stories posted by other" +" users" +msgstr "" + +#: aiogram.types.chat.Chat.promote:22 of +msgid "" +"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 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 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; for supergroups only" +msgstr "" + +#: aiogram.types.chat.Chat.promote:26 of +msgid "" +"instance of method " +":class:`aiogram.methods.promote_chat_member.PromoteChatMember`" +msgstr "" + +#: aiogram.types.chat.Chat.restrict:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.restrict_chat_member.RestrictChatMember` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.restrict:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.restrict:8 of +msgid "Source: https://core.telegram.org/bots/api#restrictchatmember" +msgstr "" + +#: aiogram.types.chat.Chat.restrict:11 of +msgid "A JSON-serialized object for new user permissions" +msgstr "" + +#: aiogram.types.chat.Chat.restrict:13 of +msgid "" +"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" +msgstr "" + +#: aiogram.types.chat.Chat.restrict:14 of +msgid "" +"instance of method " +":class:`aiogram.methods.restrict_chat_member.RestrictChatMember`" +msgstr "" + +#: aiogram.types.chat.Chat.unban:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.unban_chat_member.UnbanChatMember` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.unban:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.unban:8 of +msgid "Source: https://core.telegram.org/bots/api#unbanchatmember" +msgstr "" + +#: aiogram.types.chat.Chat.unban:11 of +msgid "Do nothing if the user is not banned" +msgstr "" + +#: aiogram.types.chat.Chat.unban:12 of +msgid "" +"instance of method " +":class:`aiogram.methods.unban_chat_member.UnbanChatMember`" +msgstr "" + +#: aiogram.types.chat.Chat.ban:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.ban_chat_member.BanChatMember` will automatically" +" fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.ban:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.ban:8 of +msgid "Source: https://core.telegram.org/bots/api#banchatmember" +msgstr "" + +#: aiogram.types.chat.Chat.ban:11 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.ban:12 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.ban:13 of +msgid "instance of method :class:`aiogram.methods.ban_chat_member.BanChatMember`" +msgstr "" + +#: aiogram.types.chat.Chat.set_description:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.set_chat_description.SetChatDescription` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.set_description:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.set_description:8 of +msgid "Source: https://core.telegram.org/bots/api#setchatdescription" +msgstr "" + +#: aiogram.types.chat.Chat.set_description:10 of +msgid "New chat description, 0-255 characters" +msgstr "" + +#: aiogram.types.chat.Chat.set_description:11 of +msgid "" +"instance of method " +":class:`aiogram.methods.set_chat_description.SetChatDescription`" +msgstr "" + +#: aiogram.types.chat.Chat.set_title:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.set_chat_title.SetChatTitle` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.set_title:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.set_title:8 of +msgid "Source: https://core.telegram.org/bots/api#setchattitle" +msgstr "" + +#: aiogram.types.chat.Chat.set_title:10 of +msgid "New chat title, 1-128 characters" +msgstr "" + +#: aiogram.types.chat.Chat.set_title:11 of +msgid "instance of method :class:`aiogram.methods.set_chat_title.SetChatTitle`" +msgstr "" + +#: aiogram.types.chat.Chat.delete_photo:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.delete_chat_photo.DeleteChatPhoto` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.delete_photo:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.delete_photo:8 of +msgid "Source: https://core.telegram.org/bots/api#deletechatphoto" +msgstr "" + +#: aiogram.types.chat.Chat.delete_photo:10 of +msgid "" +"instance of method " +":class:`aiogram.methods.delete_chat_photo.DeleteChatPhoto`" +msgstr "" + +#: aiogram.types.chat.Chat.set_photo:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.set_chat_photo.SetChatPhoto` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.set_photo:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.set_photo:8 of +msgid "Source: https://core.telegram.org/bots/api#setchatphoto" +msgstr "" + +#: aiogram.types.chat.Chat.set_photo:10 of +msgid "New chat photo, uploaded using multipart/form-data" +msgstr "" + +#: aiogram.types.chat.Chat.set_photo:11 of +msgid "instance of method :class:`aiogram.methods.set_chat_photo.SetChatPhoto`" +msgstr "" + +#: aiogram.types.chat.Chat.unpin_all_general_forum_topic_messages:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.unpin_all_general_forum_topic_messages.UnpinAllGeneralForumTopicMessages`" +" will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat.Chat.unpin_all_general_forum_topic_messages:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat.Chat.unpin_all_general_forum_topic_messages:8 of +msgid "" +"Source: " +"https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages" +msgstr "" + +#: aiogram.types.chat.Chat.unpin_all_general_forum_topic_messages:10 of +msgid "" +"instance of method " +":class:`aiogram.methods.unpin_all_general_forum_topic_messages.UnpinAllGeneralForumTopicMessages`" +msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. The " +#~ "method is guaranteed to work for " +#~ "other users, only if the bot is" +#~ " an administrator in the chat. " +#~ "Returns a :class:`aiogram.types.chat_member.ChatMember`" +#~ " object on success." +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can add new administrators with a " +#~ "subset of their own privileges or " +#~ "demote administrators that he has " +#~ "promoted, directly or indirectly (promoted " +#~ "by administrators that were appointed by" +#~ " him)" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Expiration date of the emoji" +#~ " status of the other party in a" +#~ " private chat, if any. Returned only" +#~ " in :class:`aiogram.methods.get_chat.GetChat`." +#~ msgstr "" + +#~ msgid "" +#~ "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" +#~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can access the chat event log, " +#~ "chat statistics, message statistics in " +#~ "channels, see channel members, see " +#~ "anonymous administrators in supergroups and" +#~ " ignore slow mode. Implied by any " +#~ "other administrator privilege" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can create channel posts, 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 restrict, ban or unban chat " +#~ "members" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Custom emoji identifier of " +#~ "emoji status of the other party in" +#~ " a private chat. Returned only in " +#~ ":class:`aiogram.methods.get_chat.GetChat`." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Expiration date of the emoji" +#~ " status of the other party in a" +#~ " private chat in Unix time, if " +#~ "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 new file mode 100644 index 00000000..c20f2860 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_administrator_rights.po @@ -0,0 +1,253 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/chat_administrator_rights.rst:3 +msgid "ChatAdministratorRights" +msgstr "" + +#: aiogram.types.chat_administrator_rights.ChatAdministratorRights:1 of +msgid "Represents the rights of an administrator in a chat." +msgstr "" + +#: aiogram.types.chat_administrator_rights.ChatAdministratorRights:3 of +msgid "Source: https://core.telegram.org/bots/api#chatadministratorrights" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_administrator_rights.ChatAdministratorRights.is_anonymous:1 +#: of +msgid ":code:`True`, if the user's presence in the chat is hidden" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_manage_chat:1 +#: of +msgid "" +":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 +#: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_delete_messages:1 +#: of +msgid ":code:`True`, if the administrator can delete messages of other users" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_manage_video_chats:1 +#: of +msgid ":code:`True`, if the administrator can manage video chats" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_restrict_members:1 +#: of +msgid "" +":code:`True`, if the administrator can restrict, ban or unban chat " +"members, or access supergroup statistics" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_promote_members:1 +#: of +msgid "" +":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 the user)" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_change_info:1 +#: of +msgid "" +":code:`True`, if the user is allowed to change the chat title, photo and " +"other settings" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_invite_users:1 +#: of +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; for channels only" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_edit_messages:1 +#: of +msgid "" +"*Optional*. :code:`True`, if the administrator can edit messages of other" +" 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; for " +"groups and supergroups only" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_manage_topics:1 +#: of +msgid "" +"*Optional*. :code:`True`, if the user is allowed to create, rename, " +"close, and reopen forum topics; for supergroups only" +msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the administrator can " +#~ "add new administrators with a subset " +#~ "of their own privileges or demote " +#~ "administrators that he has promoted, " +#~ "directly or indirectly (promoted by " +#~ "administrators that were appointed by " +#~ "the user)" +#~ msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the administrator can " +#~ "access the chat event log, chat " +#~ "statistics, message statistics in channels," +#~ " see channel members, 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 in the channel; channels" +#~ " only" +#~ msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the administrator can " +#~ "access the chat event log, chat " +#~ "statistics, boost list in channels, " +#~ "message statistics in channels, see " +#~ "channel members, see anonymous administrators" +#~ " in supergroups and ignore slow mode." +#~ " Implied by any other administrator " +#~ "privilege" +#~ msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the administrator can " +#~ "restrict, ban or unban chat members" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can post messages in the channel;" +#~ " channels only" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " 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.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost.po new file mode 100644 index 00000000..df452c15 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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_boost.rst:3 +msgid "ChatBoost" +msgstr "" + +#: aiogram.types.chat_boost.ChatBoost:1 of +msgid "This object contains information about a chat boost." +msgstr "" + +#: aiogram.types.chat_boost.ChatBoost:3 of +msgid "Source: https://core.telegram.org/bots/api#chatboost" +msgstr "" + +#: ../../docstring aiogram.types.chat_boost.ChatBoost.boost_id:1 of +msgid "Unique identifier of the boost" +msgstr "" + +#: ../../docstring aiogram.types.chat_boost.ChatBoost.add_date:1 of +msgid "Point in time (Unix timestamp) when the chat was boosted" +msgstr "" + +#: ../../docstring aiogram.types.chat_boost.ChatBoost.expiration_date:1 of +msgid "" +"Point in time (Unix timestamp) when the boost will automatically expire, " +"unless the booster's Telegram Premium subscription is prolonged" +msgstr "" + +#: ../../docstring aiogram.types.chat_boost.ChatBoost.source:1 of +msgid "Source of the added boost" +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 new file mode 100644 index 00000000..49a5920d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_added.po @@ -0,0 +1,38 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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_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_removed.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_removed.po new file mode 100644 index 00000000..ca64d484 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_removed.po @@ -0,0 +1,52 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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_boost_removed.rst:3 +msgid "ChatBoostRemoved" +msgstr "" + +#: aiogram.types.chat_boost_removed.ChatBoostRemoved:1 of +msgid "This object represents a boost removed from a chat." +msgstr "" + +#: aiogram.types.chat_boost_removed.ChatBoostRemoved:3 of +msgid "Source: https://core.telegram.org/bots/api#chatboostremoved" +msgstr "" + +#: ../../docstring aiogram.types.chat_boost_removed.ChatBoostRemoved.chat:1 of +msgid "Chat which was boosted" +msgstr "" + +#: ../../docstring aiogram.types.chat_boost_removed.ChatBoostRemoved.boost_id:1 +#: of +msgid "Unique identifier of the boost" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_boost_removed.ChatBoostRemoved.remove_date:1 of +msgid "Point in time (Unix timestamp) when the boost was removed" +msgstr "" + +#: ../../docstring aiogram.types.chat_boost_removed.ChatBoostRemoved.source:1 +#: of +msgid "Source of the removed boost" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_source.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_source.po new file mode 100644 index 00000000..a92b26e8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_source.po @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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_boost_source.rst:3 +msgid "ChatBoostSource" +msgstr "" + +#: aiogram.types.chat_boost_source.ChatBoostSource:1 of +msgid "This object describes the source of a chat boost. It can be one of" +msgstr "" + +#: aiogram.types.chat_boost_source.ChatBoostSource:3 of +msgid ":class:`aiogram.types.chat_boost_source_premium.ChatBoostSourcePremium`" +msgstr "" + +#: aiogram.types.chat_boost_source.ChatBoostSource:4 of +msgid ":class:`aiogram.types.chat_boost_source_gift_code.ChatBoostSourceGiftCode`" +msgstr "" + +#: aiogram.types.chat_boost_source.ChatBoostSource:5 of +msgid ":class:`aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway`" +msgstr "" + +#: aiogram.types.chat_boost_source.ChatBoostSource:7 of +msgid "Source: https://core.telegram.org/bots/api#chatboostsource" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_source_gift_code.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_source_gift_code.po new file mode 100644 index 00000000..e4b2eef7 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_source_gift_code.po @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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_boost_source_gift_code.rst:3 +msgid "ChatBoostSourceGiftCode" +msgstr "" + +#: aiogram.types.chat_boost_source_gift_code.ChatBoostSourceGiftCode:1 of +msgid "" +"The boost was obtained by the creation of Telegram Premium gift codes to " +"boost a chat. Each such code boosts the chat 4 times for the duration of " +"the corresponding Telegram Premium subscription." +msgstr "" + +#: aiogram.types.chat_boost_source_gift_code.ChatBoostSourceGiftCode:3 of +msgid "Source: https://core.telegram.org/bots/api#chatboostsourcegiftcode" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_boost_source_gift_code.ChatBoostSourceGiftCode.source:1 +#: of +msgid "Source of the boost, always 'gift_code'" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_boost_source_gift_code.ChatBoostSourceGiftCode.user:1 of +msgid "User for which the gift code was created" +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 new file mode 100644 index 00000000..8b6784b9 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_source_giveaway.po @@ -0,0 +1,85 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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_boost_source_giveaway.rst:3 +msgid "ChatBoostSourceGiveaway" +msgstr "" + +#: aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway:1 of +msgid "" +"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 +msgid "Source: https://core.telegram.org/bots/api#chatboostsourcegiveaway" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway.source:1 of +msgid "Source of the boost, always 'giveaway'" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway.giveaway_message_id:1 +#: of +msgid "" +"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." +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway.user:1 of +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 +#: aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway.is_unclaimed:1 +#: of +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_source_premium.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_source_premium.po new file mode 100644 index 00000000..151a04d5 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_source_premium.po @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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_boost_source_premium.rst:3 +msgid "ChatBoostSourcePremium" +msgstr "" + +#: aiogram.types.chat_boost_source_premium.ChatBoostSourcePremium:1 of +msgid "" +"The boost was obtained by subscribing to Telegram Premium or by gifting a" +" Telegram Premium subscription to another user." +msgstr "" + +#: aiogram.types.chat_boost_source_premium.ChatBoostSourcePremium:3 of +msgid "Source: https://core.telegram.org/bots/api#chatboostsourcepremium" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_boost_source_premium.ChatBoostSourcePremium.source:1 of +msgid "Source of the boost, always 'premium'" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_boost_source_premium.ChatBoostSourcePremium.user:1 of +msgid "User that boosted the chat" +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 new file mode 100644 index 00000000..570bf8c2 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_updated.po @@ -0,0 +1,44 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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_boost_updated.rst:3 +msgid "ChatBoostUpdated" +msgstr "" + +#: aiogram.types.chat_boost_updated.ChatBoostUpdated:1 of +msgid "This object represents a boost added to a chat or changed." +msgstr "" + +#: aiogram.types.chat_boost_updated.ChatBoostUpdated:3 of +msgid "Source: https://core.telegram.org/bots/api#chatboostupdated" +msgstr "" + +#: ../../docstring aiogram.types.chat_boost_updated.ChatBoostUpdated.chat:1 of +msgid "Chat which was boosted" +msgstr "" + +#: ../../docstring aiogram.types.chat_boost_updated.ChatBoostUpdated.boost:1 of +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 new file mode 100644 index 00000000..3d3d05e4 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_invite_link.po @@ -0,0 +1,97 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/chat_invite_link.rst:3 +msgid "ChatInviteLink" +msgstr "" + +#: aiogram.types.chat_invite_link.ChatInviteLink:1 of +msgid "Represents an invite link for a chat." +msgstr "" + +#: aiogram.types.chat_invite_link.ChatInviteLink:3 of +msgid "Source: https://core.telegram.org/bots/api#chatinvitelink" +msgstr "" + +#: ../../docstring aiogram.types.chat_invite_link.ChatInviteLink.invite_link:1 +#: of +msgid "" +"The invite link. If the link was created by another chat administrator, " +"then the second part of the link will be replaced with '…'." +msgstr "" + +#: ../../docstring aiogram.types.chat_invite_link.ChatInviteLink.creator:1 of +msgid "Creator of the link" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_invite_link.ChatInviteLink.creates_join_request:1 of +msgid "" +":code:`True`, if users joining the chat via the link need to be approved " +"by chat administrators" +msgstr "" + +#: ../../docstring aiogram.types.chat_invite_link.ChatInviteLink.is_primary:1 +#: of +msgid ":code:`True`, if the link is primary" +msgstr "" + +#: ../../docstring aiogram.types.chat_invite_link.ChatInviteLink.is_revoked:1 +#: of +msgid ":code:`True`, if the link is revoked" +msgstr "" + +#: ../../docstring aiogram.types.chat_invite_link.ChatInviteLink.name:1 of +msgid "*Optional*. Invite link name" +msgstr "" + +#: ../../docstring aiogram.types.chat_invite_link.ChatInviteLink.expire_date:1 +#: of +msgid "" +"*Optional*. Point in time (Unix timestamp) when the link will expire or " +"has been expired" +msgstr "" + +#: ../../docstring aiogram.types.chat_invite_link.ChatInviteLink.member_limit:1 +#: of +msgid "" +"*Optional*. The maximum number of users that can be members of the chat " +"simultaneously after joining the chat via this invite link; 1-99999" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_invite_link.ChatInviteLink.pending_join_request_count:1 +#: 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 new file mode 100644 index 00000000..14043885 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_join_request.po @@ -0,0 +1,1924 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/chat_join_request.rst:3 +msgid "ChatJoinRequest" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest:1 of +msgid "Represents a join request sent to a chat." +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest:3 of +msgid "Source: https://core.telegram.org/bots/api#chatjoinrequest" +msgstr "" + +#: ../../docstring aiogram.types.chat_join_request.ChatJoinRequest.chat:1 of +msgid "Chat to which the request was sent" +msgstr "" + +#: ../../docstring aiogram.types.chat_join_request.ChatJoinRequest.from_user:1 +#: of +msgid "User that sent the join request" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_join_request.ChatJoinRequest.user_chat_id:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring aiogram.types.chat_join_request.ChatJoinRequest.date:1 of +msgid "Date the request was sent in Unix time" +msgstr "" + +#: ../../docstring aiogram.types.chat_join_request.ChatJoinRequest.bio:1 of +msgid "*Optional*. Bio of the user." +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_join_request.ChatJoinRequest.invite_link:1 of +msgid "" +"*Optional*. Chat invite link that was used by the user to send the join " +"request" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.approve:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.approve_chat_join_request.ApproveChatJoinRequest`" +" will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.approve:4 +#: aiogram.types.chat_join_request.ChatJoinRequest.decline:4 of +msgid ":code:`chat_id`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.approve:5 +#: aiogram.types.chat_join_request.ChatJoinRequest.decline:5 of +msgid ":code:`user_id`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.approve:7 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.approve:9 of +msgid "Source: https://core.telegram.org/bots/api#approvechatjoinrequest" +msgstr "" + +#: ../../api/types/chat_join_request.rst +msgid "Returns" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.approve:11 of +msgid "" +"instance of method " +":class:`aiogram.methods.approve_chat_join_request.ApproveChatJoinRequest`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.decline:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.decline_chat_join_request.DeclineChatJoinRequest`" +" will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.decline:7 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.decline:9 of +msgid "Source: https://core.telegram.org/bots/api#declinechatjoinrequest" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.decline:11 of +msgid "" +"instance of method " +":class:`aiogram.methods.decline_chat_join_request.DeclineChatJoinRequest`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_message.SendMessage` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:6 of +msgid "" +"Use this method to send text messages. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer:8 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:8 of +msgid "Source: https://core.telegram.org/bots/api#sendmessage" +msgstr "" + +#: ../../api/types/chat_join_request.rst +msgid "Parameters" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:10 of +msgid "Text of the message to be sent, 1-4096 characters after entities parsing" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:11 +#: 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_location:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:14 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:14 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:11 +#: 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: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: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: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: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: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:17 +#: 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_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: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_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: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: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:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:18 of +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: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 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:15 +#: 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_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: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: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:27 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:19 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.chat_join_request.ChatJoinRequest.answer:19 +#: 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 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:21 +#: 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: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: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: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: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:28 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:20 of +msgid "" +"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_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 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:17 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:17 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:22 +#: 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: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_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: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:29 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:21 of +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_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 "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_animation.SendAnimation`" +" will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:6 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.chat_join_request.ChatJoinRequest.answer_animation:8 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:8 of +msgid "Source: https://core.telegram.org/bots/api#sendanimation" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:10 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.chat_join_request.ChatJoinRequest.answer_animation:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:13 of +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 width" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:15 +#: 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" +" 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.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: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: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: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:30 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:30 of +msgid "instance of method :class:`aiogram.methods.send_animation.SendAnimation`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_audio.SendAudio` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:6 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.chat_join_request.ChatJoinRequest.answer_audio:9 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:9 of +msgid "Source: https://core.telegram.org/bots/api#sendaudio" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:11 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.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: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:17 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:17 of +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:29 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:29 of +msgid "instance of method :class:`aiogram.methods.send_audio.SendAudio`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_contact.SendContact` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:6 of +msgid "" +"Use this method to send phone contacts. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:8 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:8 of +msgid "Source: https://core.telegram.org/bots/api#sendcontact" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:10 of +msgid "Contact's phone number" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:11 of +msgid "Contact's first name" +msgstr "" + +#: 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: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:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:24 of +msgid "instance of method :class:`aiogram.methods.send_contact.SendContact`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_document.SendDocument` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:6 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.chat_join_request.ChatJoinRequest.answer_document:8 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:8 of +msgid "Source: https://core.telegram.org/bots/api#senddocument" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:10 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.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: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: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:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:26 of +msgid "instance of method :class:`aiogram.methods.send_document.SendDocument`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_game.SendGame` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:6 of +msgid "" +"Use this method to send a game. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:8 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:8 of +msgid "Source: https://core.telegram.org/bots/api#sendgame" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:10 of +msgid "" +"Short name of the game, serves as the unique identifier for the game. Set" +" up your games via `@BotFather `_." +msgstr "" + +#: 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, " +"one 'Play game_title' button will be shown. If not empty, the first " +"button must launch the game." +msgstr "" + +#: 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 "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_invoice.SendInvoice` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:6 of +msgid "" +"Use this method to send invoices. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:8 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:8 of +msgid "Source: https://core.telegram.org/bots/api#sendinvoice" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:10 of +msgid "Product name, 1-32 characters" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:11 of +msgid "Product description, 1-255 characters" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:12 +#: 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 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 "" +"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 "" +"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:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:16 of +msgid "" +"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 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:17 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.chat_join_request.ChatJoinRequest.answer_invoice:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:18 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.chat_join_request.ChatJoinRequest.answer_invoice:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:19 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.chat_join_request.ChatJoinRequest.answer_invoice:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:20 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.chat_join_request.ChatJoinRequest.answer_invoice:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:21 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.chat_join_request.ChatJoinRequest.answer_invoice:22 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:22 of +msgid "Photo size in bytes" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:23 of +msgid "Photo width" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:24 of +msgid "Photo height" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:25 +#: 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. 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. 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. 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. 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 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 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. " +"Ignored for payments in `Telegram Stars `_." +msgstr "" + +#: 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, " +"one 'Pay :code:`total price`' button will be shown. If not empty, the " +"first button must be a Pay button." +msgstr "" + +#: 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 "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_location.SendLocation` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:6 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.chat_join_request.ChatJoinRequest.answer_location:8 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:8 of +msgid "Source: https://core.telegram.org/bots/api#sendlocation" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:10 of +msgid "Latitude of the location" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:11 of +msgid "Longitude of the location" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:14 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:14 of +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 "" +"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:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:26 of +msgid "instance of method :class:`aiogram.methods.send_location.SendLocation`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.send_media_group.SendMediaGroup` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:6 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.chat_join_request.ChatJoinRequest.answer_media_group:8 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:8 of +msgid "Source: https://core.telegram.org/bots/api#sendmediagroup" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:10 of +msgid "" +"A JSON-serialized array describing messages to be sent, must include 2-10" +" items" +msgstr "" + +#: 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: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: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:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:20 of +msgid "" +"instance of method " +":class:`aiogram.methods.send_media_group.SendMediaGroup`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_photo.SendPhoto` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:6 of +msgid "" +"Use this method to send photos. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:8 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:8 of +msgid "Source: https://core.telegram.org/bots/api#sendphoto" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:10 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.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: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: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:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:26 of +msgid "instance of method :class:`aiogram.methods.send_photo.SendPhoto`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_poll.SendPoll` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:6 of +msgid "" +"Use this method to send a native poll. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:8 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:8 of +msgid "Source: https://core.telegram.org/bots/api#sendpoll" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:10 of +msgid "Poll question, 1-300 characters" +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 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 "" +"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 "" +"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: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: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: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. It can be specified instead of *explanation_parse_mode*" +msgstr "" + +#: 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: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: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:34 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:34 of +msgid "instance of method :class:`aiogram.methods.send_poll.SendPoll`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_dice.SendDice` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:6 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.chat_join_request.ChatJoinRequest.answer_dice:8 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:8 of +msgid "Source: https://core.telegram.org/bots/api#senddice" +msgstr "" + +#: 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 '🎲', '🎯'" +" and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults " +"to '🎲'" +msgstr "" + +#: 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:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:21 of +msgid "instance of method :class:`aiogram.methods.send_dice.SendDice`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_sticker.SendSticker` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:6 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.chat_join_request.ChatJoinRequest.answer_sticker:8 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:8 of +msgid "Source: https://core.telegram.org/bots/api#sendsticker" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:10 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.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:22 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:22 of +msgid "instance of method :class:`aiogram.methods.send_sticker.SendSticker`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_venue.SendVenue` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:6 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.chat_join_request.ChatJoinRequest.answer_venue:8 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:8 of +msgid "Source: https://core.telegram.org/bots/api#sendvenue" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:10 of +msgid "Latitude of the venue" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:11 of +msgid "Longitude of the venue" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:12 of +msgid "Name of the venue" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:13 of +msgid "Address of the venue" +msgstr "" + +#: 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: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: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: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:28 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:28 of +msgid "instance of method :class:`aiogram.methods.send_venue.SendVenue`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_video.SendVideo` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:6 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.chat_join_request.ChatJoinRequest.answer_video:8 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:8 of +msgid "Source: https://core.telegram.org/bots/api#sendvideo" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:10 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.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 "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: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: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: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: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:33 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:33 of +msgid "instance of method :class:`aiogram.methods.send_video.SendVideo`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.send_video_note.SendVideoNote` will automatically" +" fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:6 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.chat_join_request.ChatJoinRequest.answer_video_note:8 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:8 of +msgid "Source: https://core.telegram.org/bots/api#sendvideonote" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:10 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.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: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 "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:1 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_voice.SendVoice` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:6 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:6 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.chat_join_request.ChatJoinRequest.answer_voice:8 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:8 of +msgid "Source: https://core.telegram.org/bots/api#sendvoice" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:10 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:10 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.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: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: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:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:25 of +msgid "instance of method :class:`aiogram.methods.send_voice.SendVoice`" +msgstr "" + +#~ msgid "Use this method to approve a chat join request." +#~ msgstr "" + +#~ msgid "Use this method to decline a chat join request." +#~ msgstr "" + +#~ msgid "" +#~ "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 24 hours to send messages " +#~ "until the join request is processed, " +#~ "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_location.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_location.po new file mode 100644 index 00000000..ce065a0e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_location.po @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/chat_location.rst:3 +msgid "ChatLocation" +msgstr "" + +#: aiogram.types.chat_location.ChatLocation:1 of +msgid "Represents a location to which a chat is connected." +msgstr "" + +#: aiogram.types.chat_location.ChatLocation:3 of +msgid "Source: https://core.telegram.org/bots/api#chatlocation" +msgstr "" + +#: ../../docstring aiogram.types.chat_location.ChatLocation.location:1 of +msgid "" +"The location to which the supergroup is connected. Can't be a live " +"location." +msgstr "" + +#: ../../docstring aiogram.types.chat_location.ChatLocation.address:1 of +msgid "Location address; 1-64 characters, as defined by the chat owner" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member.po new file mode 100644 index 00000000..49bf21a4 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member.po @@ -0,0 +1,223 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-07-30 18:31+0300\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" + +#: ../../api/types/chat_member.rst:3 +msgid "ChatMember" +msgstr "" + +#: aiogram.types.chat_member.ChatMember:1 of +msgid "" +"This object contains information about one member of a chat. Currently, " +"the following 6 types of chat members are supported:" +msgstr "" + +#: aiogram.types.chat_member.ChatMember:3 of +msgid ":class:`aiogram.types.chat_member_owner.ChatMemberOwner`" +msgstr "" + +#: aiogram.types.chat_member.ChatMember:4 of +msgid ":class:`aiogram.types.chat_member_administrator.ChatMemberAdministrator`" +msgstr "" + +#: aiogram.types.chat_member.ChatMember:5 of +msgid ":class:`aiogram.types.chat_member_member.ChatMemberMember`" +msgstr "" + +#: aiogram.types.chat_member.ChatMember:6 of +msgid ":class:`aiogram.types.chat_member_restricted.ChatMemberRestricted`" +msgstr "" + +#: aiogram.types.chat_member.ChatMember:7 of +msgid ":class:`aiogram.types.chat_member_left.ChatMemberLeft`" +msgstr "" + +#: aiogram.types.chat_member.ChatMember:8 of +msgid ":class:`aiogram.types.chat_member_banned.ChatMemberBanned`" +msgstr "" + +#: aiogram.types.chat_member.ChatMember:10 of +msgid "Source: https://core.telegram.org/bots/api#chatmember" +msgstr "" + +#~ msgid "..." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can add new administrators with a" +#~ " subset of their own privileges or" +#~ " demote administrators that he has " +#~ "promoted, directly or indirectly (promoted " +#~ "by administrators that were appointed by" +#~ " the user)" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send text messages, " +#~ "contacts, locations and venues" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send audios, documents, " +#~ "photos, videos, video notes and voice" +#~ " notes" +#~ msgstr "" + +#~ msgid "The member's status in the chat" +#~ msgstr "" + +#~ msgid "*Optional*. Information about the user" +#~ msgstr "" + +#~ msgid "*Optional*. :code:`True`, if the user's presence in the chat is hidden" +#~ msgstr "" + +#~ msgid "*Optional*. Custom title for this user" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the bot is" +#~ " allowed to edit administrator privileges" +#~ " of that user" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can access the chat event log, " +#~ "chat statistics, message statistics in " +#~ "channels, see channel members, see " +#~ "anonymous administrators in supergroups and" +#~ " ignore slow mode. Implied by any " +#~ "other administrator privilege" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can delete messages of other users" +#~ msgstr "" + +#~ msgid "*Optional*. :code:`True`, if the administrator can manage video chats" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can restrict, ban or unban chat " +#~ "members" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :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" +#~ " the user)" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to change the chat title," +#~ " photo and other settings" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to invite new users to " +#~ "the chat" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can post in the channel; 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 user is" +#~ " allowed to create, rename, close, " +#~ "and reopen forum topics; supergroups " +#~ "only" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " a member of the chat at the" +#~ " moment of the request" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send text messages, " +#~ "contacts, invoices, locations and venues" +#~ msgstr "" + +#~ msgid "*Optional*. :code:`True`, if the user is allowed to send audios" +#~ msgstr "" + +#~ msgid "*Optional*. :code:`True`, if the user is allowed to send documents" +#~ msgstr "" + +#~ msgid "*Optional*. :code:`True`, if the user is allowed to send photos" +#~ msgstr "" + +#~ msgid "*Optional*. :code:`True`, if the user is allowed to send videos" +#~ msgstr "" + +#~ msgid "*Optional*. :code:`True`, if the user is allowed to send video notes" +#~ msgstr "" + +#~ msgid "*Optional*. :code:`True`, if the user is allowed to send voice notes" +#~ msgstr "" + +#~ msgid "*Optional*. :code:`True`, if the user is allowed to send polls" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send animations, games, " +#~ "stickers and use inline bots" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to add web page previews " +#~ "to their messages" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Date when restrictions will " +#~ "be lifted for this user; unix " +#~ "time. If 0, then the user is " +#~ "restricted forever" +#~ 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 new file mode 100644 index 00000000..cbe6711e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_administrator.po @@ -0,0 +1,280 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/chat_member_administrator.rst:3 +msgid "ChatMemberAdministrator" +msgstr "" + +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator:1 of +msgid "" +"Represents a `chat member " +"`_ that has some " +"additional privileges." +msgstr "" + +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator:3 of +msgid "Source: https://core.telegram.org/bots/api#chatmemberadministrator" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.status:1 of +msgid "The member's status in the chat, always 'administrator'" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.user:1 of +msgid "Information about the user" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_be_edited:1 +#: of +msgid "" +":code:`True`, if the bot is allowed to edit administrator privileges of " +"that user" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.is_anonymous:1 +#: of +msgid ":code:`True`, if the user's presence in the chat is hidden" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_manage_chat:1 +#: of +msgid "" +":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 +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_delete_messages:1 +#: of +msgid ":code:`True`, if the administrator can delete messages of other users" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_manage_video_chats:1 +#: of +msgid ":code:`True`, if the administrator can manage video chats" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_restrict_members:1 +#: of +msgid "" +":code:`True`, if the administrator can restrict, ban or unban chat " +"members, or access supergroup statistics" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_promote_members:1 +#: of +msgid "" +":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 the user)" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_change_info:1 +#: of +msgid "" +":code:`True`, if the user is allowed to change the chat title, photo and " +"other settings" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_invite_users:1 +#: of +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; for channels only" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_edit_messages:1 +#: of +msgid "" +"*Optional*. :code:`True`, if the administrator can edit messages of other" +" 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; for " +"groups and supergroups only" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_manage_topics:1 +#: of +msgid "" +"*Optional*. :code:`True`, if the user is allowed to create, rename, " +"close, and reopen forum topics; for supergroups only" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.custom_title:1 +#: of +msgid "*Optional*. Custom title for this user" +msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the administrator can " +#~ "add new administrators with a subset " +#~ "of their own privileges or demote " +#~ "administrators that he has promoted, " +#~ "directly or indirectly (promoted by " +#~ "administrators that were appointed by " +#~ "the user)" +#~ msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the administrator can " +#~ "access the chat event log, chat " +#~ "statistics, message statistics in channels," +#~ " see channel members, 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 in the channel; channels" +#~ " only" +#~ msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the administrator can " +#~ "access the chat event log, chat " +#~ "statistics, boost list in channels, " +#~ "message statistics in channels, see " +#~ "channel members, see anonymous administrators" +#~ " in supergroups and ignore slow mode." +#~ " Implied by any other administrator " +#~ "privilege" +#~ msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the administrator can " +#~ "restrict, ban or unban chat members" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can post messages in the channel;" +#~ " channels only" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " 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_banned.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_banned.po new file mode 100644 index 00000000..4f3224f7 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_banned.po @@ -0,0 +1,55 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-10-08 19:04+0300\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" + +#: ../../api/types/chat_member_banned.rst:3 +msgid "ChatMemberBanned" +msgstr "" + +#: aiogram.types.chat_member_banned.ChatMemberBanned:1 of +msgid "" +"Represents a `chat member " +"`_ that was banned in the " +"chat and can't return to the chat or view chat messages." +msgstr "" + +#: aiogram.types.chat_member_banned.ChatMemberBanned:3 of +msgid "Source: https://core.telegram.org/bots/api#chatmemberbanned" +msgstr "" + +#: ../../docstring aiogram.types.chat_member_banned.ChatMemberBanned.status:1 +#: of +msgid "The member's status in the chat, always 'kicked'" +msgstr "" + +#: ../../docstring aiogram.types.chat_member_banned.ChatMemberBanned.user:1 of +msgid "Information about the user" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_banned.ChatMemberBanned.until_date:1 of +msgid "" +"Date when restrictions will be lifted for this user; Unix time. If 0, " +"then the user is banned forever" +msgstr "" + +#~ msgid "" +#~ "Date when restrictions will be lifted" +#~ " for this user; unix time. If " +#~ "0, then the user is banned forever" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_left.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_left.po new file mode 100644 index 00000000..cae2e7b8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_left.po @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/chat_member_left.rst:3 +msgid "ChatMemberLeft" +msgstr "" + +#: aiogram.types.chat_member_left.ChatMemberLeft:1 of +msgid "" +"Represents a `chat member " +"`_ that isn't currently a " +"member of the chat, but may join it themselves." +msgstr "" + +#: aiogram.types.chat_member_left.ChatMemberLeft:3 of +msgid "Source: https://core.telegram.org/bots/api#chatmemberleft" +msgstr "" + +#: ../../docstring aiogram.types.chat_member_left.ChatMemberLeft.status:1 of +msgid "The member's status in the chat, always 'left'" +msgstr "" + +#: ../../docstring aiogram.types.chat_member_left.ChatMemberLeft.user:1 of +msgid "Information about the user" +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 new file mode 100644 index 00000000..4b4f1dd7 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_member.po @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/chat_member_member.rst:3 +msgid "ChatMemberMember" +msgstr "" + +#: aiogram.types.chat_member_member.ChatMemberMember:1 of +msgid "" +"Represents a `chat member " +"`_ that has no additional " +"privileges or restrictions." +msgstr "" + +#: aiogram.types.chat_member_member.ChatMemberMember:3 of +msgid "Source: https://core.telegram.org/bots/api#chatmembermember" +msgstr "" + +#: ../../docstring aiogram.types.chat_member_member.ChatMemberMember.status:1 +#: of +msgid "The member's status in the chat, always 'member'" +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_owner.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_owner.po new file mode 100644 index 00000000..25470e8c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_owner.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/chat_member_owner.rst:3 +msgid "ChatMemberOwner" +msgstr "" + +#: aiogram.types.chat_member_owner.ChatMemberOwner:1 of +msgid "" +"Represents a `chat member " +"`_ that owns the chat and " +"has all administrator privileges." +msgstr "" + +#: aiogram.types.chat_member_owner.ChatMemberOwner:3 of +msgid "Source: https://core.telegram.org/bots/api#chatmemberowner" +msgstr "" + +#: ../../docstring aiogram.types.chat_member_owner.ChatMemberOwner.status:1 of +msgid "The member's status in the chat, always 'creator'" +msgstr "" + +#: ../../docstring aiogram.types.chat_member_owner.ChatMemberOwner.user:1 of +msgid "Information about the user" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_owner.ChatMemberOwner.is_anonymous:1 of +msgid ":code:`True`, if the user's presence in the chat is hidden" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_owner.ChatMemberOwner.custom_title:1 of +msgid "*Optional*. Custom title for this user" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_restricted.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_restricted.po new file mode 100644 index 00000000..d6c10f5b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_restricted.po @@ -0,0 +1,174 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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.13.1\n" + +#: ../../api/types/chat_member_restricted.rst:3 +msgid "ChatMemberRestricted" +msgstr "" + +#: aiogram.types.chat_member_restricted.ChatMemberRestricted:1 of +msgid "" +"Represents a `chat member " +"`_ that is under certain " +"restrictions in the chat. Supergroups only." +msgstr "" + +#: aiogram.types.chat_member_restricted.ChatMemberRestricted:3 of +msgid "Source: https://core.telegram.org/bots/api#chatmemberrestricted" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.status:1 of +msgid "The member's status in the chat, always 'restricted'" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.user:1 of +msgid "Information about the user" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.is_member:1 of +msgid "" +":code:`True`, if the user is a member of the chat at the moment of the " +"request" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_messages:1 +#: of +msgid "" +":code:`True`, if the user is allowed to send text messages, contacts, " +"giveaways, giveaway winners, invoices, locations and venues" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_audios:1 +#: of +msgid ":code:`True`, if the user is allowed to send audios" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_documents:1 +#: of +msgid ":code:`True`, if the user is allowed to send documents" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_photos:1 +#: of +msgid ":code:`True`, if the user is allowed to send photos" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_videos:1 +#: of +msgid ":code:`True`, if the user is allowed to send videos" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_video_notes:1 +#: of +msgid ":code:`True`, if the user is allowed to send video notes" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_voice_notes:1 +#: of +msgid ":code:`True`, if the user is allowed to send voice notes" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_polls:1 +#: of +msgid ":code:`True`, if the user is allowed to send polls" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_other_messages:1 +#: of +msgid "" +":code:`True`, if the user is allowed to send animations, games, stickers " +"and use inline bots" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_add_web_page_previews:1 +#: of +msgid "" +":code:`True`, if the user is allowed to add web page previews to their " +"messages" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_change_info:1 +#: of +msgid "" +":code:`True`, if the user is allowed to change the chat title, photo and " +"other settings" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_invite_users:1 +#: of +msgid ":code:`True`, if the user is allowed to invite new users to the chat" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_pin_messages:1 +#: of +msgid ":code:`True`, if the user is allowed to pin messages" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_manage_topics:1 +#: of +msgid ":code:`True`, if the user is allowed to create forum topics" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.until_date:1 of +msgid "" +"Date when restrictions will be lifted for this user; Unix time. If 0, " +"then the user is restricted forever" +msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the user is allowed " +#~ "to send text messages, contacts, " +#~ "locations and venues" +#~ msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the user is allowed " +#~ "to send audios, documents, photos, " +#~ "videos, video notes and voice notes" +#~ msgstr "" + +#~ msgid "" +#~ "Date when restrictions will be lifted" +#~ " for this user; unix time. If " +#~ "0, then the user is restricted " +#~ "forever" +#~ msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the user is allowed " +#~ "to send text messages, contacts, " +#~ "invoices, locations and venues" +#~ 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 new file mode 100644 index 00000000..21a36e1e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_updated.po @@ -0,0 +1,1489 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/chat_member_updated.rst:3 +msgid "ChatMemberUpdated" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated:1 of +msgid "This object represents changes in the status of a chat member." +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated:3 of +msgid "Source: https://core.telegram.org/bots/api#chatmemberupdated" +msgstr "" + +#: ../../docstring aiogram.types.chat_member_updated.ChatMemberUpdated.chat:1 +#: of +msgid "Chat the user belongs to" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_updated.ChatMemberUpdated.from_user:1 of +msgid "Performer of the action, which resulted in the change" +msgstr "" + +#: ../../docstring aiogram.types.chat_member_updated.ChatMemberUpdated.date:1 +#: of +msgid "Date the change was done in Unix time" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_updated.ChatMemberUpdated.old_chat_member:1 of +msgid "Previous information about the chat member" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_updated.ChatMemberUpdated.new_chat_member:1 of +msgid "New information about the chat member" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_updated.ChatMemberUpdated.invite_link:1 of +msgid "" +"*Optional*. Chat invite link, which was used by the user to join the " +"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 +msgid "" +"*Optional*. True, if the user joined the chat via a chat folder invite " +"link" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_message.SendMessage` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:4 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:4 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:4 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:4 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:4 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:4 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:4 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:4 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:4 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:4 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:4 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:4 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:4 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:4 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:4 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:4 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:4 of +msgid ":code:`chat_id`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:6 of +msgid "" +"Use this method to send text messages. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:8 of +msgid "Source: https://core.telegram.org/bots/api#sendmessage" +msgstr "" + +#: ../../api/types/chat_member_updated.rst +msgid "Parameters" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:10 of +msgid "Text of the message to be sent, 1-4096 characters after entities parsing" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:11 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:11 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:12 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:12 +#: 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_location:12 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:11 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:11 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:12 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:11 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:14 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:11 +#: 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: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: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:15 of +msgid "Link preview generation options for the message" +msgstr "" + +#: 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: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: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: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:18 +#: 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_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:27 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:18 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:19 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.chat_member_updated.ChatMemberUpdated.answer:19 +#: 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:35 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:21 +#: 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:28 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:19 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:20 of +msgid "" +"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 +#: 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:36 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:22 +#: 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: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 "" + +#: ../../api/types/chat_member_updated.rst +msgid "Returns" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:25 of +msgid "instance of method :class:`aiogram.methods.send_message.SendMessage`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_animation.SendAnimation`" +" will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:6 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.chat_member_updated.ChatMemberUpdated.answer_animation:8 of +msgid "Source: https://core.telegram.org/bots/api#sendanimation" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:10 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.chat_member_updated.ChatMemberUpdated.answer_animation:13 of +msgid "Duration of sent animation in seconds" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:14 of +msgid "Animation width" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:15 of +msgid "Animation height" +msgstr "" + +#: 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" +" 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.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: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: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: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:30 of +msgid "instance of method :class:`aiogram.methods.send_animation.SendAnimation`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_audio.SendAudio` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:6 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.chat_member_updated.ChatMemberUpdated.answer_audio:9 of +msgid "Source: https://core.telegram.org/bots/api#sendaudio" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:11 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.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: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:17 of +msgid "Duration of the audio in seconds" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:18 of +msgid "Performer" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:19 of +msgid "Track name" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:29 of +msgid "instance of method :class:`aiogram.methods.send_audio.SendAudio`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_contact.SendContact` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:6 of +msgid "" +"Use this method to send phone contacts. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:8 of +msgid "Source: https://core.telegram.org/bots/api#sendcontact" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:10 of +msgid "Contact's phone number" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:11 of +msgid "Contact's first name" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:14 of +msgid "Contact's last name" +msgstr "" + +#: 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:24 of +msgid "instance of method :class:`aiogram.methods.send_contact.SendContact`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_document.SendDocument` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:6 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.chat_member_updated.ChatMemberUpdated.answer_document:8 of +msgid "Source: https://core.telegram.org/bots/api#senddocument" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:10 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.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: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: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:26 of +msgid "instance of method :class:`aiogram.methods.send_document.SendDocument`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_game.SendGame` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:6 of +msgid "" +"Use this method to send a game. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:8 of +msgid "Source: https://core.telegram.org/bots/api#sendgame" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:10 of +msgid "" +"Short name of the game, serves as the unique identifier for the game. Set" +" up your games via `@BotFather `_." +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_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.chat_member_updated.ChatMemberUpdated.answer_game:21 of +msgid "instance of method :class:`aiogram.methods.send_game.SendGame`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_invoice.SendInvoice` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:6 of +msgid "" +"Use this method to send invoices. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:8 of +msgid "Source: https://core.telegram.org/bots/api#sendinvoice" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:10 of +msgid "Product name, 1-32 characters" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:11 of +msgid "Product description, 1-255 characters" +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 it for your internal processes." +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:13 of +msgid "" +"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 "" +"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:16 of +msgid "" +"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 +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.chat_member_updated.ChatMemberUpdated.answer_invoice:18 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.chat_member_updated.ChatMemberUpdated.answer_invoice:19 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.chat_member_updated.ChatMemberUpdated.answer_invoice:20 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.chat_member_updated.ChatMemberUpdated.answer_invoice:21 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.chat_member_updated.ChatMemberUpdated.answer_invoice:22 of +msgid "Photo size in bytes" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:23 of +msgid "Photo width" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:24 of +msgid "Photo height" +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. 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. 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. 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. 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 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 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. " +"Ignored for payments in `Telegram Stars `_." +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_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.chat_member_updated.ChatMemberUpdated.answer_invoice:40 of +msgid "instance of method :class:`aiogram.methods.send_invoice.SendInvoice`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_location.SendLocation` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:6 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.chat_member_updated.ChatMemberUpdated.answer_location:8 of +msgid "Source: https://core.telegram.org/bots/api#sendlocation" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:10 of +msgid "Latitude of the location" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:11 of +msgid "Longitude of the location" +msgstr "" + +#: 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:15 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.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: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:26 of +msgid "instance of method :class:`aiogram.methods.send_location.SendLocation`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.send_media_group.SendMediaGroup` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:6 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.chat_member_updated.ChatMemberUpdated.answer_media_group:8 of +msgid "Source: https://core.telegram.org/bots/api#sendmediagroup" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:10 of +msgid "" +"A JSON-serialized array describing messages to be sent, must include 2-10" +" items" +msgstr "" + +#: 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:14 of +msgid "Protects the contents of the sent messages from forwarding and saving" +msgstr "" + +#: 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:20 of +msgid "" +"instance of method " +":class:`aiogram.methods.send_media_group.SendMediaGroup`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_photo.SendPhoto` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:6 of +msgid "" +"Use this method to send photos. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:8 of +msgid "Source: https://core.telegram.org/bots/api#sendphoto" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:10 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.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: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: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:26 of +msgid "instance of method :class:`aiogram.methods.send_photo.SendPhoto`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_poll.SendPoll` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:6 of +msgid "" +"Use this method to send a native poll. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:8 of +msgid "Source: https://core.telegram.org/bots/api#sendpoll" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:10 of +msgid "Poll question, 1-300 characters" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:11 of +msgid "A JSON-serialized list of 2-10 answer options" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:14 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.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: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: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: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:22 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.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: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: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:34 of +msgid "instance of method :class:`aiogram.methods.send_poll.SendPoll`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_dice.SendDice` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:6 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.chat_member_updated.ChatMemberUpdated.answer_dice:8 of +msgid "Source: https://core.telegram.org/bots/api#senddice" +msgstr "" + +#: 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 '🎲', '🎯'" +" and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults " +"to '🎲'" +msgstr "" + +#: 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:21 of +msgid "instance of method :class:`aiogram.methods.send_dice.SendDice`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_sticker.SendSticker` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:6 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.chat_member_updated.ChatMemberUpdated.answer_sticker:8 of +msgid "Source: https://core.telegram.org/bots/api#sendsticker" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:10 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.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:22 of +msgid "instance of method :class:`aiogram.methods.send_sticker.SendSticker`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_venue.SendVenue` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:6 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.chat_member_updated.ChatMemberUpdated.answer_venue:8 of +msgid "Source: https://core.telegram.org/bots/api#sendvenue" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:10 of +msgid "Latitude of the venue" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:11 of +msgid "Longitude of the venue" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:12 of +msgid "Name of the venue" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:13 of +msgid "Address of the venue" +msgstr "" + +#: 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: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:18 of +msgid "Google Places identifier of the venue" +msgstr "" + +#: 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:28 of +msgid "instance of method :class:`aiogram.methods.send_venue.SendVenue`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_video.SendVideo` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:6 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.chat_member_updated.ChatMemberUpdated.answer_video:8 of +msgid "Source: https://core.telegram.org/bots/api#sendvideo" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:10 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.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:14 of +msgid "Video width" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:15 of +msgid "Video height" +msgstr "" + +#: 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: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: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:24 of +msgid "Pass :code:`True` if the uploaded video is suitable for streaming" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:33 of +msgid "instance of method :class:`aiogram.methods.send_video.SendVideo`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.send_video_note.SendVideoNote` will automatically" +" fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:6 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.chat_member_updated.ChatMemberUpdated.answer_video_note:8 of +msgid "Source: https://core.telegram.org/bots/api#sendvideonote" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:10 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.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:24 of +msgid "instance of method :class:`aiogram.methods.send_video_note.SendVideoNote`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_voice.SendVoice` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:6 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.chat_member_updated.ChatMemberUpdated.answer_voice:8 of +msgid "Source: https://core.telegram.org/bots/api#sendvoice" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:10 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.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: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:16 of +msgid "Duration of the voice message in seconds" +msgstr "" + +#: 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_permissions.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_permissions.po new file mode 100644 index 00000000..d9a5569f --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_permissions.po @@ -0,0 +1,156 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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.13.1\n" + +#: ../../api/types/chat_permissions.rst:3 +msgid "ChatPermissions" +msgstr "" + +#: aiogram.types.chat_permissions.ChatPermissions:1 of +msgid "" +"Describes actions that a non-administrator user is allowed to take in a " +"chat." +msgstr "" + +#: aiogram.types.chat_permissions.ChatPermissions:3 of +msgid "Source: https://core.telegram.org/bots/api#chatpermissions" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_messages:1 of +msgid "" +"*Optional*. :code:`True`, if the user is allowed to send text messages, " +"contacts, giveaways, giveaway winners, invoices, locations and venues" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_audios:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send audios" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_documents:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send documents" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_photos:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send photos" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_videos:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send videos" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_video_notes:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send video notes" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_voice_notes:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send voice notes" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_polls:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send polls" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_other_messages:1 of +msgid "" +"*Optional*. :code:`True`, if the user is allowed to send animations, " +"games, stickers and use inline bots" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_add_web_page_previews:1 +#: of +msgid "" +"*Optional*. :code:`True`, if the user is allowed to add web page previews" +" to their messages" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_change_info:1 of +msgid "" +"*Optional*. :code:`True`, if the user is allowed to change the chat " +"title, photo and other settings. Ignored in public supergroups" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_invite_users:1 of +msgid "" +"*Optional*. :code:`True`, if the user is allowed to invite new users to " +"the chat" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_pin_messages:1 of +msgid "" +"*Optional*. :code:`True`, if the user is allowed to pin messages. Ignored" +" in public supergroups" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_manage_topics:1 of +msgid "" +"*Optional*. :code:`True`, if the user is allowed to create forum topics. " +"If omitted defaults to the value of can_pin_messages" +msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send text messages, " +#~ "contacts, locations and venues" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send audios, documents, " +#~ "photos, videos, video notes and voice" +#~ " notes, implies can_send_messages" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send polls, implies " +#~ "can_send_messages" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send animations, games, " +#~ "stickers and use inline bots, implies" +#~ " can_send_media_messages" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to add web page previews " +#~ "to their messages, implies " +#~ "can_send_media_messages" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send text messages, " +#~ "contacts, invoices, locations and venues" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_photo.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_photo.po new file mode 100644 index 00000000..67bbfafe --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_photo.po @@ -0,0 +1,56 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/chat_photo.rst:3 +msgid "ChatPhoto" +msgstr "" + +#: aiogram.types.chat_photo.ChatPhoto:1 of +msgid "This object represents a chat photo." +msgstr "" + +#: aiogram.types.chat_photo.ChatPhoto:3 of +msgid "Source: https://core.telegram.org/bots/api#chatphoto" +msgstr "" + +#: ../../docstring aiogram.types.chat_photo.ChatPhoto.small_file_id:1 of +msgid "" +"File identifier of small (160x160) chat photo. This file_id can be used " +"only for photo download and only for as long as the photo is not changed." +msgstr "" + +#: ../../docstring aiogram.types.chat_photo.ChatPhoto.small_file_unique_id:1 of +msgid "" +"Unique file identifier of small (160x160) chat photo, which is supposed " +"to be the same over time and for different bots. Can't be used to " +"download or reuse the file." +msgstr "" + +#: ../../docstring aiogram.types.chat_photo.ChatPhoto.big_file_id:1 of +msgid "" +"File identifier of big (640x640) chat photo. This file_id can be used " +"only for photo download and only for as long as the photo is not changed." +msgstr "" + +#: ../../docstring aiogram.types.chat_photo.ChatPhoto.big_file_unique_id:1 of +msgid "" +"Unique file identifier of big (640x640) chat photo, which is supposed to " +"be the same over time and for different bots. Can't be used to download " +"or reuse the file." +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 new file mode 100644 index 00000000..50d7d5c7 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_shared.po @@ -0,0 +1,73 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, 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-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.13.1\n" + +#: ../../api/types/chat_shared.rst:3 +msgid "ChatShared" +msgstr "" + +#: aiogram.types.chat_shared.ChatShared:1 of +msgid "" +"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 "" + +#: aiogram.types.chat_shared.ChatShared:3 of +msgid "Source: https://core.telegram.org/bots/api#chatshared" +msgstr "" + +#: ../../docstring aiogram.types.chat_shared.ChatShared.request_id:1 of +msgid "Identifier of the request" +msgstr "" + +#: ../../docstring aiogram.types.chat_shared.ChatShared.chat_id:1 of +msgid "" +"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." +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/chosen_inline_result.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chosen_inline_result.po new file mode 100644 index 00000000..ebbc8e52 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chosen_inline_result.po @@ -0,0 +1,69 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/chosen_inline_result.rst:3 +msgid "ChosenInlineResult" +msgstr "" + +#: aiogram.types.chosen_inline_result.ChosenInlineResult:1 of +msgid "" +"Represents a `result " +"`_ of an inline " +"query that was chosen by the user and sent to their chat partner. " +"**Note:** It is necessary to enable `inline feedback " +"`_ via " +"`@BotFather `_ in order to receive these objects " +"in updates." +msgstr "" + +#: aiogram.types.chosen_inline_result.ChosenInlineResult:4 of +msgid "Source: https://core.telegram.org/bots/api#choseninlineresult" +msgstr "" + +#: ../../docstring +#: aiogram.types.chosen_inline_result.ChosenInlineResult.result_id:1 of +msgid "The unique identifier for the result that was chosen" +msgstr "" + +#: ../../docstring +#: aiogram.types.chosen_inline_result.ChosenInlineResult.from_user:1 of +msgid "The user that chose the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.chosen_inline_result.ChosenInlineResult.query:1 of +msgid "The query that was used to obtain the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.chosen_inline_result.ChosenInlineResult.location:1 of +msgid "*Optional*. Sender location, only for bots that require user location" +msgstr "" + +#: ../../docstring +#: aiogram.types.chosen_inline_result.ChosenInlineResult.inline_message_id:1 of +msgid "" +"*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." +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/contact.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/contact.po new file mode 100644 index 00000000..7e9f5102 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/contact.po @@ -0,0 +1,57 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/contact.rst:3 +msgid "Contact" +msgstr "" + +#: aiogram.types.contact.Contact:1 of +msgid "This object represents a phone contact." +msgstr "" + +#: aiogram.types.contact.Contact:3 of +msgid "Source: https://core.telegram.org/bots/api#contact" +msgstr "" + +#: ../../docstring aiogram.types.contact.Contact.phone_number:1 of +msgid "Contact's phone number" +msgstr "" + +#: ../../docstring aiogram.types.contact.Contact.first_name:1 of +msgid "Contact's first name" +msgstr "" + +#: ../../docstring aiogram.types.contact.Contact.last_name:1 of +msgid "*Optional*. Contact's last name" +msgstr "" + +#: ../../docstring aiogram.types.contact.Contact.user_id:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.contact.Contact.vcard:1 of +msgid "" +"*Optional*. Additional data about the contact in the form of a `vCard " +"`_" +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/dice.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/dice.po new file mode 100644 index 00000000..55baf589 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/dice.po @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/dice.rst:3 +msgid "Dice" +msgstr "" + +#: aiogram.types.dice.Dice:1 of +msgid "This object represents an animated emoji that displays a random value." +msgstr "" + +#: aiogram.types.dice.Dice:3 of +msgid "Source: https://core.telegram.org/bots/api#dice" +msgstr "" + +#: ../../docstring aiogram.types.dice.Dice.emoji:1 of +msgid "Emoji on which the dice throw animation is based" +msgstr "" + +#: ../../docstring aiogram.types.dice.Dice.value:1 of +msgid "" +"Value of the dice, 1-6 for '🎲', '🎯' and '🎳' base emoji, 1-5 for '🏀' and " +"'⚽' base emoji, 1-64 for '🎰' base emoji" +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 new file mode 100644 index 00000000..661b1d76 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/document.po @@ -0,0 +1,73 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/document.rst:3 +msgid "Document" +msgstr "" + +#: aiogram.types.document.Document:1 of +msgid "" +"This object represents a general file (as opposed to `photos " +"`_, `voice messages " +"`_ and `audio files " +"`_)." +msgstr "" + +#: aiogram.types.document.Document:3 of +msgid "Source: https://core.telegram.org/bots/api#document" +msgstr "" + +#: ../../docstring aiogram.types.document.Document.file_id:1 of +msgid "Identifier for this file, which can be used to download or reuse the file" +msgstr "" + +#: ../../docstring aiogram.types.document.Document.file_unique_id:1 of +msgid "" +"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." +msgstr "" + +#: ../../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 the sender" +msgstr "" + +#: ../../docstring aiogram.types.document.Document.mime_type:1 of +msgid "*Optional*. MIME type of the file as defined by the sender" +msgstr "" + +#: ../../docstring aiogram.types.document.Document.file_size:1 of +msgid "" +"*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." +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_credentials.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/encrypted_credentials.po new file mode 100644 index 00000000..ef407694 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/encrypted_credentials.po @@ -0,0 +1,56 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/encrypted_credentials.rst:3 +msgid "EncryptedCredentials" +msgstr "" + +#: aiogram.types.encrypted_credentials.EncryptedCredentials:1 of +msgid "" +"Describes data required for decrypting and authenticating " +":class:`aiogram.types.encrypted_passport_element.EncryptedPassportElement`." +" See the `Telegram Passport Documentation " +"`_ for a " +"complete description of the data decryption and authentication processes." +msgstr "" + +#: aiogram.types.encrypted_credentials.EncryptedCredentials:3 of +msgid "Source: https://core.telegram.org/bots/api#encryptedcredentials" +msgstr "" + +#: ../../docstring +#: aiogram.types.encrypted_credentials.EncryptedCredentials.data:1 of +msgid "" +"Base64-encoded encrypted JSON-serialized data with unique user's payload," +" data hashes and secrets required for " +":class:`aiogram.types.encrypted_passport_element.EncryptedPassportElement`" +" decryption and authentication" +msgstr "" + +#: ../../docstring +#: aiogram.types.encrypted_credentials.EncryptedCredentials.hash:1 of +msgid "Base64-encoded data hash for data authentication" +msgstr "" + +#: ../../docstring +#: aiogram.types.encrypted_credentials.EncryptedCredentials.secret:1 of +msgid "" +"Base64-encoded secret, encrypted with the bot's public RSA key, required " +"for data decryption" +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 new file mode 100644 index 00000000..d8d98b6c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/encrypted_passport_element.po @@ -0,0 +1,204 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/encrypted_passport_element.rst:3 +msgid "EncryptedPassportElement" +msgstr "" + +#: aiogram.types.encrypted_passport_element.EncryptedPassportElement:1 of +msgid "" +"Describes documents or other Telegram Passport elements shared with the " +"bot by the user." +msgstr "" + +#: aiogram.types.encrypted_passport_element.EncryptedPassportElement:3 of +msgid "Source: https://core.telegram.org/bots/api#encryptedpassportelement" +msgstr "" + +#: ../../docstring +#: aiogram.types.encrypted_passport_element.EncryptedPassportElement.type:1 of +msgid "" +"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'." +msgstr "" + +#: ../../docstring +#: aiogram.types.encrypted_passport_element.EncryptedPassportElement.hash:1 of +msgid "" +"Base64-encoded element hash for using in " +":class:`aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified`" +msgstr "" + +#: ../../docstring +#: aiogram.types.encrypted_passport_element.EncryptedPassportElement.data:1 of +msgid "" +"*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`." +msgstr "" + +#: ../../docstring +#: aiogram.types.encrypted_passport_element.EncryptedPassportElement.phone_number:1 +#: of +msgid "" +"*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" +msgstr "" + +#: ../../docstring +#: aiogram.types.encrypted_passport_element.EncryptedPassportElement.files:1 of +msgid "" +"*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 "" + +#: ../../docstring +#: aiogram.types.encrypted_passport_element.EncryptedPassportElement.front_side:1 +#: of +msgid "" +"*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`." +msgstr "" + +#: ../../docstring +#: aiogram.types.encrypted_passport_element.EncryptedPassportElement.reverse_side:1 +#: of +msgid "" +"*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`." +msgstr "" + +#: ../../docstring +#: aiogram.types.encrypted_passport_element.EncryptedPassportElement.selfie:1 +#: of +msgid "" +"*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`." +msgstr "" + +#: ../../docstring +#: aiogram.types.encrypted_passport_element.EncryptedPassportElement.translation:1 +#: of +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 "" + +#~ 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/error_event.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/error_event.po new file mode 100644 index 00000000..fbaceb09 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/error_event.po @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22: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" + +#: ../../api/types/error_event.rst:3 +msgid "ErrorEvent" +msgstr "" + +#: aiogram.types.error_event.ErrorEvent:1 of +msgid "" +"Internal event, should be used to receive errors while processing Updates" +" from Telegram" +msgstr "" + +#: aiogram.types.error_event.ErrorEvent:3 of +msgid "Source: https://core.telegram.org/bots/api#error-event" +msgstr "" + +#: ../../docstring aiogram.types.error_event.ErrorEvent.update:1 of +msgid "Received update" +msgstr "" + +#: ../../docstring aiogram.types.error_event.ErrorEvent.exception:1 of +msgid "Exception" +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 new file mode 100644 index 00000000..81228097 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/external_reply_info.po @@ -0,0 +1,174 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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/external_reply_info.rst:3 +msgid "ExternalReplyInfo" +msgstr "" + +#: aiogram.types.external_reply_info.ExternalReplyInfo:1 of +msgid "" +"This object contains information about a message that is being replied " +"to, which may come from another chat or forum topic." +msgstr "" + +#: aiogram.types.external_reply_info.ExternalReplyInfo:3 of +msgid "Source: https://core.telegram.org/bots/api#externalreplyinfo" +msgstr "" + +#: ../../docstring aiogram.types.external_reply_info.ExternalReplyInfo.origin:1 +#: of +msgid "Origin of the message replied to by the given message" +msgstr "" + +#: ../../docstring aiogram.types.external_reply_info.ExternalReplyInfo.chat:1 +#: of +msgid "" +"*Optional*. Chat the original message belongs to. Available only if the " +"chat is a supergroup or a channel." +msgstr "" + +#: ../../docstring +#: aiogram.types.external_reply_info.ExternalReplyInfo.message_id:1 of +msgid "" +"*Optional*. Unique message identifier inside the original chat. Available" +" only if the original chat is a supergroup or a channel." +msgstr "" + +#: ../../docstring +#: aiogram.types.external_reply_info.ExternalReplyInfo.link_preview_options:1 +#: of +msgid "" +"*Optional*. Options used for link preview generation for the original " +"message, if it is a text message" +msgstr "" + +#: ../../docstring +#: aiogram.types.external_reply_info.ExternalReplyInfo.animation:1 of +msgid "*Optional*. Message is an animation, information about the animation" +msgstr "" + +#: ../../docstring aiogram.types.external_reply_info.ExternalReplyInfo.audio:1 +#: of +msgid "*Optional*. Message is an audio file, information about the file" +msgstr "" + +#: ../../docstring +#: aiogram.types.external_reply_info.ExternalReplyInfo.document:1 of +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" +msgstr "" + +#: ../../docstring +#: aiogram.types.external_reply_info.ExternalReplyInfo.sticker:1 of +msgid "*Optional*. Message is a sticker, information about the sticker" +msgstr "" + +#: ../../docstring aiogram.types.external_reply_info.ExternalReplyInfo.story:1 +#: of +msgid "*Optional*. Message is a forwarded story" +msgstr "" + +#: ../../docstring aiogram.types.external_reply_info.ExternalReplyInfo.video:1 +#: of +msgid "*Optional*. Message is a video, information about the video" +msgstr "" + +#: ../../docstring +#: aiogram.types.external_reply_info.ExternalReplyInfo.video_note:1 of +msgid "" +"*Optional*. Message is a `video note `_, information about the video message" +msgstr "" + +#: ../../docstring aiogram.types.external_reply_info.ExternalReplyInfo.voice:1 +#: of +msgid "*Optional*. Message is a voice message, information about the file" +msgstr "" + +#: ../../docstring +#: aiogram.types.external_reply_info.ExternalReplyInfo.has_media_spoiler:1 of +msgid "" +"*Optional*. :code:`True`, if the message media is covered by a spoiler " +"animation" +msgstr "" + +#: ../../docstring +#: aiogram.types.external_reply_info.ExternalReplyInfo.contact:1 of +msgid "*Optional*. Message is a shared contact, information about the contact" +msgstr "" + +#: ../../docstring aiogram.types.external_reply_info.ExternalReplyInfo.dice:1 +#: of +msgid "*Optional*. Message is a dice with random value" +msgstr "" + +#: ../../docstring aiogram.types.external_reply_info.ExternalReplyInfo.game:1 +#: of +msgid "" +"*Optional*. Message is a game, information about the game. `More about " +"games » `_" +msgstr "" + +#: ../../docstring +#: aiogram.types.external_reply_info.ExternalReplyInfo.giveaway:1 of +msgid "" +"*Optional*. Message is a scheduled giveaway, information about the " +"giveaway" +msgstr "" + +#: ../../docstring +#: aiogram.types.external_reply_info.ExternalReplyInfo.giveaway_winners:1 of +msgid "*Optional*. A giveaway with public winners was completed" +msgstr "" + +#: ../../docstring +#: aiogram.types.external_reply_info.ExternalReplyInfo.invoice:1 of +msgid "" +"*Optional*. Message is an invoice for a `payment " +"`_, information about the " +"invoice. `More about payments » " +"`_" +msgstr "" + +#: ../../docstring +#: aiogram.types.external_reply_info.ExternalReplyInfo.location:1 of +msgid "*Optional*. Message is a shared location, information about the location" +msgstr "" + +#: ../../docstring aiogram.types.external_reply_info.ExternalReplyInfo.poll:1 +#: of +msgid "*Optional*. Message is a native poll, information about the poll" +msgstr "" + +#: ../../docstring aiogram.types.external_reply_info.ExternalReplyInfo.venue:1 +#: of +msgid "*Optional*. Message is a venue, information about the venue" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/file.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/file.po new file mode 100644 index 00000000..7b0c0c2c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/file.po @@ -0,0 +1,65 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/file.rst:3 +msgid "File" +msgstr "" + +#: aiogram.types.file.File:1 of +msgid "" +"This object represents a file ready to be downloaded. The file can be " +"downloaded via the link " +":code:`https://api.telegram.org/file/bot/`. 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`." +msgstr "" + +#: aiogram.types.file.File:3 of +msgid "The maximum file size to download is 20 MB" +msgstr "" + +#: aiogram.types.file.File:5 of +msgid "Source: https://core.telegram.org/bots/api#file" +msgstr "" + +#: ../../docstring aiogram.types.file.File.file_id:1 of +msgid "Identifier for this file, which can be used to download or reuse the file" +msgstr "" + +#: ../../docstring aiogram.types.file.File.file_unique_id:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring aiogram.types.file.File.file_size:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.file.File.file_path:1 of +msgid "" +"*Optional*. File path. Use " +":code:`https://api.telegram.org/file/bot/` to get the " +"file." +msgstr "" 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 new file mode 100644 index 00000000..512cee90 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/force_reply.po @@ -0,0 +1,125 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/force_reply.rst:3 +msgid "ForceReply" +msgstr "" + +#: aiogram.types.force_reply.ForceReply:1 of +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 `_. " +"Not supported in channels and for messages sent on behalf of a Telegram " +"Business account." +msgstr "" + +#: aiogram.types.force_reply.ForceReply:3 of +msgid "" +"**Example:** A `poll bot `_ for groups runs in " +"privacy mode (only receives commands, replies to its messages and " +"mentions). There could be two ways to create a new poll:" +msgstr "" + +#: aiogram.types.force_reply.ForceReply:5 of +msgid "" +"Explain the user how to send a command with parameters (e.g. /newpoll " +"question answer1 answer2). May be appealing for hardcore users but lacks " +"modern day polish." +msgstr "" + +#: aiogram.types.force_reply.ForceReply:6 of +msgid "" +"Guide the user through a step-by-step process. 'Please send me your " +"question', 'Cool, now let's add the first answer option', 'Great. Keep " +"adding answer options, then send /done when you're ready'." +msgstr "" + +#: aiogram.types.force_reply.ForceReply:8 of +msgid "" +"The last option is definitely more attractive. And if you use " +":class:`aiogram.types.force_reply.ForceReply` in your bot's questions, it" +" will receive the user's answers even if it only receives replies, " +"commands and mentions - without any extra work for the user." +msgstr "" + +#: aiogram.types.force_reply.ForceReply:10 of +msgid "Source: https://core.telegram.org/bots/api#forcereply" +msgstr "" + +#: ../../docstring aiogram.types.force_reply.ForceReply.force_reply:1 of +msgid "" +"Shows reply interface to the user, as if they manually selected the bot's" +" message and tapped 'Reply'" +msgstr "" + +#: ../../docstring +#: aiogram.types.force_reply.ForceReply.input_field_placeholder:1 of +msgid "" +"*Optional*. The placeholder to be shown in the input field when the reply" +" is active; 1-64 characters" +msgstr "" + +#: ../../docstring aiogram.types.force_reply.ForceReply.selective:1 of +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 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 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 "" +#~ "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/forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic.po new file mode 100644 index 00000000..c59c0698 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic.po @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-06 14:18+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" + +#: ../../api/types/forum_topic.rst:3 +msgid "ForumTopic" +msgstr "" + +#: aiogram.types.forum_topic.ForumTopic:1 of +msgid "This object represents a forum topic." +msgstr "" + +#: aiogram.types.forum_topic.ForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#forumtopic" +msgstr "" + +#: ../../docstring aiogram.types.forum_topic.ForumTopic.message_thread_id:1 of +msgid "Unique identifier of the forum topic" +msgstr "" + +#: ../../docstring aiogram.types.forum_topic.ForumTopic.name:1 of +msgid "Name of the topic" +msgstr "" + +#: ../../docstring aiogram.types.forum_topic.ForumTopic.icon_color:1 of +msgid "Color of the topic icon in RGB format" +msgstr "" + +#: ../../docstring aiogram.types.forum_topic.ForumTopic.icon_custom_emoji_id:1 +#: of +msgid "*Optional*. Unique identifier of the custom emoji shown as the topic icon" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic_closed.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic_closed.po new file mode 100644 index 00000000..9fadeb3d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic_closed.po @@ -0,0 +1,32 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-06 14:18+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" + +#: ../../api/types/forum_topic_closed.rst:3 +msgid "ForumTopicClosed" +msgstr "" + +#: aiogram.types.forum_topic_closed.ForumTopicClosed:1 of +msgid "" +"This object represents a service message about a forum topic closed in " +"the chat. Currently holds no information." +msgstr "" + +#: aiogram.types.forum_topic_closed.ForumTopicClosed:3 of +msgid "Source: https://core.telegram.org/bots/api#forumtopicclosed" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic_created.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic_created.po new file mode 100644 index 00000000..59855d81 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic_created.po @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-06 14:18+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" + +#: ../../api/types/forum_topic_created.rst:3 +msgid "ForumTopicCreated" +msgstr "" + +#: aiogram.types.forum_topic_created.ForumTopicCreated:1 of +msgid "" +"This object represents a service message about a new forum topic created " +"in the chat." +msgstr "" + +#: aiogram.types.forum_topic_created.ForumTopicCreated:3 of +msgid "Source: https://core.telegram.org/bots/api#forumtopiccreated" +msgstr "" + +#: ../../docstring aiogram.types.forum_topic_created.ForumTopicCreated.name:1 +#: of +msgid "Name of the topic" +msgstr "" + +#: ../../docstring +#: aiogram.types.forum_topic_created.ForumTopicCreated.icon_color:1 of +msgid "Color of the topic icon in RGB format" +msgstr "" + +#: ../../docstring +#: aiogram.types.forum_topic_created.ForumTopicCreated.icon_custom_emoji_id:1 +#: of +msgid "*Optional*. Unique identifier of the custom emoji shown as the topic icon" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic_edited.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic_edited.po new file mode 100644 index 00000000..26fe021a --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic_edited.po @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22: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" + +#: ../../api/types/forum_topic_edited.rst:3 +msgid "ForumTopicEdited" +msgstr "" + +#: aiogram.types.forum_topic_edited.ForumTopicEdited:1 of +msgid "This object represents a service message about an edited forum topic." +msgstr "" + +#: aiogram.types.forum_topic_edited.ForumTopicEdited:3 of +msgid "Source: https://core.telegram.org/bots/api#forumtopicedited" +msgstr "" + +#: ../../docstring aiogram.types.forum_topic_edited.ForumTopicEdited.name:1 of +msgid "*Optional*. New name of the topic, if it was edited" +msgstr "" + +#: ../../docstring +#: aiogram.types.forum_topic_edited.ForumTopicEdited.icon_custom_emoji_id:1 of +msgid "" +"*Optional*. New identifier of the custom emoji shown as the topic icon, " +"if it was edited; an empty string if the icon was removed" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic_reopened.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic_reopened.po new file mode 100644 index 00000000..0d202ed8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic_reopened.po @@ -0,0 +1,32 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-06 14:18+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" + +#: ../../api/types/forum_topic_reopened.rst:3 +msgid "ForumTopicReopened" +msgstr "" + +#: aiogram.types.forum_topic_reopened.ForumTopicReopened:1 of +msgid "" +"This object represents a service message about a forum topic reopened in " +"the chat. Currently holds no information." +msgstr "" + +#: aiogram.types.forum_topic_reopened.ForumTopicReopened:3 of +msgid "Source: https://core.telegram.org/bots/api#forumtopicreopened" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/game.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/game.po new file mode 100644 index 00000000..2e2df85b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/game.po @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/game.rst:3 +msgid "Game" +msgstr "" + +#: aiogram.types.game.Game:1 of +msgid "" +"This object represents a game. Use BotFather to create and edit games, " +"their short names will act as unique identifiers." +msgstr "" + +#: aiogram.types.game.Game:3 of +msgid "Source: https://core.telegram.org/bots/api#game" +msgstr "" + +#: ../../docstring aiogram.types.game.Game.title:1 of +msgid "Title of the game" +msgstr "" + +#: ../../docstring aiogram.types.game.Game.description:1 of +msgid "Description of the game" +msgstr "" + +#: ../../docstring aiogram.types.game.Game.photo:1 of +msgid "Photo that will be displayed in the game message in chats." +msgstr "" + +#: ../../docstring aiogram.types.game.Game.text:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.game.Game.text_entities:1 of +msgid "" +"*Optional*. Special entities that appear in *text*, such as usernames, " +"URLs, bot commands, etc." +msgstr "" + +#: ../../docstring aiogram.types.game.Game.animation:1 of +msgid "" +"*Optional*. Animation that will be displayed in the game message in " +"chats. Upload via `BotFather `_" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/game_high_score.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/game_high_score.po new file mode 100644 index 00000000..bcfb27bd --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/game_high_score.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/game_high_score.rst:3 +msgid "GameHighScore" +msgstr "" + +#: aiogram.types.game_high_score.GameHighScore:1 of +msgid "" +"This object represents one row of the high scores table for a game. And " +"that's about all we've got for now." +msgstr "" + +#: aiogram.types.game_high_score.GameHighScore:4 of +msgid "" +"If you've got any questions, please check out our " +"`https://core.telegram.org/bots/faq " +"`_ **Bot FAQ »**" +msgstr "" + +#: aiogram.types.game_high_score.GameHighScore:6 of +msgid "Source: https://core.telegram.org/bots/api#gamehighscore" +msgstr "" + +#: ../../docstring aiogram.types.game_high_score.GameHighScore.position:1 of +msgid "Position in high score table for the game" +msgstr "" + +#: ../../docstring aiogram.types.game_high_score.GameHighScore.user:1 of +msgid "User" +msgstr "" + +#: ../../docstring aiogram.types.game_high_score.GameHighScore.score:1 of +msgid "Score" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/general_forum_topic_hidden.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/general_forum_topic_hidden.po new file mode 100644 index 00000000..0cb7dbe1 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/general_forum_topic_hidden.po @@ -0,0 +1,32 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22: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" + +#: ../../api/types/general_forum_topic_hidden.rst:3 +msgid "GeneralForumTopicHidden" +msgstr "" + +#: aiogram.types.general_forum_topic_hidden.GeneralForumTopicHidden:1 of +msgid "" +"This object represents a service message about General forum topic hidden" +" in the chat. Currently holds no information." +msgstr "" + +#: aiogram.types.general_forum_topic_hidden.GeneralForumTopicHidden:3 of +msgid "Source: https://core.telegram.org/bots/api#generalforumtopichidden" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/general_forum_topic_unhidden.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/general_forum_topic_unhidden.po new file mode 100644 index 00000000..84782543 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/general_forum_topic_unhidden.po @@ -0,0 +1,32 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22: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" + +#: ../../api/types/general_forum_topic_unhidden.rst:3 +msgid "GeneralForumTopicUnhidden" +msgstr "" + +#: aiogram.types.general_forum_topic_unhidden.GeneralForumTopicUnhidden:1 of +msgid "" +"This object represents a service message about General forum topic " +"unhidden in the chat. Currently holds no information." +msgstr "" + +#: aiogram.types.general_forum_topic_unhidden.GeneralForumTopicUnhidden:3 of +msgid "Source: https://core.telegram.org/bots/api#generalforumtopicunhidden" +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 new file mode 100644 index 00000000..2d36af23 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway.po @@ -0,0 +1,94 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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/giveaway.rst:3 +msgid "Giveaway" +msgstr "" + +#: aiogram.types.giveaway.Giveaway:1 of +msgid "This object represents a message about a scheduled giveaway." +msgstr "" + +#: aiogram.types.giveaway.Giveaway:3 of +msgid "Source: https://core.telegram.org/bots/api#giveaway" +msgstr "" + +#: ../../docstring aiogram.types.giveaway.Giveaway.chats:1 of +msgid "The list of chats which the user must join to participate in the giveaway" +msgstr "" + +#: ../../docstring aiogram.types.giveaway.Giveaway.winners_selection_date:1 of +msgid "" +"Point in time (Unix timestamp) when winners of the giveaway will be " +"selected" +msgstr "" + +#: ../../docstring aiogram.types.giveaway.Giveaway.winner_count:1 of +msgid "" +"The number of users which are supposed to be selected as winners of the " +"giveaway" +msgstr "" + +#: ../../docstring aiogram.types.giveaway.Giveaway.only_new_members:1 of +msgid "" +"*Optional*. :code:`True`, if only users who join the chats after the " +"giveaway started should be eligible to win" +msgstr "" + +#: ../../docstring aiogram.types.giveaway.Giveaway.has_public_winners:1 of +msgid "" +"*Optional*. :code:`True`, if the list of giveaway winners will be visible" +" to everyone" +msgstr "" + +#: ../../docstring aiogram.types.giveaway.Giveaway.prize_description:1 of +msgid "*Optional*. Description of additional giveaway prize" +msgstr "" + +#: ../../docstring aiogram.types.giveaway.Giveaway.country_codes:1 of +msgid "" +"*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." +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; 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 new file mode 100644 index 00000000..1e824a27 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway_completed.po @@ -0,0 +1,60 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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/giveaway_completed.rst:3 +msgid "GiveawayCompleted" +msgstr "" + +#: aiogram.types.giveaway_completed.GiveawayCompleted:1 of +msgid "" +"This object represents a service message about the completion of a " +"giveaway without public winners." +msgstr "" + +#: aiogram.types.giveaway_completed.GiveawayCompleted:3 of +msgid "Source: https://core.telegram.org/bots/api#giveawaycompleted" +msgstr "" + +#: ../../docstring +#: aiogram.types.giveaway_completed.GiveawayCompleted.winner_count:1 of +msgid "Number of winners in the giveaway" +msgstr "" + +#: ../../docstring +#: aiogram.types.giveaway_completed.GiveawayCompleted.unclaimed_prize_count:1 +#: of +msgid "*Optional*. Number of undistributed prizes" +msgstr "" + +#: ../../docstring +#: aiogram.types.giveaway_completed.GiveawayCompleted.giveaway_message:1 of +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 new file mode 100644 index 00000000..de1015e1 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway_created.po @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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/giveaway_created.rst:3 +msgid "GiveawayCreated" +msgstr "" + +#: aiogram.types.giveaway_created.GiveawayCreated:1 of +msgid "" +"This object represents a service message about the creation of a " +"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 new file mode 100644 index 00000000..0f651c73 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway_winners.po @@ -0,0 +1,113 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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/giveaway_winners.rst:3 +msgid "GiveawayWinners" +msgstr "" + +#: aiogram.types.giveaway_winners.GiveawayWinners:1 of +msgid "" +"This object represents a message about the completion of a giveaway with " +"public winners." +msgstr "" + +#: aiogram.types.giveaway_winners.GiveawayWinners:3 of +msgid "Source: https://core.telegram.org/bots/api#giveawaywinners" +msgstr "" + +#: ../../docstring aiogram.types.giveaway_winners.GiveawayWinners.chat:1 of +msgid "The chat that created the giveaway" +msgstr "" + +#: ../../docstring +#: aiogram.types.giveaway_winners.GiveawayWinners.giveaway_message_id:1 of +msgid "Identifier of the message with the giveaway in the chat" +msgstr "" + +#: ../../docstring +#: aiogram.types.giveaway_winners.GiveawayWinners.winners_selection_date:1 of +msgid "Point in time (Unix timestamp) when winners of the giveaway were selected" +msgstr "" + +#: ../../docstring +#: aiogram.types.giveaway_winners.GiveawayWinners.winner_count:1 of +msgid "Total number of winners in the giveaway" +msgstr "" + +#: ../../docstring aiogram.types.giveaway_winners.GiveawayWinners.winners:1 of +msgid "List of up to 100 winners of the giveaway" +msgstr "" + +#: ../../docstring +#: aiogram.types.giveaway_winners.GiveawayWinners.additional_chat_count:1 of +msgid "" +"*Optional*. The number of other chats the user had to join in order to be" +" 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; for Telegram Premium giveaways only" +msgstr "" + +#: ../../docstring +#: aiogram.types.giveaway_winners.GiveawayWinners.unclaimed_prize_count:1 of +msgid "*Optional*. Number of undistributed prizes" +msgstr "" + +#: ../../docstring +#: aiogram.types.giveaway_winners.GiveawayWinners.only_new_members:1 of +msgid "" +"*Optional*. :code:`True`, if only users who had joined the chats after " +"the giveaway started were eligible to win" +msgstr "" + +#: ../../docstring +#: aiogram.types.giveaway_winners.GiveawayWinners.was_refunded:1 of +msgid "" +"*Optional*. :code:`True`, if the giveaway was canceled because the " +"payment for it was refunded" +msgstr "" + +#: ../../docstring +#: 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 new file mode 100644 index 00000000..1a839ba8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inaccessible_message.po @@ -0,0 +1,1772 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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/inaccessible_message.rst:3 +msgid "InaccessibleMessage" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage:1 of +msgid "" +"This object describes a message that was deleted or is otherwise " +"inaccessible to the bot." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage:3 of +msgid "Source: https://core.telegram.org/bots/api#inaccessiblemessage" +msgstr "" + +#: ../../docstring +#: aiogram.types.inaccessible_message.InaccessibleMessage.chat:1 of +msgid "Chat the message belonged to" +msgstr "" + +#: ../../docstring +#: aiogram.types.inaccessible_message.InaccessibleMessage.message_id:1 of +msgid "Unique message identifier inside the chat" +msgstr "" + +#: ../../docstring +#: aiogram.types.inaccessible_message.InaccessibleMessage.date:1 of +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/index.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/index.po new file mode 100644 index 00000000..dd347157 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/index.po @@ -0,0 +1,60 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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: 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" + +#: ../../api/types/index.rst:3 +msgid "Types" +msgstr "" + +#: ../../api/types/index.rst:5 +msgid "Here is list of all available API types:" +msgstr "" + +#: ../../api/types/index.rst:9 +msgid "Inline mode" +msgstr "" + +#: ../../api/types/index.rst:47 +msgid "Available types" +msgstr "" + +#: ../../api/types/index.rst:143 +msgid "Telegram Passport" +msgstr "" + +#: ../../api/types/index.rst:164 +msgid "Getting updates" +msgstr "" + +#: ../../api/types/index.rst:173 +msgid "Stickers" +msgstr "" + +#: ../../api/types/index.rst:184 +msgid "Payments" +msgstr "" + +#: ../../api/types/index.rst:199 +msgid "Games" +msgstr "" + +#~ msgid "Internal events" +#~ msgstr "" + +#~ msgid "Internals" +#~ 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 new file mode 100644 index 00000000..727d0185 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_keyboard_button.po @@ -0,0 +1,190 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_keyboard_button.rst:3 +msgid "InlineKeyboardButton" +msgstr "" + +#: aiogram.types.inline_keyboard_button.InlineKeyboardButton:1 of +msgid "" +"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 +msgid "Source: https://core.telegram.org/bots/api#inlinekeyboardbutton" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_keyboard_button.InlineKeyboardButton.text:1 of +msgid "Label text on the button" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_keyboard_button.InlineKeyboardButton.url:1 of +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 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 the " +"button is pressed, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_keyboard_button.InlineKeyboardButton.web_app:1 of +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. Not supported" +" for messages sent on behalf of a Telegram Business account." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_keyboard_button.InlineKeyboardButton.login_url:1 of +msgid "" +"*Optional*. An HTTPS URL used to automatically authorize the user. Can be" +" used as a replacement for the `Telegram Login Widget " +"`_." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_keyboard_button.InlineKeyboardButton.switch_inline_query:1 +#: of +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. Not supported for messages sent" +" on behalf of a Telegram Business account." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_keyboard_button.InlineKeyboardButton.switch_inline_query_current_chat:1 +#: of +msgid "" +"*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." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_keyboard_button.InlineKeyboardButton.switch_inline_query_chosen_chat:1 +#: of +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. 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 +#: aiogram.types.inline_keyboard_button.InlineKeyboardButton.callback_game:1 of +msgid "" +"*Optional*. Description of the game that will be launched when the user " +"presses the button." +msgstr "" + +#: ../../docstring +#: 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 new file mode 100644 index 00000000..801a8c0e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_keyboard_markup.po @@ -0,0 +1,65 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_keyboard_markup.rst:3 +msgid "InlineKeyboardMarkup" +msgstr "" + +#: aiogram.types.inline_keyboard_markup.InlineKeyboardMarkup:1 of +msgid "" +"This object represents an `inline keyboard " +"`_ that appears" +" right next to the message it belongs to." +msgstr "" + +#: aiogram.types.inline_keyboard_markup.InlineKeyboardMarkup:3 of +msgid "Source: https://core.telegram.org/bots/api#inlinekeyboardmarkup" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_keyboard_markup.InlineKeyboardMarkup.inline_keyboard:1 +#: of +msgid "" +"Array of button rows, each represented by an Array of " +":class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton` " +"objects" +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 "" + +#~ 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.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query.po new file mode 100644 index 00000000..f848f5d0 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query.po @@ -0,0 +1,155 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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: 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" + +#: ../../api/types/inline_query.rst:3 +msgid "InlineQuery" +msgstr "" + +#: aiogram.types.inline_query.InlineQuery:1 of +msgid "" +"This object represents an incoming inline query. When the user sends an " +"empty query, your bot could return some default or trending results." +msgstr "" + +#: aiogram.types.inline_query.InlineQuery:3 of +msgid "Source: https://core.telegram.org/bots/api#inlinequery" +msgstr "" + +#: ../../docstring aiogram.types.inline_query.InlineQuery.id:1 of +msgid "Unique identifier for this query" +msgstr "" + +#: ../../docstring aiogram.types.inline_query.InlineQuery.from_user:1 of +msgid "Sender" +msgstr "" + +#: ../../docstring aiogram.types.inline_query.InlineQuery.query:1 of +msgid "Text of the query (up to 256 characters)" +msgstr "" + +#: ../../docstring aiogram.types.inline_query.InlineQuery.offset:1 of +msgid "Offset of the results to be returned, can be controlled by the bot" +msgstr "" + +#: ../../docstring aiogram.types.inline_query.InlineQuery.chat_type:1 of +msgid "" +"*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" +msgstr "" + +#: ../../docstring aiogram.types.inline_query.InlineQuery.location:1 of +msgid "*Optional*. Sender location, only for bots that request user location" +msgstr "" + +#: aiogram.types.inline_query.InlineQuery.answer:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.answer_inline_query.AnswerInlineQuery` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inline_query.InlineQuery.answer:4 of +msgid ":code:`inline_query_id`" +msgstr "" + +#: aiogram.types.inline_query.InlineQuery.answer:6 of +msgid "" +"Use this method to send answers to an inline query. On success, " +":code:`True` is returned." +msgstr "" + +#: aiogram.types.inline_query.InlineQuery.answer:8 of +msgid "No more than **50** results per query are allowed." +msgstr "" + +#: aiogram.types.inline_query.InlineQuery.answer:10 of +msgid "Source: https://core.telegram.org/bots/api#answerinlinequery" +msgstr "" + +#: aiogram.types.inline_query.InlineQuery.answer of +msgid "Parameters" +msgstr "" + +#: aiogram.types.inline_query.InlineQuery.answer:12 of +msgid "A JSON-serialized array of results for the inline query" +msgstr "" + +#: aiogram.types.inline_query.InlineQuery.answer:13 of +msgid "" +"The maximum amount of time in seconds that the result of the inline query" +" may be cached on the server. Defaults to 300." +msgstr "" + +#: aiogram.types.inline_query.InlineQuery.answer:14 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.inline_query.InlineQuery.answer:15 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.inline_query.InlineQuery.answer:16 of +msgid "" +"A JSON-serialized object describing a button to be shown above inline " +"query results" +msgstr "" + +#: aiogram.types.inline_query.InlineQuery.answer:17 of +msgid "" +"`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." +msgstr "" + +#: aiogram.types.inline_query.InlineQuery.answer:18 of +msgid "" +"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*" +msgstr "" + +#: aiogram.types.inline_query.InlineQuery.answer of +msgid "Returns" +msgstr "" + +#: aiogram.types.inline_query.InlineQuery.answer:19 of +msgid "" +"instance of method " +":class:`aiogram.methods.answer_inline_query.AnswerInlineQuery`" +msgstr "" + +#~ msgid "" +#~ "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" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result.po new file mode 100644 index 00000000..e5213929 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result.po @@ -0,0 +1,118 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/inline_query_result.rst:3 +msgid "InlineQueryResult" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:1 of +msgid "" +"This object represents one result of an inline query. Telegram clients " +"currently support results of the following 20 types:" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:3 of +msgid ":class:`aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:4 of +msgid ":class:`aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:5 of +msgid ":class:`aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:6 of +msgid ":class:`aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:7 of +msgid ":class:`aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:8 of +msgid ":class:`aiogram.types.inline_query_result_cached_sticker.InlineQueryResultCachedSticker`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:9 of +msgid ":class:`aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:10 of +msgid ":class:`aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:11 of +msgid ":class:`aiogram.types.inline_query_result_article.InlineQueryResultArticle`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:12 of +msgid ":class:`aiogram.types.inline_query_result_audio.InlineQueryResultAudio`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:13 of +msgid ":class:`aiogram.types.inline_query_result_contact.InlineQueryResultContact`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:14 of +msgid ":class:`aiogram.types.inline_query_result_game.InlineQueryResultGame`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:15 of +msgid ":class:`aiogram.types.inline_query_result_document.InlineQueryResultDocument`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:16 of +msgid ":class:`aiogram.types.inline_query_result_gif.InlineQueryResultGif`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:17 of +msgid ":class:`aiogram.types.inline_query_result_location.InlineQueryResultLocation`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:18 of +msgid ":class:`aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:19 of +msgid ":class:`aiogram.types.inline_query_result_photo.InlineQueryResultPhoto`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:20 of +msgid ":class:`aiogram.types.inline_query_result_venue.InlineQueryResultVenue`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:21 of +msgid ":class:`aiogram.types.inline_query_result_video.InlineQueryResultVideo`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:22 of +msgid ":class:`aiogram.types.inline_query_result_voice.InlineQueryResultVoice`" +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:24 of +msgid "" +"**Note:** All URLs passed in inline query results will be available to " +"end users and therefore must be assumed to be **public**." +msgstr "" + +#: aiogram.types.inline_query_result.InlineQueryResult:26 of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresult" +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 new file mode 100644 index 00000000..5a147d57 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_article.po @@ -0,0 +1,110 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_article.rst:3 +msgid "InlineQueryResultArticle" +msgstr "" + +#: aiogram.types.inline_query_result_article.InlineQueryResultArticle:1 of +msgid "Represents a link to an article or web page." +msgstr "" + +#: aiogram.types.inline_query_result_article.InlineQueryResultArticle:3 of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultarticle" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_article.InlineQueryResultArticle.type:1 of +msgid "Type of the result, must be *article*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_article.InlineQueryResultArticle.id:1 of +msgid "Unique identifier for this result, 1-64 Bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_article.InlineQueryResultArticle.title:1 +#: of +msgid "Title of the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_article.InlineQueryResultArticle.input_message_content:1 +#: of +msgid "Content of the message to be sent" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_article.InlineQueryResultArticle.reply_markup:1 +#: of +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_article.InlineQueryResultArticle.url:1 of +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 +msgid "" +"*Optional*. Pass :code:`True` if you don't want the URL to be shown in " +"the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_article.InlineQueryResultArticle.hide_url:3 +#: of +msgid "https://core.telegram.org/bots/api-changelog#january-1-2025" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ attached to " +#~ "the message" +#~ msgstr "" 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 new file mode 100644 index 00000000..d404804e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_audio.po @@ -0,0 +1,122 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_audio.rst:3 +msgid "InlineQueryResultAudio" +msgstr "" + +#: aiogram.types.inline_query_result_audio.InlineQueryResultAudio:1 of +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." +msgstr "" + +#: aiogram.types.inline_query_result_audio.InlineQueryResultAudio:3 of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultaudio" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_audio.InlineQueryResultAudio.type:1 of +msgid "Type of the result, must be *audio*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_audio.InlineQueryResultAudio.id:1 of +msgid "Unique identifier for this result, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_audio.InlineQueryResultAudio.audio_url:1 +#: of +msgid "A valid URL for the audio file" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_audio.InlineQueryResultAudio.title:1 of +msgid "Title" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_audio.InlineQueryResultAudio.caption:1 of +msgid "*Optional*. Caption, 0-1024 characters after entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_audio.InlineQueryResultAudio.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the audio caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_audio.InlineQueryResultAudio.caption_entities:1 +#: of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"can be specified instead of *parse_mode*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_audio.InlineQueryResultAudio.performer:1 +#: of +msgid "*Optional*. Performer" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_audio.InlineQueryResultAudio.audio_duration:1 +#: of +msgid "*Optional*. Audio duration in seconds" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_audio.InlineQueryResultAudio.reply_markup:1 +#: of +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_audio.InlineQueryResultAudio.input_message_content:1 +#: of +msgid "*Optional*. Content of the message to be sent instead of the audio" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ 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 new file mode 100644 index 00000000..ed5e5a5a --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_audio.po @@ -0,0 +1,111 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_cached_audio.rst:3 +msgid "InlineQueryResultCachedAudio" +msgstr "" + +#: aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio:1 +#: of +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." +msgstr "" + +#: aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultcachedaudio" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio.type:1 +#: of +msgid "Type of the result, must be *audio*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio.id:1 +#: of +msgid "Unique identifier for this result, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio.audio_file_id:1 +#: of +msgid "A valid file identifier for the audio file" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio.caption:1 +#: of +msgid "*Optional*. Caption, 0-1024 characters after entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the audio caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio.caption_entities:1 +#: of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"can be specified instead of *parse_mode*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio.reply_markup:1 +#: of +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio.input_message_content:1 +#: of +msgid "*Optional*. Content of the message to be sent instead of the audio" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ 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 new file mode 100644 index 00000000..864bca28 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_document.po @@ -0,0 +1,126 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_cached_document.rst:3 +msgid "InlineQueryResultCachedDocument" +msgstr "" + +#: aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument:1 +#: of +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." +msgstr "" + +#: aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultcacheddocument" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument.type:1 +#: of +msgid "Type of the result, must be *document*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument.id:1 +#: of +msgid "Unique identifier for this result, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument.title:1 +#: of +msgid "Title for the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument.document_file_id:1 +#: of +msgid "A valid file identifier for the file" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument.description:1 +#: of +msgid "*Optional*. Short description of the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument.caption:1 +#: of +msgid "" +"*Optional*. Caption of the document to be sent, 0-1024 characters after " +"entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the document caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument.caption_entities:1 +#: of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"can be specified instead of *parse_mode*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument.reply_markup:1 +#: of +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument.input_message_content:1 +#: of +msgid "*Optional*. Content of the message to be sent instead of the file" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ 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 new file mode 100644 index 00000000..69f784b2 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_gif.po @@ -0,0 +1,112 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_cached_gif.rst:3 +msgid "InlineQueryResultCachedGif" +msgstr "" + +#: aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif:1 of +msgid "" +"Represents a link to an animated GIF file stored on the Telegram servers." +" By default, this animated GIF file will be sent by the user with an " +"optional caption. Alternatively, you can use *input_message_content* to " +"send a message with specified content instead of the animation." +msgstr "" + +#: aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif:3 of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultcachedgif" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif.type:1 +#: of +msgid "Type of the result, must be *gif*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif.id:1 +#: of +msgid "Unique identifier for this result, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif.gif_file_id:1 +#: of +msgid "A valid file identifier for the GIF file" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif.title:1 +#: of +msgid "*Optional*. Title for the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif.caption:1 +#: of +msgid "" +"*Optional*. Caption of the GIF file to be sent, 0-1024 characters after " +"entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the caption. See `formatting " +"options `_ for " +"more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif.caption_entities:1 +#: of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"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 +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif.input_message_content:1 +#: of +msgid "*Optional*. Content of the message to be sent instead of the GIF animation" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ attached to " +#~ "the message" +#~ msgstr "" 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 new file mode 100644 index 00000000..cd6ee9ea --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_mpeg4_gif.po @@ -0,0 +1,117 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_cached_mpeg4_gif.rst:3 +msgid "InlineQueryResultCachedMpeg4Gif" +msgstr "" + +#: aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif:1 +#: of +msgid "" +"Represents a link to a video animation (H.264/MPEG-4 AVC video without " +"sound) stored on the Telegram servers. By default, this animated MPEG-4 " +"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 animation." +msgstr "" + +#: aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif.type:1 +#: of +msgid "Type of the result, must be *mpeg4_gif*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif.id:1 +#: of +msgid "Unique identifier for this result, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif.mpeg4_file_id:1 +#: of +msgid "A valid file identifier for the MPEG4 file" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif.title:1 +#: of +msgid "*Optional*. Title for the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif.caption:1 +#: of +msgid "" +"*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters " +"after entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the caption. See `formatting " +"options `_ for " +"more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif.caption_entities:1 +#: of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"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 +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif.input_message_content:1 +#: of +msgid "" +"*Optional*. Content of the message to be sent instead of the video " +"animation" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ attached to " +#~ "the message" +#~ msgstr "" 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 new file mode 100644 index 00000000..c3b543c0 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_photo.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_cached_photo.rst:3 +msgid "InlineQueryResultCachedPhoto" +msgstr "" + +#: aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto:1 +#: of +msgid "" +"Represents a link to a photo stored on the Telegram servers. By default, " +"this photo 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 photo." +msgstr "" + +#: aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultcachedphoto" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto.type:1 +#: of +msgid "Type of the result, must be *photo*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto.id:1 +#: of +msgid "Unique identifier for this result, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto.photo_file_id:1 +#: of +msgid "A valid file identifier of the photo" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto.title:1 +#: of +msgid "*Optional*. Title for the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto.description:1 +#: of +msgid "*Optional*. Short description of the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto.caption:1 +#: of +msgid "" +"*Optional*. Caption of the photo to be sent, 0-1024 characters after " +"entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the photo caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto.caption_entities:1 +#: of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"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 +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto.input_message_content:1 +#: of +msgid "*Optional*. Content of the message to be sent instead of the photo" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ attached to " +#~ "the message" +#~ msgstr "" 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 new file mode 100644 index 00000000..0ccbf99b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_sticker.po @@ -0,0 +1,91 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_cached_sticker.rst:3 +msgid "InlineQueryResultCachedSticker" +msgstr "" + +#: aiogram.types.inline_query_result_cached_sticker.InlineQueryResultCachedSticker:1 +#: of +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." +msgstr "" + +#: aiogram.types.inline_query_result_cached_sticker.InlineQueryResultCachedSticker:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultcachedsticker" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_sticker.InlineQueryResultCachedSticker.type:1 +#: of +msgid "Type of the result, must be *sticker*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_sticker.InlineQueryResultCachedSticker.id:1 +#: of +msgid "Unique identifier for this result, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_sticker.InlineQueryResultCachedSticker.sticker_file_id:1 +#: of +msgid "A valid file identifier of the sticker" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_sticker.InlineQueryResultCachedSticker.reply_markup:1 +#: of +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_sticker.InlineQueryResultCachedSticker.input_message_content:1 +#: of +msgid "*Optional*. Content of the message to be sent instead of the sticker" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ 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 new file mode 100644 index 00000000..1a7151f6 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_video.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_cached_video.rst:3 +msgid "InlineQueryResultCachedVideo" +msgstr "" + +#: aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo:1 +#: of +msgid "" +"Represents a link to a video file stored on the Telegram servers. By " +"default, this video 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 video." +msgstr "" + +#: aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultcachedvideo" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo.type:1 +#: of +msgid "Type of the result, must be *video*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo.id:1 +#: of +msgid "Unique identifier for this result, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo.video_file_id:1 +#: of +msgid "A valid file identifier for the video file" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo.title:1 +#: of +msgid "Title for the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo.description:1 +#: of +msgid "*Optional*. Short description of the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo.caption:1 +#: of +msgid "" +"*Optional*. Caption of the video to be sent, 0-1024 characters after " +"entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the video caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo.caption_entities:1 +#: of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"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 +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo.input_message_content:1 +#: of +msgid "*Optional*. Content of the message to be sent instead of the video" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ attached to " +#~ "the message" +#~ msgstr "" 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 new file mode 100644 index 00000000..b88ad5cd --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_voice.po @@ -0,0 +1,118 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_cached_voice.rst:3 +msgid "InlineQueryResultCachedVoice" +msgstr "" + +#: aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice:1 +#: of +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." +msgstr "" + +#: aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultcachedvoice" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice.type:1 +#: of +msgid "Type of the result, must be *voice*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice.id:1 +#: of +msgid "Unique identifier for this result, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice.voice_file_id:1 +#: of +msgid "A valid file identifier for the voice message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice.title:1 +#: of +msgid "Voice message title" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice.caption:1 +#: of +msgid "*Optional*. Caption, 0-1024 characters after entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the voice message caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice.caption_entities:1 +#: of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"can be specified instead of *parse_mode*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice.reply_markup:1 +#: of +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice.input_message_content:1 +#: of +msgid "*Optional*. Content of the message to be sent instead of the voice message" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ 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 new file mode 100644 index 00000000..4f913bc2 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_contact.po @@ -0,0 +1,121 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_contact.rst:3 +msgid "InlineQueryResultContact" +msgstr "" + +#: aiogram.types.inline_query_result_contact.InlineQueryResultContact:1 of +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." +msgstr "" + +#: aiogram.types.inline_query_result_contact.InlineQueryResultContact:3 of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultcontact" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_contact.InlineQueryResultContact.type:1 of +msgid "Type of the result, must be *contact*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_contact.InlineQueryResultContact.id:1 of +msgid "Unique identifier for this result, 1-64 Bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_contact.InlineQueryResultContact.phone_number:1 +#: of +msgid "Contact's phone number" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_contact.InlineQueryResultContact.first_name:1 +#: of +msgid "Contact's first name" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_contact.InlineQueryResultContact.last_name:1 +#: of +msgid "*Optional*. Contact's last name" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_contact.InlineQueryResultContact.vcard:1 +#: of +msgid "" +"*Optional*. Additional data about the contact in the form of a `vCard " +"`_, 0-2048 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_contact.InlineQueryResultContact.reply_markup:1 +#: of +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_contact.InlineQueryResultContact.input_message_content:1 +#: of +msgid "*Optional*. Content of the message to be sent instead of the contact" +msgstr "" + +#: ../../docstring +#: 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.thumbnail_width:1 +#: of +msgid "*Optional*. Thumbnail width" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_contact.InlineQueryResultContact.thumbnail_height:1 +#: of +msgid "*Optional*. Thumbnail height" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ 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 new file mode 100644 index 00000000..677bbac2 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_document.po @@ -0,0 +1,142 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_document.rst:3 +msgid "InlineQueryResultDocument" +msgstr "" + +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument:1 of +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." +msgstr "" + +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument:3 of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultdocument" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.type:1 +#: of +msgid "Type of the result, must be *document*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.id:1 of +msgid "Unique identifier for this result, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.title:1 +#: of +msgid "Title for the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.document_url:1 +#: of +msgid "A valid URL for the file" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.mime_type:1 +#: of +msgid "" +"MIME type of the content of the file, either 'application/pdf' or " +"'application/zip'" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.caption:1 +#: of +msgid "" +"*Optional*. Caption of the document to be sent, 0-1024 characters after " +"entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the document caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.caption_entities:1 +#: of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"can be specified instead of *parse_mode*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.description:1 +#: of +msgid "*Optional*. Short description of the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.reply_markup:1 +#: of +msgid "*Optional*. Inline keyboard attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.input_message_content:1 +#: of +msgid "*Optional*. Content of the message to be sent instead of the file" +msgstr "" + +#: ../../docstring +#: 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.thumbnail_width:1 +#: of +msgid "*Optional*. Thumbnail width" +msgstr "" + +#: ../../docstring +#: 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 new file mode 100644 index 00000000..3f5fd45f --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_game.po @@ -0,0 +1,71 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.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 `_." +msgstr "" + +#: aiogram.types.inline_query_result_game.InlineQueryResultGame:3 of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultgame" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_game.InlineQueryResultGame.type:1 of +msgid "Type of the result, must be *game*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_game.InlineQueryResultGame.id:1 of +msgid "Unique identifier for this result, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_game.InlineQueryResultGame.game_short_name:1 +#: of +msgid "Short name of the game" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_game.InlineQueryResultGame.reply_markup:1 +#: of +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ 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 new file mode 100644 index 00000000..54f0197d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_gif.po @@ -0,0 +1,139 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_gif.rst:3 +msgid "InlineQueryResultGif" +msgstr "" + +#: aiogram.types.inline_query_result_gif.InlineQueryResultGif:1 of +msgid "" +"Represents a link to an animated GIF file. By default, this animated GIF " +"file will be sent by the user with optional caption. Alternatively, you " +"can use *input_message_content* to send a message with the specified " +"content instead of the animation." +msgstr "" + +#: aiogram.types.inline_query_result_gif.InlineQueryResultGif:3 of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultgif" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_gif.InlineQueryResultGif.type:1 of +msgid "Type of the result, must be *gif*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_gif.InlineQueryResultGif.id:1 of +msgid "Unique identifier for this result, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_gif.InlineQueryResultGif.gif_url:1 of +msgid "A valid URL for the GIF file" +msgstr "" + +#: ../../docstring +#: 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" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_gif.InlineQueryResultGif.gif_width:1 of +msgid "*Optional*. Width of the GIF" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_gif.InlineQueryResultGif.gif_height:1 of +msgid "*Optional*. Height of the GIF" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_gif.InlineQueryResultGif.gif_duration:1 of +msgid "*Optional*. Duration of the GIF in seconds" +msgstr "" + +#: ../../docstring +#: 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', " +"'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_gif.InlineQueryResultGif.title:1 of +msgid "*Optional*. Title for the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_gif.InlineQueryResultGif.caption:1 of +msgid "" +"*Optional*. Caption of the GIF file to be sent, 0-1024 characters after " +"entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_gif.InlineQueryResultGif.parse_mode:1 of +msgid "" +"*Optional*. Mode for parsing entities in the caption. See `formatting " +"options `_ for " +"more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_gif.InlineQueryResultGif.caption_entities:1 +#: of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"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 "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_gif.InlineQueryResultGif.input_message_content:1 +#: of +msgid "*Optional*. Content of the message to be sent instead of the GIF animation" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ 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 new file mode 100644 index 00000000..6b32e250 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_location.po @@ -0,0 +1,153 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_location.rst:3 +msgid "InlineQueryResultLocation" +msgstr "" + +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation:1 of +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." +msgstr "" + +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation:3 of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultlocation" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.type:1 +#: of +msgid "Type of the result, must be *location*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.id:1 of +msgid "Unique identifier for this result, 1-64 Bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.latitude:1 +#: of +msgid "Location latitude in degrees" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.longitude:1 +#: of +msgid "Location longitude in degrees" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.title:1 +#: of +msgid "Location title" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.horizontal_accuracy:1 +#: of +msgid "" +"*Optional*. The radius of uncertainty for the location, measured in " +"meters; 0-1500" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.live_period:1 +#: of +msgid "" +"*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 +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.heading:1 +#: of +msgid "" +"*Optional*. For live locations, a direction in which the user is moving, " +"in degrees. Must be between 1 and 360 if specified." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.proximity_alert_radius:1 +#: of +msgid "" +"*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." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.reply_markup:1 +#: of +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.input_message_content:1 +#: of +msgid "*Optional*. Content of the message to be sent instead of the location" +msgstr "" + +#: ../../docstring +#: 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.thumbnail_width:1 +#: of +msgid "*Optional*. Thumbnail width" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.thumbnail_height:1 +#: of +msgid "*Optional*. Thumbnail height" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ 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 new file mode 100644 index 00000000..c5e9d307 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_mpeg4_gif.po @@ -0,0 +1,151 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_mpeg4_gif.rst:3 +msgid "InlineQueryResultMpeg4Gif" +msgstr "" + +#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif:1 of +msgid "" +"Represents a link to a video animation (H.264/MPEG-4 AVC video without " +"sound). By default, this animated MPEG-4 file will be sent by the user " +"with optional caption. Alternatively, you can use *input_message_content*" +" to send a message with the specified content instead of the animation." +msgstr "" + +#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif:3 of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.type:1 +#: of +msgid "Type of the result, must be *mpeg4_gif*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.id:1 +#: of +msgid "Unique identifier for this result, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.mpeg4_url:1 +#: of +msgid "A valid URL for the MPEG4 file" +msgstr "" + +#: ../../docstring +#: 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 " +"result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.mpeg4_width:1 +#: of +msgid "*Optional*. Video width" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.mpeg4_height:1 +#: of +msgid "*Optional*. Video height" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.mpeg4_duration:1 +#: of +msgid "*Optional*. Video duration in seconds" +msgstr "" + +#: ../../docstring +#: 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', " +"'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.title:1 +#: of +msgid "*Optional*. Title for the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.caption:1 +#: of +msgid "" +"*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters " +"after entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the caption. See `formatting " +"options `_ for " +"more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.caption_entities:1 +#: of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"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 +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.input_message_content:1 +#: of +msgid "" +"*Optional*. Content of the message to be sent instead of the video " +"animation" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ 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 new file mode 100644 index 00000000..207b3e25 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_photo.po @@ -0,0 +1,134 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_photo.rst:3 +msgid "InlineQueryResultPhoto" +msgstr "" + +#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto:1 of +msgid "" +"Represents a link to a photo. By default, this photo will be sent by the " +"user with optional caption. Alternatively, you can use " +"*input_message_content* to send a message with the specified content " +"instead of the photo." +msgstr "" + +#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto:3 of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultphoto" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto.type:1 of +msgid "Type of the result, must be *photo*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto.id:1 of +msgid "Unique identifier for this result, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto.photo_url:1 +#: of +msgid "" +"A valid URL of the photo. Photo must be in **JPEG** format. Photo size " +"must not exceed 5MB" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto.thumbnail_url:1 +#: of +msgid "URL of the thumbnail for the photo" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto.photo_width:1 +#: of +msgid "*Optional*. Width of the photo" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto.photo_height:1 +#: of +msgid "*Optional*. Height of the photo" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto.title:1 of +msgid "*Optional*. Title for the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto.description:1 +#: of +msgid "*Optional*. Short description of the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto.caption:1 of +msgid "" +"*Optional*. Caption of the photo to be sent, 0-1024 characters after " +"entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the photo caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto.caption_entities:1 +#: of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"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 +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto.input_message_content:1 +#: of +msgid "*Optional*. Content of the message to be sent instead of the photo" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ attached to " +#~ "the message" +#~ msgstr "" 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 new file mode 100644 index 00000000..039c0a6c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_venue.po @@ -0,0 +1,144 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_venue.rst:3 +msgid "InlineQueryResultVenue" +msgstr "" + +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue:1 of +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." +msgstr "" + +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue:3 of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultvenue" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.type:1 of +msgid "Type of the result, must be *venue*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.id:1 of +msgid "Unique identifier for this result, 1-64 Bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.latitude:1 of +msgid "Latitude of the venue location in degrees" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.longitude:1 +#: of +msgid "Longitude of the venue location in degrees" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.title:1 of +msgid "Title of the venue" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.address:1 of +msgid "Address of the venue" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.foursquare_id:1 +#: of +msgid "*Optional*. Foursquare identifier of the venue if known" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.foursquare_type:1 +#: of +msgid "" +"*Optional*. Foursquare type of the venue, if known. (For example, " +"'arts_entertainment/default', 'arts_entertainment/aquarium' or " +"'food/icecream'.)" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.google_place_id:1 +#: of +msgid "*Optional*. Google Places identifier of the venue" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.google_place_type:1 +#: of +msgid "" +"*Optional*. Google Places type of the venue. (See `supported types " +"`_.)" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.reply_markup:1 +#: of +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.input_message_content:1 +#: of +msgid "*Optional*. Content of the message to be sent instead of the venue" +msgstr "" + +#: ../../docstring +#: 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.thumbnail_width:1 +#: of +msgid "*Optional*. Thumbnail width" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.thumbnail_height:1 +#: of +msgid "*Optional*. Thumbnail height" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ 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 new file mode 100644 index 00000000..1b71e3a8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_video.po @@ -0,0 +1,153 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_video.rst:3 +msgid "InlineQueryResultVideo" +msgstr "" + +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo:1 of +msgid "" +"Represents a link to a page containing an embedded video player or a " +"video file. By default, this video 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 video." +msgstr "" + +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo:3 of +msgid "" +"If an InlineQueryResultVideo message contains an embedded video (e.g., " +"YouTube), you **must** replace its content using *input_message_content*." +msgstr "" + +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo:5 of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultvideo" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.type:1 of +msgid "Type of the result, must be *video*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.id:1 of +msgid "Unique identifier for this result, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.video_url:1 +#: of +msgid "A valid URL for the embedded video player or video file" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.mime_type:1 +#: of +msgid "MIME type of the content of the video URL, 'text/html' or 'video/mp4'" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.thumbnail_url:1 +#: of +msgid "URL of the thumbnail (JPEG only) for the video" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.title:1 of +msgid "Title for the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.caption:1 of +msgid "" +"*Optional*. Caption of the video to be sent, 0-1024 characters after " +"entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the video caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.caption_entities:1 +#: of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"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 +msgid "*Optional*. Video width" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.video_height:1 +#: of +msgid "*Optional*. Video height" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.video_duration:1 +#: of +msgid "*Optional*. Video duration in seconds" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.description:1 +#: of +msgid "*Optional*. Short description of the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.reply_markup:1 +#: of +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.input_message_content:1 +#: of +msgid "" +"*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)." +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ attached to " +#~ "the message" +#~ msgstr "" 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 new file mode 100644 index 00000000..87cdabf0 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_voice.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/inline_query_result_voice.rst:3 +msgid "InlineQueryResultVoice" +msgstr "" + +#: aiogram.types.inline_query_result_voice.InlineQueryResultVoice:1 of +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 the voice message." +msgstr "" + +#: aiogram.types.inline_query_result_voice.InlineQueryResultVoice:3 of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultvoice" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_voice.InlineQueryResultVoice.type:1 of +msgid "Type of the result, must be *voice*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_voice.InlineQueryResultVoice.id:1 of +msgid "Unique identifier for this result, 1-64 bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_voice.InlineQueryResultVoice.voice_url:1 +#: of +msgid "A valid URL for the voice recording" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_voice.InlineQueryResultVoice.title:1 of +msgid "Recording title" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_voice.InlineQueryResultVoice.caption:1 of +msgid "*Optional*. Caption, 0-1024 characters after entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_voice.InlineQueryResultVoice.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the voice message caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_voice.InlineQueryResultVoice.caption_entities:1 +#: of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"can be specified instead of *parse_mode*" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_voice.InlineQueryResultVoice.voice_duration:1 +#: of +msgid "*Optional*. Recording duration in seconds" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_voice.InlineQueryResultVoice.reply_markup:1 +#: of +msgid "" +"*Optional*. `Inline keyboard `_ attached to the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_voice.InlineQueryResultVoice.input_message_content:1 +#: of +msgid "" +"*Optional*. Content of the message to be sent instead of the voice " +"recording" +msgstr "" + +#~ msgid "" +#~ "*Optional*. `Inline keyboard " +#~ "`_ 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/inline_query_results_button.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_results_button.po new file mode 100644 index 00000000..5a323f31 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_results_button.po @@ -0,0 +1,71 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-10-08 19:04+0300\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" + +#: ../../api/types/inline_query_results_button.rst:3 +msgid "InlineQueryResultsButton" +msgstr "" + +#: aiogram.types.inline_query_results_button.InlineQueryResultsButton:1 of +msgid "" +"This object represents a button to be shown above inline query results. " +"You **must** use exactly one of the optional fields." +msgstr "" + +#: aiogram.types.inline_query_results_button.InlineQueryResultsButton:3 of +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultsbutton" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_results_button.InlineQueryResultsButton.text:1 of +msgid "Label text on the button" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_results_button.InlineQueryResultsButton.web_app:1 +#: of +msgid "" +"*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." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_results_button.InlineQueryResultsButton.start_parameter:1 +#: of +msgid "" +"*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." +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 switch back to the " +#~ "inline mode using the method " +#~ "`switchInlineQuery `_ inside the Web" +#~ " App." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_contact_message_content.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_contact_message_content.po new file mode 100644 index 00000000..16c4ac2b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_contact_message_content.po @@ -0,0 +1,59 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/input_contact_message_content.rst:3 +msgid "InputContactMessageContent" +msgstr "" + +#: aiogram.types.input_contact_message_content.InputContactMessageContent:1 of +msgid "" +"Represents the `content " +"`_ of a contact " +"message to be sent as the result of an inline query." +msgstr "" + +#: aiogram.types.input_contact_message_content.InputContactMessageContent:3 of +msgid "Source: https://core.telegram.org/bots/api#inputcontactmessagecontent" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_contact_message_content.InputContactMessageContent.phone_number:1 +#: of +msgid "Contact's phone number" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_contact_message_content.InputContactMessageContent.first_name:1 +#: of +msgid "Contact's first name" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_contact_message_content.InputContactMessageContent.last_name:1 +#: of +msgid "*Optional*. Contact's last name" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_contact_message_content.InputContactMessageContent.vcard:1 +#: of +msgid "" +"*Optional*. Additional data about the contact in the form of a `vCard " +"`_, 0-2048 bytes" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_file.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_file.po new file mode 100644 index 00000000..908e1a50 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_file.po @@ -0,0 +1,63 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/input_file.rst:3 +msgid "InputFile" +msgstr "" + +#: aiogram.types.input_file.InputFile:1 of +msgid "" +"This object represents the contents of a file to be uploaded. Must be " +"posted using multipart/form-data in the usual way that files are uploaded" +" via the browser." +msgstr "" + +#: aiogram.types.input_file.InputFile:3 of +msgid "Source: https://core.telegram.org/bots/api#inputfile" +msgstr "" + +#: aiogram.types.input_file.BufferedInputFile.from_file:1 of +msgid "Create buffer from file" +msgstr "" + +#: aiogram.types.input_file.BufferedInputFile.from_file of +msgid "Parameters" +msgstr "" + +#: aiogram.types.input_file.BufferedInputFile.from_file:3 of +msgid "Path to file" +msgstr "" + +#: aiogram.types.input_file.BufferedInputFile.from_file:4 of +msgid "" +"Filename to be propagated to telegram. By default, will be parsed from " +"path" +msgstr "" + +#: aiogram.types.input_file.BufferedInputFile.from_file:6 of +msgid "Uploading chunk size" +msgstr "" + +#: aiogram.types.input_file.BufferedInputFile.from_file of +msgid "Returns" +msgstr "" + +#: aiogram.types.input_file.BufferedInputFile.from_file:7 of +msgid "instance of :obj:`BufferedInputFile`" +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 new file mode 100644 index 00000000..50cc9b13 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_invoice_message_content.po @@ -0,0 +1,286 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/input_invoice_message_content.rst:3 +msgid "InputInvoiceMessageContent" +msgstr "" + +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent:1 of +msgid "" +"Represents the `content " +"`_ of an invoice " +"message to be sent as the result of an inline query." +msgstr "" + +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent:3 of +msgid "Source: https://core.telegram.org/bots/api#inputinvoicemessagecontent" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.title:1 +#: of +msgid "Product name, 1-32 characters" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.description:1 +#: of +msgid "Product description, 1-255 characters" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.payload:1 +#: of +msgid "" +"Bot-defined invoice payload, 1-128 bytes. This will not be displayed to " +"the user, use it for your internal processes." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.currency:1 +#: of +msgid "" +"Three-letter ISO 4217 currency code, see `more on currencies " +"`_. Pass " +"'XTR' for payments in `Telegram Stars `_." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.prices:1 +#: 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 "" + +#: ../../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 +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.max_tip_amount:1 +#: of +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. Not supported for payments in " +"`Telegram Stars `_." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.suggested_tip_amounts:1 +#: of +msgid "" +"*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*." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.provider_data:1 +#: of +msgid "" +"*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." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.photo_url:1 +#: of +msgid "" +"*Optional*. URL of the product photo for the invoice. Can be a photo of " +"the goods or a marketing image for a service." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.photo_size:1 +#: of +msgid "*Optional*. Photo size in bytes" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.photo_width:1 +#: of +msgid "*Optional*. Photo width" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.photo_height:1 +#: of +msgid "*Optional*. Photo height" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.need_name:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` if you require the user's full name to " +"complete the order. Ignored for payments in `Telegram Stars " +"`_." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.need_phone_number:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` if you require the user's phone number to " +"complete the order. Ignored for payments in `Telegram Stars " +"`_." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.need_email:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` if you require the user's email address to " +"complete the order. Ignored for payments in `Telegram Stars " +"`_." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.need_shipping_address:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` if you require the user's shipping address " +"to complete the order. Ignored for payments in `Telegram Stars " +"`_." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.send_phone_number_to_provider:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` if the user's phone number should be sent " +"to the provider. Ignored for payments in `Telegram Stars " +"`_." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.send_email_to_provider:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` if the user's email address should be sent " +"to the provider. Ignored for payments in `Telegram Stars " +"`_." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.is_flexible:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` if the final price depends on the shipping " +"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 new file mode 100644 index 00000000..1fa15b17 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_location_message_content.po @@ -0,0 +1,87 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/input_location_message_content.rst:3 +msgid "InputLocationMessageContent" +msgstr "" + +#: aiogram.types.input_location_message_content.InputLocationMessageContent:1 +#: of +msgid "" +"Represents the `content " +"`_ of a location " +"message to be sent as the result of an inline query." +msgstr "" + +#: aiogram.types.input_location_message_content.InputLocationMessageContent:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#inputlocationmessagecontent" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_location_message_content.InputLocationMessageContent.latitude:1 +#: of +msgid "Latitude of the location in degrees" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_location_message_content.InputLocationMessageContent.longitude:1 +#: of +msgid "Longitude of the location in degrees" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_location_message_content.InputLocationMessageContent.horizontal_accuracy:1 +#: of +msgid "" +"*Optional*. The radius of uncertainty for the location, measured in " +"meters; 0-1500" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_location_message_content.InputLocationMessageContent.live_period:1 +#: of +msgid "" +"*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 +#: aiogram.types.input_location_message_content.InputLocationMessageContent.heading:1 +#: of +msgid "" +"*Optional*. For live locations, a direction in which the user is moving, " +"in degrees. Must be between 1 and 360 if specified." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_location_message_content.InputLocationMessageContent.proximity_alert_radius:1 +#: of +msgid "" +"*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." +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.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media.po new file mode 100644 index 00000000..b6740e36 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media.po @@ -0,0 +1,52 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/input_media.rst:3 +msgid "InputMedia" +msgstr "" + +#: aiogram.types.input_media.InputMedia:1 of +msgid "" +"This object represents the content of a media message to be sent. It " +"should be one of" +msgstr "" + +#: aiogram.types.input_media.InputMedia:3 of +msgid ":class:`aiogram.types.input_media_animation.InputMediaAnimation`" +msgstr "" + +#: aiogram.types.input_media.InputMedia:4 of +msgid ":class:`aiogram.types.input_media_document.InputMediaDocument`" +msgstr "" + +#: aiogram.types.input_media.InputMedia:5 of +msgid ":class:`aiogram.types.input_media_audio.InputMediaAudio`" +msgstr "" + +#: aiogram.types.input_media.InputMedia:6 of +msgid ":class:`aiogram.types.input_media_photo.InputMediaPhoto`" +msgstr "" + +#: aiogram.types.input_media.InputMedia:7 of +msgid ":class:`aiogram.types.input_media_video.InputMediaVideo`" +msgstr "" + +#: aiogram.types.input_media.InputMedia:9 of +msgid "Source: https://core.telegram.org/bots/api#inputmedia" +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 new file mode 100644 index 00000000..5e99da16 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_animation.po @@ -0,0 +1,114 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/input_media_animation.rst:3 +msgid "InputMediaAnimation" +msgstr "" + +#: aiogram.types.input_media_animation.InputMediaAnimation:1 of +msgid "" +"Represents an animation file (GIF or H.264/MPEG-4 AVC video without " +"sound) to be sent." +msgstr "" + +#: aiogram.types.input_media_animation.InputMediaAnimation:3 of +msgid "Source: https://core.telegram.org/bots/api#inputmediaanimation" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_animation.InputMediaAnimation.type:1 of +msgid "Type of the result, must be *animation*" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_animation.InputMediaAnimation.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_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" +" 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_media_animation.InputMediaAnimation.caption:1 of +msgid "" +"*Optional*. Caption of the animation to be sent, 0-1024 characters after " +"entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_animation.InputMediaAnimation.parse_mode:1 of +msgid "" +"*Optional*. Mode for parsing entities in the animation caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_animation.InputMediaAnimation.caption_entities:1 +#: of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"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" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_animation.InputMediaAnimation.height:1 of +msgid "*Optional*. Animation height" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_animation.InputMediaAnimation.duration:1 of +msgid "*Optional*. Animation duration in seconds" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_animation.InputMediaAnimation.has_spoiler:1 of +msgid "" +"*Optional*. Pass :code:`True` if the animation needs to be covered with a" +" spoiler animation" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_audio.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_audio.po new file mode 100644 index 00000000..7273e1ac --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_audio.po @@ -0,0 +1,91 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/input_media_audio.rst:3 +msgid "InputMediaAudio" +msgstr "" + +#: aiogram.types.input_media_audio.InputMediaAudio:1 of +msgid "Represents an audio file to be treated as music to be sent." +msgstr "" + +#: aiogram.types.input_media_audio.InputMediaAudio:3 of +msgid "Source: https://core.telegram.org/bots/api#inputmediaaudio" +msgstr "" + +#: ../../docstring aiogram.types.input_media_audio.InputMediaAudio.type:1 of +msgid "Type of the result, must be *audio*" +msgstr "" + +#: ../../docstring aiogram.types.input_media_audio.InputMediaAudio.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_media_audio.InputMediaAudio.thumb: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_media_audio.InputMediaAudio.caption:1 of +msgid "" +"*Optional*. Caption of the audio to be sent, 0-1024 characters after " +"entities parsing" +msgstr "" + +#: ../../docstring aiogram.types.input_media_audio.InputMediaAudio.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the audio caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_audio.InputMediaAudio.caption_entities:1 of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"can be specified instead of *parse_mode*" +msgstr "" + +#: ../../docstring aiogram.types.input_media_audio.InputMediaAudio.duration:1 +#: of +msgid "*Optional*. Duration of the audio in seconds" +msgstr "" + +#: ../../docstring aiogram.types.input_media_audio.InputMediaAudio.performer:1 +#: of +msgid "*Optional*. Performer of the audio" +msgstr "" + +#: ../../docstring aiogram.types.input_media_audio.InputMediaAudio.title:1 of +msgid "*Optional*. Title of the audio" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_document.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_document.po new file mode 100644 index 00000000..5ea2a3d9 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_document.po @@ -0,0 +1,90 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/input_media_document.rst:3 +msgid "InputMediaDocument" +msgstr "" + +#: aiogram.types.input_media_document.InputMediaDocument:1 of +msgid "Represents a general file to be sent." +msgstr "" + +#: aiogram.types.input_media_document.InputMediaDocument:3 of +msgid "Source: https://core.telegram.org/bots/api#inputmediadocument" +msgstr "" + +#: ../../docstring aiogram.types.input_media_document.InputMediaDocument.type:1 +#: of +msgid "Type of the result, must be *document*" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_document.InputMediaDocument.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_media_document.InputMediaDocument.thumb: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_media_document.InputMediaDocument.caption:1 of +msgid "" +"*Optional*. Caption of the document to be sent, 0-1024 characters after " +"entities parsing" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_document.InputMediaDocument.parse_mode:1 of +msgid "" +"*Optional*. Mode for parsing entities in the document caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_document.InputMediaDocument.caption_entities:1 of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"can be specified instead of *parse_mode*" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_document.InputMediaDocument.disable_content_type_detection:1 +#: of +msgid "" +"*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." +msgstr "" 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 new file mode 100644 index 00000000..c56de849 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_photo.po @@ -0,0 +1,79 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/input_media_photo.rst:3 +msgid "InputMediaPhoto" +msgstr "" + +#: aiogram.types.input_media_photo.InputMediaPhoto:1 of +msgid "Represents a photo to be sent." +msgstr "" + +#: aiogram.types.input_media_photo.InputMediaPhoto:3 of +msgid "Source: https://core.telegram.org/bots/api#inputmediaphoto" +msgstr "" + +#: ../../docstring aiogram.types.input_media_photo.InputMediaPhoto.type:1 of +msgid "Type of the result, must be *photo*" +msgstr "" + +#: ../../docstring aiogram.types.input_media_photo.InputMediaPhoto.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_media_photo.InputMediaPhoto.caption:1 of +msgid "" +"*Optional*. Caption of the photo to be sent, 0-1024 characters after " +"entities parsing" +msgstr "" + +#: ../../docstring aiogram.types.input_media_photo.InputMediaPhoto.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the photo caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_photo.InputMediaPhoto.caption_entities:1 of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"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 "" +"*Optional*. Pass :code:`True` if the photo needs to be covered with a " +"spoiler animation" +msgstr "" 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 new file mode 100644 index 00000000..d6744e00 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_video.po @@ -0,0 +1,128 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/input_media_video.rst:3 +msgid "InputMediaVideo" +msgstr "" + +#: aiogram.types.input_media_video.InputMediaVideo:1 of +msgid "Represents a video to be sent." +msgstr "" + +#: aiogram.types.input_media_video.InputMediaVideo:3 of +msgid "Source: https://core.telegram.org/bots/api#inputmediavideo" +msgstr "" + +#: ../../docstring aiogram.types.input_media_video.InputMediaVideo.type:1 of +msgid "Type of the result, must be *video*" +msgstr "" + +#: ../../docstring aiogram.types.input_media_video.InputMediaVideo.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_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" +" 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_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 " +"entities parsing" +msgstr "" + +#: ../../docstring aiogram.types.input_media_video.InputMediaVideo.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the video caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_video.InputMediaVideo.caption_entities:1 of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"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 "" + +#: ../../docstring aiogram.types.input_media_video.InputMediaVideo.height:1 of +msgid "*Optional*. Video height" +msgstr "" + +#: ../../docstring aiogram.types.input_media_video.InputMediaVideo.duration:1 +#: of +msgid "*Optional*. Video duration in seconds" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_video.InputMediaVideo.supports_streaming:1 of +msgid "" +"*Optional*. Pass :code:`True` if the uploaded video is suitable for " +"streaming" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_video.InputMediaVideo.has_spoiler:1 of +msgid "" +"*Optional*. Pass :code:`True` if the video needs to be covered with a " +"spoiler animation" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_message_content.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_message_content.po new file mode 100644 index 00000000..cb7a6f5f --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_message_content.po @@ -0,0 +1,53 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/input_message_content.rst:3 +msgid "InputMessageContent" +msgstr "" + +#: aiogram.types.input_message_content.InputMessageContent:1 of +msgid "" +"This object represents the content of a message to be sent as a result of" +" an inline query. Telegram clients currently support the following 5 " +"types:" +msgstr "" + +#: aiogram.types.input_message_content.InputMessageContent:3 of +msgid ":class:`aiogram.types.input_text_message_content.InputTextMessageContent`" +msgstr "" + +#: aiogram.types.input_message_content.InputMessageContent:4 of +msgid ":class:`aiogram.types.input_location_message_content.InputLocationMessageContent`" +msgstr "" + +#: aiogram.types.input_message_content.InputMessageContent:5 of +msgid ":class:`aiogram.types.input_venue_message_content.InputVenueMessageContent`" +msgstr "" + +#: aiogram.types.input_message_content.InputMessageContent:6 of +msgid ":class:`aiogram.types.input_contact_message_content.InputContactMessageContent`" +msgstr "" + +#: aiogram.types.input_message_content.InputMessageContent:7 of +msgid ":class:`aiogram.types.input_invoice_message_content.InputInvoiceMessageContent`" +msgstr "" + +#: aiogram.types.input_message_content.InputMessageContent:9 of +msgid "Source: https://core.telegram.org/bots/api#inputmessagecontent" +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 new file mode 100644 index 00000000..9884d221 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_sticker.po @@ -0,0 +1,79 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, 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-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.13.1\n" + +#: ../../api/types/input_sticker.rst:3 +msgid "InputSticker" +msgstr "" + +#: aiogram.types.input_sticker.InputSticker:1 of +msgid "This object describes a sticker to be added to a sticker set." +msgstr "" + +#: aiogram.types.input_sticker.InputSticker:3 of +msgid "Source: https://core.telegram.org/bots/api#inputsticker" +msgstr "" + +#: ../../docstring aiogram.types.input_sticker.InputSticker.sticker:1 of +msgid "" +"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 » `" +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 "" + +#: ../../docstring aiogram.types.input_sticker.InputSticker.mask_position:1 of +msgid "" +"*Optional*. Position where the mask should be placed on faces. For 'mask'" +" stickers only." +msgstr "" + +#: ../../docstring aiogram.types.input_sticker.InputSticker.keywords:1 of +msgid "" +"*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." +msgstr "" + +#~ msgid "" +#~ "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 upload a " +#~ "new one using multipart/form-data. " +#~ "Animated and video stickers can't be " +#~ "uploaded via HTTP URL. :ref:`More " +#~ "information on Sending Files » " +#~ "`" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_text_message_content.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_text_message_content.po new file mode 100644 index 00000000..f1b39af7 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_text_message_content.po @@ -0,0 +1,74 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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.13.1\n" + +#: ../../api/types/input_text_message_content.rst:3 +msgid "InputTextMessageContent" +msgstr "" + +#: aiogram.types.input_text_message_content.InputTextMessageContent:1 of +msgid "" +"Represents the `content " +"`_ of a text " +"message to be sent as the result of an inline query." +msgstr "" + +#: aiogram.types.input_text_message_content.InputTextMessageContent:3 of +msgid "Source: https://core.telegram.org/bots/api#inputtextmessagecontent" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_text_message_content.InputTextMessageContent.message_text:1 +#: of +msgid "Text of the message to be sent, 1-4096 characters" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_text_message_content.InputTextMessageContent.parse_mode:1 +#: of +msgid "" +"*Optional*. Mode for parsing entities in the message text. See " +"`formatting options `_ for more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_text_message_content.InputTextMessageContent.entities:1 +#: of +msgid "" +"*Optional*. List of special entities that appear in message text, which " +"can be specified instead of *parse_mode*" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_text_message_content.InputTextMessageContent.link_preview_options:1 +#: of +msgid "*Optional*. Link preview generation options for the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_text_message_content.InputTextMessageContent.disable_web_page_preview:1 +#: of +msgid "*Optional*. Disables link previews for links in the sent message" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_text_message_content.InputTextMessageContent.disable_web_page_preview:3 +#: of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_venue_message_content.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_venue_message_content.po new file mode 100644 index 00000000..631d4d2b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_venue_message_content.po @@ -0,0 +1,86 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/input_venue_message_content.rst:3 +msgid "InputVenueMessageContent" +msgstr "" + +#: aiogram.types.input_venue_message_content.InputVenueMessageContent:1 of +msgid "" +"Represents the `content " +"`_ of a venue " +"message to be sent as the result of an inline query." +msgstr "" + +#: aiogram.types.input_venue_message_content.InputVenueMessageContent:3 of +msgid "Source: https://core.telegram.org/bots/api#inputvenuemessagecontent" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_venue_message_content.InputVenueMessageContent.latitude:1 +#: of +msgid "Latitude of the venue in degrees" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_venue_message_content.InputVenueMessageContent.longitude:1 +#: of +msgid "Longitude of the venue in degrees" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_venue_message_content.InputVenueMessageContent.title:1 +#: of +msgid "Name of the venue" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_venue_message_content.InputVenueMessageContent.address:1 +#: of +msgid "Address of the venue" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_venue_message_content.InputVenueMessageContent.foursquare_id:1 +#: of +msgid "*Optional*. Foursquare identifier of the venue, if known" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_venue_message_content.InputVenueMessageContent.foursquare_type:1 +#: of +msgid "" +"*Optional*. Foursquare type of the venue, if known. (For example, " +"'arts_entertainment/default', 'arts_entertainment/aquarium' or " +"'food/icecream'.)" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_venue_message_content.InputVenueMessageContent.google_place_id:1 +#: of +msgid "*Optional*. Google Places identifier of the venue" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_venue_message_content.InputVenueMessageContent.google_place_type:1 +#: of +msgid "" +"*Optional*. Google Places type of the venue. (See `supported types " +"`_.)" +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 new file mode 100644 index 00000000..09d4e8a8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/invoice.po @@ -0,0 +1,67 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/invoice.rst:3 +msgid "Invoice" +msgstr "" + +#: aiogram.types.invoice.Invoice:1 of +msgid "This object contains basic information about an invoice." +msgstr "" + +#: aiogram.types.invoice.Invoice:3 of +msgid "Source: https://core.telegram.org/bots/api#invoice" +msgstr "" + +#: ../../docstring aiogram.types.invoice.Invoice.title:1 of +msgid "Product name" +msgstr "" + +#: ../../docstring aiogram.types.invoice.Invoice.description:1 of +msgid "Product description" +msgstr "" + +#: ../../docstring aiogram.types.invoice.Invoice.start_parameter:1 of +msgid "" +"Unique bot deep-linking parameter that can be used to generate this " +"invoice" +msgstr "" + +#: ../../docstring aiogram.types.invoice.Invoice.currency:1 of +msgid "" +"Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars " +"`_" +msgstr "" + +#: ../../docstring aiogram.types.invoice.Invoice.total_amount:1 of +msgid "" +"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)." +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 new file mode 100644 index 00000000..3036aa9f --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button.po @@ -0,0 +1,178 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/keyboard_button.rst:3 +msgid "KeyboardButton" +msgstr "" + +#: aiogram.types.keyboard_button.KeyboardButton:1 of +msgid "" +"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 "Source: https://core.telegram.org/bots/api#keyboardbutton" +msgstr "" + +#: ../../docstring aiogram.types.keyboard_button.KeyboardButton.text:1 of +msgid "" +"Text of the button. If none of the optional fields are used, it will be " +"sent as a message when the button is pressed" +msgstr "" + +#: ../../docstring aiogram.types.keyboard_button.KeyboardButton.request_users:1 +#: of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.keyboard_button.KeyboardButton.request_chat:1 +#: of +msgid "" +"*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." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button.KeyboardButton.request_contact:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button.KeyboardButton.request_location:1 of +msgid "" +"*Optional*. If :code:`True`, the user's current location will be sent " +"when the button is pressed. Available in private chats only." +msgstr "" + +#: ../../docstring aiogram.types.keyboard_button.KeyboardButton.request_poll:1 +#: of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.keyboard_button.KeyboardButton.web_app:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.keyboard_button.KeyboardButton.request_user:1 +#: of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.keyboard_button.KeyboardButton.request_user:3 +#: of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +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 text of" +#~ " the button. Optional fields *web_app*, " +#~ "*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 "" +#~ "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_user*, *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_user* and *request_chat* " +#~ "options will only work in Telegram " +#~ "versions released after 3 February, " +#~ "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_poll_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_poll_type.po new file mode 100644 index 00000000..32adde2e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_poll_type.po @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/keyboard_button_poll_type.rst:3 +msgid "KeyboardButtonPollType" +msgstr "" + +#: aiogram.types.keyboard_button_poll_type.KeyboardButtonPollType:1 of +msgid "" +"This object represents type of a poll, which is allowed to be created and" +" sent when the corresponding button is pressed." +msgstr "" + +#: aiogram.types.keyboard_button_poll_type.KeyboardButtonPollType:3 of +msgid "Source: https://core.telegram.org/bots/api#keyboardbuttonpolltype" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_poll_type.KeyboardButtonPollType.type:1 of +msgid "" +"*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." +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 new file mode 100644 index 00000000..4a258c18 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_chat.po @@ -0,0 +1,143 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, 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-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.13.1\n" + +#: ../../api/types/keyboard_button_request_chat.rst:3 +msgid "KeyboardButtonRequestChat" +msgstr "" + +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat:1 of +msgid "" +"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 +msgid "Source: https://core.telegram.org/bots/api#keyboardbuttonrequestchat" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.request_id:1 +#: of +msgid "" +"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" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.chat_is_channel:1 +#: of +msgid "" +"Pass :code:`True` to request a channel chat, pass :code:`False` to " +"request a group or a supergroup chat." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.chat_is_forum:1 +#: of +msgid "" +"*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." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.chat_has_username:1 +#: of +msgid "" +"*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." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.chat_is_created:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request a chat owned by the user. " +"Otherwise, no additional restrictions are applied." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.user_administrator_rights:1 +#: of +msgid "" +"*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." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.bot_administrator_rights:1 +#: of +msgid "" +"*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." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.bot_is_member:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request a chat with the bot as a member." +" 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 " +#~ "identifier of the selected chat will " +#~ "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_user.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_user.po new file mode 100644 index 00000000..36dcd1cf --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_user.po @@ -0,0 +1,73 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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.13.1\n" + +#: ../../api/types/keyboard_button_request_user.rst:3 +msgid "KeyboardButtonRequestUser" +msgstr "" + +#: aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser:1 of +msgid "" +"This object defines the criteria used to request a suitable user. The " +"identifier of the selected user will be shared with the bot when the " +"corresponding button is pressed. `More about requesting users » " +"`_" +msgstr "" + +#: aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser:6 of +msgid "Source: https://core.telegram.org/bots/api#keyboardbuttonrequestuser" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser.request_id:1 +#: of +msgid "" +"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" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser.user_is_bot:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request a bot, pass :code:`False` to " +"request a regular user. If not specified, no additional restrictions are " +"applied." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser.user_is_premium:1 +#: of +msgid "" +"*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." +msgstr "" + +#~ msgid "" +#~ "This object defines the criteria used" +#~ " to request a suitable user. The " +#~ "identifier of the selected user will " +#~ "be shared with the bot when the" +#~ " corresponding button is pressed." +#~ 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 new file mode 100644 index 00000000..f7717c6a --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_users.po @@ -0,0 +1,101 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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/keyboard_button_request_users.rst:3 +msgid "KeyboardButtonRequestUsers" +msgstr "" + +#: aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers:1 of +msgid "" +"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 "" + +#: aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers:3 of +msgid "Source: https://core.telegram.org/bots/api#keyboardbuttonrequestusers" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers.request_id:1 +#: of +msgid "" +"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" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers.user_is_bot:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request bots, pass :code:`False` to " +"request regular users. If not specified, no additional restrictions are " +"applied." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers.user_is_premium:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request premium users, pass " +":code:`False` to request non-premium users. If not specified, no " +"additional restrictions are applied." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers.max_quantity:1 +#: of +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/labeled_price.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/labeled_price.po new file mode 100644 index 00000000..6b3f1406 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/labeled_price.po @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/labeled_price.rst:3 +msgid "LabeledPrice" +msgstr "" + +#: aiogram.types.labeled_price.LabeledPrice:1 of +msgid "This object represents a portion of the price for goods or services." +msgstr "" + +#: aiogram.types.labeled_price.LabeledPrice:3 of +msgid "Source: https://core.telegram.org/bots/api#labeledprice" +msgstr "" + +#: ../../docstring aiogram.types.labeled_price.LabeledPrice.label:1 of +msgid "Portion label" +msgstr "" + +#: ../../docstring aiogram.types.labeled_price.LabeledPrice.amount:1 of +msgid "" +"Price of the product 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)." +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 new file mode 100644 index 00000000..cd4e9c1d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/link_preview_options.po @@ -0,0 +1,89 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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/link_preview_options.rst:3 +msgid "LinkPreviewOptions" +msgstr "" + +#: aiogram.types.link_preview_options.LinkPreviewOptions:1 of +msgid "Describes the options used for link preview generation." +msgstr "" + +#: aiogram.types.link_preview_options.LinkPreviewOptions:3 of +msgid "Source: https://core.telegram.org/bots/api#linkpreviewoptions" +msgstr "" + +#: ../../docstring +#: aiogram.types.link_preview_options.LinkPreviewOptions.is_disabled:1 of +msgid "*Optional*. :code:`True`, if the link preview is disabled" +msgstr "" + +#: ../../docstring aiogram.types.link_preview_options.LinkPreviewOptions.url:1 +#: of +msgid "" +"*Optional*. URL to use for the link preview. If empty, then the first URL" +" found in the message text will be used" +msgstr "" + +#: ../../docstring +#: aiogram.types.link_preview_options.LinkPreviewOptions.prefer_small_media:1 +#: of +msgid "" +"*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 supposed to" +" be enlarged; 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.show_above_text:1 of +msgid "" +"*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" +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 new file mode 100644 index 00000000..c8f1f7ff --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/location.po @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/location.rst:3 +msgid "Location" +msgstr "" + +#: aiogram.types.location.Location:1 of +msgid "This object represents a point on the map." +msgstr "" + +#: aiogram.types.location.Location:3 of +msgid "Source: https://core.telegram.org/bots/api#location" +msgstr "" + +#: ../../docstring aiogram.types.location.Location.latitude:1 of +msgid "Latitude as defined by the sender" +msgstr "" + +#: ../../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 +msgid "" +"*Optional*. The radius of uncertainty for the location, measured in " +"meters; 0-1500" +msgstr "" + +#: ../../docstring aiogram.types.location.Location.live_period:1 of +msgid "" +"*Optional*. Time relative to the message sending date, during which the " +"location can be updated; in seconds. For active live locations only." +msgstr "" + +#: ../../docstring aiogram.types.location.Location.heading:1 of +msgid "" +"*Optional*. The direction in which user is moving, in degrees; 1-360. For" +" active live locations only." +msgstr "" + +#: ../../docstring aiogram.types.location.Location.proximity_alert_radius:1 of +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/login_url.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/login_url.po new file mode 100644 index 00000000..1aca7150 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/login_url.po @@ -0,0 +1,72 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/login_url.rst:3 +msgid "LoginUrl" +msgstr "" + +#: aiogram.types.login_url.LoginUrl:1 of +msgid "" +"This object represents a parameter of the inline keyboard button used to " +"automatically authorize a user. Serves as a great replacement for the " +"`Telegram Login Widget `_ when " +"the user is coming from Telegram. All the user needs to do is tap/click a" +" button and confirm that they want to log in: Telegram apps support these" +" buttons as of `version 5.7 `_." +msgstr "" + +#: aiogram.types.login_url.LoginUrl:4 of +msgid "Sample bot: `@discussbot `_" +msgstr "" + +#: aiogram.types.login_url.LoginUrl:6 of +msgid "Source: https://core.telegram.org/bots/api#loginurl" +msgstr "" + +#: ../../docstring aiogram.types.login_url.LoginUrl.url:1 of +msgid "" +"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 `_." +msgstr "" + +#: ../../docstring aiogram.types.login_url.LoginUrl.forward_text:1 of +msgid "*Optional*. New text of the button in forwarded messages." +msgstr "" + +#: ../../docstring aiogram.types.login_url.LoginUrl.bot_username:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.login_url.LoginUrl.request_write_access:1 of +msgid "" +"*Optional*. Pass :code:`True` to request the permission for your bot to " +"send messages to the user." +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/mask_position.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/mask_position.po new file mode 100644 index 00000000..5ab98120 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/mask_position.po @@ -0,0 +1,56 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/mask_position.rst:3 +msgid "MaskPosition" +msgstr "" + +#: aiogram.types.mask_position.MaskPosition:1 of +msgid "" +"This object describes the position on faces where a mask should be placed" +" by default." +msgstr "" + +#: aiogram.types.mask_position.MaskPosition:3 of +msgid "Source: https://core.telegram.org/bots/api#maskposition" +msgstr "" + +#: ../../docstring aiogram.types.mask_position.MaskPosition.point:1 of +msgid "" +"The part of the face relative to which the mask should be placed. One of " +"'forehead', 'eyes', 'mouth', or 'chin'." +msgstr "" + +#: ../../docstring aiogram.types.mask_position.MaskPosition.x_shift:1 of +msgid "" +"Shift by X-axis measured in widths of the mask scaled to the face size, " +"from left to right. For example, choosing -1.0 will place mask just to " +"the left of the default mask position." +msgstr "" + +#: ../../docstring aiogram.types.mask_position.MaskPosition.y_shift:1 of +msgid "" +"Shift by Y-axis measured in heights of the mask scaled to the face size, " +"from top to bottom. For example, 1.0 will place the mask just below the " +"default mask position." +msgstr "" + +#: ../../docstring aiogram.types.mask_position.MaskPosition.scale:1 of +msgid "Mask scaling coefficient. For example, 2.0 means double size." +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/maybe_inaccessible_message.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/maybe_inaccessible_message.po new file mode 100644 index 00000000..bf6d2499 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/maybe_inaccessible_message.po @@ -0,0 +1,43 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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/maybe_inaccessible_message.rst:3 +msgid "MaybeInaccessibleMessage" +msgstr "" + +#: aiogram.types.maybe_inaccessible_message.MaybeInaccessibleMessage:1 of +msgid "" +"This object describes a message that can be inaccessible to the bot. It " +"can be one of" +msgstr "" + +#: aiogram.types.maybe_inaccessible_message.MaybeInaccessibleMessage:3 of +msgid ":class:`aiogram.types.message.Message`" +msgstr "" + +#: aiogram.types.maybe_inaccessible_message.MaybeInaccessibleMessage:4 of +msgid ":class:`aiogram.types.inaccessible_message.InaccessibleMessage`" +msgstr "" + +#: aiogram.types.maybe_inaccessible_message.MaybeInaccessibleMessage:6 of +msgid "Source: https://core.telegram.org/bots/api#maybeinaccessiblemessage" +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 new file mode 100644 index 00000000..cba4ce0a --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/menu_button.po @@ -0,0 +1,85 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/menu_button.rst:3 +msgid "MenuButton" +msgstr "" + +#: aiogram.types.menu_button.MenuButton:1 of +msgid "" +"This object describes the bot's menu button in a private chat. It should " +"be one of" +msgstr "" + +#: aiogram.types.menu_button.MenuButton:3 of +msgid ":class:`aiogram.types.menu_button_commands.MenuButtonCommands`" +msgstr "" + +#: aiogram.types.menu_button.MenuButton:4 of +msgid ":class:`aiogram.types.menu_button_web_app.MenuButtonWebApp`" +msgstr "" + +#: aiogram.types.menu_button.MenuButton:5 of +msgid ":class:`aiogram.types.menu_button_default.MenuButtonDefault`" +msgstr "" + +#: aiogram.types.menu_button.MenuButton:7 of +msgid "" +"If a menu button other than " +":class:`aiogram.types.menu_button_default.MenuButtonDefault` is set for a" +" private chat, then it is applied in the chat. Otherwise the default menu" +" button is applied. By default, the menu button opens the list of bot " +"commands." +msgstr "" + +#: aiogram.types.menu_button.MenuButton:9 of +msgid "Source: https://core.telegram.org/bots/api#menubutton" +msgstr "" + +#: ../../docstring aiogram.types.menu_button.MenuButton.type:1 of +msgid "Type of the button" +msgstr "" + +#: ../../docstring aiogram.types.menu_button.MenuButton.text:1 of +msgid "*Optional*. Text on the button" +msgstr "" + +#: ../../docstring aiogram.types.menu_button.MenuButton.web_app:1 of +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`. " +"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_commands.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/menu_button_commands.po new file mode 100644 index 00000000..6e0e12cc --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/menu_button_commands.po @@ -0,0 +1,35 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/menu_button_commands.rst:3 +msgid "MenuButtonCommands" +msgstr "" + +#: aiogram.types.menu_button_commands.MenuButtonCommands:1 of +msgid "Represents a menu button, which opens the bot's list of commands." +msgstr "" + +#: aiogram.types.menu_button_commands.MenuButtonCommands:3 of +msgid "Source: https://core.telegram.org/bots/api#menubuttoncommands" +msgstr "" + +#: ../../docstring aiogram.types.menu_button_commands.MenuButtonCommands.type:1 +#: of +msgid "Type of the button, must be *commands*" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/menu_button_default.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/menu_button_default.po new file mode 100644 index 00000000..93e8b337 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/menu_button_default.po @@ -0,0 +1,35 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/menu_button_default.rst:3 +msgid "MenuButtonDefault" +msgstr "" + +#: aiogram.types.menu_button_default.MenuButtonDefault:1 of +msgid "Describes that no specific value for the menu button was set." +msgstr "" + +#: aiogram.types.menu_button_default.MenuButtonDefault:3 of +msgid "Source: https://core.telegram.org/bots/api#menubuttondefault" +msgstr "" + +#: ../../docstring aiogram.types.menu_button_default.MenuButtonDefault.type:1 +#: of +msgid "Type of the button, must be *default*" +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 new file mode 100644 index 00000000..397f85bc --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/menu_button_web_app.po @@ -0,0 +1,62 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/menu_button_web_app.rst:3 +msgid "MenuButtonWebApp" +msgstr "" + +#: aiogram.types.menu_button_web_app.MenuButtonWebApp:1 of +msgid "" +"Represents a menu button, which launches a `Web App " +"`_." +msgstr "" + +#: aiogram.types.menu_button_web_app.MenuButtonWebApp:3 of +msgid "Source: https://core.telegram.org/bots/api#menubuttonwebapp" +msgstr "" + +#: ../../docstring aiogram.types.menu_button_web_app.MenuButtonWebApp.type:1 of +msgid "Type of the button, must be *web_app*" +msgstr "" + +#: ../../docstring aiogram.types.menu_button_web_app.MenuButtonWebApp.text:1 of +msgid "Text on the button" +msgstr "" + +#: ../../docstring aiogram.types.menu_button_web_app.MenuButtonWebApp.web_app:1 +#: of +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`. " +"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 new file mode 100644 index 00000000..48540757 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po @@ -0,0 +1,3315 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/message.rst:3 +msgid "Message" +msgstr "" + +#: aiogram.types.message.Message:1 of +msgid "This object represents a message." +msgstr "" + +#: aiogram.types.message.Message:3 of +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. 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 +msgid "" +"Date the message was sent in Unix time. It is always a positive number, " +"representing a valid date." +msgstr "" + +#: ../../docstring aiogram.types.message.Message.chat:1 of +msgid "Chat the message belongs to" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.message_thread_id:1 of +msgid "" +"*Optional*. Unique identifier of a message thread to which the message " +"belongs; for supergroups only" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.from_user:1 of +msgid "" +"*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 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 +msgid "*Optional*. Information about the original message for forwarded messages" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.is_topic_message:1 of +msgid "*Optional*. :code:`True`, if the message is sent to a forum topic" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.is_automatic_forward:1 of +msgid "" +"*Optional*. :code:`True`, if the message is a channel post that was " +"automatically forwarded to the connected discussion group" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.reply_to_message:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.message.Message.external_reply:1 of +msgid "" +"*Optional*. Information about the message that is being replied to, which" +" may come from another chat or forum topic" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.quote:1 of +msgid "" +"*Optional*. For replies that quote part of the original message, the " +"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 "" + +#: ../../docstring aiogram.types.message.Message.edit_date:1 of +msgid "*Optional*. Date the message was last edited in Unix time" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.has_protected_content:1 of +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 " +"belongs to" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.author_signature:1 of +msgid "" +"*Optional*. Signature of the post author for messages in channels, or the" +" custom title of an anonymous group administrator" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.text:1 of +msgid "*Optional*. For text messages, the actual UTF-8 text of the message" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.entities:1 of +msgid "" +"*Optional*. For text messages, special entities like usernames, URLs, bot" +" commands, etc. that appear in the text" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.link_preview_options:1 of +msgid "" +"*Optional*. Options used for link preview generation for the message, if " +"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" +" backward compatibility, when this field is set, the *document* field " +"will also be set" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.audio:1 of +msgid "*Optional*. Message is an audio file, information about the file" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.document:1 of +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 "" + +#: ../../docstring aiogram.types.message.Message.sticker:1 of +msgid "*Optional*. Message is a sticker, information about the sticker" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.story:1 of +msgid "*Optional*. Message is a forwarded story" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.video:1 of +msgid "*Optional*. Message is a video, information about the video" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.video_note:1 of +msgid "" +"*Optional*. Message is a `video note `_, information about the video message" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.voice:1 of +msgid "*Optional*. Message is a voice message, information about the file" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.caption:1 of +msgid "" +"*Optional*. Caption for the animation, audio, document, paid media, " +"photo, video or voice" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.caption_entities:1 of +msgid "" +"*Optional*. For messages with a caption, special entities like usernames," +" 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 " +"animation" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.contact:1 of +msgid "*Optional*. Message is a shared contact, information about the contact" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.dice:1 of +msgid "*Optional*. Message is a dice with random value" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.game:1 of +msgid "" +"*Optional*. Message is a game, information about the game. `More about " +"games » `_" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.poll:1 of +msgid "*Optional*. Message is a native poll, information about the poll" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.venue:1 of +msgid "" +"*Optional*. Message is a venue, information about the venue. For backward" +" compatibility, when this field is set, the *location* field will also be" +" set" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.location:1 of +msgid "*Optional*. Message is a shared location, information about the location" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.new_chat_members:1 of +msgid "" +"*Optional*. New members that were added to the group or supergroup and " +"information about them (the bot itself may be one of these members)" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.left_chat_member:1 of +msgid "" +"*Optional*. A member was removed from the group, information about them " +"(this member may be the bot itself)" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.new_chat_title:1 of +msgid "*Optional*. A chat title was changed to this value" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.new_chat_photo:1 of +msgid "*Optional*. A chat photo was change to this value" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.delete_chat_photo:1 of +msgid "*Optional*. Service message: the chat photo was deleted" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.group_chat_created:1 of +msgid "*Optional*. Service message: the group has been created" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.supergroup_chat_created:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.message.Message.channel_chat_created:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring +#: aiogram.types.message.Message.message_auto_delete_timer_changed:1 of +msgid "" +"*Optional*. Service message: auto-delete timer settings changed in the " +"chat" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.migrate_to_chat_id:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.message.Message.migrate_from_chat_id:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.message.Message.pinned_message:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.message.Message.invoice:1 of +msgid "" +"*Optional*. Message is an invoice for a `payment " +"`_, information about the " +"invoice. `More about payments » " +"`_" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.successful_payment:1 of +msgid "" +"*Optional*. Message is a service message about a successful payment, " +"information about the payment. `More about payments » " +"`_" +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 "" + +#: ../../docstring aiogram.types.message.Message.chat_shared:1 of +msgid "*Optional*. Service message: a chat was shared with the bot" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.connected_website:1 of +msgid "" +"*Optional*. The domain name of the website on which the user has logged " +"in. `More about Telegram Login » " +"`_" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.write_access_allowed:1 of +msgid "" +"*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 `_" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.passport_data:1 of +msgid "*Optional*. Telegram Passport data" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.proximity_alert_triggered:1 of +msgid "" +"*Optional*. Service message. A user in the chat triggered another user's " +"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 "" + +#: ../../docstring aiogram.types.message.Message.forum_topic_edited:1 of +msgid "*Optional*. Service message: forum topic edited" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.forum_topic_closed:1 of +msgid "*Optional*. Service message: forum topic closed" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.forum_topic_reopened:1 of +msgid "*Optional*. Service message: forum topic reopened" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.general_forum_topic_hidden:1 +#: of +msgid "*Optional*. Service message: the 'General' forum topic hidden" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.general_forum_topic_unhidden:1 +#: of +msgid "*Optional*. Service message: the 'General' forum topic unhidden" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.giveaway_created:1 of +msgid "*Optional*. Service message: a scheduled giveaway was created" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.giveaway:1 of +msgid "*Optional*. The message is a scheduled giveaway message" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.giveaway_winners:1 of +msgid "*Optional*. A giveaway with public winners was completed" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.giveaway_completed:1 of +msgid "" +"*Optional*. Service message: a giveaway without public winners was " +"completed" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.video_chat_scheduled:1 of +msgid "*Optional*. Service message: video chat scheduled" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.video_chat_started:1 of +msgid "*Optional*. Service message: video chat started" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.video_chat_ended:1 of +msgid "*Optional*. Service message: video chat ended" +msgstr "" + +#: ../../docstring +#: aiogram.types.message.Message.video_chat_participants_invited:1 of +msgid "*Optional*. Service message: new participants invited to a video chat" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.web_app_data:1 of +msgid "*Optional*. Service message: data sent by a Web App" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.reply_markup:1 of +msgid "" +"*Optional*. Inline keyboard attached to the message. :code:`login_url` " +"buttons are represented as ordinary :code:`url` buttons." +msgstr "" + +#: ../../docstring aiogram.types.message.Message.forward_date:1 of +msgid "" +"*Optional*. For forwarded messages, date the original message was sent in" +" Unix time" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.forward_date:3 +#: aiogram.types.message.Message.forward_from:3 +#: aiogram.types.message.Message.forward_from_chat:3 +#: aiogram.types.message.Message.forward_from_message_id:3 +#: aiogram.types.message.Message.forward_sender_name:3 +#: aiogram.types.message.Message.forward_signature:3 +#: aiogram.types.message.Message.user_shared:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.forward_from:1 of +msgid "*Optional*. For forwarded messages, sender of the original message" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.forward_from_chat:1 of +msgid "" +"*Optional*. For messages forwarded from channels or from anonymous " +"administrators, information about the original sender chat" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.forward_from_message_id:1 of +msgid "" +"*Optional*. For messages forwarded from channels, identifier of the " +"original message in the channel" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.forward_sender_name:1 of +msgid "" +"*Optional*. Sender's name for messages forwarded from users who disallow " +"adding a link to their account in forwarded messages" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.forward_signature:1 of +msgid "" +"*Optional*. For forwarded messages that were originally sent in channels " +"or by an anonymous chat administrator, signature of the message sender if" +" present" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.user_shared:1 of +msgid "*Optional*. Service message: a user was shared with the bot" +msgstr "" + +#: aiogram.types.message.Message.answer_animation:1 +#: aiogram.types.message.Message.reply_animation:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_animation.SendAnimation`" +" will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.message.Message.answer:4 +#: aiogram.types.message.Message.answer_animation:4 +#: aiogram.types.message.Message.answer_audio:4 +#: aiogram.types.message.Message.answer_contact:4 +#: aiogram.types.message.Message.answer_dice:4 +#: aiogram.types.message.Message.answer_document:4 +#: aiogram.types.message.Message.answer_game:4 +#: 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 +#: aiogram.types.message.Message.answer_venue:4 +#: aiogram.types.message.Message.answer_video:4 +#: aiogram.types.message.Message.answer_video_note:4 +#: aiogram.types.message.Message.answer_voice:4 +#: aiogram.types.message.Message.delete:4 +#: aiogram.types.message.Message.delete_reply_markup:4 +#: aiogram.types.message.Message.edit_caption:4 +#: aiogram.types.message.Message.edit_live_location:4 +#: aiogram.types.message.Message.edit_media:4 +#: aiogram.types.message.Message.edit_reply_markup:4 +#: aiogram.types.message.Message.edit_text:4 +#: aiogram.types.message.Message.pin:4 aiogram.types.message.Message.react:4 +#: aiogram.types.message.Message.reply:4 +#: aiogram.types.message.Message.reply_animation:4 +#: aiogram.types.message.Message.reply_audio:4 +#: aiogram.types.message.Message.reply_contact:4 +#: aiogram.types.message.Message.reply_dice:4 +#: aiogram.types.message.Message.reply_document:4 +#: aiogram.types.message.Message.reply_game:4 +#: 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 +#: aiogram.types.message.Message.reply_venue:4 +#: aiogram.types.message.Message.reply_video:4 +#: aiogram.types.message.Message.reply_video_note:4 +#: aiogram.types.message.Message.reply_voice:4 +#: aiogram.types.message.Message.stop_live_location:4 +#: aiogram.types.message.Message.unpin:4 of +msgid ":code:`chat_id`" +msgstr "" + +#: aiogram.types.message.Message.answer:5 +#: aiogram.types.message.Message.answer_animation:5 +#: aiogram.types.message.Message.answer_audio:5 +#: aiogram.types.message.Message.answer_contact:5 +#: aiogram.types.message.Message.answer_dice:5 +#: aiogram.types.message.Message.answer_document:5 +#: aiogram.types.message.Message.answer_game:5 +#: 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 +#: aiogram.types.message.Message.answer_venue:5 +#: aiogram.types.message.Message.answer_video:5 +#: aiogram.types.message.Message.answer_video_note:5 +#: aiogram.types.message.Message.answer_voice:5 +#: aiogram.types.message.Message.reply:5 +#: aiogram.types.message.Message.reply_animation:5 +#: aiogram.types.message.Message.reply_audio:5 +#: aiogram.types.message.Message.reply_contact:5 +#: aiogram.types.message.Message.reply_dice:5 +#: aiogram.types.message.Message.reply_document:5 +#: aiogram.types.message.Message.reply_game:5 +#: 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 +#: aiogram.types.message.Message.reply_venue:5 +#: aiogram.types.message.Message.reply_video:5 +#: aiogram.types.message.Message.reply_video_note:5 +#: aiogram.types.message.Message.reply_voice:5 of +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 +#: aiogram.types.message.Message.reply_contact:6 +#: aiogram.types.message.Message.reply_dice:6 +#: aiogram.types.message.Message.reply_document:6 +#: aiogram.types.message.Message.reply_game:6 +#: 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 +#: 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.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 " +":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.message.Message.answer_animation:10 +#: aiogram.types.message.Message.reply_animation:11 of +msgid "Source: https://core.telegram.org/bots/api#sendanimation" +msgstr "" + +#: ../../api/types/message.rst +msgid "Parameters" +msgstr "" + +#: 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 " +"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.message.Message.answer_animation:13 +#: aiogram.types.message.Message.reply_animation:14 of +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 width" +msgstr "" + +#: aiogram.types.message.Message.answer_animation:15 +#: 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" +" 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.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: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: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: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: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:17 +#: 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_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_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:26 +#: aiogram.types.message.Message.answer_video_note:17 +#: aiogram.types.message.Message.answer_voice:18 +#: aiogram.types.message.Message.copy_to:19 +#: aiogram.types.message.Message.reply:18 +#: 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_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_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:27 +#: aiogram.types.message.Message.reply_video_note:18 +#: aiogram.types.message.Message.reply_voice:19 of +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: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_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:27 +#: aiogram.types.message.Message.answer_video_note:18 +#: aiogram.types.message.Message.answer_voice:19 +#: aiogram.types.message.Message.copy_to:20 +#: aiogram.types.message.Message.reply:19 +#: 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_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:28 +#: aiogram.types.message.Message.reply_video_note:19 +#: aiogram.types.message.Message.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.message.Message.answer:19 +#: 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 +#: aiogram.types.message.Message.answer_document:21 +#: 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: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:28 +#: aiogram.types.message.Message.answer_video_note:19 +#: aiogram.types.message.Message.answer_voice:20 +#: aiogram.types.message.Message.reply:20 +#: 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 +#: aiogram.types.message.Message.reply_document:22 +#: 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: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: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 "" + +#: ../../api/types/message.rst +msgid "Returns" +msgstr "" + +#: 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: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 +#: aiogram.types.message.Message.answer_document:22 +#: 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_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: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 "" + +#: aiogram.types.message.Message.answer_audio:1 +#: aiogram.types.message.Message.reply_audio:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_audio.SendAudio` will " +"automatically fill method attributes:" +msgstr "" + +#: 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 " +"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.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: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 " +"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.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: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:17 +#: aiogram.types.message.Message.reply_audio:18 of +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:29 +#: aiogram.types.message.Message.reply_audio:28 of +msgid "instance of method :class:`aiogram.methods.send_audio.SendAudio`" +msgstr "" + +#: aiogram.types.message.Message.answer_contact:1 +#: aiogram.types.message.Message.reply_contact:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_contact.SendContact` " +"will automatically fill method attributes:" +msgstr "" + +#: 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: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:12 +#: aiogram.types.message.Message.reply_contact:13 of +msgid "Contact's phone number" +msgstr "" + +#: aiogram.types.message.Message.answer_contact:13 +#: aiogram.types.message.Message.reply_contact:14 of +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:24 +#: aiogram.types.message.Message.reply_contact:23 of +msgid "instance of method :class:`aiogram.methods.send_contact.SendContact`" +msgstr "" + +#: aiogram.types.message.Message.answer_document:1 +#: aiogram.types.message.Message.reply_document:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_document.SendDocument` " +"will automatically fill method attributes:" +msgstr "" + +#: 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 " +"send files of any type of up to 50 MB in size, this limit may be changed " +"in the future." +msgstr "" + +#: 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: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" +" 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.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: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: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:26 +#: aiogram.types.message.Message.reply_document:25 of +msgid "instance of method :class:`aiogram.methods.send_document.SendDocument`" +msgstr "" + +#: aiogram.types.message.Message.answer_game:1 +#: aiogram.types.message.Message.reply_game:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_game.SendGame` will " +"automatically fill method attributes:" +msgstr "" + +#: 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: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: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:18 +#: aiogram.types.message.Message.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.message.Message.answer_game:21 +#: aiogram.types.message.Message.reply_game:20 of +msgid "instance of method :class:`aiogram.methods.send_game.SendGame`" +msgstr "" + +#: aiogram.types.message.Message.answer_invoice:1 +#: aiogram.types.message.Message.reply_invoice:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_invoice.SendInvoice` " +"will automatically fill method attributes:" +msgstr "" + +#: 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: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:12 +#: aiogram.types.message.Message.reply_invoice:13 of +msgid "Product name, 1-32 characters" +msgstr "" + +#: aiogram.types.message.Message.answer_invoice:13 +#: aiogram.types.message.Message.reply_invoice:14 of +msgid "Product description, 1-255 characters" +msgstr "" + +#: aiogram.types.message.Message.answer_invoice:14 +#: aiogram.types.message.Message.reply_invoice:15 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.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.). 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. Not supported for payments in " +"`Telegram Stars `_." +msgstr "" + +#: 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 " +"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.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 " +"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.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: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:23 +#: aiogram.types.message.Message.reply_invoice:24 of +msgid "Photo size in bytes" +msgstr "" + +#: aiogram.types.message.Message.answer_invoice:24 +#: aiogram.types.message.Message.reply_invoice:25 of +msgid "Photo width" +msgstr "" + +#: aiogram.types.message.Message.answer_invoice:25 +#: aiogram.types.message.Message.reply_invoice:26 of +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 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 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 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 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 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 user's email address should be sent to the " +"provider. Ignored for payments in `Telegram Stars " +"`_." +msgstr "" + +#: 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, " +"one 'Pay :code:`total price`' button will be shown. If not empty, the " +"first button must be a Pay button." +msgstr "" + +#: 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 "" + +#: aiogram.types.message.Message.answer_location:1 +#: aiogram.types.message.Message.reply_location:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_location.SendLocation` " +"will automatically fill method attributes:" +msgstr "" + +#: 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: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:12 +#: aiogram.types.message.Message.reply_location:13 of +msgid "Latitude of the location" +msgstr "" + +#: aiogram.types.message.Message.answer_location:13 +#: aiogram.types.message.Message.reply_location:14 of +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 "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 "" +"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:26 +#: aiogram.types.message.Message.reply_location:25 of +msgid "instance of method :class:`aiogram.methods.send_location.SendLocation`" +msgstr "" + +#: aiogram.types.message.Message.answer_media_group:1 +#: aiogram.types.message.Message.reply_media_group:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.send_media_group.SendMediaGroup` will " +"automatically fill method attributes:" +msgstr "" + +#: 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" +" messages of the same type. On success, an array of `Messages " +"`_ that were sent is " +"returned." +msgstr "" + +#: 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:12 +#: aiogram.types.message.Message.reply_media_group:13 of +msgid "" +"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: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:19 of +msgid "If the messages are a reply, ID of the original message" +msgstr "" + +#: aiogram.types.message.Message.answer:1 aiogram.types.message.Message.reply:1 +#: of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_message.SendMessage` " +"will automatically fill method attributes:" +msgstr "" + +#: 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:10 +#: aiogram.types.message.Message.reply:11 of +msgid "Source: https://core.telegram.org/bots/api#sendmessage" +msgstr "" + +#: aiogram.types.message.Message.answer:12 +#: aiogram.types.message.Message.reply:13 of +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 "" +"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: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:25 +#: aiogram.types.message.Message.reply:24 of +msgid "instance of method :class:`aiogram.methods.send_message.SendMessage`" +msgstr "" + +#: aiogram.types.message.Message.answer_photo:1 +#: aiogram.types.message.Message.reply_photo:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_photo.SendPhoto` will " +"automatically fill method attributes:" +msgstr "" + +#: 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: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: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 " +"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.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: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: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:26 +#: aiogram.types.message.Message.reply_photo:25 of +msgid "instance of method :class:`aiogram.methods.send_photo.SendPhoto`" +msgstr "" + +#: aiogram.types.message.Message.answer_poll:1 +#: aiogram.types.message.Message.reply_poll:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_poll.SendPoll` will " +"automatically fill method attributes:" +msgstr "" + +#: 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: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:12 +#: aiogram.types.message.Message.reply_poll:13 of +msgid "Poll question, 1-300 characters" +msgstr "" + +#: aiogram.types.message.Message.answer_poll:13 +#: aiogram.types.message.Message.reply_poll:14 of +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 "" +"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 "" +"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: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: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:22 +#: aiogram.types.message.Message.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.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: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: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:34 +#: aiogram.types.message.Message.reply_poll:33 of +msgid "instance of method :class:`aiogram.methods.send_poll.SendPoll`" +msgstr "" + +#: aiogram.types.message.Message.answer_dice:1 +#: aiogram.types.message.Message.reply_dice:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_dice.SendDice` will " +"automatically fill method attributes:" +msgstr "" + +#: 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: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: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 '🎲', '🎯'" +" and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults " +"to '🎲'" +msgstr "" + +#: 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:21 +#: aiogram.types.message.Message.reply_dice:20 of +msgid "instance of method :class:`aiogram.methods.send_dice.SendDice`" +msgstr "" + +#: aiogram.types.message.Message.answer_sticker:1 +#: aiogram.types.message.Message.reply_sticker:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_sticker.SendSticker` " +"will automatically fill method attributes:" +msgstr "" + +#: 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 " +"`_ .WEBM " +"stickers. On success, the sent :class:`aiogram.types.message.Message` is " +"returned." +msgstr "" + +#: 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: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:22 +#: aiogram.types.message.Message.reply_sticker:21 of +msgid "instance of method :class:`aiogram.methods.send_sticker.SendSticker`" +msgstr "" + +#: aiogram.types.message.Message.answer_venue:1 +#: aiogram.types.message.Message.reply_venue:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_venue.SendVenue` will " +"automatically fill method attributes:" +msgstr "" + +#: 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: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:12 +#: aiogram.types.message.Message.reply_venue:13 of +msgid "Latitude of the venue" +msgstr "" + +#: aiogram.types.message.Message.answer_venue:13 +#: aiogram.types.message.Message.reply_venue:14 of +msgid "Longitude of the venue" +msgstr "" + +#: aiogram.types.message.Message.answer_venue:14 +#: aiogram.types.message.Message.reply_venue:15 of +msgid "Name of the venue" +msgstr "" + +#: aiogram.types.message.Message.answer_venue:15 +#: aiogram.types.message.Message.reply_venue:16 of +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:18 +#: aiogram.types.message.Message.reply_venue:19 of +msgid "Google Places identifier of the venue" +msgstr "" + +#: 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:28 +#: aiogram.types.message.Message.reply_venue:27 of +msgid "instance of method :class:`aiogram.methods.send_venue.SendVenue`" +msgstr "" + +#: aiogram.types.message.Message.answer_video:1 +#: aiogram.types.message.Message.reply_video:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_video.SendVideo` will " +"automatically fill method attributes:" +msgstr "" + +#: 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 " +":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.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: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 " +"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.message.Message.answer_video:13 +#: 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: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: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: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: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:33 +#: aiogram.types.message.Message.reply_video:32 of +msgid "instance of method :class:`aiogram.methods.send_video.SendVideo`" +msgstr "" + +#: aiogram.types.message.Message.answer_video_note:1 +#: aiogram.types.message.Message.reply_video_note:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.send_video_note.SendVideoNote` will automatically" +" fill method attributes:" +msgstr "" + +#: 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 " +"long. Use this method to send video messages. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: 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: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 " +"multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported" +msgstr "" + +#: 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:24 +#: aiogram.types.message.Message.reply_video_note:23 of +msgid "instance of method :class:`aiogram.methods.send_video_note.SendVideoNote`" +msgstr "" + +#: aiogram.types.message.Message.answer_voice:1 +#: aiogram.types.message.Message.reply_voice:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_voice.SendVoice` will " +"automatically fill method attributes:" +msgstr "" + +#: 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, 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: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: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 " +"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.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: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:16 +#: aiogram.types.message.Message.reply_voice:17 of +msgid "Duration of the voice message in seconds" +msgstr "" + +#: 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 "" + +#: aiogram.types.message.Message.send_copy:1 of +msgid "Send copy of a message." +msgstr "" + +#: aiogram.types.message.Message.send_copy:3 of +msgid "" +"Is similar to :meth:`aiogram.client.bot.Bot.copy_message` but returning " +"the sent message instead of :class:`aiogram.types.message_id.MessageId`" +msgstr "" + +#: aiogram.types.message.Message.send_copy:8 of +msgid "" +"This method doesn't use the API method named `copyMessage` and " +"historically implemented before the similar method is added to API" +msgstr "" + +#: aiogram.types.message.Message.copy_to:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.copy_message.CopyMessage` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.message.Message.copy_to:4 +#: aiogram.types.message.Message.forward:4 of +msgid ":code:`from_chat_id`" +msgstr "" + +#: aiogram.types.message.Message.copy_to:5 +#: aiogram.types.message.Message.delete:5 +#: aiogram.types.message.Message.delete_reply_markup:5 +#: aiogram.types.message.Message.edit_caption:5 +#: aiogram.types.message.Message.edit_live_location:5 +#: aiogram.types.message.Message.edit_media:5 +#: aiogram.types.message.Message.edit_reply_markup:5 +#: aiogram.types.message.Message.edit_text:5 +#: aiogram.types.message.Message.forward:5 aiogram.types.message.Message.pin:5 +#: aiogram.types.message.Message.react:5 +#: aiogram.types.message.Message.stop_live_location:5 +#: aiogram.types.message.Message.unpin:5 of +msgid ":code:`message_id`" +msgstr "" + +#: aiogram.types.message.Message.copy_to:7 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.message.Message.copy_to:9 of +msgid "Source: https://core.telegram.org/bots/api#copymessage" +msgstr "" + +#: aiogram.types.message.Message.copy_to:11 +#: aiogram.types.message.Message.forward:11 of +msgid "" +"Unique identifier for the target chat or username of the target channel " +"(in the format :code:`@channelusername`)" +msgstr "" + +#: aiogram.types.message.Message.copy_to:12 +#: aiogram.types.message.Message.forward:12 of +msgid "" +"Unique identifier for the target message thread (topic) of the forum; for" +" forum supergroups only" +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:15 of +msgid "" +"Mode for parsing entities in the new caption. See `formatting options " +"`_ for more " +"details." +msgstr "" + +#: 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: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 "" + +#: aiogram.types.message.Message.edit_text:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.edit_message_text.EditMessageText` will " +"automatically fill method attributes:" +msgstr "" + +#: 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. 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:10 of +msgid "Source: https://core.telegram.org/bots/api#editmessagetext" +msgstr "" + +#: 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: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: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:19 of +msgid "" +"instance of method " +":class:`aiogram.methods.edit_message_text.EditMessageText`" +msgstr "" + +#: aiogram.types.message.Message.forward:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.forward_message.ForwardMessage` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.message.Message.forward:7 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.message.Message.forward:9 of +msgid "Source: https://core.telegram.org/bots/api#forwardmessage" +msgstr "" + +#: 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 "" + +#: aiogram.types.message.Message.edit_media:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.edit_message_media.EditMessageMedia` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.message.Message.edit_media:8 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.message.Message.edit_media:10 of +msgid "Source: https://core.telegram.org/bots/api#editmessagemedia" +msgstr "" + +#: 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: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:15 of +msgid "" +"instance of method " +":class:`aiogram.methods.edit_message_media.EditMessageMedia`" +msgstr "" + +#: aiogram.types.message.Message.delete_reply_markup:1 +#: aiogram.types.message.Message.edit_reply_markup:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup`" +" will automatically fill method attributes:" +msgstr "" + +#: 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. 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: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: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:7 of +msgid ":code:`reply_markup`" +msgstr "" + +#: aiogram.types.message.Message.edit_live_location:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.edit_message_live_location.EditMessageLiveLocation`" +" will automatically fill method attributes:" +msgstr "" + +#: 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 " +"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." +msgstr "" + +#: 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:12 of +msgid "Latitude of new location" +msgstr "" + +#: 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: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:20 of +msgid "" +"instance of method " +":class:`aiogram.methods.edit_message_live_location.EditMessageLiveLocation`" +msgstr "" + +#: aiogram.types.message.Message.stop_live_location:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`" +" will automatically fill method attributes:" +msgstr "" + +#: 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 " +"message, the edited :class:`aiogram.types.message.Message` is returned, " +"otherwise :code:`True` is returned." +msgstr "" + +#: 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:14 of +msgid "" +"instance of method " +":class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`" +msgstr "" + +#: aiogram.types.message.Message.edit_caption:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.edit_message_caption.EditMessageCaption` will " +"automatically fill method attributes:" +msgstr "" + +#: 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. 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:10 of +msgid "Source: https://core.telegram.org/bots/api#editmessagecaption" +msgstr "" + +#: 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:14 of +msgid "" +"Mode for parsing entities in the message caption. See `formatting options" +" `_ for more " +"details." +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 "" + +#: aiogram.types.message.Message.delete:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.delete_message.DeleteMessage`" +" will automatically fill method attributes:" +msgstr "" + +#: 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:10 of +msgid "A message can only be deleted if it was sent less than 48 hours ago." +msgstr "" + +#: 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: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:16 of +msgid "" +"Bots can delete outgoing messages in private chats, groups, and " +"supergroups." +msgstr "" + +#: aiogram.types.message.Message.delete:18 of +msgid "Bots can delete incoming messages in private chats." +msgstr "" + +#: 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:22 of +msgid "" +"If the bot is an administrator of a group, it can delete any message " +"there." +msgstr "" + +#: 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:26 of +msgid "Returns :code:`True` on success." +msgstr "" + +#: aiogram.types.message.Message.delete:28 of +msgid "Source: https://core.telegram.org/bots/api#deletemessage" +msgstr "" + +#: aiogram.types.message.Message.delete:30 of +msgid "instance of method :class:`aiogram.methods.delete_message.DeleteMessage`" +msgstr "" + +#: aiogram.types.message.Message.pin:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.pin_chat_message.PinChatMessage` will " +"automatically fill method attributes:" +msgstr "" + +#: 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" +" 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." +msgstr "" + +#: aiogram.types.message.Message.pin:10 of +msgid "Source: https://core.telegram.org/bots/api#pinchatmessage" +msgstr "" + +#: 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:13 of +msgid "" +"instance of method " +":class:`aiogram.methods.pin_chat_message.PinChatMessage`" +msgstr "" + +#: aiogram.types.message.Message.unpin:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.unpin_chat_message.UnpinChatMessage` will " +"automatically fill method attributes:" +msgstr "" + +#: 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 " +"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." +msgstr "" + +#: aiogram.types.message.Message.unpin:10 of +msgid "Source: https://core.telegram.org/bots/api#unpinchatmessage" +msgstr "" + +#: aiogram.types.message.Message.unpin:12 of +msgid "" +"instance of method " +":class:`aiogram.methods.unpin_chat_message.UnpinChatMessage`" +msgstr "" + +#: aiogram.types.message.Message.get_url:1 of +msgid "" +"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" +msgstr "" + +#: aiogram.types.message.Message.get_url:5 of +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 "" + +#: aiogram.types.message.Message.react:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.set_message_reaction.SetMessageReaction` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.message.Message.react:8 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.message.Message.react:10 of +msgid "Source: https://core.telegram.org/bots/api#setmessagereaction" +msgstr "" + +#: aiogram.types.message.Message.react:12 of +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 "" + +#~ msgid "Answer with animation" +#~ msgstr "" + +#~ msgid "Reply with audio" +#~ msgstr "" + +#~ msgid "Answer with audio" +#~ msgstr "" + +#~ msgid "Reply with contact" +#~ msgstr "" + +#~ msgid "Answer with contact" +#~ msgstr "" + +#~ msgid "Reply with document" +#~ msgstr "" + +#~ msgid "Answer with document" +#~ msgstr "" + +#~ msgid "Reply with game" +#~ msgstr "" + +#~ msgid "Answer with game" +#~ msgstr "" + +#~ msgid "Reply with invoice" +#~ msgstr "" + +#~ 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 "" + +#~ msgid "On success, the sent Message is returned." +#~ msgstr "" + +#~ msgid "Answer with invoice" +#~ msgstr "" + +#~ msgid "Reply with location" +#~ msgstr "" + +#~ msgid "Answer with location" +#~ msgstr "" + +#~ msgid "Reply with media group" +#~ msgstr "" + +#~ msgid "Answer with media group" +#~ msgstr "" + +#~ msgid "Reply with text message" +#~ msgstr "" + +#~ msgid "Answer with text message" +#~ msgstr "" + +#~ msgid "Reply with photo" +#~ msgstr "" + +#~ msgid "Answer with photo" +#~ msgstr "" + +#~ msgid "Reply with poll" +#~ msgstr "" + +#~ msgid "Answer with poll" +#~ msgstr "" + +#~ msgid ":param explanation:" +#~ msgstr "" + +#~ msgid "param explanation" +#~ msgstr "" + +#~ msgid "Reply with dice" +#~ msgstr "" + +#~ msgid "Answer with dice" +#~ msgstr "" + +#~ msgid "Reply with sticker" +#~ msgstr "" + +#~ msgid "Answer with sticker" +#~ msgstr "" + +#~ msgid "Reply with venue" +#~ msgstr "" + +#~ msgid "Answer with venue" +#~ msgstr "" + +#~ msgid "Reply with video" +#~ msgstr "" + +#~ msgid "Answer with video" +#~ msgstr "" + +#~ msgid "Reply wit video note" +#~ msgstr "" + +#~ msgid "Answer wit video note" +#~ msgstr "" + +#~ msgid "Reply with voice" +#~ msgstr "" + +#~ msgid "Answer with voice" +#~ msgstr "" + +#~ msgid "Copy message" +#~ 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 file from the Internet, or " +#~ "upload a new one using multipart" +#~ "/form-data. :ref:`More information on " +#~ "Sending Files » `" +#~ msgstr "" + +#~ msgid "Send copy of message." +#~ msgstr "" + +#~ msgid "" +#~ "This method don't use the API " +#~ "method named `copyMessage` and historically" +#~ " implemented before the similar method " +#~ "is added to API" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Service message: the user " +#~ "allowed the bot added to the " +#~ "attachment menu to write messages" +#~ msgstr "" + +#~ msgid "Date the message was sent in Unix time" +#~ msgstr "" + +#~ msgid "Conversation the message belongs to" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. For replies, 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." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Specified message was pinned. " +#~ "Note that the Message object in " +#~ "this field will not contain further " +#~ "*reply_to_message* fields even if it is" +#~ " itself a reply." +#~ msgstr "" + +#~ msgid "" +#~ "Use this method to copy messages " +#~ "of any kind. Service 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 forward messages " +#~ "of any kind. Service messages can't " +#~ "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_auto_delete_timer_changed.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_auto_delete_timer_changed.po new file mode 100644 index 00000000..a4094144 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_auto_delete_timer_changed.po @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/message_auto_delete_timer_changed.rst:3 +msgid "MessageAutoDeleteTimerChanged" +msgstr "" + +#: aiogram.types.message_auto_delete_timer_changed.MessageAutoDeleteTimerChanged:1 +#: of +msgid "" +"This object represents a service message about a change in auto-delete " +"timer settings." +msgstr "" + +#: aiogram.types.message_auto_delete_timer_changed.MessageAutoDeleteTimerChanged:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#messageautodeletetimerchanged" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_auto_delete_timer_changed.MessageAutoDeleteTimerChanged.message_auto_delete_time:1 +#: of +msgid "New auto-delete time for messages in the chat; in seconds" +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 new file mode 100644 index 00000000..6003aee6 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_entity.po @@ -0,0 +1,129 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/message_entity.rst:3 +msgid "MessageEntity" +msgstr "" + +#: aiogram.types.message_entity.MessageEntity:1 of +msgid "" +"This object represents one special entity in a text message. For example," +" hashtags, usernames, URLs, etc." +msgstr "" + +#: aiogram.types.message_entity.MessageEntity:3 of +msgid "Source: https://core.telegram.org/bots/api#messageentity" +msgstr "" + +#: ../../docstring aiogram.types.message_entity.MessageEntity.type:1 of +msgid "" +"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)" +msgstr "" + +#: ../../docstring aiogram.types.message_entity.MessageEntity.offset:1 of +msgid "" +"Offset in `UTF-16 code units `_ to the start of the entity" +msgstr "" + +#: ../../docstring aiogram.types.message_entity.MessageEntity.length:1 of +msgid "" +"Length of the entity in `UTF-16 code units " +"`_" +msgstr "" + +#: ../../docstring aiogram.types.message_entity.MessageEntity.url:1 of +msgid "" +"*Optional*. For 'text_link' only, URL that will be opened after user taps" +" on the text" +msgstr "" + +#: ../../docstring aiogram.types.message_entity.MessageEntity.user:1 of +msgid "*Optional*. For 'text_mention' only, the mentioned user" +msgstr "" + +#: ../../docstring aiogram.types.message_entity.MessageEntity.language:1 of +msgid "*Optional*. For 'pre' only, the programming language of the entity text" +msgstr "" + +#: ../../docstring aiogram.types.message_entity.MessageEntity.custom_emoji_id:1 +#: of +msgid "" +"*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" +msgstr "" + +#~ msgid "Offset in UTF-16 code units to the start of the entity" +#~ msgstr "" + +#~ msgid "Length of the entity in UTF-16 code units" +#~ 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), '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 "" + +#~ 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 new file mode 100644 index 00000000..3af35158 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_id.po @@ -0,0 +1,42 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/message_id.rst:3 +msgid "MessageId" +msgstr "" + +#: aiogram.types.message_id.MessageId:1 of +msgid "This object represents a unique message identifier." +msgstr "" + +#: aiogram.types.message_id.MessageId:3 of +msgid "Source: https://core.telegram.org/bots/api#messageid" +msgstr "" + +#: ../../docstring aiogram.types.message_id.MessageId.message_id:1 of +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/message_origin.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_origin.po new file mode 100644 index 00000000..e1a28e02 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_origin.po @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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/message_origin.rst:3 +msgid "MessageOrigin" +msgstr "" + +#: aiogram.types.message_origin.MessageOrigin:1 of +msgid "This object describes the origin of a message. It can be one of" +msgstr "" + +#: aiogram.types.message_origin.MessageOrigin:3 of +msgid ":class:`aiogram.types.message_origin_user.MessageOriginUser`" +msgstr "" + +#: aiogram.types.message_origin.MessageOrigin:4 of +msgid ":class:`aiogram.types.message_origin_hidden_user.MessageOriginHiddenUser`" +msgstr "" + +#: aiogram.types.message_origin.MessageOrigin:5 of +msgid ":class:`aiogram.types.message_origin_chat.MessageOriginChat`" +msgstr "" + +#: aiogram.types.message_origin.MessageOrigin:6 of +msgid ":class:`aiogram.types.message_origin_channel.MessageOriginChannel`" +msgstr "" + +#: aiogram.types.message_origin.MessageOrigin:8 of +msgid "Source: https://core.telegram.org/bots/api#messageorigin" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/message_origin_channel.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_origin_channel.po new file mode 100644 index 00000000..24bd7dc6 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_origin_channel.po @@ -0,0 +1,59 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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/message_origin_channel.rst:3 +msgid "MessageOriginChannel" +msgstr "" + +#: aiogram.types.message_origin_channel.MessageOriginChannel:1 of +msgid "The message was originally sent to a channel chat." +msgstr "" + +#: aiogram.types.message_origin_channel.MessageOriginChannel:3 of +msgid "Source: https://core.telegram.org/bots/api#messageoriginchannel" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_origin_channel.MessageOriginChannel.type:1 of +msgid "Type of the message origin, always 'channel'" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_origin_channel.MessageOriginChannel.date:1 of +msgid "Date the message was sent originally in Unix time" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_origin_channel.MessageOriginChannel.chat:1 of +msgid "Channel chat to which the message was originally sent" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_origin_channel.MessageOriginChannel.message_id:1 of +msgid "Unique message identifier inside the chat" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_origin_channel.MessageOriginChannel.author_signature:1 +#: of +msgid "*Optional*. Signature of the original post author" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/message_origin_chat.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_origin_chat.po new file mode 100644 index 00000000..dd9d72c2 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_origin_chat.po @@ -0,0 +1,55 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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/message_origin_chat.rst:3 +msgid "MessageOriginChat" +msgstr "" + +#: aiogram.types.message_origin_chat.MessageOriginChat:1 of +msgid "The message was originally sent on behalf of a chat to a group chat." +msgstr "" + +#: aiogram.types.message_origin_chat.MessageOriginChat:3 of +msgid "Source: https://core.telegram.org/bots/api#messageoriginchat" +msgstr "" + +#: ../../docstring aiogram.types.message_origin_chat.MessageOriginChat.type:1 +#: of +msgid "Type of the message origin, always 'chat'" +msgstr "" + +#: ../../docstring aiogram.types.message_origin_chat.MessageOriginChat.date:1 +#: of +msgid "Date the message was sent originally in Unix time" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_origin_chat.MessageOriginChat.sender_chat:1 of +msgid "Chat that sent the message originally" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_origin_chat.MessageOriginChat.author_signature:1 of +msgid "" +"*Optional*. For messages originally sent by an anonymous chat " +"administrator, original message author signature" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/message_origin_hidden_user.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_origin_hidden_user.po new file mode 100644 index 00000000..124833f6 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_origin_hidden_user.po @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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/message_origin_hidden_user.rst:3 +msgid "MessageOriginHiddenUser" +msgstr "" + +#: aiogram.types.message_origin_hidden_user.MessageOriginHiddenUser:1 of +msgid "The message was originally sent by an unknown user." +msgstr "" + +#: aiogram.types.message_origin_hidden_user.MessageOriginHiddenUser:3 of +msgid "Source: https://core.telegram.org/bots/api#messageoriginhiddenuser" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_origin_hidden_user.MessageOriginHiddenUser.type:1 of +msgid "Type of the message origin, always 'hidden_user'" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_origin_hidden_user.MessageOriginHiddenUser.date:1 of +msgid "Date the message was sent originally in Unix time" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_origin_hidden_user.MessageOriginHiddenUser.sender_user_name:1 +#: of +msgid "Name of the user that sent the message originally" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/message_origin_user.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_origin_user.po new file mode 100644 index 00000000..bcc6a5c1 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_origin_user.po @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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/message_origin_user.rst:3 +msgid "MessageOriginUser" +msgstr "" + +#: aiogram.types.message_origin_user.MessageOriginUser:1 of +msgid "The message was originally sent by a known user." +msgstr "" + +#: aiogram.types.message_origin_user.MessageOriginUser:3 of +msgid "Source: https://core.telegram.org/bots/api#messageoriginuser" +msgstr "" + +#: ../../docstring aiogram.types.message_origin_user.MessageOriginUser.type:1 +#: of +msgid "Type of the message origin, always 'user'" +msgstr "" + +#: ../../docstring aiogram.types.message_origin_user.MessageOriginUser.date:1 +#: of +msgid "Date the message was sent originally in Unix time" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_origin_user.MessageOriginUser.sender_user:1 of +msgid "User that sent the message originally" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/message_reaction_count_updated.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_reaction_count_updated.po new file mode 100644 index 00000000..227879b3 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_reaction_count_updated.po @@ -0,0 +1,61 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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/message_reaction_count_updated.rst:3 +msgid "MessageReactionCountUpdated" +msgstr "" + +#: aiogram.types.message_reaction_count_updated.MessageReactionCountUpdated:1 +#: of +msgid "" +"This object represents reaction changes on a message with anonymous " +"reactions." +msgstr "" + +#: aiogram.types.message_reaction_count_updated.MessageReactionCountUpdated:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#messagereactioncountupdated" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_reaction_count_updated.MessageReactionCountUpdated.chat:1 +#: of +msgid "The chat containing the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_reaction_count_updated.MessageReactionCountUpdated.message_id:1 +#: of +msgid "Unique message identifier inside the chat" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_reaction_count_updated.MessageReactionCountUpdated.date:1 +#: of +msgid "Date of the change in Unix time" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_reaction_count_updated.MessageReactionCountUpdated.reactions:1 +#: of +msgid "List of reactions that are present on the message" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/message_reaction_updated.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_reaction_updated.po new file mode 100644 index 00000000..126ad81d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_reaction_updated.po @@ -0,0 +1,78 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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/message_reaction_updated.rst:3 +msgid "MessageReactionUpdated" +msgstr "" + +#: aiogram.types.message_reaction_updated.MessageReactionUpdated:1 of +msgid "" +"This object represents a change of a reaction on a message performed by a" +" user." +msgstr "" + +#: aiogram.types.message_reaction_updated.MessageReactionUpdated:3 of +msgid "Source: https://core.telegram.org/bots/api#messagereactionupdated" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_reaction_updated.MessageReactionUpdated.chat:1 of +msgid "The chat containing the message the user reacted to" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_reaction_updated.MessageReactionUpdated.message_id:1 +#: of +msgid "Unique identifier of the message inside the chat" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_reaction_updated.MessageReactionUpdated.date:1 of +msgid "Date of the change in Unix time" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_reaction_updated.MessageReactionUpdated.old_reaction:1 +#: of +msgid "Previous list of reaction types that were set by the user" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_reaction_updated.MessageReactionUpdated.new_reaction:1 +#: of +msgid "New list of reaction types that have been set by the user" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_reaction_updated.MessageReactionUpdated.user:1 of +msgid "" +"*Optional*. The user that changed the reaction, if the user isn't " +"anonymous" +msgstr "" + +#: ../../docstring +#: aiogram.types.message_reaction_updated.MessageReactionUpdated.actor_chat:1 +#: of +msgid "" +"*Optional*. The chat on behalf of which the reaction was changed, if the " +"user is anonymous" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/order_info.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/order_info.po new file mode 100644 index 00000000..bbf98947 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/order_info.po @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/order_info.rst:3 +msgid "OrderInfo" +msgstr "" + +#: aiogram.types.order_info.OrderInfo:1 of +msgid "This object represents information about an order." +msgstr "" + +#: aiogram.types.order_info.OrderInfo:3 of +msgid "Source: https://core.telegram.org/bots/api#orderinfo" +msgstr "" + +#: ../../docstring aiogram.types.order_info.OrderInfo.name:1 of +msgid "*Optional*. User name" +msgstr "" + +#: ../../docstring aiogram.types.order_info.OrderInfo.phone_number:1 of +msgid "*Optional*. User's phone number" +msgstr "" + +#: ../../docstring aiogram.types.order_info.OrderInfo.email:1 of +msgid "*Optional*. User email" +msgstr "" + +#: ../../docstring aiogram.types.order_info.OrderInfo.shipping_address:1 of +msgid "*Optional*. User shipping address" +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/passport_data.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_data.po new file mode 100644 index 00000000..528f756b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_data.po @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/passport_data.rst:3 +msgid "PassportData" +msgstr "" + +#: aiogram.types.passport_data.PassportData:1 of +msgid "Describes Telegram Passport data shared with the bot by the user." +msgstr "" + +#: aiogram.types.passport_data.PassportData:3 of +msgid "Source: https://core.telegram.org/bots/api#passportdata" +msgstr "" + +#: ../../docstring aiogram.types.passport_data.PassportData.data:1 of +msgid "" +"Array with information about documents and other Telegram Passport " +"elements that was shared with the bot" +msgstr "" + +#: ../../docstring aiogram.types.passport_data.PassportData.credentials:1 of +msgid "Encrypted credentials required to decrypt the data" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error.po new file mode 100644 index 00000000..53acdac9 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error.po @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/passport_element_error.rst:3 +msgid "PassportElementError" +msgstr "" + +#: aiogram.types.passport_element_error.PassportElementError:1 of +msgid "" +"This object represents an error in the Telegram Passport element which " +"was submitted that should be resolved by the user. It should be one of:" +msgstr "" + +#: aiogram.types.passport_element_error.PassportElementError:3 of +msgid ":class:`aiogram.types.passport_element_error_data_field.PassportElementErrorDataField`" +msgstr "" + +#: aiogram.types.passport_element_error.PassportElementError:4 of +msgid ":class:`aiogram.types.passport_element_error_front_side.PassportElementErrorFrontSide`" +msgstr "" + +#: aiogram.types.passport_element_error.PassportElementError:5 of +msgid ":class:`aiogram.types.passport_element_error_reverse_side.PassportElementErrorReverseSide`" +msgstr "" + +#: aiogram.types.passport_element_error.PassportElementError:6 of +msgid ":class:`aiogram.types.passport_element_error_selfie.PassportElementErrorSelfie`" +msgstr "" + +#: aiogram.types.passport_element_error.PassportElementError:7 of +msgid ":class:`aiogram.types.passport_element_error_file.PassportElementErrorFile`" +msgstr "" + +#: aiogram.types.passport_element_error.PassportElementError:8 of +msgid ":class:`aiogram.types.passport_element_error_files.PassportElementErrorFiles`" +msgstr "" + +#: aiogram.types.passport_element_error.PassportElementError:9 of +msgid ":class:`aiogram.types.passport_element_error_translation_file.PassportElementErrorTranslationFile`" +msgstr "" + +#: aiogram.types.passport_element_error.PassportElementError:10 of +msgid ":class:`aiogram.types.passport_element_error_translation_files.PassportElementErrorTranslationFiles`" +msgstr "" + +#: aiogram.types.passport_element_error.PassportElementError:11 of +msgid ":class:`aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified`" +msgstr "" + +#: aiogram.types.passport_element_error.PassportElementError:13 of +msgid "Source: https://core.telegram.org/bots/api#passportelementerror" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_data_field.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_data_field.po new file mode 100644 index 00000000..e3f9454c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_data_field.po @@ -0,0 +1,67 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/passport_element_error_data_field.rst:3 +msgid "PassportElementErrorDataField" +msgstr "" + +#: aiogram.types.passport_element_error_data_field.PassportElementErrorDataField:1 +#: of +msgid "" +"Represents an issue in one of the data fields that was provided by the " +"user. The error is considered resolved when the field's value changes." +msgstr "" + +#: aiogram.types.passport_element_error_data_field.PassportElementErrorDataField:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#passportelementerrordatafield" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_data_field.PassportElementErrorDataField.source:1 +#: of +msgid "Error source, must be *data*" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_data_field.PassportElementErrorDataField.type:1 +#: of +msgid "" +"The section of the user's Telegram Passport which has the error, one of " +"'personal_details', 'passport', 'driver_license', 'identity_card', " +"'internal_passport', 'address'" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_data_field.PassportElementErrorDataField.field_name:1 +#: of +msgid "Name of the data field which has the error" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_data_field.PassportElementErrorDataField.data_hash:1 +#: of +msgid "Base64-encoded data hash" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_data_field.PassportElementErrorDataField.message:1 +#: of +msgid "Error message" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_file.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_file.po new file mode 100644 index 00000000..96079e3e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_file.po @@ -0,0 +1,58 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/passport_element_error_file.rst:3 +msgid "PassportElementErrorFile" +msgstr "" + +#: aiogram.types.passport_element_error_file.PassportElementErrorFile:1 of +msgid "" +"Represents an issue with a document scan. The error is considered " +"resolved when the file with the document scan changes." +msgstr "" + +#: aiogram.types.passport_element_error_file.PassportElementErrorFile:3 of +msgid "Source: https://core.telegram.org/bots/api#passportelementerrorfile" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_file.PassportElementErrorFile.source:1 +#: of +msgid "Error source, must be *file*" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_file.PassportElementErrorFile.type:1 of +msgid "" +"The section of the user's Telegram Passport which has the issue, one of " +"'utility_bill', 'bank_statement', 'rental_agreement', " +"'passport_registration', 'temporary_registration'" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_file.PassportElementErrorFile.file_hash:1 +#: of +msgid "Base64-encoded file hash" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_file.PassportElementErrorFile.message:1 +#: of +msgid "Error message" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_files.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_files.po new file mode 100644 index 00000000..259754a3 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_files.po @@ -0,0 +1,59 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/passport_element_error_files.rst:3 +msgid "PassportElementErrorFiles" +msgstr "" + +#: aiogram.types.passport_element_error_files.PassportElementErrorFiles:1 of +msgid "" +"Represents an issue with a list of scans. The error is considered " +"resolved when the list of files containing the scans changes." +msgstr "" + +#: aiogram.types.passport_element_error_files.PassportElementErrorFiles:3 of +msgid "Source: https://core.telegram.org/bots/api#passportelementerrorfiles" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_files.PassportElementErrorFiles.source:1 +#: of +msgid "Error source, must be *files*" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_files.PassportElementErrorFiles.type:1 +#: of +msgid "" +"The section of the user's Telegram Passport which has the issue, one of " +"'utility_bill', 'bank_statement', 'rental_agreement', " +"'passport_registration', 'temporary_registration'" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_files.PassportElementErrorFiles.file_hashes:1 +#: of +msgid "List of base64-encoded file hashes" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_files.PassportElementErrorFiles.message:1 +#: of +msgid "Error message" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_front_side.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_front_side.po new file mode 100644 index 00000000..c8223d9e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_front_side.po @@ -0,0 +1,61 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/passport_element_error_front_side.rst:3 +msgid "PassportElementErrorFrontSide" +msgstr "" + +#: aiogram.types.passport_element_error_front_side.PassportElementErrorFrontSide:1 +#: of +msgid "" +"Represents an issue with the front side of a document. The error is " +"considered resolved when the file with the front side of the document " +"changes." +msgstr "" + +#: aiogram.types.passport_element_error_front_side.PassportElementErrorFrontSide:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#passportelementerrorfrontside" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_front_side.PassportElementErrorFrontSide.source:1 +#: of +msgid "Error source, must be *front_side*" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_front_side.PassportElementErrorFrontSide.type:1 +#: of +msgid "" +"The section of the user's Telegram Passport which has the issue, one of " +"'passport', 'driver_license', 'identity_card', 'internal_passport'" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_front_side.PassportElementErrorFrontSide.file_hash:1 +#: of +msgid "Base64-encoded hash of the file with the front side of the document" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_front_side.PassportElementErrorFrontSide.message:1 +#: of +msgid "Error message" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_reverse_side.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_reverse_side.po new file mode 100644 index 00000000..301e3b56 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_reverse_side.po @@ -0,0 +1,61 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/passport_element_error_reverse_side.rst:3 +msgid "PassportElementErrorReverseSide" +msgstr "" + +#: aiogram.types.passport_element_error_reverse_side.PassportElementErrorReverseSide:1 +#: of +msgid "" +"Represents an issue with the reverse side of a document. The error is " +"considered resolved when the file with reverse side of the document " +"changes." +msgstr "" + +#: aiogram.types.passport_element_error_reverse_side.PassportElementErrorReverseSide:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#passportelementerrorreverseside" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_reverse_side.PassportElementErrorReverseSide.source:1 +#: of +msgid "Error source, must be *reverse_side*" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_reverse_side.PassportElementErrorReverseSide.type:1 +#: of +msgid "" +"The section of the user's Telegram Passport which has the issue, one of " +"'driver_license', 'identity_card'" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_reverse_side.PassportElementErrorReverseSide.file_hash:1 +#: of +msgid "Base64-encoded hash of the file with the reverse side of the document" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_reverse_side.PassportElementErrorReverseSide.message:1 +#: of +msgid "Error message" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_selfie.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_selfie.po new file mode 100644 index 00000000..9e37ef2a --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_selfie.po @@ -0,0 +1,58 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/passport_element_error_selfie.rst:3 +msgid "PassportElementErrorSelfie" +msgstr "" + +#: aiogram.types.passport_element_error_selfie.PassportElementErrorSelfie:1 of +msgid "" +"Represents an issue with the selfie with a document. The error is " +"considered resolved when the file with the selfie changes." +msgstr "" + +#: aiogram.types.passport_element_error_selfie.PassportElementErrorSelfie:3 of +msgid "Source: https://core.telegram.org/bots/api#passportelementerrorselfie" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_selfie.PassportElementErrorSelfie.source:1 +#: of +msgid "Error source, must be *selfie*" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_selfie.PassportElementErrorSelfie.type:1 +#: of +msgid "" +"The section of the user's Telegram Passport which has the issue, one of " +"'passport', 'driver_license', 'identity_card', 'internal_passport'" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_selfie.PassportElementErrorSelfie.file_hash:1 +#: of +msgid "Base64-encoded hash of the file with the selfie" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_selfie.PassportElementErrorSelfie.message:1 +#: of +msgid "Error message" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_translation_file.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_translation_file.po new file mode 100644 index 00000000..9bf84e16 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_translation_file.po @@ -0,0 +1,64 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/passport_element_error_translation_file.rst:3 +msgid "PassportElementErrorTranslationFile" +msgstr "" + +#: aiogram.types.passport_element_error_translation_file.PassportElementErrorTranslationFile:1 +#: of +msgid "" +"Represents an issue with one of the files that constitute the translation" +" of a document. The error is considered resolved when the file changes." +msgstr "" + +#: aiogram.types.passport_element_error_translation_file.PassportElementErrorTranslationFile:3 +#: of +msgid "" +"Source: " +"https://core.telegram.org/bots/api#passportelementerrortranslationfile" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_translation_file.PassportElementErrorTranslationFile.source:1 +#: of +msgid "Error source, must be *translation_file*" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_translation_file.PassportElementErrorTranslationFile.type:1 +#: of +msgid "" +"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'" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_translation_file.PassportElementErrorTranslationFile.file_hash:1 +#: of +msgid "Base64-encoded file hash" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_translation_file.PassportElementErrorTranslationFile.message:1 +#: of +msgid "Error message" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_translation_files.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_translation_files.po new file mode 100644 index 00000000..a7eb749c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_translation_files.po @@ -0,0 +1,64 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/passport_element_error_translation_files.rst:3 +msgid "PassportElementErrorTranslationFiles" +msgstr "" + +#: aiogram.types.passport_element_error_translation_files.PassportElementErrorTranslationFiles:1 +#: of +msgid "" +"Represents an issue with the translated version of a document. The error " +"is considered resolved when a file with the document translation change." +msgstr "" + +#: aiogram.types.passport_element_error_translation_files.PassportElementErrorTranslationFiles:3 +#: of +msgid "" +"Source: " +"https://core.telegram.org/bots/api#passportelementerrortranslationfiles" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_translation_files.PassportElementErrorTranslationFiles.source:1 +#: of +msgid "Error source, must be *translation_files*" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_translation_files.PassportElementErrorTranslationFiles.type:1 +#: of +msgid "" +"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'" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_translation_files.PassportElementErrorTranslationFiles.file_hashes:1 +#: of +msgid "List of base64-encoded file hashes" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_translation_files.PassportElementErrorTranslationFiles.message:1 +#: of +msgid "Error message" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_unspecified.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_unspecified.po new file mode 100644 index 00000000..899c416c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_element_error_unspecified.po @@ -0,0 +1,58 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/passport_element_error_unspecified.rst:3 +msgid "PassportElementErrorUnspecified" +msgstr "" + +#: aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified:1 +#: of +msgid "" +"Represents an issue in an unspecified place. The error is considered " +"resolved when new data is added." +msgstr "" + +#: aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#passportelementerrorunspecified" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified.source:1 +#: of +msgid "Error source, must be *unspecified*" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified.type:1 +#: of +msgid "Type of element of the user's Telegram Passport which has the issue" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified.element_hash:1 +#: of +msgid "Base64-encoded element hash" +msgstr "" + +#: ../../docstring +#: aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified.message:1 +#: of +msgid "Error message" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_file.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_file.po new file mode 100644 index 00000000..06142ecf --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/passport_file.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/passport_file.rst:3 +msgid "PassportFile" +msgstr "" + +#: aiogram.types.passport_file.PassportFile:1 of +msgid "" +"This object represents a file uploaded to Telegram Passport. Currently " +"all Telegram Passport files are in JPEG format when decrypted and don't " +"exceed 10MB." +msgstr "" + +#: aiogram.types.passport_file.PassportFile:3 of +msgid "Source: https://core.telegram.org/bots/api#passportfile" +msgstr "" + +#: ../../docstring aiogram.types.passport_file.PassportFile.file_id:1 of +msgid "Identifier for this file, which can be used to download or reuse the file" +msgstr "" + +#: ../../docstring aiogram.types.passport_file.PassportFile.file_unique_id:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring aiogram.types.passport_file.PassportFile.file_size:1 of +msgid "File size in bytes" +msgstr "" + +#: ../../docstring aiogram.types.passport_file.PassportFile.file_date:1 of +msgid "Unix time when the file was uploaded" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/photo_size.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/photo_size.po new file mode 100644 index 00000000..d24a773c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/photo_size.po @@ -0,0 +1,55 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/photo_size.rst:3 +msgid "PhotoSize" +msgstr "" + +#: aiogram.types.photo_size.PhotoSize:1 of +msgid "" +"This object represents one size of a photo or a `file " +"`_ / " +":class:`aiogram.methods.sticker.Sticker` thumbnail." +msgstr "" + +#: aiogram.types.photo_size.PhotoSize:3 of +msgid "Source: https://core.telegram.org/bots/api#photosize" +msgstr "" + +#: ../../docstring aiogram.types.photo_size.PhotoSize.file_id:1 of +msgid "Identifier for this file, which can be used to download or reuse the file" +msgstr "" + +#: ../../docstring aiogram.types.photo_size.PhotoSize.file_unique_id:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring aiogram.types.photo_size.PhotoSize.width:1 of +msgid "Photo width" +msgstr "" + +#: ../../docstring aiogram.types.photo_size.PhotoSize.height:1 of +msgid "Photo height" +msgstr "" + +#: ../../docstring aiogram.types.photo_size.PhotoSize.file_size:1 of +msgid "*Optional*. File size in bytes" +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 new file mode 100644 index 00000000..2f29a679 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/poll.po @@ -0,0 +1,99 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/poll.rst:3 +msgid "Poll" +msgstr "" + +#: aiogram.types.poll.Poll:1 of +msgid "This object contains information about a poll." +msgstr "" + +#: aiogram.types.poll.Poll:3 of +msgid "Source: https://core.telegram.org/bots/api#poll" +msgstr "" + +#: ../../docstring aiogram.types.poll.Poll.id:1 of +msgid "Unique poll identifier" +msgstr "" + +#: ../../docstring aiogram.types.poll.Poll.question:1 of +msgid "Poll question, 1-300 characters" +msgstr "" + +#: ../../docstring aiogram.types.poll.Poll.options:1 of +msgid "List of poll options" +msgstr "" + +#: ../../docstring aiogram.types.poll.Poll.total_voter_count:1 of +msgid "Total number of users that voted in the poll" +msgstr "" + +#: ../../docstring aiogram.types.poll.Poll.is_closed:1 of +msgid ":code:`True`, if the poll is closed" +msgstr "" + +#: ../../docstring aiogram.types.poll.Poll.is_anonymous:1 of +msgid ":code:`True`, if the poll is anonymous" +msgstr "" + +#: ../../docstring aiogram.types.poll.Poll.type:1 of +msgid "Poll type, currently can be 'regular' or 'quiz'" +msgstr "" + +#: ../../docstring aiogram.types.poll.Poll.allows_multiple_answers:1 of +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 " +"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." +msgstr "" + +#: ../../docstring aiogram.types.poll.Poll.explanation:1 of +msgid "" +"*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" +msgstr "" + +#: ../../docstring aiogram.types.poll.Poll.explanation_entities:1 of +msgid "" +"*Optional*. Special entities like usernames, URLs, bot commands, etc. " +"that appear in the *explanation*" +msgstr "" + +#: ../../docstring aiogram.types.poll.Poll.open_period:1 of +msgid "" +"*Optional*. Amount of time in seconds the poll will be active after " +"creation" +msgstr "" + +#: ../../docstring aiogram.types.poll.Poll.close_date:1 of +msgid "" +"*Optional*. Point in time (Unix timestamp) when the poll will be " +"automatically closed" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/poll_answer.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/poll_answer.po new file mode 100644 index 00000000..63fb9b5d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/poll_answer.po @@ -0,0 +1,61 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-08-26 23:17+0300\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" + +#: ../../api/types/poll_answer.rst:3 +msgid "PollAnswer" +msgstr "" + +#: aiogram.types.poll_answer.PollAnswer:1 of +msgid "This object represents an answer of a user in a non-anonymous poll." +msgstr "" + +#: aiogram.types.poll_answer.PollAnswer:3 of +msgid "Source: https://core.telegram.org/bots/api#pollanswer" +msgstr "" + +#: ../../docstring aiogram.types.poll_answer.PollAnswer.poll_id:1 of +msgid "Unique poll identifier" +msgstr "" + +#: ../../docstring aiogram.types.poll_answer.PollAnswer.option_ids:1 of +msgid "" +"0-based identifiers of chosen answer options. May be empty if the vote " +"was retracted." +msgstr "" + +#: ../../docstring aiogram.types.poll_answer.PollAnswer.voter_chat:1 of +msgid "" +"*Optional*. The chat that changed the answer to the poll, if the voter is" +" anonymous" +msgstr "" + +#: ../../docstring aiogram.types.poll_answer.PollAnswer.user:1 of +msgid "" +"*Optional*. The user that changed the answer to the poll, if the voter " +"isn't anonymous" +msgstr "" + +#~ msgid "The user, who changed the answer to the poll" +#~ msgstr "" + +#~ msgid "" +#~ "0-based identifiers of answer options, " +#~ "chosen by the user. May be empty" +#~ " if the user retracted their vote." +#~ msgstr "" 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 new file mode 100644 index 00000000..e6b4c3bc --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/poll_option.po @@ -0,0 +1,44 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/poll_option.rst:3 +msgid "PollOption" +msgstr "" + +#: aiogram.types.poll_option.PollOption:1 of +msgid "This object contains information about one answer option in a poll." +msgstr "" + +#: aiogram.types.poll_option.PollOption:3 of +msgid "Source: https://core.telegram.org/bots/api#polloption" +msgstr "" + +#: ../../docstring aiogram.types.poll_option.PollOption.text:1 of +msgid "Option text, 1-100 characters" +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 new file mode 100644 index 00000000..d0034254 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/pre_checkout_query.po @@ -0,0 +1,138 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/pre_checkout_query.rst:3 +msgid "PreCheckoutQuery" +msgstr "" + +#: aiogram.types.pre_checkout_query.PreCheckoutQuery:1 of +msgid "This object contains information about an incoming pre-checkout query." +msgstr "" + +#: aiogram.types.pre_checkout_query.PreCheckoutQuery:3 of +msgid "Source: https://core.telegram.org/bots/api#precheckoutquery" +msgstr "" + +#: ../../docstring aiogram.types.pre_checkout_query.PreCheckoutQuery.id:1 of +msgid "Unique query identifier" +msgstr "" + +#: ../../docstring +#: aiogram.types.pre_checkout_query.PreCheckoutQuery.from_user:1 of +msgid "User who sent the query" +msgstr "" + +#: ../../docstring aiogram.types.pre_checkout_query.PreCheckoutQuery.currency:1 +#: of +msgid "" +"Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars " +"`_" +msgstr "" + +#: ../../docstring +#: aiogram.types.pre_checkout_query.PreCheckoutQuery.total_amount:1 of +msgid "" +"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)." +msgstr "" + +#: ../../docstring +#: aiogram.types.pre_checkout_query.PreCheckoutQuery.invoice_payload:1 of +msgid "Bot-specified invoice payload" +msgstr "" + +#: ../../docstring +#: aiogram.types.pre_checkout_query.PreCheckoutQuery.shipping_option_id:1 of +msgid "*Optional*. Identifier of the shipping option chosen by the user" +msgstr "" + +#: ../../docstring +#: aiogram.types.pre_checkout_query.PreCheckoutQuery.order_info:1 of +msgid "*Optional*. Order information provided by the user" +msgstr "" + +#: aiogram.types.pre_checkout_query.PreCheckoutQuery.answer:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.answer_pre_checkout_query.AnswerPreCheckoutQuery`" +" will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.pre_checkout_query.PreCheckoutQuery.answer:4 of +msgid ":code:`pre_checkout_query_id`" +msgstr "" + +#: aiogram.types.pre_checkout_query.PreCheckoutQuery.answer:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.pre_checkout_query.PreCheckoutQuery.answer:8 of +msgid "Source: https://core.telegram.org/bots/api#answerprecheckoutquery" +msgstr "" + +#: ../../api/types/pre_checkout_query.rst +msgid "Parameters" +msgstr "" + +#: aiogram.types.pre_checkout_query.PreCheckoutQuery.answer:10 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.pre_checkout_query.PreCheckoutQuery.answer:11 of +msgid "" +"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." +msgstr "" + +#: ../../api/types/pre_checkout_query.rst +msgid "Returns" +msgstr "" + +#: aiogram.types.pre_checkout_query.PreCheckoutQuery.answer:12 of +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/proximity_alert_triggered.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/proximity_alert_triggered.po new file mode 100644 index 00000000..bbfc27d1 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/proximity_alert_triggered.po @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/proximity_alert_triggered.rst:3 +msgid "ProximityAlertTriggered" +msgstr "" + +#: aiogram.types.proximity_alert_triggered.ProximityAlertTriggered:1 of +msgid "" +"This object represents the content of a service message, sent whenever a " +"user in the chat triggers a proximity alert set by another user." +msgstr "" + +#: aiogram.types.proximity_alert_triggered.ProximityAlertTriggered:3 of +msgid "Source: https://core.telegram.org/bots/api#proximityalerttriggered" +msgstr "" + +#: ../../docstring +#: aiogram.types.proximity_alert_triggered.ProximityAlertTriggered.traveler:1 +#: of +msgid "User that triggered the alert" +msgstr "" + +#: ../../docstring +#: aiogram.types.proximity_alert_triggered.ProximityAlertTriggered.watcher:1 of +msgid "User that set the alert" +msgstr "" + +#: ../../docstring +#: aiogram.types.proximity_alert_triggered.ProximityAlertTriggered.distance:1 +#: of +msgid "The distance between the users" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/reaction_count.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/reaction_count.po new file mode 100644 index 00000000..3c2e9b54 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/reaction_count.po @@ -0,0 +1,43 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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_count.rst:3 +msgid "ReactionCount" +msgstr "" + +#: aiogram.types.reaction_count.ReactionCount:1 of +msgid "" +"Represents a reaction added to a message along with the number of times " +"it was added." +msgstr "" + +#: aiogram.types.reaction_count.ReactionCount:3 of +msgid "Source: https://core.telegram.org/bots/api#reactioncount" +msgstr "" + +#: ../../docstring aiogram.types.reaction_count.ReactionCount.type:1 of +msgid "Type of the reaction" +msgstr "" + +#: ../../docstring aiogram.types.reaction_count.ReactionCount.total_count:1 of +msgid "Number of times the reaction was added" +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 new file mode 100644 index 00000000..bf4000d0 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/reaction_type.po @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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.rst:3 +msgid "ReactionType" +msgstr "" + +#: aiogram.types.reaction_type.ReactionType:1 of +msgid "This object describes the type of a reaction. Currently, it can be one of" +msgstr "" + +#: aiogram.types.reaction_type.ReactionType:3 of +msgid ":class:`aiogram.types.reaction_type_emoji.ReactionTypeEmoji`" +msgstr "" + +#: aiogram.types.reaction_type.ReactionType:4 of +msgid ":class:`aiogram.types.reaction_type_custom_emoji.ReactionTypeCustomEmoji`" +msgstr "" + +#: 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_custom_emoji.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/reaction_type_custom_emoji.po new file mode 100644 index 00000000..ae632d02 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/reaction_type_custom_emoji.po @@ -0,0 +1,44 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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_custom_emoji.rst:3 +msgid "ReactionTypeCustomEmoji" +msgstr "" + +#: aiogram.types.reaction_type_custom_emoji.ReactionTypeCustomEmoji:1 of +msgid "The reaction is based on a custom emoji." +msgstr "" + +#: aiogram.types.reaction_type_custom_emoji.ReactionTypeCustomEmoji:3 of +msgid "Source: https://core.telegram.org/bots/api#reactiontypecustomemoji" +msgstr "" + +#: ../../docstring +#: aiogram.types.reaction_type_custom_emoji.ReactionTypeCustomEmoji.type:1 of +msgid "Type of the reaction, always 'custom_emoji'" +msgstr "" + +#: ../../docstring +#: aiogram.types.reaction_type_custom_emoji.ReactionTypeCustomEmoji.custom_emoji_id:1 +#: of +msgid "Custom emoji identifier" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/reaction_type_emoji.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/reaction_type_emoji.po new file mode 100644 index 00000000..47acee3d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/reaction_type_emoji.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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_emoji.rst:3 +msgid "ReactionTypeEmoji" +msgstr "" + +#: aiogram.types.reaction_type_emoji.ReactionTypeEmoji:1 of +msgid "The reaction is based on an emoji." +msgstr "" + +#: aiogram.types.reaction_type_emoji.ReactionTypeEmoji:3 of +msgid "Source: https://core.telegram.org/bots/api#reactiontypeemoji" +msgstr "" + +#: ../../docstring aiogram.types.reaction_type_emoji.ReactionTypeEmoji.type:1 +#: of +msgid "Type of the reaction, always 'emoji'" +msgstr "" + +#: ../../docstring aiogram.types.reaction_type_emoji.ReactionTypeEmoji.emoji:1 +#: of +msgid "" +"Reaction emoji. Currently, it can be one of \"👍\", \"👎\", \"❤\", \"🔥\", " +"\"🥰\", \"👏\", \"😁\", \"🤔\", \"🤯\", \"😱\", \"🤬\", \"😢\", \"🎉\", \"🤩\", " +"\"🤮\", \"💩\", \"🙏\", \"👌\", \"🕊\", \"🤡\", \"🥱\", \"🥴\", \"😍\", \"🐳\", " +"\"❤‍🔥\", \"🌚\", \"🌭\", \"💯\", \"🤣\", \"⚡\", \"🍌\", \"🏆\", \"💔\", \"🤨\", " +"\"😐\", \"🍓\", \"🍾\", \"💋\", \"🖕\", \"😈\", \"😴\", \"😭\", \"🤓\", \"👻\", " +"\"👨‍💻\", \"👀\", \"🎃\", \"🙈\", \"😇\", \"😨\", \"🤝\", \"✍\", \"🤗\", \"🫡\", " +"\"🎅\", \"🎄\", \"☃\", \"💅\", \"🤪\", \"🗿\", \"🆒\", \"💘\", \"🙉\", \"🦄\", " +"\"😘\", \"💊\", \"🙊\", \"😎\", \"👾\", \"🤷‍♂\", \"🤷\", \"🤷‍♀\", \"😡\"" +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 new file mode 100644 index 00000000..082de65b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_markup.po @@ -0,0 +1,117 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/reply_keyboard_markup.rst:3 +msgid "ReplyKeyboardMarkup" +msgstr "" + +#: aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup:1 of +msgid "" +"This object represents a `custom keyboard " +"`_ with reply options " +"(see `Introduction to bots " +"`_ for details and " +"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 +msgid "Source: https://core.telegram.org/bots/api#replykeyboardmarkup" +msgstr "" + +#: ../../docstring +#: aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup.keyboard:1 of +msgid "" +"Array of button rows, each represented by an Array of " +":class:`aiogram.types.keyboard_button.KeyboardButton` objects" +msgstr "" + +#: ../../docstring +#: aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup.is_persistent:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring +#: aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup.resize_keyboard:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring +#: aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup.one_time_keyboard:1 +#: of +msgid "" +"*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*." +msgstr "" + +#: ../../docstring +#: aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup.input_field_placeholder:1 +#: of +msgid "" +"*Optional*. The placeholder to be shown in the input field when the " +"keyboard is active; 1-64 characters" +msgstr "" + +#: ../../docstring +#: aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup.selective:1 of +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 to a message in the same chat and forum topic, sender " +"of the original message." +msgstr "" + +#~ msgid "" +#~ "This object represents a `custom " +#~ "keyboard `_ with" +#~ " reply options (see `Introduction to " +#~ "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 new file mode 100644 index 00000000..c9ec03f4 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_remove.po @@ -0,0 +1,82 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/reply_keyboard_remove.rst:3 +msgid "ReplyKeyboardRemove" +msgstr "" + +#: aiogram.types.reply_keyboard_remove.ReplyKeyboardRemove:1 of +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`). Not " +"supported in channels and for messages sent on behalf of a Telegram " +"Business account." +msgstr "" + +#: aiogram.types.reply_keyboard_remove.ReplyKeyboardRemove:3 of +msgid "Source: https://core.telegram.org/bots/api#replykeyboardremove" +msgstr "" + +#: ../../docstring +#: aiogram.types.reply_keyboard_remove.ReplyKeyboardRemove.remove_keyboard:1 of +msgid "" +"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`)" +msgstr "" + +#: ../../docstring +#: aiogram.types.reply_keyboard_remove.ReplyKeyboardRemove.selective:1 of +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 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 new file mode 100644 index 00000000..a278dcf0 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_parameters.po @@ -0,0 +1,106 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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/reply_parameters.rst:3 +msgid "ReplyParameters" +msgstr "" + +#: aiogram.types.reply_parameters.ReplyParameters:1 of +msgid "Describes reply parameters for the message that is being sent." +msgstr "" + +#: aiogram.types.reply_parameters.ReplyParameters:3 of +msgid "Source: https://core.telegram.org/bots/api#replyparameters" +msgstr "" + +#: ../../docstring aiogram.types.reply_parameters.ReplyParameters.message_id:1 +#: of +msgid "" +"Identifier of the message that will be replied to in the current chat, or" +" in the chat *chat_id* if it is specified" +msgstr "" + +#: ../../docstring aiogram.types.reply_parameters.ReplyParameters.chat_id:1 of +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`). Not supported for messages sent on behalf of a" +" business account." +msgstr "" + +#: ../../docstring +#: aiogram.types.reply_parameters.ReplyParameters.allow_sending_without_reply:1 +#: of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.reply_parameters.ReplyParameters.quote:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring +#: aiogram.types.reply_parameters.ReplyParameters.quote_parse_mode:1 of +msgid "" +"*Optional*. Mode for parsing entities in the quote. See `formatting " +"options `_ for " +"more details." +msgstr "" + +#: ../../docstring +#: aiogram.types.reply_parameters.ReplyParameters.quote_entities:1 of +msgid "" +"*Optional*. A JSON-serialized list of special entities that appear in the" +" quote. It can be specified instead of *quote_parse_mode*." +msgstr "" + +#: ../../docstring +#: aiogram.types.reply_parameters.ReplyParameters.quote_position:1 of +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/response_parameters.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/response_parameters.po new file mode 100644 index 00000000..44650c07 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/response_parameters.po @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/response_parameters.rst:3 +msgid "ResponseParameters" +msgstr "" + +#: aiogram.types.response_parameters.ResponseParameters:1 of +msgid "Describes why a request was unsuccessful." +msgstr "" + +#: aiogram.types.response_parameters.ResponseParameters:3 of +msgid "Source: https://core.telegram.org/bots/api#responseparameters" +msgstr "" + +#: ../../docstring +#: aiogram.types.response_parameters.ResponseParameters.migrate_to_chat_id:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring +#: aiogram.types.response_parameters.ResponseParameters.retry_after:1 of +msgid "" +"*Optional*. In case of exceeding flood control, the number of seconds " +"left to wait before the request can be repeated" +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/sent_web_app_message.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/sent_web_app_message.po new file mode 100644 index 00000000..1464542c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/sent_web_app_message.po @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/sent_web_app_message.rst:3 +msgid "SentWebAppMessage" +msgstr "" + +#: aiogram.types.sent_web_app_message.SentWebAppMessage:1 of +msgid "" +"Describes an inline message sent by a `Web App " +"`_ on behalf of a user." +msgstr "" + +#: aiogram.types.sent_web_app_message.SentWebAppMessage:3 of +msgid "Source: https://core.telegram.org/bots/api#sentwebappmessage" +msgstr "" + +#: ../../docstring +#: aiogram.types.sent_web_app_message.SentWebAppMessage.inline_message_id:1 of +msgid "" +"*Optional*. Identifier of the sent inline message. Available only if " +"there is an `inline keyboard " +"`_ attached to " +"the message." +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_address.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/shipping_address.po new file mode 100644 index 00000000..f5fbf117 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/shipping_address.po @@ -0,0 +1,63 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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.13.1\n" + +#: ../../api/types/shipping_address.rst:3 +msgid "ShippingAddress" +msgstr "" + +#: aiogram.types.shipping_address.ShippingAddress:1 of +msgid "This object represents a shipping address." +msgstr "" + +#: aiogram.types.shipping_address.ShippingAddress:3 of +msgid "Source: https://core.telegram.org/bots/api#shippingaddress" +msgstr "" + +#: ../../docstring +#: aiogram.types.shipping_address.ShippingAddress.country_code:1 of +msgid "" +"Two-letter `ISO 3166-1 alpha-2 " +"`_ country code" +msgstr "" + +#: ../../docstring aiogram.types.shipping_address.ShippingAddress.state:1 of +msgid "State, if applicable" +msgstr "" + +#: ../../docstring aiogram.types.shipping_address.ShippingAddress.city:1 of +msgid "City" +msgstr "" + +#: ../../docstring +#: aiogram.types.shipping_address.ShippingAddress.street_line1:1 of +msgid "First line for the address" +msgstr "" + +#: ../../docstring +#: aiogram.types.shipping_address.ShippingAddress.street_line2:1 of +msgid "Second line for the address" +msgstr "" + +#: ../../docstring aiogram.types.shipping_address.ShippingAddress.post_code:1 +#: of +msgid "Address post code" +msgstr "" + +#~ msgid "Two-letter ISO 3166-1 alpha-2 country code" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/shipping_option.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/shipping_option.po new file mode 100644 index 00000000..e9f95db7 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/shipping_option.po @@ -0,0 +1,42 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/shipping_option.rst:3 +msgid "ShippingOption" +msgstr "" + +#: aiogram.types.shipping_option.ShippingOption:1 of +msgid "This object represents one shipping option." +msgstr "" + +#: aiogram.types.shipping_option.ShippingOption:3 of +msgid "Source: https://core.telegram.org/bots/api#shippingoption" +msgstr "" + +#: ../../docstring aiogram.types.shipping_option.ShippingOption.id:1 of +msgid "Shipping option identifier" +msgstr "" + +#: ../../docstring aiogram.types.shipping_option.ShippingOption.title:1 of +msgid "Option title" +msgstr "" + +#: ../../docstring aiogram.types.shipping_option.ShippingOption.prices:1 of +msgid "List of price portions" +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 new file mode 100644 index 00000000..68672cf7 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/shipping_query.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/shipping_query.rst:3 +msgid "ShippingQuery" +msgstr "" + +#: aiogram.types.shipping_query.ShippingQuery:1 of +msgid "This object contains information about an incoming shipping query." +msgstr "" + +#: aiogram.types.shipping_query.ShippingQuery:3 of +msgid "Source: https://core.telegram.org/bots/api#shippingquery" +msgstr "" + +#: ../../docstring aiogram.types.shipping_query.ShippingQuery.id:1 of +msgid "Unique query identifier" +msgstr "" + +#: ../../docstring aiogram.types.shipping_query.ShippingQuery.from_user:1 of +msgid "User who sent the query" +msgstr "" + +#: ../../docstring aiogram.types.shipping_query.ShippingQuery.invoice_payload:1 +#: of +msgid "Bot-specified invoice payload" +msgstr "" + +#: ../../docstring +#: aiogram.types.shipping_query.ShippingQuery.shipping_address:1 of +msgid "User specified shipping address" +msgstr "" + +#: aiogram.types.shipping_query.ShippingQuery.answer:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.answer_shipping_query.AnswerShippingQuery` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.shipping_query.ShippingQuery.answer:4 of +msgid ":code:`shipping_query_id`" +msgstr "" + +#: aiogram.types.shipping_query.ShippingQuery.answer:6 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.shipping_query.ShippingQuery.answer:8 of +msgid "Source: https://core.telegram.org/bots/api#answershippingquery" +msgstr "" + +#: ../../api/types/shipping_query.rst +msgid "Parameters" +msgstr "" + +#: aiogram.types.shipping_query.ShippingQuery.answer:10 of +msgid "" +"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)" +msgstr "" + +#: aiogram.types.shipping_query.ShippingQuery.answer:11 of +msgid "" +"Required if *ok* is :code:`True`. A JSON-serialized array of available " +"shipping options." +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, " +"delivery to your desired address is unavailable'). Telegram will display " +"this message to the user." +msgstr "" + +#: ../../api/types/shipping_query.rst +msgid "Returns" +msgstr "" + +#: aiogram.types.shipping_query.ShippingQuery.answer:13 of +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.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/sticker.po new file mode 100644 index 00000000..fe98cecc --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/sticker.po @@ -0,0 +1,173 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+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" + +#: ../../api/types/sticker.rst:3 +msgid "Sticker" +msgstr "" + +#: aiogram.types.sticker.Sticker:1 of +msgid "This object represents a sticker." +msgstr "" + +#: aiogram.types.sticker.Sticker:3 of +msgid "Source: https://core.telegram.org/bots/api#sticker" +msgstr "" + +#: ../../docstring aiogram.types.sticker.Sticker.file_id:1 of +msgid "Identifier for this file, which can be used to download or reuse the file" +msgstr "" + +#: ../../docstring aiogram.types.sticker.Sticker.file_unique_id:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring aiogram.types.sticker.Sticker.type:1 of +msgid "" +"Type of the sticker, currently one of 'regular', 'mask', 'custom_emoji'. " +"The type of the sticker is independent from its format, which is " +"determined by the fields *is_animated* and *is_video*." +msgstr "" + +#: ../../docstring aiogram.types.sticker.Sticker.width:1 of +msgid "Sticker width" +msgstr "" + +#: ../../docstring aiogram.types.sticker.Sticker.height:1 of +msgid "Sticker height" +msgstr "" + +#: ../../docstring aiogram.types.sticker.Sticker.is_animated:1 of +msgid "" +":code:`True`, if the sticker is `animated `_" +msgstr "" + +#: ../../docstring aiogram.types.sticker.Sticker.is_video:1 of +msgid "" +":code:`True`, if the sticker is a `video sticker " +"`_" +msgstr "" + +#: ../../docstring aiogram.types.sticker.Sticker.thumbnail:1 of +msgid "*Optional*. Sticker thumbnail in the .WEBP or .JPG format" +msgstr "" + +#: ../../docstring aiogram.types.sticker.Sticker.emoji:1 of +msgid "*Optional*. Emoji associated with the sticker" +msgstr "" + +#: ../../docstring aiogram.types.sticker.Sticker.set_name:1 of +msgid "*Optional*. Name of the sticker set to which the sticker belongs" +msgstr "" + +#: ../../docstring aiogram.types.sticker.Sticker.premium_animation:1 of +msgid "" +"*Optional*. For premium regular stickers, premium animation for the " +"sticker" +msgstr "" + +#: ../../docstring aiogram.types.sticker.Sticker.mask_position:1 of +msgid "" +"*Optional*. For mask stickers, the position where the mask should be " +"placed" +msgstr "" + +#: ../../docstring aiogram.types.sticker.Sticker.custom_emoji_id:1 of +msgid "" +"*Optional*. For custom emoji stickers, unique identifier of the custom " +"emoji" +msgstr "" + +#: ../../docstring aiogram.types.sticker.Sticker.needs_repainting:1 of +msgid "" +"*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" +msgstr "" + +#: ../../docstring aiogram.types.sticker.Sticker.file_size:1 of +msgid "*Optional*. File size in bytes" +msgstr "" + +#: aiogram.types.sticker.Sticker.set_position_in_set:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet`" +" will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.sticker.Sticker.delete_from_set:4 +#: aiogram.types.sticker.Sticker.set_position_in_set:4 of +msgid ":code:`sticker`" +msgstr "" + +#: aiogram.types.sticker.Sticker.set_position_in_set:6 of +msgid "" +"Use this method to move a sticker in a set created by the bot to a " +"specific position. Returns :code:`True` on success." +msgstr "" + +#: aiogram.types.sticker.Sticker.set_position_in_set:8 of +msgid "Source: https://core.telegram.org/bots/api#setstickerpositioninset" +msgstr "" + +#: aiogram.types.sticker.Sticker.set_position_in_set of +msgid "Parameters" +msgstr "" + +#: aiogram.types.sticker.Sticker.set_position_in_set:10 of +msgid "New sticker position in the set, zero-based" +msgstr "" + +#: aiogram.types.sticker.Sticker.delete_from_set +#: aiogram.types.sticker.Sticker.set_position_in_set of +msgid "Returns" +msgstr "" + +#: aiogram.types.sticker.Sticker.set_position_in_set:11 of +msgid "" +"instance of method " +":class:`aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet`" +msgstr "" + +#: aiogram.types.sticker.Sticker.delete_from_set:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.sticker.Sticker.delete_from_set:6 of +msgid "" +"Use this method to delete a sticker from a set created by the bot. " +"Returns :code:`True` on success." +msgstr "" + +#: aiogram.types.sticker.Sticker.delete_from_set:8 of +msgid "Source: https://core.telegram.org/bots/api#deletestickerfromset" +msgstr "" + +#: aiogram.types.sticker.Sticker.delete_from_set:10 of +msgid "" +"instance of method " +":class:`aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet`" +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 new file mode 100644 index 00000000..121d9faf --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/sticker_set.po @@ -0,0 +1,69 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/sticker_set.rst:3 +msgid "StickerSet" +msgstr "" + +#: aiogram.types.sticker_set.StickerSet:1 of +msgid "This object represents a sticker set." +msgstr "" + +#: aiogram.types.sticker_set.StickerSet:3 of +msgid "Source: https://core.telegram.org/bots/api#stickerset" +msgstr "" + +#: ../../docstring aiogram.types.sticker_set.StickerSet.name:1 of +msgid "Sticker set name" +msgstr "" + +#: ../../docstring aiogram.types.sticker_set.StickerSet.title:1 of +msgid "Sticker set title" +msgstr "" + +#: ../../docstring aiogram.types.sticker_set.StickerSet.sticker_type:1 of +msgid "" +"Type of stickers in the set, currently one of 'regular', 'mask', " +"'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 "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/story.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/story.po new file mode 100644 index 00000000..f940ed4d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/story.po @@ -0,0 +1,44 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, 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-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.13.1\n" + +#: ../../api/types/story.rst:3 +msgid "Story" +msgstr "" + +#: aiogram.types.story.Story:1 of +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 new file mode 100644 index 00000000..7082c319 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/successful_payment.po @@ -0,0 +1,110 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.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. 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 +msgid "Source: https://core.telegram.org/bots/api#successfulpayment" +msgstr "" + +#: ../../docstring +#: aiogram.types.successful_payment.SuccessfulPayment.currency:1 of +msgid "" +"Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars " +"`_" +msgstr "" + +#: ../../docstring +#: aiogram.types.successful_payment.SuccessfulPayment.total_amount:1 of +msgid "" +"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)." +msgstr "" + +#: ../../docstring +#: aiogram.types.successful_payment.SuccessfulPayment.invoice_payload:1 of +msgid "Bot-specified invoice payload" +msgstr "" + +#: ../../docstring +#: aiogram.types.successful_payment.SuccessfulPayment.telegram_payment_charge_id:1 +#: of +msgid "Telegram payment identifier" +msgstr "" + +#: ../../docstring +#: aiogram.types.successful_payment.SuccessfulPayment.provider_payment_charge_id:1 +#: of +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" +msgstr "" + +#: ../../docstring +#: 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/switch_inline_query_chosen_chat.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/switch_inline_query_chosen_chat.po new file mode 100644 index 00000000..3b8f431d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/switch_inline_query_chosen_chat.po @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, 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: 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" + +#: ../../api/types/switch_inline_query_chosen_chat.rst:3 +msgid "SwitchInlineQueryChosenChat" +msgstr "" + +#: aiogram.types.switch_inline_query_chosen_chat.SwitchInlineQueryChosenChat:1 +#: of +msgid "" +"This object represents an inline button that switches the current user to" +" inline mode in a chosen chat, with an optional default inline query." +msgstr "" + +#: aiogram.types.switch_inline_query_chosen_chat.SwitchInlineQueryChosenChat:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#switchinlinequerychosenchat" +msgstr "" + +#: ../../docstring +#: aiogram.types.switch_inline_query_chosen_chat.SwitchInlineQueryChosenChat.query:1 +#: of +msgid "" +"*Optional*. The default inline query to be inserted in the input field. " +"If left empty, only the bot's username will be inserted" +msgstr "" + +#: ../../docstring +#: aiogram.types.switch_inline_query_chosen_chat.SwitchInlineQueryChosenChat.allow_user_chats:1 +#: of +msgid "*Optional*. True, if private chats with users can be chosen" +msgstr "" + +#: ../../docstring +#: aiogram.types.switch_inline_query_chosen_chat.SwitchInlineQueryChosenChat.allow_bot_chats:1 +#: of +msgid "*Optional*. True, if private chats with bots can be chosen" +msgstr "" + +#: ../../docstring +#: aiogram.types.switch_inline_query_chosen_chat.SwitchInlineQueryChosenChat.allow_group_chats:1 +#: of +msgid "*Optional*. True, if group and supergroup chats can be chosen" +msgstr "" + +#: ../../docstring +#: aiogram.types.switch_inline_query_chosen_chat.SwitchInlineQueryChosenChat.allow_channel_chats:1 +#: of +msgid "*Optional*. True, if channel chats can be chosen" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/text_quote.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/text_quote.po new file mode 100644 index 00000000..fa44fd94 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/text_quote.po @@ -0,0 +1,60 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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/text_quote.rst:3 +msgid "TextQuote" +msgstr "" + +#: aiogram.types.text_quote.TextQuote:1 of +msgid "" +"This object contains information about the quoted part of a message that " +"is replied to by the given message." +msgstr "" + +#: aiogram.types.text_quote.TextQuote:3 of +msgid "Source: https://core.telegram.org/bots/api#textquote" +msgstr "" + +#: ../../docstring aiogram.types.text_quote.TextQuote.text:1 of +msgid "" +"Text of the quoted part of a message that is replied to by the given " +"message" +msgstr "" + +#: ../../docstring aiogram.types.text_quote.TextQuote.position:1 of +msgid "" +"Approximate quote position in the original message in UTF-16 code units " +"as specified by the sender" +msgstr "" + +#: ../../docstring aiogram.types.text_quote.TextQuote.entities:1 of +msgid "" +"*Optional*. Special entities that appear in the quote. Currently, only " +"*bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and " +"*custom_emoji* entities are kept in quotes." +msgstr "" + +#: ../../docstring aiogram.types.text_quote.TextQuote.is_manual:1 of +msgid "" +"*Optional*. True, if the quote was chosen manually by the message sender." +" Otherwise, the quote was added automatically by the server." +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 new file mode 100644 index 00000000..2332b7c2 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/update.po @@ -0,0 +1,259 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/update.rst:3 +msgid "Update" +msgstr "" + +#: aiogram.types.update.Update:1 of +msgid "" +"This `object `_ " +"represents an incoming update." +msgstr "" + +#: aiogram.types.update.Update:3 of +msgid "" +"At most **one** of the optional parameters can be present in any given " +"update." +msgstr "" + +#: aiogram.types.update.Update:5 of +msgid "Source: https://core.telegram.org/bots/api#update" +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 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." +msgstr "" + +#: ../../docstring aiogram.types.update.Update.message:1 of +msgid "*Optional*. New incoming message of any kind - text, photo, sticker, etc." +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. 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 +msgid "" +"*Optional*. New incoming channel post of any kind - text, photo, sticker," +" etc." +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. 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 +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.update.Update.message_reaction_count:1 of +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. 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 +msgid "" +"*Optional*. New incoming `inline `_ query" +msgstr "" + +#: ../../docstring aiogram.types.update.Update.chosen_inline_result:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.update.Update.callback_query:1 of +msgid "*Optional*. New incoming callback query" +msgstr "" + +#: ../../docstring aiogram.types.update.Update.shipping_query:1 of +msgid "" +"*Optional*. New incoming shipping query. Only for invoices with flexible " +"price" +msgstr "" + +#: ../../docstring aiogram.types.update.Update.pre_checkout_query:1 of +msgid "" +"*Optional*. New incoming pre-checkout query. Contains full information " +"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 manually " +"stopped polls and polls, which are sent by the bot" +msgstr "" + +#: ../../docstring aiogram.types.update.Update.poll_answer:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.update.Update.my_chat_member:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.update.Update.chat_member:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.update.Update.chat_join_request:1 of +msgid "" +"*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." +msgstr "" + +#: ../../docstring aiogram.types.update.Update.chat_boost:1 of +msgid "" +"*Optional*. A chat boost was added or changed. The bot must be an " +"administrator in the chat to receive these updates." +msgstr "" + +#: ../../docstring aiogram.types.update.Update.removed_chat_boost:1 of +msgid "" +"*Optional*. A boost was removed from a chat. The bot must be an " +"administrator in the chat to receive these updates." +msgstr "" + +#: aiogram.types.update.Update.event_type:1 of +msgid "Detect update type If update type is unknown, raise UpdateTypeLookupError" +msgstr "" + +#: ../../api/types/update.rst +msgid "Returns" +msgstr "" + +#: aiogram.types.update.UpdateTypeLookupError:1 of +msgid "Update does not contain any known event type." +msgstr "" + +#~ msgid "" +#~ "*Optional*. A chat member's status was" +#~ " updated in a chat. The bot " +#~ "must be an administrator in the " +#~ "chat and must explicitly specify " +#~ "'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 new file mode 100644 index 00000000..537fe1d8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/user.po @@ -0,0 +1,170 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/user.rst:3 +msgid "User" +msgstr "" + +#: aiogram.types.user.User:1 of +msgid "This object represents a Telegram user or bot." +msgstr "" + +#: aiogram.types.user.User:3 of +msgid "Source: https://core.telegram.org/bots/api#user" +msgstr "" + +#: ../../docstring aiogram.types.user.User.id:1 of +msgid "" +"Unique identifier for this user or bot. 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.user.User.is_bot:1 of +msgid ":code:`True`, if this user is a bot" +msgstr "" + +#: ../../docstring aiogram.types.user.User.first_name:1 of +msgid "User's or bot's first name" +msgstr "" + +#: ../../docstring aiogram.types.user.User.last_name:1 of +msgid "*Optional*. User's or bot's last name" +msgstr "" + +#: ../../docstring aiogram.types.user.User.username:1 of +msgid "*Optional*. User's or bot's username" +msgstr "" + +#: ../../docstring aiogram.types.user.User.language_code:1 of +msgid "" +"*Optional*. `IETF language tag " +"`_ of the user's " +"language" +msgstr "" + +#: ../../docstring aiogram.types.user.User.is_premium:1 of +msgid "*Optional*. :code:`True`, if this user is a Telegram Premium user" +msgstr "" + +#: ../../docstring aiogram.types.user.User.added_to_attachment_menu:1 of +msgid "" +"*Optional*. :code:`True`, if this user added the bot to the attachment " +"menu" +msgstr "" + +#: ../../docstring aiogram.types.user.User.can_join_groups:1 of +msgid "" +"*Optional*. :code:`True`, if the bot can be invited to groups. Returned " +"only in :class:`aiogram.methods.get_me.GetMe`." +msgstr "" + +#: ../../docstring aiogram.types.user.User.can_read_all_group_messages:1 of +msgid "" +"*Optional*. :code:`True`, if `privacy mode " +"`_ is disabled for " +"the bot. Returned only in :class:`aiogram.methods.get_me.GetMe`." +msgstr "" + +#: ../../docstring aiogram.types.user.User.supports_inline_queries:1 of +msgid "" +"*Optional*. :code:`True`, if the bot supports inline queries. Returned " +"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 " +":class:`aiogram.methods.get_user_profile_photos.GetUserProfilePhotos` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.user.User.get_profile_photos:4 of +msgid ":code:`user_id`" +msgstr "" + +#: aiogram.types.user.User.get_profile_photos:6 of +msgid "" +"Use this method to get a list of profile pictures for a user. Returns a " +":class:`aiogram.types.user_profile_photos.UserProfilePhotos` object." +msgstr "" + +#: aiogram.types.user.User.get_profile_photos:8 of +msgid "Source: https://core.telegram.org/bots/api#getuserprofilephotos" +msgstr "" + +#: ../../api/types/user.rst +msgid "Parameters" +msgstr "" + +#: aiogram.types.user.User.get_profile_photos:10 of +msgid "" +"Sequential number of the first photo to be returned. By default, all " +"photos are returned." +msgstr "" + +#: aiogram.types.user.User.get_profile_photos:11 of +msgid "" +"Limits the number of photos to be retrieved. Values between 1-100 are " +"accepted. Defaults to 100." +msgstr "" + +#: ../../api/types/user.rst +msgid "Returns" +msgstr "" + +#: aiogram.types.user.User.get_profile_photos:12 of +msgid "" +"instance of method " +":class:`aiogram.methods.get_user_profile_photos.GetUserProfilePhotos`" +msgstr "" + +#~ msgid "This object represents a Telegram user or bot." +#~ msgstr "" + +#~ msgid "Source: https://core.telegram.org/bots/api#user" +#~ msgstr "" + +#~ msgid "" +#~ "This object represents a Telegram user" +#~ " or bot. Source: " +#~ "https://core.telegram.org/bots/api#user" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if `privacy mode " +#~ "`_ is " +#~ "disabled for the bot. Returned only " +#~ "in :class:`aiogram.methods.get_me.GetMe`." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/user_chat_boosts.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/user_chat_boosts.po new file mode 100644 index 00000000..56dc86df --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/user_chat_boosts.po @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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/user_chat_boosts.rst:3 +msgid "UserChatBoosts" +msgstr "" + +#: aiogram.types.user_chat_boosts.UserChatBoosts:1 of +msgid "This object represents a list of boosts added to a chat by a user." +msgstr "" + +#: aiogram.types.user_chat_boosts.UserChatBoosts:3 of +msgid "Source: https://core.telegram.org/bots/api#userchatboosts" +msgstr "" + +#: ../../docstring aiogram.types.user_chat_boosts.UserChatBoosts.boosts:1 of +msgid "The list of boosts added to the chat by the user" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/user_profile_photos.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/user_profile_photos.po new file mode 100644 index 00000000..a1a37319 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/user_profile_photos.po @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/user_profile_photos.rst:3 +msgid "UserProfilePhotos" +msgstr "" + +#: aiogram.types.user_profile_photos.UserProfilePhotos:1 of +msgid "This object represent a user's profile pictures." +msgstr "" + +#: aiogram.types.user_profile_photos.UserProfilePhotos:3 of +msgid "Source: https://core.telegram.org/bots/api#userprofilephotos" +msgstr "" + +#: ../../docstring +#: aiogram.types.user_profile_photos.UserProfilePhotos.total_count:1 of +msgid "Total number of profile pictures the target user has" +msgstr "" + +#: ../../docstring aiogram.types.user_profile_photos.UserProfilePhotos.photos:1 +#: of +msgid "Requested profile pictures (in up to 4 sizes each)" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/user_shared.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/user_shared.po new file mode 100644 index 00000000..ecc612cc --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/user_shared.po @@ -0,0 +1,53 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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.13.1\n" + +#: ../../api/types/user_shared.rst:3 +msgid "UserShared" +msgstr "" + +#: aiogram.types.user_shared.UserShared:1 of +msgid "" +"This object contains information about the user whose identifier was " +"shared with the bot using a " +":class:`aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser`" +" button." +msgstr "" + +#: aiogram.types.user_shared.UserShared:3 of +msgid "https://core.telegram.org/bots/api-changelog#december-29-2023" +msgstr "" + +#: aiogram.types.user_shared.UserShared:6 of +msgid "Source: https://core.telegram.org/bots/api#usershared" +msgstr "" + +#: ../../docstring aiogram.types.user_shared.UserShared.request_id:1 of +msgid "Identifier of the request" +msgstr "" + +#: ../../docstring aiogram.types.user_shared.UserShared.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 a 64-bit integer or double-precision float type are " +"safe for storing this identifier. 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 "" 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 new file mode 100644 index 00000000..2306458b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/users_shared.po @@ -0,0 +1,60 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2024, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2024. +# +#, 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/users_shared.rst:3 +msgid "UsersShared" +msgstr "" + +#: aiogram.types.users_shared.UsersShared:1 of +msgid "" +"This object contains information about the users whose identifiers were " +"shared with the bot using a " +":class:`aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers`" +" button." +msgstr "" + +#: aiogram.types.users_shared.UsersShared:3 of +msgid "Source: https://core.telegram.org/bots/api#usersshared" +msgstr "" + +#: ../../docstring aiogram.types.users_shared.UsersShared.request_id:1 of +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 " +"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." +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/venue.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/venue.po new file mode 100644 index 00000000..949a414e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/venue.po @@ -0,0 +1,63 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/venue.rst:3 +msgid "Venue" +msgstr "" + +#: aiogram.types.venue.Venue:1 of +msgid "This object represents a venue." +msgstr "" + +#: aiogram.types.venue.Venue:3 of +msgid "Source: https://core.telegram.org/bots/api#venue" +msgstr "" + +#: ../../docstring aiogram.types.venue.Venue.location:1 of +msgid "Venue location. Can't be a live location" +msgstr "" + +#: ../../docstring aiogram.types.venue.Venue.title:1 of +msgid "Name of the venue" +msgstr "" + +#: ../../docstring aiogram.types.venue.Venue.address:1 of +msgid "Address of the venue" +msgstr "" + +#: ../../docstring aiogram.types.venue.Venue.foursquare_id:1 of +msgid "*Optional*. Foursquare identifier of the venue" +msgstr "" + +#: ../../docstring aiogram.types.venue.Venue.foursquare_type:1 of +msgid "" +"*Optional*. Foursquare type of the venue. (For example, " +"'arts_entertainment/default', 'arts_entertainment/aquarium' or " +"'food/icecream'.)" +msgstr "" + +#: ../../docstring aiogram.types.venue.Venue.google_place_id:1 of +msgid "*Optional*. Google Places identifier of the venue" +msgstr "" + +#: ../../docstring aiogram.types.venue.Venue.google_place_type:1 of +msgid "" +"*Optional*. Google Places type of the venue. (See `supported types " +"`_.)" +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 new file mode 100644 index 00000000..5da7a7d3 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/video.po @@ -0,0 +1,97 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/video.rst:3 +msgid "Video" +msgstr "" + +#: aiogram.types.video.Video:1 of +msgid "This object represents a video file." +msgstr "" + +#: aiogram.types.video.Video:3 of +msgid "Source: https://core.telegram.org/bots/api#video" +msgstr "" + +#: ../../docstring aiogram.types.video.Video.file_id:1 of +msgid "Identifier for this file, which can be used to download or reuse the file" +msgstr "" + +#: ../../docstring aiogram.types.video.Video.file_unique_id:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring aiogram.types.video.Video.width:1 of +msgid "Video width as defined by the sender" +msgstr "" + +#: ../../docstring aiogram.types.video.Video.height:1 of +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 the sender" +msgstr "" + +#: ../../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 the sender" +msgstr "" + +#: ../../docstring aiogram.types.video.Video.mime_type:1 of +msgid "*Optional*. MIME type of the file as defined by the sender" +msgstr "" + +#: ../../docstring aiogram.types.video.Video.file_size:1 of +msgid "" +"*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." +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_chat_ended.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/video_chat_ended.po new file mode 100644 index 00000000..85fca928 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/video_chat_ended.po @@ -0,0 +1,36 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/video_chat_ended.rst:3 +msgid "VideoChatEnded" +msgstr "" + +#: aiogram.types.video_chat_ended.VideoChatEnded:1 of +msgid "" +"This object represents a service message about a video chat ended in the " +"chat." +msgstr "" + +#: aiogram.types.video_chat_ended.VideoChatEnded:3 of +msgid "Source: https://core.telegram.org/bots/api#videochatended" +msgstr "" + +#: ../../docstring aiogram.types.video_chat_ended.VideoChatEnded.duration:1 of +msgid "Video chat duration in seconds" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/video_chat_participants_invited.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/video_chat_participants_invited.po new file mode 100644 index 00000000..003f340f --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/video_chat_participants_invited.po @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/video_chat_participants_invited.rst:3 +msgid "VideoChatParticipantsInvited" +msgstr "" + +#: aiogram.types.video_chat_participants_invited.VideoChatParticipantsInvited:1 +#: of +msgid "" +"This object represents a service message about new members invited to a " +"video chat." +msgstr "" + +#: aiogram.types.video_chat_participants_invited.VideoChatParticipantsInvited:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#videochatparticipantsinvited" +msgstr "" + +#: ../../docstring +#: aiogram.types.video_chat_participants_invited.VideoChatParticipantsInvited.users:1 +#: of +msgid "New members that were invited to the video chat" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/video_chat_scheduled.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/video_chat_scheduled.po new file mode 100644 index 00000000..cefac90b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/video_chat_scheduled.po @@ -0,0 +1,39 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/video_chat_scheduled.rst:3 +msgid "VideoChatScheduled" +msgstr "" + +#: aiogram.types.video_chat_scheduled.VideoChatScheduled:1 of +msgid "" +"This object represents a service message about a video chat scheduled in " +"the chat." +msgstr "" + +#: aiogram.types.video_chat_scheduled.VideoChatScheduled:3 of +msgid "Source: https://core.telegram.org/bots/api#videochatscheduled" +msgstr "" + +#: ../../docstring +#: aiogram.types.video_chat_scheduled.VideoChatScheduled.start_date:1 of +msgid "" +"Point in time (Unix timestamp) when the video chat is supposed to be " +"started by a chat administrator" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/video_chat_started.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/video_chat_started.po new file mode 100644 index 00000000..c4b7b655 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/video_chat_started.po @@ -0,0 +1,32 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/video_chat_started.rst:3 +msgid "VideoChatStarted" +msgstr "" + +#: aiogram.types.video_chat_started.VideoChatStarted:1 of +msgid "" +"This object represents a service message about a video chat started in " +"the chat. Currently holds no information." +msgstr "" + +#: aiogram.types.video_chat_started.VideoChatStarted:3 of +msgid "Source: https://core.telegram.org/bots/api#videochatstarted" +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 new file mode 100644 index 00000000..ea1accb2 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/video_note.po @@ -0,0 +1,70 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/video_note.rst:3 +msgid "VideoNote" +msgstr "" + +#: aiogram.types.video_note.VideoNote:1 of +msgid "" +"This object represents a `video message `_ (available in Telegram apps as of `v.4.0 " +"`_)." +msgstr "" + +#: aiogram.types.video_note.VideoNote:3 of +msgid "Source: https://core.telegram.org/bots/api#videonote" +msgstr "" + +#: ../../docstring aiogram.types.video_note.VideoNote.file_id:1 of +msgid "Identifier for this file, which can be used to download or reuse the file" +msgstr "" + +#: ../../docstring aiogram.types.video_note.VideoNote.file_unique_id:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring aiogram.types.video_note.VideoNote.length:1 of +msgid "" +"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 the sender" +msgstr "" + +#: ../../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 new file mode 100644 index 00000000..572000d2 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/voice.po @@ -0,0 +1,62 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../api/types/voice.rst:3 +msgid "Voice" +msgstr "" + +#: aiogram.types.voice.Voice:1 of +msgid "This object represents a voice note." +msgstr "" + +#: aiogram.types.voice.Voice:3 of +msgid "Source: https://core.telegram.org/bots/api#voice" +msgstr "" + +#: ../../docstring aiogram.types.voice.Voice.file_id:1 of +msgid "Identifier for this file, which can be used to download or reuse the file" +msgstr "" + +#: ../../docstring aiogram.types.voice.Voice.file_unique_id:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring aiogram.types.voice.Voice.duration:1 of +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 the sender" +msgstr "" + +#: ../../docstring aiogram.types.voice.Voice.file_size:1 of +msgid "" +"*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." +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/types/web_app_data.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/web_app_data.po new file mode 100644 index 00000000..812f3b5c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/web_app_data.po @@ -0,0 +1,44 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/web_app_data.rst:3 +msgid "WebAppData" +msgstr "" + +#: aiogram.types.web_app_data.WebAppData:1 of +msgid "" +"Describes data sent from a `Web App " +"`_ to the bot." +msgstr "" + +#: aiogram.types.web_app_data.WebAppData:3 of +msgid "Source: https://core.telegram.org/bots/api#webappdata" +msgstr "" + +#: ../../docstring aiogram.types.web_app_data.WebAppData.data:1 of +msgid "" +"The data. Be aware that a bad client can send arbitrary data in this " +"field." +msgstr "" + +#: ../../docstring aiogram.types.web_app_data.WebAppData.button_text:1 of +msgid "" +"Text of the *web_app* keyboard button from which the Web App was opened. " +"Be aware that a bad client can send arbitrary data in this field." +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/web_app_info.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/web_app_info.po new file mode 100644 index 00000000..912f766a --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/web_app_info.po @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-10-08 19:04+0300\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" + +#: ../../api/types/web_app_info.rst:3 +msgid "WebAppInfo" +msgstr "" + +#: aiogram.types.web_app_info.WebAppInfo:1 of +msgid "Describes a `Web App `_." +msgstr "" + +#: aiogram.types.web_app_info.WebAppInfo:3 of +msgid "Source: https://core.telegram.org/bots/api#webappinfo" +msgstr "" + +#: ../../docstring aiogram.types.web_app_info.WebAppInfo.url:1 of +msgid "" +"An HTTPS URL of a Web App to be opened with additional data as specified " +"in `Initializing Web Apps `_" +msgstr "" + +#~ msgid "" +#~ "An HTTPS URL of a Web App to" +#~ " be opened with additional data as" +#~ " specified in `Initializing Web Apps " +#~ "`_" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/webhook_info.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/webhook_info.po new file mode 100644 index 00000000..f8433f9d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/webhook_info.po @@ -0,0 +1,82 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../api/types/webhook_info.rst:3 +msgid "WebhookInfo" +msgstr "" + +#: aiogram.types.webhook_info.WebhookInfo:1 of +msgid "Describes the current status of a webhook." +msgstr "" + +#: aiogram.types.webhook_info.WebhookInfo:3 of +msgid "Source: https://core.telegram.org/bots/api#webhookinfo" +msgstr "" + +#: ../../docstring aiogram.types.webhook_info.WebhookInfo.url:1 of +msgid "Webhook URL, may be empty if webhook is not set up" +msgstr "" + +#: ../../docstring +#: aiogram.types.webhook_info.WebhookInfo.has_custom_certificate:1 of +msgid "" +":code:`True`, if a custom certificate was provided for webhook " +"certificate checks" +msgstr "" + +#: ../../docstring +#: aiogram.types.webhook_info.WebhookInfo.pending_update_count:1 of +msgid "Number of updates awaiting delivery" +msgstr "" + +#: ../../docstring aiogram.types.webhook_info.WebhookInfo.ip_address:1 of +msgid "*Optional*. Currently used webhook IP address" +msgstr "" + +#: ../../docstring aiogram.types.webhook_info.WebhookInfo.last_error_date:1 of +msgid "" +"*Optional*. Unix time for the most recent error that happened when trying" +" to deliver an update via webhook" +msgstr "" + +#: ../../docstring aiogram.types.webhook_info.WebhookInfo.last_error_message:1 +#: of +msgid "" +"*Optional*. Error message in human-readable format for the most recent " +"error that happened when trying to deliver an update via webhook" +msgstr "" + +#: ../../docstring +#: aiogram.types.webhook_info.WebhookInfo.last_synchronization_error_date:1 of +msgid "" +"*Optional*. Unix time of the most recent error that happened when trying " +"to synchronize available updates with Telegram datacenters" +msgstr "" + +#: ../../docstring aiogram.types.webhook_info.WebhookInfo.max_connections:1 of +msgid "" +"*Optional*. The maximum allowed number of simultaneous HTTPS connections " +"to the webhook for update delivery" +msgstr "" + +#: ../../docstring aiogram.types.webhook_info.WebhookInfo.allowed_updates:1 of +msgid "" +"*Optional*. A list of update types the bot is subscribed to. Defaults to " +"all update types except *chat_member*" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/write_access_allowed.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/write_access_allowed.po new file mode 100644 index 00000000..1378b6ea --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/write_access_allowed.po @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-10-08 19:04+0300\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" + +#: ../../api/types/write_access_allowed.rst:3 +msgid "WriteAccessAllowed" +msgstr "" + +#: aiogram.types.write_access_allowed.WriteAccessAllowed:1 of +msgid "" +"This object represents a service message about a user allowing a bot to " +"write messages after adding it to the attachment menu, launching a Web " +"App from a link, or accepting an explicit request from a Web App sent by " +"the method `requestWriteAccess `_." +msgstr "" + +#: aiogram.types.write_access_allowed.WriteAccessAllowed:3 of +msgid "Source: https://core.telegram.org/bots/api#writeaccessallowed" +msgstr "" + +#: ../../docstring +#: aiogram.types.write_access_allowed.WriteAccessAllowed.from_request:1 of +msgid "" +"*Optional*. True, if the access was granted after the user accepted an " +"explicit request from a Web App sent by the method `requestWriteAccess " +"`_" +msgstr "" + +#: ../../docstring +#: aiogram.types.write_access_allowed.WriteAccessAllowed.web_app_name:1 of +msgid "" +"*Optional*. Name of the Web App, if the access was granted when the Web " +"App was launched from a link" +msgstr "" + +#: ../../docstring +#: aiogram.types.write_access_allowed.WriteAccessAllowed.from_attachment_menu:1 +#: of +msgid "" +"*Optional*. True, if the access was granted when the bot was added to the" +" attachment or side menu" +msgstr "" + +#~ msgid "" +#~ "This object represents a service message" +#~ " about a user allowing a bot " +#~ "added to the attachment menu to " +#~ "write messages. Currently holds no " +#~ "information." +#~ msgstr "" + +#~ msgid "" +#~ "This object represents a service message" +#~ " about a user allowing a bot to" +#~ " write messages after adding the bot" +#~ " to the attachment menu or launching" +#~ " a Web App from a link." +#~ msgstr "" + +#~ msgid "*Optional*. Name of the Web App which was launched from a link" +#~ 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 new file mode 100644 index 00000000..b5ff8ed9 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/upload_file.po @@ -0,0 +1,182 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +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: 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.13.1\n" + +#: ../../api/upload_file.rst:5 +msgid "How to upload file?" +msgstr "Як відвантажити файл?" + +#: ../../api/upload_file.rst:7 +msgid "" +"As says `official Telegram Bot API documentation " +"`_ there are three ways" +" to send files (photos, stickers, audio, media, etc.):" +msgstr "" +"Як стверджує `official Telegram Bot API documentation " +"`_ існує три способа " +"надіслати файл (фото, наклейки, аудіо, медіа тощо):" + +#: ../../api/upload_file.rst:10 +msgid "" +"If the file is already stored somewhere on the Telegram servers or file " +"is available by the URL, you don't need to reupload it." +msgstr "" +"Якщо файл уже зберігається десь на серверах Telegram або файл доступний " +"за URL-адресою, вам не потрібно його повторно завантажувати." + +#: ../../api/upload_file.rst:13 +#, fuzzy +msgid "" +"But if you need to upload a new file just use subclasses of `InputFile " +"`__." +msgstr "" +"Але якщо вам потрібно завантажити новий файл, просто використовуйте " +"підкласи `InputFile `__." + +#: ../../api/upload_file.rst:15 +#, fuzzy +msgid "Here are the three different available builtin types of input file:" +msgstr "Тут доступні три різні типи вхідних файлів:" + +#: ../../api/upload_file.rst:17 +msgid "" +":class:`aiogram.types.input_file.FSInputFile` - `uploading from file " +"system <#upload-from-file-system>`__" +msgstr "" +":class:`aiogram.types.input_file.FSInputFile` - `відвантажений з файлової" +" системи <#upload-from-file-system>`__" + +#: ../../api/upload_file.rst:18 +msgid "" +":class:`aiogram.types.input_file.BufferedInputFile` - `uploading from " +"buffer <#upload-from-buffer>`__" +msgstr "" +":class:`aiogram.types.input_file.BufferedInputFile` - `відвантажений з " +"буферу <#upload-from-buffer>`__" + +#: ../../api/upload_file.rst:19 +msgid "" +":class:`aiogram.types.input_file.URLInputFile` - `uploading from URL " +"<#upload-from-url>`__" +msgstr "" +":class:`aiogram.types.input_file.URLInputFile` - `відвантажений з URL " +"<#upload-from-url>`__" + +#: ../../api/upload_file.rst:23 +#, fuzzy +msgid "**Be respectful to Telegram**" +msgstr "**Поважайте Telegram**" + +#: ../../api/upload_file.rst:25 +#, fuzzy +msgid "" +"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 і надіслати цей файл кілька разів, " +"але Telegram не рекомендує цього робити, і коли ви завантажуєте файл один" +" раз, просто збережіть його `file_id` і використовуйте його наступного " +"разу." + +#: ../../api/upload_file.rst:29 +msgid "Upload from file system" +msgstr "Відвантаження з файлової системи" + +#: ../../api/upload_file.rst:31 +msgid "By first step you will need to import InputFile wrapper:" +msgstr "Перш за все, вам потрібно буде імпортувати обгортку InputFile:" + +#: ../../api/upload_file.rst:37 +msgid "Then you can use it:" +msgstr "Тепер ви можете використовувати її:" + +#: aiogram.types.input_file.BufferedInputFile.__init__:1 +#: aiogram.types.input_file.FSInputFile.__init__:1 of +msgid "Represents object for uploading files from filesystem" +msgstr "Об’єкт для відвантаження файлів із файлової системи" + +#: ../../api/upload_file.rst +msgid "Parameters" +msgstr "Параметри" + +#: aiogram.types.input_file.FSInputFile.__init__:3 of +msgid "Path to file" +msgstr "Шлях до файлу" + +#: aiogram.types.input_file.FSInputFile.__init__:4 of +msgid "" +"Filename to be propagated to telegram. By default, will be parsed from " +"path" +msgstr "" +"Ім'я файлу, яке буде передано в telegram. За замовчуванням, буде взято зі" +" шляху" + +#: aiogram.types.input_file.BufferedInputFile.__init__:5 +#: aiogram.types.input_file.FSInputFile.__init__:6 of +msgid "Uploading chunk size" +msgstr "Розмір фрагмента відвантаження" + +#: ../../api/upload_file.rst:50 +msgid "Upload from buffer" +msgstr "Відвантаження з буферу" + +#: ../../api/upload_file.rst:52 +#, fuzzy +msgid "" +"Files can be also passed from buffer (For example you generate image " +"using `Pillow `_ and you want " +"to send it to Telegram):" +msgstr "" +"Файли також можна передавати з буфера (наприклад, ви створюєте зображення" +" за допомогою `Pillow `_ і " +"хочете надіслати його в Telegram):" + +#: ../../api/upload_file.rst:56 ../../api/upload_file.rst:78 +msgid "Import wrapper:" +msgstr "Імпорт обгортки:" + +#: ../../api/upload_file.rst:62 ../../api/upload_file.rst:84 +msgid "And then you can use it:" +msgstr "Тепер ви можете використовувати її:" + +#: aiogram.types.input_file.BufferedInputFile.__init__:3 of +msgid "Bytes" +msgstr "Байти" + +#: aiogram.types.input_file.BufferedInputFile.__init__:4 of +msgid "Filename to be propagated to telegram." +msgstr "Ім'я файлу, яке буде передано в telegram." + +#: ../../api/upload_file.rst:72 +msgid "Upload from url" +msgstr "Відвантаження з URL" + +#: ../../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 " +"`_ by URL, you can use " +":obj:`aiogram.types.input_file.URLInputFile`." +msgstr "" +"Якщо вам потрібно відвантажити файл з іншого сервера, але пряме посилання" +" прив’язано до IP-адреси вашого сервера, або ви хочете обійти власні " +"`обмеження на завантаження `_ за URL-адресою, ви можете використовувати " +":obj:`aiogram.types.input_file.URLInputFile`." diff --git a/docs/locale/uk_UA/LC_MESSAGES/changelog.po b/docs/locale/uk_UA/LC_MESSAGES/changelog.po new file mode 100644 index 00000000..a0027709 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/changelog.po @@ -0,0 +1,4590 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../../CHANGES.rst:3 +msgid "Changelog" +msgstr "" + +#: ../../../CHANGES.rst:20 +msgid "3.18.0 (2025-02-16)" +msgstr "" + +#: ../../../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 "" + +#: ../../../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 "" + +#: ../../../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 "" + +#: ../../../CHANGES.rst:642 +msgid "`#1392 `_" +msgstr "" + +#: ../../../CHANGES.rst:643 +msgid "" +"A new enum :code:`KeyboardButtonPollTypeType` for " +":code:`KeyboardButtonPollTypeType.type` field has bed added. `#1398 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:645 +msgid "" +"Added full support of `Bot API 7.1 `_" +msgstr "" + +#: ../../../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 "" + +#: ../../../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:669 +msgid "" +"Add notion \"Working with plural forms\" in documentation Utils -> " +"Translation `#1395 `_" +msgstr "" + +#: ../../../CHANGES.rst:674 +msgid "3.3.0 (2023-12-31)" +msgstr "" + +#: ../../../CHANGES.rst:679 +msgid "" +"Added full support of `Bot API 7.0 `_" +msgstr "" + +#: ../../../CHANGES.rst:681 +msgid "Reactions" +msgstr "" + +#: ../../../CHANGES.rst:682 +msgid "Replies 2.0" +msgstr "" + +#: ../../../CHANGES.rst:683 +msgid "Link Preview Customization" +msgstr "" + +#: ../../../CHANGES.rst:684 +msgid "Block Quotation" +msgstr "" + +#: ../../../CHANGES.rst:685 +msgid "Multiple Message Actions" +msgstr "" + +#: ../../../CHANGES.rst:686 +msgid "Requests for multiple users" +msgstr "" + +#: ../../../CHANGES.rst:687 +msgid "Chat Boosts" +msgstr "" + +#: ../../../CHANGES.rst:688 +msgid "Giveaway" +msgstr "" + +#: ../../../CHANGES.rst:689 +msgid "Other changes" +msgstr "" + +#: ../../../CHANGES.rst:690 +msgid "`#1387 `_" +msgstr "" + +#: ../../../CHANGES.rst:694 +msgid "3.2.0 (2023-11-24)" +msgstr "" + +#: ../../../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: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 " +"groups without topics. `#1343 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:709 +msgid "" +"Fixed :code:`parse_mode` argument in the in :code:`Message.send_copy` " +"shortcut. Disable by default. `#1332 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:711 +msgid "" +"Added ability to get handler flags from filters. `#1360 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:713 +msgid "" +"Fixed a situation where a :code:`CallbackData` could not be parsed " +"without a default value. `#1368 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:720 +msgid "" +"Corrected grammatical errors, improved sentence structures, translation " +"for migration 2.x-3.x `#1302 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:722 +msgid "" +"Minor typo correction, specifically in module naming + some grammar. " +"`#1340 `_" +msgstr "" + +#: ../../../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:727 +msgid "" +"Minor typo correction in middleware docs. `#1353 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:734 +msgid "" +"Fixed ResourceWarning in the tests, reworked :code:`RedisEventsIsolation`" +" fixture to use Redis connection from :code:`RedisStorage` `#1320 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:736 +msgid "Updated dependencies, bumped minimum required version:" +msgstr "" + +#: ../../../CHANGES.rst:738 +msgid ":code:`magic-filter` - fixed `.resolve` operation" +msgstr "" + +#: ../../../CHANGES.rst:739 +msgid ":code:`pydantic` - fixed compatibility (broken in 2.4)" +msgstr "" + +#: ../../../CHANGES.rst:740 +msgid "" +":code:`aiodns` - added new dependency to the :code:`fast` extras " +"(:code:`pip install aiogram[fast]`)" +msgstr "" + +#: ../../../CHANGES.rst:741 +msgid "*others...*" +msgstr "" + +#: ../../../CHANGES.rst:742 +msgid "`#1327 `_" +msgstr "" + +#: ../../../CHANGES.rst:743 +msgid "" +"Prevent update handling task pointers from being garbage collected, " +"backport from 2.x `#1331 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:745 +msgid "" +"Updated :code:`typing-extensions` package version range in dependencies " +"to fix compatibility with :code:`FastAPI` `#1347 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:747 +msgid "" +"Introduce Python 3.12 support `#1354 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:749 +msgid "" +"Speeded up CallableMixin processing by caching references to nested " +"objects and simplifying kwargs assembly. `#1357 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:751 +msgid "" +"Added :code:`pydantic` v2.5 support. `#1361 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:753 +msgid "" +"Updated :code:`thumbnail` fields type to :code:`InputFile` only `#1372 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:758 +msgid "3.1.1 (2023-09-25)" +msgstr "" + +#: ../../../CHANGES.rst:763 +msgid "" +"Fixed `pydantic` version <2.4, since 2.4 has breaking changes. `#1322 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:768 +msgid "3.1.0 (2023-09-22)" +msgstr "" + +#: ../../../CHANGES.rst:773 +msgid "" +"Added support for custom encoders/decoders for payload (and also for " +"deep-linking). `#1262 `_" +msgstr "" + +#: ../../../CHANGES.rst:775 +msgid "" +"Added :class:`aiogram.utils.input_media.MediaGroupBuilder` for media " +"group construction. `#1293 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:777 +msgid "" +"Added full support of `Bot API 6.9 `_ `#1319 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:784 +msgid "" +"Added actual param hints for `InlineKeyboardBuilder` and " +"`ReplyKeyboardBuilder`. `#1303 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:786 +msgid "" +"Fixed priority of events isolation, now user state will be loaded only " +"after lock is acquired `#1317 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:791 +msgid "3.0.0 (2023-09-01)" +msgstr "" + +#: ../../../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:799 +msgid "" +"Fixed magic :code:`.as_(...)` operation for values that can be " +"interpreted as `False` (e.g. `0`). `#1281 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:801 +msgid "" +"Italic markdown from utils now uses correct decorators `#1282 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:803 +msgid "" +"Fixed method :code:`Message.send_copy` for stickers. `#1284 " +"`_" +msgstr "" + +#: ../../../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:807 +msgid "" +"Fixed error overlapping when validation error is caused by remove_unset " +"root validator in base types and methods. `#1290 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:812 +msgid "3.0.0rc2 (2023-08-18)" +msgstr "" + +#: ../../../CHANGES.rst:817 +msgid "" +"Fixed missing message content types (:code:`ContentType.USER_SHARED`, " +":code:`ContentType.CHAT_SHARED`) `#1252 " +"`_" +msgstr "" + +#: ../../../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: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:829 +msgid "" +"Added error handling example `examples/error_handling.py` `#1099 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:831 +msgid "" +"Added a few words about skipping pending updates `#1251 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:833 +msgid "" +"Added a section on Dependency Injection technology `#1253 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:835 +msgid "" +"This update includes the addition of a multi-file bot example to the " +"repository. `#1254 `_" +msgstr "" + +#: ../../../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:840 +msgid "" +"Supplemented \"Finite State Machine\" section in Migration FAQ `#1264 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:842 +msgid "" +"Removed extra param in docstring of TelegramEventObserver's filter method" +" and fixed typo in I18n documentation. `#1268 " +"`_" +msgstr "" + +#: ../../../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:852 +msgid "" +"Added support for `Bot API 6.8 `_ `#1275 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:857 +msgid "3.0.0rc1 (2023-08-06)" +msgstr "" + +#: ../../../CHANGES.rst:862 +msgid "Added Currency enum. You can use it like this:" +msgstr "" + +#: ../../../CHANGES.rst:874 +msgid "`#1194 `_" +msgstr "" + +#: ../../../CHANGES.rst:875 +msgid "" +"Updated keyboard builders with new methods for integrating buttons and " +"keyboard creation more seamlessly. Added functionality to create buttons " +"from existing markup and attach another builder. This improvement aims to" +" make the keyboard building process more user-friendly and flexible. " +"`#1236 `_" +msgstr "" + +#: ../../../CHANGES.rst:879 +msgid "" +"Added support for message_thread_id in ChatActionSender `#1249 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:886 +msgid "" +"Fixed polling startup when \"bot\" key is passed manually into dispatcher" +" workflow data `#1242 `_" +msgstr "" + +#: ../../../CHANGES.rst:888 +msgid "Added codegen configuration for lost shortcuts:" +msgstr "" + +#: ../../../CHANGES.rst:890 +msgid "ShippingQuery.answer" +msgstr "" + +#: ../../../CHANGES.rst:891 +msgid "PreCheckoutQuery.answer" +msgstr "" + +#: ../../../CHANGES.rst:892 +msgid "Message.delete_reply_markup" +msgstr "" + +#: ../../../CHANGES.rst:893 +msgid "`#1244 `_" +msgstr "" + +#: ../../../CHANGES.rst:899 +msgid "" +"Added documentation for webhook and polling modes. `#1241 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:906 +msgid "" +"Reworked InputFile reading, removed :code:`__aiter__` method, added `bot:" +" Bot` argument to the :code:`.read(...)` method, so, from now " +"URLInputFile can be used without specifying bot instance. `#1238 " +"`_" +msgstr "" + +#: ../../../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:915 +msgid "3.0.0b9 (2023-07-30)" +msgstr "" + +#: ../../../CHANGES.rst:920 +msgid "" +"Added new shortcuts for " +":class:`aiogram.types.chat_member_updated.ChatMemberUpdated` to send " +"message to chat that member joined/left. `#1234 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:923 +msgid "" +"Added new shortcuts for " +":class:`aiogram.types.chat_join_request.ChatJoinRequest` to make easier " +"access to sending messages to users who wants to join to chat. `#1235 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:931 +msgid "" +"Fixed bot assignment in the :code:`Message.send_copy` shortcut `#1232 " +"`_" +msgstr "" + +#: ../../../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" +" as a sentinel value. Without the removal of 'UNSET', it would create " +"issues when passed to model initialization from Bot.method_name. 'UNSET' " +"was also added to typing. `#1233 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:938 +msgid "Updated pydantic to 2.1 with few bugfixes" +msgstr "" + +#: ../../../CHANGES.rst:944 +msgid "" +"Improved docs, added basic migration guide (will be expanded later) " +"`#1143 `_" +msgstr "" + +#: ../../../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 " +"context instance in the wrong place. `#1230 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:957 +msgid "3.0.0b8 (2023-07-17)" +msgstr "" + +#: ../../../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:964 +msgid "Added support for FSM in Forum topics." +msgstr "" + +#: ../../../CHANGES.rst:966 +msgid "The strategy can be changed in dispatcher:" +msgstr "" + +#: ../../../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:981 +msgid "`#1161 `_" +msgstr "" + +#: ../../../CHANGES.rst:982 +msgid "Improved CallbackData serialization." +msgstr "" + +#: ../../../CHANGES.rst:984 +msgid "Minimized UUID (hex without dashes)" +msgstr "" + +#: ../../../CHANGES.rst:985 +msgid "Replaced bool values with int (true=1, false=0)" +msgstr "" + +#: ../../../CHANGES.rst:986 +msgid "`#1163 `_" +msgstr "" + +#: ../../../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:990 +msgid "" +"Added :code:`X-Telegram-Bot-Api-Secret-Token` header check `#1173 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:992 +msgid "" +"Made :code:`allowed_updates` list to revolve automatically in " +"start_polling method if not set explicitly. `#1178 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:994 +msgid "" +"Added possibility to pass custom headers to :class:`URLInputFile` object " +"`#1191 `_" +msgstr "" + +#: ../../../CHANGES.rst:1001 +msgid "" +"Change type of result in InlineQueryResult enum for " +":code:`InlineQueryResultCachedMpeg4Gif` and " +":code:`InlineQueryResultMpeg4Gif` to more correct according to " +"documentation." +msgstr "" + +#: ../../../CHANGES.rst:1004 +msgid "" +"Change regexp for entities parsing to more correct " +"(:code:`InlineQueryResultType.yml`). `#1146 " +"`_" +msgstr "" + +#: ../../../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:1008 +msgid "" +"Added missing :code:`FORUM_TOPIC_EDITED` value to content_type property " +"`#1160 `_" +msgstr "" + +#: ../../../CHANGES.rst:1010 +msgid "" +"Fixed compatibility with Python 3.8-3.9 (from previous release) `#1162 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1012 +msgid "" +"Fixed the markdown spoiler parser. `#1176 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1014 +msgid "" +"Fixed workflow data propagation `#1196 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1016 +msgid "" +"Fixed the serialization error associated with nested subtypes like " +"InputMedia, ChatMember, etc." +msgstr "" + +#: ../../../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" +" specification of all subtype unions were generating an empty object. " +"This has been rectified now. `#1213 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1029 +msgid "" +"Changed small grammar typos for :code:`upload_file` `#1133 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1036 +msgid "" +"Removed text filter in due to is planned to remove this filter few " +"versions ago." +msgstr "" + +#: ../../../CHANGES.rst:1038 +msgid "" +"Use :code:`F.text` instead `#1170 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1045 +msgid "" +"Added full support of `Bot API 6.6 `_" +msgstr "" + +#: ../../../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:1052 +msgid "`#1139 `_" +msgstr "" + +#: ../../../CHANGES.rst:1053 +msgid "" +"Added full support of `Bot API 6.7 `_" +msgstr "" + +#: ../../../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:1059 +msgid "`#1168 `_" +msgstr "" + +#: ../../../CHANGES.rst:1060 +msgid "Updated `Pydantic to V2 `_" +msgstr "" + +#: ../../../CHANGES.rst:1064 +msgid "Be careful, not all libraries is already updated to using V2" +msgstr "" + +#: ../../../CHANGES.rst:1065 +msgid "`#1202 `_" +msgstr "" + +#: ../../../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 " +"instance, reworked internal request builder mechanism. `#1142 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1069 +msgid "" +"Removed bot parameters from storages `#1144 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1072 +msgid "" +"Replaced ContextVar's with a new feature called `Validation Context " +"`_" +" in Pydantic to improve the clarity, usability, and versatility of " +"handling the Bot instance within method shortcuts." +msgstr "" + +#: ../../../CHANGES.rst:1077 +msgid "**Breaking**: The 'bot' argument now is required in `URLInputFile`" +msgstr "" + +#: ../../../CHANGES.rst:1078 +msgid "`#1210 `_" +msgstr "" + +#: ../../../CHANGES.rst:1079 +msgid "Updated magic-filter with new features" +msgstr "" + +#: ../../../CHANGES.rst:1081 +msgid "Added hint for :code:`len(F)` error" +msgstr "" + +#: ../../../CHANGES.rst:1082 +msgid "Added not in operation" +msgstr "" + +#: ../../../CHANGES.rst:1083 +msgid "`#1221 `_" +msgstr "" + +#: ../../../CHANGES.rst:1087 +msgid "3.0.0b7 (2023-02-18)" +msgstr "" + +#: ../../../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:1093 +msgid "Sorry for the inconvenience, it will be fixed in the next version." +msgstr "" + +#: ../../../CHANGES.rst:1095 +msgid "This code will not work:" +msgstr "" + +#: ../../../CHANGES.rst:1107 +msgid "But if you change it like this it should works as well:" +msgstr "" + +#: ../../../CHANGES.rst:1125 +msgid "Added missing shortcuts, new enums, reworked old stuff" +msgstr "" + +#: ../../../CHANGES.rst:1127 +msgid "" +"**Breaking** All previously added enums is re-generated in new place - " +"`aiogram.enums` instead of `aiogram.types`" +msgstr "" + +#: ../../../CHANGES.rst:1130 +msgid "" +"**Added enums:** " +":class:`aiogram.enums.bot_command_scope_type.BotCommandScopeType`," +msgstr "" + +#: ../../../CHANGES.rst:1131 +msgid "" +":class:`aiogram.enums.chat_action.ChatAction`, " +":class:`aiogram.enums.chat_member_status.ChatMemberStatus`, " +":class:`aiogram.enums.chat_type.ChatType`, " +":class:`aiogram.enums.content_type.ContentType`, " +":class:`aiogram.enums.dice_emoji.DiceEmoji`, " +":class:`aiogram.enums.inline_query_result_type.InlineQueryResultType`, " +":class:`aiogram.enums.input_media_type.InputMediaType`, " +":class:`aiogram.enums.mask_position_point.MaskPositionPoint`, " +":class:`aiogram.enums.menu_button_type.MenuButtonType`, " +":class:`aiogram.enums.message_entity_type.MessageEntityType`, " +":class:`aiogram.enums.parse_mode.ParseMode`, " +":class:`aiogram.enums.poll_type.PollType`, " +":class:`aiogram.enums.sticker_type.StickerType`, " +":class:`aiogram.enums.topic_icon_color.TopicIconColor`, " +":class:`aiogram.enums.update_type.UpdateType`," +msgstr "" + +#: ../../../CHANGES.rst:1147 +msgid "**Added shortcuts**:" +msgstr "" + +#: ../../../CHANGES.rst:1149 +msgid "*Chat* :meth:`aiogram.types.chat.Chat.get_administrators`," +msgstr "" + +#: ../../../CHANGES.rst:1150 +msgid "" +":meth:`aiogram.types.chat.Chat.delete_message`, " +":meth:`aiogram.types.chat.Chat.revoke_invite_link`, " +":meth:`aiogram.types.chat.Chat.edit_invite_link`, " +":meth:`aiogram.types.chat.Chat.create_invite_link`, " +":meth:`aiogram.types.chat.Chat.export_invite_link`, " +":meth:`aiogram.types.chat.Chat.do`, " +":meth:`aiogram.types.chat.Chat.delete_sticker_set`, " +":meth:`aiogram.types.chat.Chat.set_sticker_set`, " +":meth:`aiogram.types.chat.Chat.get_member`, " +":meth:`aiogram.types.chat.Chat.get_member_count`, " +":meth:`aiogram.types.chat.Chat.leave`, " +":meth:`aiogram.types.chat.Chat.unpin_all_messages`, " +":meth:`aiogram.types.chat.Chat.unpin_message`, " +":meth:`aiogram.types.chat.Chat.pin_message`, " +":meth:`aiogram.types.chat.Chat.set_administrator_custom_title`, " +":meth:`aiogram.types.chat.Chat.set_permissions`, " +":meth:`aiogram.types.chat.Chat.promote`, " +":meth:`aiogram.types.chat.Chat.restrict`, " +":meth:`aiogram.types.chat.Chat.unban`, " +":meth:`aiogram.types.chat.Chat.ban`, " +":meth:`aiogram.types.chat.Chat.set_description`, " +":meth:`aiogram.types.chat.Chat.set_title`, " +":meth:`aiogram.types.chat.Chat.delete_photo`, " +":meth:`aiogram.types.chat.Chat.set_photo`," +msgstr "" + +#: ../../../CHANGES.rst:1174 +msgid "*Sticker*: :meth:`aiogram.types.sticker.Sticker.set_position_in_set`," +msgstr "" + +#: ../../../CHANGES.rst:1175 +msgid ":meth:`aiogram.types.sticker.Sticker.delete_from_set`," +msgstr "" + +#: ../../../CHANGES.rst:1176 +msgid "*User*: :meth:`aiogram.types.user.User.get_profile_photos`" +msgstr "" + +#: ../../../CHANGES.rst:1177 +msgid "`#952 `_" +msgstr "" + +#: ../../../CHANGES.rst:1178 +msgid "" +"Added :ref:`callback answer ` feature `#1091 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1180 +msgid "" +"Added a method that allows you to compactly register routers `#1117 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1187 +msgid "" +"Check status code when downloading file `#816 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1189 +msgid "" +"Fixed `ignore_case` parameter in :obj:`aiogram.filters.command.Command` " +"filter `#1106 `_" +msgstr "" + +#: ../../../CHANGES.rst:1196 +msgid "" +"Added integration with new code-generator named `Butcher " +"`_ `#1069 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1198 +msgid "" +"Added full support of `Bot API 6.4 `_ `#1088 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1200 +msgid "" +"Updated package metadata, moved build internals from Poetry to Hatch, " +"added contributing guides. `#1095 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1202 +msgid "" +"Added full support of `Bot API 6.5 `_" +msgstr "" + +#: ../../../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:1208 +msgid "`#1112 `_" +msgstr "" + +#: ../../../CHANGES.rst:1209 +msgid "" +"Replaced error :code:`TypeError: TelegramEventObserver.__call__() got an " +"unexpected keyword argument ''` with a more understandable one for " +"developers and with a link to the documentation. `#1114 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1212 +msgid "" +"Added possibility to reply into webhook with files `#1120 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1214 +msgid "" +"Reworked graceful shutdown. Added method to stop polling. Now polling " +"started from dispatcher can be stopped by signals gracefully without " +"errors (on Linux and Mac). `#1124 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1220 +msgid "3.0.0b6 (2022-11-18)" +msgstr "" + +#: ../../../CHANGES.rst:1225 +msgid "" +"(again) Added possibility to combine filters with an *and*/*or* " +"operations." +msgstr "" + +#: ../../../CHANGES.rst:1227 +msgid "" +"Read more in \":ref:`Combining filters `\" " +"documentation section `#1018 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1229 +msgid "Added following methods to ``Message`` class:" +msgstr "" + +#: ../../../CHANGES.rst:1231 +msgid ":code:`Message.forward(...)`" +msgstr "" + +#: ../../../CHANGES.rst:1232 +msgid ":code:`Message.edit_media(...)`" +msgstr "" + +#: ../../../CHANGES.rst:1233 +msgid ":code:`Message.edit_live_location(...)`" +msgstr "" + +#: ../../../CHANGES.rst:1234 +msgid ":code:`Message.stop_live_location(...)`" +msgstr "" + +#: ../../../CHANGES.rst:1235 +msgid ":code:`Message.pin(...)`" +msgstr "" + +#: ../../../CHANGES.rst:1236 +msgid ":code:`Message.unpin()`" +msgstr "" + +#: ../../../CHANGES.rst:1237 +msgid "`#1030 `_" +msgstr "" + +#: ../../../CHANGES.rst:1238 +msgid "Added following methods to :code:`User` class:" +msgstr "" + +#: ../../../CHANGES.rst:1240 +msgid ":code:`User.mention_markdown(...)`" +msgstr "" + +#: ../../../CHANGES.rst:1241 +msgid ":code:`User.mention_html(...)`" +msgstr "" + +#: ../../../CHANGES.rst:1242 +msgid "`#1049 `_" +msgstr "" + +#: ../../../CHANGES.rst:1243 +msgid "" +"Added full support of `Bot API 6.3 `_ `#1057 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1250 +msgid "" +"Fixed :code:`Message.send_invoice` and :code:`Message.reply_invoice`, " +"added missing arguments `#1047 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1252 +msgid "Fixed copy and forward in:" +msgstr "" + +#: ../../../CHANGES.rst:1254 +msgid ":code:`Message.answer(...)`" +msgstr "" + +#: ../../../CHANGES.rst:1255 +msgid ":code:`Message.copy_to(...)`" +msgstr "" + +#: ../../../CHANGES.rst:1256 +msgid "`#1064 `_" +msgstr "" + +#: ../../../CHANGES.rst:1262 +msgid "" +"Fixed UA translations in index.po `#1017 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1264 +msgid "" +"Fix typehints for :code:`Message`, :code:`reply_media_group` and " +":code:`answer_media_group` methods `#1029 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1266 +msgid "" +"Removed an old now non-working feature `#1060 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1273 +msgid "" +"Enabled testing on Python 3.11 `#1044 " +"`_" +msgstr "" + +#: ../../../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" +" fails with reason :code:`[SSL: CERTIFICATE_VERIFY_FAILED] certificate " +"verify failed: self signed certificate in certificate chain` `#1066 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1280 +msgid "3.0.0b5 (2022-10-02)" +msgstr "" + +#: ../../../CHANGES.rst:1285 +msgid "" +"Add PyPy support and run tests under PyPy `#985 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1287 +msgid "" +"Added message text to aiogram exceptions representation `#988 " +"`_" +msgstr "" + +#: ../../../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 " +"of `from magic_filter import F` `#990 " +"`_" +msgstr "" + +#: ../../../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:1299 +msgid "" +"Reworked error event, introduced " +":class:`aiogram.types.error_event.ErrorEvent` object. `#898 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1301 +msgid "" +"Fixed escaping markdown in `aiogram.utils.markdown` module `#903 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1303 +msgid "" +"Fixed polling crash when Telegram Bot API raises HTTP 429 status-code. " +"`#995 `_" +msgstr "" + +#: ../../../CHANGES.rst:1305 +msgid "" +"Fixed empty mention in command parsing, now it will be None instead of an" +" empty string `#1013 `_" +msgstr "" + +#: ../../../CHANGES.rst:1312 +msgid "" +"Initialized Docs translation (added Ukrainian language) `#925 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1319 +msgid "" +"Removed filters factory as described in corresponding issue. `#942 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1326 +msgid "" +"Now Router/Dispatcher accepts only keyword arguments. `#982 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1331 +msgid "3.0.0b4 (2022-08-14)" +msgstr "" + +#: ../../../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" +" improve compatibility with 2.x version where similar class was called " +"\"ChatActions\". `#803 `_" +msgstr "" + +#: ../../../CHANGES.rst:1340 +msgid "Added possibility to combine filters or invert result" +msgstr "" + +#: ../../../CHANGES.rst:1342 +msgid "Example:" +msgstr "" + +#: ../../../CHANGES.rst:1350 +msgid "`#894 `_" +msgstr "" + +#: ../../../CHANGES.rst:1351 +msgid "" +"Fixed type hints for redis TTL params. `#922 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1353 +msgid "" +"Added `full_name` shortcut for `Chat` object `#929 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1360 +msgid "" +"Fixed false-positive coercing of Union types in API methods `#901 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1362 +msgid "Added 3 missing content types:" +msgstr "" + +#: ../../../CHANGES.rst:1364 +msgid "proximity_alert_triggered" +msgstr "" + +#: ../../../CHANGES.rst:1365 +msgid "supergroup_chat_created" +msgstr "" + +#: ../../../CHANGES.rst:1366 +msgid "channel_chat_created" +msgstr "" + +#: ../../../CHANGES.rst:1367 +msgid "`#906 `_" +msgstr "" + +#: ../../../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:1370 +msgid "" +"Fixed default lock kwargs in RedisEventIsolation. `#972 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1377 +msgid "" +"Restrict including routers with strings `#896 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1379 +msgid "" +"Changed CommandPatterType to CommandPatternType in " +"`aiogram/dispatcher/filters/command.py` `#907 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1381 +msgid "" +"Added full support of `Bot API 6.1 `_ `#936 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1383 +msgid "**Breaking!** More flat project structure" +msgstr "" + +#: ../../../CHANGES.rst:1385 +msgid "These packages was moved, imports in your code should be fixed:" +msgstr "" + +#: ../../../CHANGES.rst:1387 +msgid ":code:`aiogram.dispatcher.filters` -> :code:`aiogram.filters`" +msgstr "" + +#: ../../../CHANGES.rst:1388 +msgid ":code:`aiogram.dispatcher.fsm` -> :code:`aiogram.fsm`" +msgstr "" + +#: ../../../CHANGES.rst:1389 +msgid ":code:`aiogram.dispatcher.handler` -> :code:`aiogram.handler`" +msgstr "" + +#: ../../../CHANGES.rst:1390 +msgid ":code:`aiogram.dispatcher.webhook` -> :code:`aiogram.webhook`" +msgstr "" + +#: ../../../CHANGES.rst:1391 +msgid "" +":code:`aiogram.dispatcher.flags/*` -> :code:`aiogram.dispatcher.flags` " +"(single module instead of package)" +msgstr "" + +#: ../../../CHANGES.rst:1392 +msgid "`#938 `_" +msgstr "" + +#: ../../../CHANGES.rst:1393 +msgid "" +"Removed deprecated :code:`router._handler` and " +":code:`router.register__handler` methods. `#941 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1395 +msgid "" +"Deprecated filters factory. It will be removed in next Beta (3.0b5) `#942" +" `_" +msgstr "" + +#: ../../../CHANGES.rst:1397 +msgid "" +"`MessageEntity` method `get_text` was removed and `extract` was renamed " +"to `extract_from` `#944 `_" +msgstr "" + +#: ../../../CHANGES.rst:1399 +msgid "" +"Added full support of `Bot API 6.2 `_ `#975 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1404 +msgid "3.0.0b3 (2022-04-19)" +msgstr "" + +#: ../../../CHANGES.rst:1409 +msgid "" +"Added possibility to get command magic result as handler argument `#889 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1411 +msgid "" +"Added full support of `Telegram Bot API 6.0 " +"`_ `#890 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1418 +msgid "" +"Fixed I18n lazy-proxy. Disabled caching. `#839 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1420 +msgid "" +"Added parsing of spoiler message entity `#865 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1422 +msgid "" +"Fixed default `parse_mode` for `Message.copy_to()` method. `#876 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1424 +msgid "" +"Fixed CallbackData factory parsing IntEnum's `#885 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1431 +msgid "" +"Added automated check that pull-request adds a changes description to " +"**CHANGES** directory `#873 " +"`_" +msgstr "" + +#: ../../../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" +" of raising error. `#874 " +"`_" +msgstr "" + +#: ../../../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:1438 +msgid "" +"Solved common naming problem with middlewares that confusing too much " +"developers - now you can't see the `middleware` and `middlewares` " +"attributes at the same point because this functionality encapsulated to " +"special interface. `#883 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1445 +msgid "3.0.0b2 (2022-02-19)" +msgstr "" + +#: ../../../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:1453 +msgid "" +"Added possibility to add handler flags via decorator (like `pytest.mark` " +"decorator but `aiogram.flags`) `#836 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1455 +msgid "" +"Added :code:`ChatActionSender` utility to automatically sends chat action" +" while long process is running." +msgstr "" + +#: ../../../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:1464 +msgid "" +"Fixed unexpected behavior of sequences in the StateFilter. `#791 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1466 +msgid "" +"Fixed exceptions filters `#827 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1473 +msgid "" +"Logger name for processing events is changed to :code:`aiogram.events`. " +"`#830 `_" +msgstr "" + +#: ../../../CHANGES.rst:1475 +msgid "" +"Added full support of Telegram Bot API 5.6 and 5.7 `#835 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1477 +msgid "" +"**BREAKING** Events isolation mechanism is moved from FSM storages to " +"standalone managers `#838 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1483 +msgid "3.0.0b1 (2021-12-12)" +msgstr "" + +#: ../../../CHANGES.rst:1488 +msgid "Added new custom operation for MagicFilter named :code:`as_`" +msgstr "" + +#: ../../../CHANGES.rst:1490 +msgid "Now you can use it to get magic filter result as handler argument" +msgstr "" + +#: ../../../CHANGES.rst:1506 +msgid "`#759 `_" +msgstr "" + +#: ../../../CHANGES.rst:1512 +msgid "" +"Fixed: Missing :code:`ChatMemberHandler` import in " +":code:`aiogram/dispatcher/handler` `#751 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1519 +msgid "" +"Check :code:`destiny` in case of no :code:`with_destiny` enabled in " +"RedisStorage key builder `#776 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1521 +msgid "" +"Added full support of `Bot API 5.5 `_ `#777 " +"`_" +msgstr "" + +#: ../../../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:1525 +msgid "" +"Make TelegramAPIServer files wrapper in local mode bi-directional " +"(server-client, client-server) Now you can convert local path to server " +"path and server path to local path. `#779 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1531 +msgid "3.0.0a18 (2021-11-10)" +msgstr "" + +#: ../../../CHANGES.rst:1536 +msgid "" +"Breaking: Changed the signature of the session middlewares Breaking: " +"Renamed AiohttpSession.make_request method parameter from call to method " +"to match the naming in the base class Added middleware for logging " +"outgoing requests `#716 `_" +msgstr "" + +#: ../../../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:1550 +msgid "`#717 `_" +msgstr "" + +#: ../../../CHANGES.rst:1551 +msgid "" +"**Breaking internal API change** Reworked FSM Storage record keys " +"propagation `#723 `_" +msgstr "" + +#: ../../../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: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:1562 +msgid "`#724 `_" +msgstr "" + +#: ../../../CHANGES.rst:1568 +msgid "" +"Fixed I18n context inside error handlers `#726 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1570 +msgid "" +"Fixed bot session closing before emit shutdown `#734 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1572 +msgid "" +"Fixed: bound filter resolving does not require children routers `#736 " +"`_" +msgstr "" + +#: ../../../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:1582 +msgid "" +"Converted README.md to README.rst and use it as base file for docs `#725 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1584 +msgid "Rework filters resolving:" +msgstr "" + +#: ../../../CHANGES.rst:1586 +msgid "Automatically apply Bound Filters with default values to handlers" +msgstr "" + +#: ../../../CHANGES.rst:1587 +msgid "Fix data transfer from parent to included routers filters" +msgstr "" + +#: ../../../CHANGES.rst:1588 +msgid "`#727 `_" +msgstr "" + +#: ../../../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:1595 +msgid "3.0.0a17 (2021-09-24)" +msgstr "" + +#: ../../../CHANGES.rst:1600 +msgid "" +"Added :code:`html_text` and :code:`md_text` to Message object `#708 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1602 +msgid "" +"Refactored I18n, added context managers for I18n engine and current " +"locale `#709 `_" +msgstr "" + +#: ../../../CHANGES.rst:1607 +msgid "3.0.0a16 (2021-09-22)" +msgstr "" + +#: ../../../CHANGES.rst:1612 +msgid "Added support of local Bot API server files downloading" +msgstr "" + +#: ../../../CHANGES.rst:1614 +msgid "" +"When Local API is enabled files can be downloaded via " +"`bot.download`/`bot.download_file` methods. `#698 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1616 +msgid "" +"Implemented I18n & L10n support `#701 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1623 +msgid "" +"Covered by tests and docs KeyboardBuilder util `#699 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1625 +msgid "**Breaking!!!**. Refactored and renamed exceptions." +msgstr "" + +#: ../../../CHANGES.rst:1627 +msgid "" +"Exceptions module was moved from :code:`aiogram.utils.exceptions` to " +":code:`aiogram.exceptions`" +msgstr "" + +#: ../../../CHANGES.rst:1628 +msgid "Added prefix `Telegram` for all error classes" +msgstr "" + +#: ../../../CHANGES.rst:1629 +msgid "`#700 `_" +msgstr "" + +#: ../../../CHANGES.rst:1630 +msgid "" +"Replaced all :code:`pragma: no cover` marks via global " +":code:`.coveragerc` config `#702 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1632 +msgid "Updated dependencies." +msgstr "" + +#: ../../../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:1640 +msgid "3.0.0a15 (2021-09-10)" +msgstr "" + +#: ../../../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:1653 +msgid "" +"Fixed incorrect type checking in the " +":class:`aiogram.utils.keyboard.KeyboardBuilder` `#674 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1660 +msgid "" +"Disable ContentType filter by default `#668 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1662 +msgid "" +"Moved update type detection from Dispatcher to Update object `#669 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1664 +msgid "" +"Updated **pre-commit** config `#681 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1666 +msgid "" +"Reworked **handlers_in_use** util. Function moved to Router as method " +"**.resolve_used_update_types()** `#682 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1671 +msgid "3.0.0a14 (2021-08-17)" +msgstr "" + +#: ../../../CHANGES.rst:1676 +msgid "" +"add aliases for edit/delete reply markup to Message `#662 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1678 +msgid "" +"Reworked outer middleware chain. Prevent to call many times the outer " +"middleware for each nested router `#664 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1685 +msgid "" +"Prepare parse mode for InputMessageContent in AnswerInlineQuery method " +"`#660 `_" +msgstr "" + +#: ../../../CHANGES.rst:1692 +msgid "" +"Added integration with :code:`towncrier` `#602 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1699 +msgid "" +"Added `.editorconfig` `#650 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1701 +msgid "" +"Redis storage speedup globals `#651 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:1703 +msgid "" +"add allow_sending_without_reply param to Message reply aliases `#663 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:7 +msgid "2.14.3 (2021-07-21)" +msgstr "" + +#: ../../../HISTORY.rst:9 +msgid "" +"Fixed :code:`ChatMember` type detection via adding customizable object " +"serialization mechanism (`#624 " +"`_, `#623 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:13 +msgid "2.14.2 (2021-07-26)" +msgstr "" + +#: ../../../HISTORY.rst:15 +msgid "" +"Fixed :code:`MemoryStorage` cleaner (`#619 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:16 +msgid "" +"Fixed unused default locale in :code:`I18nMiddleware` (`#562 " +"`_, `#563 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:20 +msgid "2.14 (2021-07-27)" +msgstr "" + +#: ../../../HISTORY.rst:22 +msgid "" +"Full support of Bot API 5.3 (`#610 " +"`_, `#614 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:23 +msgid "" +"Fixed :code:`Message.send_copy` method for polls (`#603 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:24 +msgid "" +"Updated pattern for :code:`GroupDeactivated` exception (`#549 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:25 +msgid "" +"Added :code:`caption_entities` field in :code:`InputMedia` base class " +"(`#583 `_)" +msgstr "" + +#: ../../../HISTORY.rst:26 +msgid "" +"Fixed HTML text decorations for tag :code:`pre` (`#597 " +"`_ fixes issues `#596 " +"`_ and `#481 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:27 +msgid "" +"Fixed :code:`Message.get_full_command` method for messages with caption " +"(`#576 `_)" +msgstr "" + +#: ../../../HISTORY.rst:28 +msgid "" +"Improved :code:`MongoStorage`: remove documents with empty data from " +":code:`aiogram_data` collection to save memory. (`#609 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:32 +msgid "2.13 (2021-04-28)" +msgstr "" + +#: ../../../HISTORY.rst:34 +msgid "" +"Added full support of Bot API 5.2 (`#572 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:35 +msgid "" +"Fixed usage of :code:`provider_data` argument in :code:`sendInvoice` " +"method call" +msgstr "" + +#: ../../../HISTORY.rst:36 +msgid "" +"Fixed builtin command filter args (`#556 " +"`_) (`#558 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:37 +msgid "" +"Allowed to use State instances FSM storage directly (`#542 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:38 +msgid "" +"Added possibility to get i18n locale without User instance (`#546 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:39 +msgid "" +"Fixed returning type of :code:`Bot.*_chat_invite_link()` methods `#548 " +"`_ (`#549 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:40 +msgid "" +"Fixed deep-linking util (`#569 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:41 +msgid "" +"Small changes in documentation - describe limits in docstrings " +"corresponding to the current limit. (`#565 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:42 +msgid "" +"Fixed internal call to deprecated 'is_private' method (`#553 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:43 +msgid "" +"Added possibility to use :code:`allowed_updates` argument in Polling mode" +" (`#564 `_)" +msgstr "" + +#: ../../../HISTORY.rst:47 +msgid "2.12.1 (2021-03-22)" +msgstr "" + +#: ../../../HISTORY.rst:49 +msgid "" +"Fixed :code:`TypeError: Value should be instance of 'User' not " +"'NoneType'` (`#527 `_)" +msgstr "" + +#: ../../../HISTORY.rst:50 +msgid "" +"Added missing :code:`Chat.message_auto_delete_time` field (`#535 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:51 +msgid "" +"Added :code:`MediaGroup` filter (`#528 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:52 +msgid "" +"Added :code:`Chat.delete_message` shortcut (`#526 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:53 +msgid "" +"Added mime types parsing for :code:`aiogram.types.Document` (`#431 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:54 +msgid "" +"Added warning in :code:`TelegramObject.__setitem__` when Telegram adds a " +"new field (`#532 `_)" +msgstr "" + +#: ../../../HISTORY.rst:55 +msgid "" +"Fixed :code:`examples/chat_type_filter.py` (`#533 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:56 +msgid "" +"Removed redundant definitions in framework code (`#531 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:60 +msgid "2.12 (2021-03-14)" +msgstr "" + +#: ../../../HISTORY.rst:62 +msgid "" +"Full support for Telegram Bot API 5.1 (`#519 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:63 +msgid "" +"Fixed sending playlist of audio files and documents (`#465 " +"`_, `#468 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:64 +msgid "" +"Fixed :code:`FSMContextProxy.setdefault` method (`#491 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:65 +msgid "" +"Fixed :code:`Message.answer_location` and :code:`Message.reply_location` " +"unable to send live location (`#497 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:66 +msgid "" +"Fixed :code:`user_id` and :code:`chat_id` getters from the context at " +"Dispatcher :code:`check_key`, :code:`release_key` and :code:`throttle` " +"methods (`#520 `_)" +msgstr "" + +#: ../../../HISTORY.rst:67 +msgid "" +"Fixed :code:`Chat.update_chat` method and all similar situations (`#516 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:68 +msgid "" +"Fixed :code:`MediaGroup` attach methods (`#514 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:69 +msgid "" +"Fixed state filter for inline keyboard query callback in groups (`#508 " +"`_, `#510 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:70 +msgid "" +"Added missing :code:`ContentTypes.DICE` (`#466 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:71 +msgid "" +"Added missing vcard argument to :code:`InputContactMessageContent` " +"constructor (`#473 `_)" +msgstr "" + +#: ../../../HISTORY.rst:72 +msgid "" +"Add missing exceptions: :code:`MessageIdInvalid`, " +":code:`CantRestrictChatOwner` and :code:`UserIsAnAdministratorOfTheChat` " +"(`#474 `_, `#512 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:73 +msgid "" +"Added :code:`answer_chat_action` to the :code:`Message` object (`#501 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:74 +msgid "" +"Added dice to :code:`message.send_copy` method (`#511 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:75 +msgid "Removed deprecation warning from :code:`Message.send_copy`" +msgstr "" + +#: ../../../HISTORY.rst:76 +msgid "" +"Added an example of integration between externally created aiohttp " +"Application and aiogram (`#433 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:77 +msgid "" +"Added :code:`split_separator` argument to :code:`safe_split_text` (`#515 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:78 +msgid "" +"Fixed some typos in docs and examples (`#489 " +"`_, `#490 " +"`_, `#498 " +"`_, `#504 " +"`_, `#514 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:82 +msgid "2.11.2 (2021-11-10)" +msgstr "" + +#: ../../../HISTORY.rst:84 +msgid "Fixed default parse mode" +msgstr "" + +#: ../../../HISTORY.rst:85 +msgid "" +"Added missing \"supports_streaming\" argument to answer_video method " +"`#462 `_" +msgstr "" + +#: ../../../HISTORY.rst:89 +msgid "2.11.1 (2021-11-10)" +msgstr "" + +#: ../../../HISTORY.rst:91 +msgid "Fixed files URL template" +msgstr "" + +#: ../../../HISTORY.rst:92 +msgid "" +"Fix MessageEntity serialization for API calls `#457 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:93 +msgid "" +"When entities are set, default parse_mode become disabled (`#461 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:94 +msgid "" +"Added parameter supports_streaming to reply_video, remove redundant " +"docstrings (`#459 `_)" +msgstr "" + +#: ../../../HISTORY.rst:95 +msgid "" +"Added missing parameter to promoteChatMember alias (`#458 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:99 +msgid "2.11 (2021-11-08)" +msgstr "" + +#: ../../../HISTORY.rst:101 +msgid "" +"Added full support of Telegram Bot API 5.0 (`#454 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:102 +msgid "Added possibility to more easy specify custom API Server (example)" +msgstr "" + +#: ../../../HISTORY.rst:103 +msgid "" +"WARNING: API method :code:`close` was named in Bot class as close_bot in " +"due to Bot instance already has method with the same name. It will be " +"changed in :code:`aiogram 3.0`" +msgstr "" + +#: ../../../HISTORY.rst:104 +msgid "" +"Added alias to Message object :code:`Message.copy_to` with deprecation of" +" :code:`Message.send_copy`" +msgstr "" + +#: ../../../HISTORY.rst:105 +msgid "" +":code:`ChatType.SUPER_GROUP` renamed to :code:`ChatType.SUPERGROUP` " +"(`#438 `_)" +msgstr "" + +#: ../../../HISTORY.rst:109 +msgid "2.10.1 (2021-09-14)" +msgstr "" + +#: ../../../HISTORY.rst:111 +msgid "" +"Fixed critical bug with getting asyncio event loop in executor. (`#424 " +"`_) :code:`AttributeError:" +" 'NoneType' object has no attribute 'run_until_complete'`" +msgstr "" + +#: ../../../HISTORY.rst:115 +msgid "2.10 (2021-09-13)" +msgstr "" + +#: ../../../HISTORY.rst:117 +msgid "" +"Breaking change: Stop using _MainThread event loop in bot/dispatcher " +"instances (`#397 `_)" +msgstr "" + +#: ../../../HISTORY.rst:118 +msgid "" +"Breaking change: Replaced aiomongo with motor (`#368 " +"`_, `#380 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:119 +msgid "" +"Fixed: TelegramObject's aren't destroyed after update handling `#307 " +"`_ (`#371 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:120 +msgid "" +"Add setting current context of Telegram types (`#369 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:121 +msgid "" +"Fixed markdown escaping issues (`#363 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:122 +msgid "" +"Fixed HTML characters escaping (`#409 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:123 +msgid "Fixed italic and underline decorations when parse entities to Markdown" +msgstr "" + +#: ../../../HISTORY.rst:124 +msgid "" +"Fixed `#413 `_: parse " +"entities positioning (`#414 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:125 +msgid "" +"Added missing thumb parameter (`#362 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:126 +msgid "" +"Added public methods to register filters and middlewares (`#370 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:127 +msgid "" +"Added ChatType builtin filter (`#356 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:128 +msgid "" +"Fixed IDFilter checking message from channel (`#376 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:129 +msgid "" +"Added missed answer_poll and reply_poll (`#384 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:130 +msgid "" +"Added possibility to ignore message caption in commands filter (`#383 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:131 +msgid "Fixed addStickerToSet method" +msgstr "" + +#: ../../../HISTORY.rst:132 +msgid "" +"Added preparing thumb in send_document method (`#391 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:133 +msgid "" +"Added exception MessageToPinNotFound (`#404 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:134 +msgid "" +"Fixed handlers parameter-spec solving (`#408 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:135 +msgid "" +"Fixed CallbackQuery.answer() returns nothing (`#420 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:136 +msgid "" +"CHOSEN_INLINE_RESULT is a correct API-term (`#415 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:137 +msgid "" +"Fixed missing attributes for Animation class (`#422 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:138 +msgid "" +"Added missed emoji argument to reply_dice (`#395 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:139 +msgid "" +"Added is_chat_creator method to ChatMemberStatus (`#394 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:140 +msgid "" +"Added missed ChatPermissions to __all__ (`#393 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:141 +msgid "" +"Added is_forward method to Message (`#390 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:142 +msgid "" +"Fixed usage of deprecated is_private function (`#421 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:144 +msgid "and many others documentation and examples changes:" +msgstr "" + +#: ../../../HISTORY.rst:146 +msgid "" +"Updated docstring of RedisStorage2 (`#423 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:147 +msgid "" +"Updated I18n example (added docs and fixed typos) (`#419 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:148 +msgid "" +"A little documentation revision (`#381 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:149 +msgid "" +"Added comments about correct errors_handlers usage (`#398 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:150 +msgid "" +"Fixed typo rexex -> regex (`#386 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:151 +msgid "" +"Fixed docs Quick start page code blocks (`#417 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:152 +msgid "" +"fixed type hints of callback_data (`#400 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:153 +msgid "" +"Prettify readme, update downloads stats badge (`#406 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:157 +msgid "2.9.2 (2021-06-13)" +msgstr "" + +#: ../../../HISTORY.rst:159 +msgid "" +"Fixed :code:`Message.get_full_command()` `#352 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:160 +msgid "" +"Fixed markdown util `#353 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:164 +msgid "2.9 (2021-06-08)" +msgstr "" + +#: ../../../HISTORY.rst:166 +msgid "Added full support of Telegram Bot API 4.9" +msgstr "" + +#: ../../../HISTORY.rst:167 +msgid "" +"Fixed user context at poll_answer update (`#322 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:168 +msgid "" +"Fix Chat.set_description (`#325 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:169 +msgid "" +"Add lazy session generator (`#326 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:170 +msgid "" +"Fix text decorations (`#315 " +"`_, `#316 " +"`_, `#328 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:171 +msgid "" +"Fix missing :code:`InlineQueryResultPhoto` :code:`parse_mode` field " +"(`#331 `_)" +msgstr "" + +#: ../../../HISTORY.rst:172 +msgid "" +"Fix fields from parent object in :code:`KeyboardButton` (`#344 " +"`_ fixes `#343 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:173 +msgid "" +"Add possibility to get bot id without calling :code:`get_me` (`#296 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:177 +msgid "2.8 (2021-04-26)" +msgstr "" + +#: ../../../HISTORY.rst:179 +msgid "Added full support of Bot API 4.8" +msgstr "" + +#: ../../../HISTORY.rst:180 +msgid "" +"Added :code:`Message.answer_dice` and :code:`Message.reply_dice` methods " +"(`#306 `_)" +msgstr "" + +#: ../../../HISTORY.rst:184 +msgid "2.7 (2021-04-07)" +msgstr "" + +#: ../../../HISTORY.rst:186 +msgid "" +"Added full support of Bot API 4.7 (`#294 " +"`_ `#289 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:187 +msgid "" +"Added default parse mode for send_animation method (`#293 " +"`_ `#292 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:188 +msgid "" +"Added new API exception when poll requested in public chats (`#270 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:189 +msgid "" +"Make correct User and Chat get_mention methods (`#277 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:190 +msgid "Small changes and other minor improvements" +msgstr "" + +#: ../../../HISTORY.rst:194 +msgid "2.6.1 (2021-01-25)" +msgstr "" + +#: ../../../HISTORY.rst:196 +msgid "" +"Fixed reply :code:`KeyboardButton` initializer with :code:`request_poll` " +"argument (`#266 `_)" +msgstr "" + +#: ../../../HISTORY.rst:197 +msgid "Added helper for poll types (:code:`aiogram.types.PollType`)" +msgstr "" + +#: ../../../HISTORY.rst:198 +msgid "" +"Changed behavior of Telegram_object :code:`.as_*` and :code:`.to_*` " +"methods. It will no more mutate the object. (`#247 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:202 +msgid "2.6 (2021-01-23)" +msgstr "" + +#: ../../../HISTORY.rst:204 +msgid "" +"Full support of Telegram Bot API v4.6 (Polls 2.0) `#265 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:205 +msgid "Aded new filter - IsContactSender (commit)" +msgstr "" + +#: ../../../HISTORY.rst:206 +msgid "" +"Fixed proxy extra dependencies version `#262 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:210 +msgid "2.5.3 (2021-01-05)" +msgstr "" + +#: ../../../HISTORY.rst:212 +msgid "" +"`#255 `_ Updated " +"CallbackData factory validity check. More correct for non-latin symbols" +msgstr "" + +#: ../../../HISTORY.rst:213 +msgid "" +"`#256 `_ Fixed " +":code:`renamed_argument` decorator error" +msgstr "" + +#: ../../../HISTORY.rst:214 +msgid "" +"`#257 `_ One more fix of " +"CommandStart filter" +msgstr "" + +#: ../../../HISTORY.rst:218 +msgid "2.5.2 (2021-01-01)" +msgstr "" + +#: ../../../HISTORY.rst:220 +msgid "Get back :code:`quote_html` and :code:`escape_md` functions" +msgstr "" + +#: ../../../HISTORY.rst:224 +msgid "2.5.1 (2021-01-01)" +msgstr "" + +#: ../../../HISTORY.rst:226 +msgid "Hot-fix of :code:`CommandStart` filter" +msgstr "" + +#: ../../../HISTORY.rst:230 +msgid "2.5 (2021-01-01)" +msgstr "" + +#: ../../../HISTORY.rst:232 +msgid "" +"Added full support of Telegram Bot API 4.5 (`#250 " +"`_, `#251 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:233 +msgid "" +"`#239 `_ Fixed " +":code:`check_token` method" +msgstr "" + +#: ../../../HISTORY.rst:234 +msgid "" +"`#238 `_, `#241 " +"`_: Added deep-linking " +"utils" +msgstr "" + +#: ../../../HISTORY.rst:235 +msgid "" +"`#248 `_ Fixed support of " +"aiohttp-socks" +msgstr "" + +#: ../../../HISTORY.rst:236 +msgid "Updated setup.py. No more use of internal pip API" +msgstr "" + +#: ../../../HISTORY.rst:237 +msgid "Updated links to documentations (https://docs.aiogram.dev)" +msgstr "" + +#: ../../../HISTORY.rst:238 +msgid "" +"Other small changes and minor improvements (`#223 " +"`_ and others...)" +msgstr "" + +#: ../../../HISTORY.rst:242 +msgid "2.4 (2021-10-29)" +msgstr "" + +#: ../../../HISTORY.rst:244 +msgid "Added Message.send_copy method (forward message without forwarding)" +msgstr "" + +#: ../../../HISTORY.rst:245 +msgid "" +"Safe close of aiohttp client session (no more exception when application " +"is shutdown)" +msgstr "" + +#: ../../../HISTORY.rst:246 +msgid "" +"No more \"adWanced\" words in project `#209 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:247 +msgid "" +"Arguments user and chat is renamed to user_id and chat_id in " +"Dispatcher.throttle method `#196 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:248 +msgid "" +"Fixed set_chat_permissions `#198 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:249 +msgid "" +"Fixed Dispatcher polling task does not process cancellation `#199 " +"`_, `#201 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:250 +msgid "" +"Fixed compatibility with latest asyncio version `#200 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:251 +msgid "" +"Disabled caching by default for lazy_gettext method of I18nMiddleware " +"`#203 `_" +msgstr "" + +#: ../../../HISTORY.rst:252 +msgid "" +"Fixed HTML user mention parser `#205 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:253 +msgid "" +"Added IsReplyFilter `#210 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:254 +msgid "" +"Fixed send_poll method arguments `#211 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:255 +msgid "" +"Added OrderedHelper `#215 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:256 +msgid "" +"Fix incorrect completion order. `#217 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:260 +msgid "2.3 (2021-08-16)" +msgstr "" + +#: ../../../HISTORY.rst:262 +msgid "Full support of Telegram Bot API 4.4" +msgstr "" + +#: ../../../HISTORY.rst:263 +msgid "Fixed `#143 `_" +msgstr "" + +#: ../../../HISTORY.rst:264 +msgid "" +"Added new filters from issue `#151 " +"`_: `#172 " +"`_, `#176 " +"`_, `#182 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:265 +msgid "" +"Added expire argument to RedisStorage2 and other storage fixes `#145 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:266 +msgid "" +"Fixed JSON and Pickle storages `#138 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:267 +msgid "" +"Implemented MongoStorage `#153 " +"`_ based on aiomongo (soon" +" motor will be also added)" +msgstr "" + +#: ../../../HISTORY.rst:268 +msgid "Improved tests" +msgstr "" + +#: ../../../HISTORY.rst:269 +msgid "Updated examples" +msgstr "" + +#: ../../../HISTORY.rst:270 +msgid "" +"Warning: Updated auth widget util. `#190 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:271 +msgid "" +"Implemented throttle decorator `#181 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:275 +msgid "2.2 (2021-06-09)" +msgstr "" + +#: ../../../HISTORY.rst:277 +msgid "Provides latest Telegram Bot API (4.3)" +msgstr "" + +#: ../../../HISTORY.rst:278 +msgid "Updated docs for filters" +msgstr "" + +#: ../../../HISTORY.rst:279 +msgid "" +"Added opportunity to use different bot tokens from single bot instance " +"(via context manager, `#100 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:280 +msgid "" +"IMPORTANT: Fixed Typo: :code:`data` -> :code:`bucket` in " +":code:`update_bucket` for RedisStorage2 (`#132 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:284 +msgid "2.1 (2021-04-18)" +msgstr "" + +#: ../../../HISTORY.rst:286 +msgid "Implemented all new features from Telegram Bot API 4.2" +msgstr "" + +#: ../../../HISTORY.rst:287 +msgid "" +":code:`is_member` and :code:`is_admin` methods of :code:`ChatMember` and " +":code:`ChatMemberStatus` was renamed to :code:`is_chat_member` and " +":code:`is_chat_admin`" +msgstr "" + +#: ../../../HISTORY.rst:288 +msgid "Remover func filter" +msgstr "" + +#: ../../../HISTORY.rst:289 +msgid "" +"Added some useful Message edit functions (:code:`Message.edit_caption`, " +":code:`Message.edit_media`, :code:`Message.edit_reply_markup`) (`#121 " +"`_, `#103 " +"`_, `#104 " +"`_, `#112 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:290 +msgid "" +"Added requests timeout for all methods (`#110 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:291 +msgid "" +"Added :code:`answer*` methods to :code:`Message` object (`#112 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:292 +msgid "Maked some improvements of :code:`CallbackData` factory" +msgstr "" + +#: ../../../HISTORY.rst:293 +msgid "Added deep-linking parameter filter to :code:`CommandStart` filter" +msgstr "" + +#: ../../../HISTORY.rst:294 +msgid "" +"Implemented opportunity to use DNS over socks (`#97 " +"`_ -> `#98 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:295 +msgid "" +"Implemented logging filter for extending LogRecord attributes (Will be " +"usefull with external logs collector utils like GrayLog, Kibana and etc.)" +msgstr "" + +#: ../../../HISTORY.rst:296 +msgid "Updated :code:`requirements.txt` and :code:`dev_requirements.txt` files" +msgstr "" + +#: ../../../HISTORY.rst:297 +msgid "Other small changes and minor improvements" +msgstr "" + +#: ../../../HISTORY.rst:301 +msgid "2.0.1 (2021-12-31)" +msgstr "" + +#: ../../../HISTORY.rst:303 +msgid "" +"Implemented CallbackData factory (`example " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:304 +msgid "" +"Implemented methods for answering to inline query from context and reply " +"with animation to the messages. `#85 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:305 +msgid "" +"Fixed installation from tar.gz `#84 " +"`_" +msgstr "" + +#: ../../../HISTORY.rst:306 +msgid "" +"More exceptions (:code:`ChatIdIsEmpty` and " +":code:`NotEnoughRightsToRestrict`)" +msgstr "" + +#: ../../../HISTORY.rst:310 +msgid "2.0 (2021-10-28)" +msgstr "" + +#: ../../../HISTORY.rst:312 +msgid "" +"This update will break backward compability with Python 3.6 and works " +"only with Python 3.7+: - contextvars (PEP-567); - New syntax for " +"annotations (PEP-563)." +msgstr "" + +#: ../../../HISTORY.rst:316 +msgid "" +"Changes: - Used contextvars instead of :code:`aiogram.utils.context`; - " +"Implemented filters factory; - Implemented new filters mechanism; - " +"Allowed to customize command prefix in CommandsFilter; - Implemented " +"mechanism of passing results from filters (as dicts) as kwargs in " +"handlers (like fixtures in pytest); - Implemented states group feature; -" +" Implemented FSM storage's proxy; - Changed files uploading mechanism; - " +"Implemented pipe for uploading files from URL; - Implemented I18n " +"Middleware; - Errors handlers now should accept only two arguments " +"(current update and exception); - Used :code:`aiohttp_socks` instead of " +":code:`aiosocksy` for Socks4/5 proxy; - types.ContentType was divided to " +":code:`types.ContentType` and :code:`types.ContentTypes`; - Allowed to " +"use rapidjson instead of ujson/json; - :code:`.current()` method in bot " +"and dispatcher objects was renamed to :code:`get_current()`;" +msgstr "" + +#: ../../../HISTORY.rst:333 +msgid "" +"Full changelog - You can read more details about this release in " +"migration FAQ: " +"``_" +msgstr "" + +#: ../../../HISTORY.rst:338 +msgid "1.4 (2021-08-03)" +msgstr "" + +#: ../../../HISTORY.rst:340 +msgid "Bot API 4.0 (`#57 `_)" +msgstr "" + +#: ../../../HISTORY.rst:344 +msgid "1.3.3 (2021-07-16)" +msgstr "" + +#: ../../../HISTORY.rst:346 +msgid "Fixed markup-entities parsing;" +msgstr "" + +#: ../../../HISTORY.rst:347 +msgid "Added more API exceptions;" +msgstr "" + +#: ../../../HISTORY.rst:348 +msgid "Now InlineQueryResultLocation has live_period;" +msgstr "" + +#: ../../../HISTORY.rst:349 +msgid "Added more message content types;" +msgstr "" + +#: ../../../HISTORY.rst:350 +msgid "Other small changes and minor improvements." +msgstr "" + +#: ../../../HISTORY.rst:354 +msgid "1.3.2 (2021-05-27)" +msgstr "" + +#: ../../../HISTORY.rst:356 +msgid "Fixed crashing of polling process. (i think)" +msgstr "" + +#: ../../../HISTORY.rst:357 +msgid "Added parse_mode field into input query results according to Bot API Docs." +msgstr "" + +#: ../../../HISTORY.rst:358 +msgid "" +"Added new methods for Chat object. (`#42 " +"`_, `#43 " +"`_)" +msgstr "" + +#: ../../../HISTORY.rst:359 +msgid "**Warning**: disabled connections limit for bot aiohttp session." +msgstr "" + +#: ../../../HISTORY.rst:360 +msgid "**Warning**: Destroyed \"temp sessions\" mechanism." +msgstr "" + +#: ../../../HISTORY.rst:361 +msgid "Added new error types." +msgstr "" + +#: ../../../HISTORY.rst:362 +msgid "Refactored detection of error type." +msgstr "" + +#: ../../../HISTORY.rst:363 +msgid "Small fixes of executor util." +msgstr "" + +#: ../../../HISTORY.rst:364 +msgid "Fixed RethinkDBStorage" +msgstr "" + +#: ../../../HISTORY.rst:367 +msgid "1.3.1 (2018-05-27)" +msgstr "" + +#: ../../../HISTORY.rst:371 +msgid "1.3 (2021-04-22)" +msgstr "" + +#: ../../../HISTORY.rst:373 +msgid "Allow to use Socks5 proxy (need manually install :code:`aiosocksy`)." +msgstr "" + +#: ../../../HISTORY.rst:374 +msgid "Refactored :code:`aiogram.utils.executor` module." +msgstr "" + +#: ../../../HISTORY.rst:375 +msgid "**[Warning]** Updated requirements list." +msgstr "" + +#: ../../../HISTORY.rst:379 +msgid "1.2.3 (2018-04-14)" +msgstr "" + +#: ../../../HISTORY.rst:381 +msgid "Fixed API errors detection" +msgstr "" + +#: ../../../HISTORY.rst:382 +msgid "Fixed compability of :code:`setup.py` with pip 10.0.0" +msgstr "" + +#: ../../../HISTORY.rst:386 +msgid "1.2.2 (2018-04-08)" +msgstr "" + +#: ../../../HISTORY.rst:388 +msgid "Added more error types." +msgstr "" + +#: ../../../HISTORY.rst:389 +msgid "" +"Implemented method :code:`InputFile.from_url(url: str)` for downloading " +"files." +msgstr "" + +#: ../../../HISTORY.rst:390 +msgid "Implemented big part of API method tests." +msgstr "" + +#: ../../../HISTORY.rst:391 +msgid "Other small changes and mminor improvements." +msgstr "" + +#: ../../../HISTORY.rst:395 +msgid "1.2.1 (2018-03-25)" +msgstr "" + +#: ../../../HISTORY.rst:397 +msgid "" +"Fixed handling Venue's [`#27 " +"`_, `#26 " +"`_]" +msgstr "" + +#: ../../../HISTORY.rst:398 +msgid "" +"Added parse_mode to all medias (Bot API 3.6 support) [`#23 " +"`_]" +msgstr "" + +#: ../../../HISTORY.rst:399 +msgid "" +"Now regexp filter can be used with callback query data [`#19 " +"`_]" +msgstr "" + +#: ../../../HISTORY.rst:400 +msgid "" +"Improvements in :code:`InlineKeyboardMarkup` & " +":code:`ReplyKeyboardMarkup` objects [`#21 " +"`_]" +msgstr "" + +#: ../../../HISTORY.rst:401 +msgid "Other bug & typo fixes and minor improvements." +msgstr "" + +#: ../../../HISTORY.rst:405 +msgid "1.2 (2018-02-23)" +msgstr "" + +#: ../../../HISTORY.rst:407 +msgid "Full provide Telegram Bot API 3.6" +msgstr "" + +#: ../../../HISTORY.rst:408 +msgid "" +"Fixed critical error: :code:`Fatal Python error: PyImport_GetModuleDict: " +"no module dictionary!`" +msgstr "" + +#: ../../../HISTORY.rst:409 +msgid "Implemented connection pool in RethinkDB driver" +msgstr "" + +#: ../../../HISTORY.rst:410 ../../../HISTORY.rst:418 +msgid "Typo fixes of documentstion" +msgstr "" + +#: ../../../HISTORY.rst:411 ../../../HISTORY.rst:464 +msgid "Other bug fixes and minor improvements." +msgstr "" + +#: ../../../HISTORY.rst:415 +msgid "1.1 (2018-01-27)" +msgstr "" + +#: ../../../HISTORY.rst:417 +msgid "" +"Added more methods for data types (like " +":code:`message.reply_sticker(...)` or :code:`file.download(...)`" +msgstr "" + +#: ../../../HISTORY.rst:419 +msgid "" +"Allow to set default parse mode for messages (:code:`Bot( ... , " +"parse_mode='HTML')`)" +msgstr "" + +#: ../../../HISTORY.rst:420 +msgid "" +"Allowed to cancel event from the :code:`Middleware.on_pre_process_`" +msgstr "" + +#: ../../../HISTORY.rst:421 +msgid "Fixed sending files with correct names." +msgstr "" + +#: ../../../HISTORY.rst:422 +msgid "Fixed MediaGroup" +msgstr "" + +#: ../../../HISTORY.rst:423 +msgid "" +"Added RethinkDB storage for FSM " +"(:code:`aiogram.contrib.fsm_storage.rethinkdb`)" +msgstr "" + +#: ../../../HISTORY.rst:427 +msgid "1.0.4 (2018-01-10)" +msgstr "" + +#: ../../../HISTORY.rst:431 +msgid "1.0.3 (2018-01-07)" +msgstr "" + +#: ../../../HISTORY.rst:433 +msgid "Added middlewares mechanism." +msgstr "" + +#: ../../../HISTORY.rst:434 +msgid "Added example for middlewares and throttling manager." +msgstr "" + +#: ../../../HISTORY.rst:435 +msgid "" +"Added logging middleware " +"(:code:`aiogram.contrib.middlewares.logging.LoggingMiddleware`)" +msgstr "" + +#: ../../../HISTORY.rst:436 +msgid "Fixed handling errors in async tasks (marked as 'async_task')" +msgstr "" + +#: ../../../HISTORY.rst:437 +msgid "Small fixes and other minor improvements." +msgstr "" + +#: ../../../HISTORY.rst:441 +msgid "1.0.2 (2017-11-29)" +msgstr "" + +#: ../../../HISTORY.rst:445 +msgid "1.0.1 (2017-11-21)" +msgstr "" + +#: ../../../HISTORY.rst:447 +msgid "Implemented :code:`types.InputFile` for more easy sending local files" +msgstr "" + +#: ../../../HISTORY.rst:448 +msgid "" +"**Danger!** Fixed typo in word pooling. Now whatever all methods with " +"that word marked as deprecated and original methods is renamed to " +"polling. Check it in you'r code before updating!" +msgstr "" + +#: ../../../HISTORY.rst:449 +msgid "Fixed helper for chat actions (:code:`types.ChatActions`)" +msgstr "" + +#: ../../../HISTORY.rst:450 +msgid "" +"Added `example " +"`_" +" for media group." +msgstr "" + +#: ../../../HISTORY.rst:454 +msgid "1.0 (2017-11-19)" +msgstr "" + +#: ../../../HISTORY.rst:456 +msgid "Remaked data types serialozation/deserialization mechanism (Speed up)." +msgstr "" + +#: ../../../HISTORY.rst:457 +msgid "Fully rewrited all Telegram data types." +msgstr "" + +#: ../../../HISTORY.rst:458 +msgid "Bot object was fully rewritted (regenerated)." +msgstr "" + +#: ../../../HISTORY.rst:459 +msgid "Full provide Telegram Bot API 3.4+ (with sendMediaGroup)" +msgstr "" + +#: ../../../HISTORY.rst:460 +msgid "Warning: Now :code:`BaseStorage.close()` is awaitable! (FSM)" +msgstr "" + +#: ../../../HISTORY.rst:461 +msgid "Fixed compability with uvloop." +msgstr "" + +#: ../../../HISTORY.rst:462 +msgid "More employments for :code:`aiogram.utils.context`." +msgstr "" + +#: ../../../HISTORY.rst:463 +msgid "Allowed to disable :code:`ujson`." +msgstr "" + +#: ../../../HISTORY.rst:465 +msgid "Migrated from Bitbucket to Github." +msgstr "" + +#: ../../../HISTORY.rst:469 +msgid "0.4.1 (2017-08-03)" +msgstr "" + +#: ../../../HISTORY.rst:473 +msgid "0.4 (2017-08-05)" +msgstr "" + +#: ../../../HISTORY.rst:477 +msgid "0.3.4 (2017-08-04)" +msgstr "" + +#: ../../../HISTORY.rst:481 +msgid "0.3.3 (2017-07-05)" +msgstr "" + +#: ../../../HISTORY.rst:485 +msgid "0.3.2 (2017-07-04)" +msgstr "" + +#: ../../../HISTORY.rst:489 +msgid "0.3.1 (2017-07-04)" +msgstr "" + +#: ../../../HISTORY.rst:493 +msgid "0.2b1 (2017-06-00)" +msgstr "" + +#: ../../../HISTORY.rst:497 +msgid "0.1 (2017-06-03)" +msgstr "" + +#~ msgid "\\ |release| [UNRELEASED DRAFT] (2023-11-24)" +#~ msgstr "" + +#~ msgid "" +#~ "Introduced Scenes feature that helps you" +#~ " to simplify user interactions using " +#~ "Finite State Machines. Read more about" +#~ " 👉 :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 new file mode 100644 index 00000000..ab57b8da --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/contributing.po @@ -0,0 +1,323 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, 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-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.13.1\n" + +#: ../../contributing.rst:3 +msgid "Contributing" +msgstr "Сприяння розробці" + +#: ../../contributing.rst:5 +msgid "You're welcome to contribute to aiogram!" +msgstr "Ласкаво просимо зробити свій внесок у aiogram!" + +#: ../../contributing.rst:7 +msgid "" +"*aiogram* is an open-source project, and anyone can contribute to it in " +"any possible way" +msgstr "*aiogram* є проєктом з відкритим вихідним кодом, і будь-хто може зробити свій внесок у будь-який можливий спосіб" + +#: ../../contributing.rst:11 +msgid "Developing" +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 "Перш ніж вносити будь-які зміни в код фреймворка, потрібно створити форк проєкту, клонувати проєкт на свій комп’ютер і розуміти, як робити запит на витяг (pull-request)." + +#: ../../contributing.rst:16 +msgid "" +"How to work with pull-request you can read in the `GitHub docs " +"`_" +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 "Оскільки цей проєкт написаний на Python, вам потрібно встановити Python (рекомендується використовувати останні версії Python, але можна використовувати будь-яку версію, починаючи з 3.8)" + +#: ../../contributing.rst:23 +msgid "Use virtualenv" +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 "Ви можете створити віртуальне середовище в каталозі, використовуючи модуль :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 "Ця дія створить каталог :code:`.venv` з виконуваними файлами Python, і тоді ви зможете встановлювати пакунки в цьому ізольованому середовищі." + +#: ../../contributing.rst:36 +msgid "Activate the environment" +msgstr "Активуйте середовище" + +#: ../../contributing.rst:38 ../../contributing.rst:77 +msgid "Linux / macOS:" +msgstr "Linux / macOS:" + +#: ../../contributing.rst:44 +msgid "Windows cmd" +msgstr "Windows cmd" + +#: ../../contributing.rst:50 +msgid "Windows PowerShell" +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 "Щоб перевірити, що все працює, скористайтеся описаною командою, яка повинна показати версію :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 "Також переконайтеся, що у вас найновіша версія pip у вашому віртуальному середовищі, щоб уникнути помилок на наступних етапах:" + +#: ../../contributing.rst:73 +msgid "Setup project" +msgstr "Налаштування проєкту" + +#: ../../contributing.rst:75 +msgid "" +"After activating the environment install `aiogram` from sources and their" +" dependencies." +msgstr "Після активації середовища встановіть `aiogram` із вихідних кодів разом із їх залежностями." + +#: ../../contributing.rst:83 +msgid "Windows:" +msgstr "Windows:" + +#: ../../contributing.rst:89 +msgid "" +"It will install :code:`aiogram` in editable mode into your virtual " +"environment and all dependencies." +msgstr "Це встановить :code:`aiogram` у режимі редагування у ваше віртуальне середовище та всі залежності." + +#: ../../contributing.rst:92 +msgid "Making changes in code" +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 "На цьому етапі ви можете вносити будь-які зміни у код, які бажаєте, це можуть бути виправлення, впровадження нових функцій або експерименти." + +#: ../../contributing.rst:99 +msgid "Format the code (code-style)" +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 "Зверніть увагу, що цей проєкт використовує форматування Black, тому ви також маєте дотримуватись цього стилю коду. Щоб упевнитись, що ви робите це правильно, відформатуйте код автоматично:" + +#: ../../contributing.rst:111 +msgid "Run tests" +msgstr "Запуск тестів" + +#: ../../contributing.rst:113 +msgid "All changes should be tested:" +msgstr "Всі зміни повинні бути протестовані:" + +#: ../../contributing.rst:119 +msgid "" +"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:127 +msgid "Docs" +msgstr "Документація" + +#: ../../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 "Ми використовуємо `Sphinx` для створення документації різними мовами. Всі вихідні файли знаходяться в каталозі `docs`. Ви можете змінювати джерела та тестувати їх, запустивши сервер попереднього перегляду, щоб побачити, що ви робите:" + +#: ../../contributing.rst:138 +msgid "Docs translations" +msgstr "Переклади документації" + +#: ../../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 "Переклад документації є дуже важливим і не може бути виконаний без допомоги спільноти зі всього світу, тому ми запрошуємо вас перекладати документацію різними мовами." + +#: ../../contributing.rst:144 +msgid "Before start, let's up to date all texts:" +msgstr "Перш ніж почати, оновіть усі тексти:" + +#: ../../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 "Змініть :code:`` у прикладі нижче на код цільової мови, після цього ви можете змінювати тексти в :code:`docs/locale//LC_MESSAGES` як файли :code:`*.po`, використовуючи будь-який текстовий редактор або спеціалізовані утиліти для GNU Gettext, наприклад за допомогою `poedit `_." + +#: ../../contributing.rst:157 +msgid "To view results:" +msgstr "Щоб переглянути результати:" + +#: ../../contributing.rst:165 +msgid "Describe changes" +msgstr "Опишіть зміни" + +#: ../../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 "Опишіть свої зміни одним або кількома реченнями, щоб розробники ботів знали, що змінилося у їхньому улюбленому фреймворку. Створіть файл `..rst` і напишіть опис." + +#: ../../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 ":code:`` — це номер issue або запиту на витяг (pull-request). Після релізу посилання на цей issue буде опубліковано на сторінці *Changelog*." + +#: ../../contributing.rst:173 +msgid ":code:`` is a changes category marker, it can be one of:" +msgstr ":code:`` — це маркер категорії змін, і це може бути одне з наступного:" + +#: ../../contributing.rst:175 +msgid ":code:`feature` - when you are implementing new feature" +msgstr ":code:`feature` — якщо ви впроваджуєте нову функцію" + +#: ../../contributing.rst:176 +msgid ":code:`bugfix` - when you fix a bug" +msgstr ":code:`bugfix` — якщо ви виправляєте помилку" + +#: ../../contributing.rst:177 +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 ":code:`misc` — якщо ви змінили щось усередині ядра або конфігурації проєкту" + +#: ../../contributing.rst:181 +msgid "" +"If you have troubles with changing category feel free to ask Core-" +"contributors to help with choosing it." +msgstr "Якщо у вас виникли труднощі з вибором категорії, не соромтеся звертатися до основних контриб'юторів за допомогою." + +#: ../../contributing.rst:184 +msgid "Complete" +msgstr "Завершення" + +#: ../../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 "Після того, як ви внесли всі зміни, опублікуйте їх у репозиторії і створіть запит на витяг, як зазначено в початку статті, і зачекайте на перегляд цих змін." + +#: ../../contributing.rst:191 +msgid "Star on GitHub" +msgstr "Зірка на GitHub" + +#: ../../contributing.rst:193 +msgid "" +"You can \"star\" repository on GitHub - " +"https://github.com/aiogram/aiogram (click the star button at the top " +"right)" +msgstr "Ви можете «зіркувати» репозиторій на GitHub -" +"https://github.com/aiogram/aiogram (натисніть кнопку зірки в правому верхньому куті)" + +#: ../../contributing.rst:195 +msgid "" +"Adding stars makes it easier for other people to find this project and " +"understand how useful it is." +msgstr "Додавання зірок полегшує іншим людям знаходження цього проекту і розуміння того, наскільки він корисний." + +#: ../../contributing.rst:198 +msgid "Guides" +msgstr "Інструкції" + +#: ../../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 "Ви можете написати посібники, як розробляти ботів на основі aiogram і публікувати їх на YouTube, Medium, GitHub Books, будь-якій платформі курсів або на будь-якій іншій платформі, яку ви знаєте." + +#: ../../contributing.rst:203 +msgid "" +"This will help more people learn about the framework and learn how to use" +" it" +msgstr "Це допоможе більшій кількості людей дізнатися про фреймворк і навчитися його використовувати." + +#: ../../contributing.rst:207 +msgid "Take answers" +msgstr "Запитання" + +#: ../../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 "Розробники завжди задають питання в наших чатах або на інших платформах, таких як GitHub Discussions, StackOverflow та інших, не соромтеся відповідати на ці питання." + +#: ../../contributing.rst:213 +msgid "Funding" +msgstr "Фінансова підтримка" + +#: ../../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 "Розробка проекту є безкоштовною і не фінансується комерційними організаціями, це моя особиста ініціатива (`@JRootJunior `_) і я займаюся розробкою проекту у вільний час." + +#: ../../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 "Тож, якщо ви хочете фінансово підтримати проект, або, наприклад, купити мені піцу чи пиво, ви можете зробити це на `OpenCollective `_." diff --git a/docs/locale/uk_UA/LC_MESSAGES/deployment/index.po b/docs/locale/uk_UA/LC_MESSAGES/deployment/index.po new file mode 100644 index 00000000..e5fe6ce8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/deployment/index.po @@ -0,0 +1,22 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-08-06 16:52+0300\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" + +#: ../../deployment/index.rst:3 +msgid "Deployment" +msgstr "" 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 new file mode 100644 index 00000000..942af74c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/base.po @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-10-29 02:16+0300\n" +"PO-Revision-Date: 2022-12-11 22:34+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.13.1\n" + +#: ../../dispatcher/class_based_handlers/base.rst:5 +msgid "BaseHandler" +msgstr "BaseHandler" + +#: ../../dispatcher/class_based_handlers/base.rst:7 +msgid "" +"Base handler is generic abstract class and should be used in all other " +"class-based handlers." +msgstr "" +"Базовий обробник є загальним абстрактним класом і повинен " +"використовуватися в усіх інших обробниках на основі класу." + +#: ../../dispatcher/class_based_handlers/base.rst:9 +#, fuzzy +msgid "Import: :code:`from aiogram.handlers import BaseHandler`" +msgstr "Import: :code:`from aiogram.handler import BaseHandler`" + +#: ../../dispatcher/class_based_handlers/base.rst:11 +msgid "" +"By default you will need to override only method :code:`async def " +"handle(self) -> Any: ...`" +msgstr "" +"За замовчуванням вам потрібно буде перевизначити лише метод :code:`async " +"def handle(self) -> Any: ...`" + +#: ../../dispatcher/class_based_handlers/base.rst:13 +#, fuzzy +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[str, Any]`" +msgstr "" +"Цей клас також має ініціалізатор за замовчуванням, і вам не потрібно його" +" змінювати. Ініціалізатор приймає поточну подію та всі контекстні дані, " +"доступ до яких можна отримати з обробника через атрибути: :code:`event: " +"TelegramEvent` and :code:`data: Dict[str, Any]`" + +#: ../../dispatcher/class_based_handlers/base.rst:17 +#, fuzzy +msgid "" +"If an instance of the bot is specified in context data or current context" +" it can be accessed through *bot* class attribute." +msgstr "" +"Якщо екземпляр бота вказано в контекстних даних або поточному контексті, " +"до нього можна отримати доступ через атрибут класу *bot*." + +#: ../../dispatcher/class_based_handlers/base.rst:20 +msgid "Example" +msgstr "Приклад" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/callback_query.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/callback_query.po new file mode 100644 index 00000000..5a2b6566 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/callback_query.po @@ -0,0 +1,42 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"PO-Revision-Date: 2022-12-11 22:37+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.10.3\n" +"X-Generator: Poedit 3.2.2\n" + +#: ../../dispatcher/class_based_handlers/callback_query.rst:3 +msgid "CallbackQueryHandler" +msgstr "CallbackQueryHandler" + +#: aiogram.handlers.callback_query.CallbackQueryHandler:1 of +msgid "There is base class for callback query handlers." +msgstr "Це базовий клас для обробників запитів зворотного виклику." + +#: aiogram.handlers.callback_query.CallbackQueryHandler:13 of +msgid "Example:" +msgstr "Приклад:" + +#: aiogram.handlers.callback_query.CallbackQueryHandler.from_user:1 of +msgid "Is alias for `event.from_user`" +msgstr "Псевдонім для `event.from_user`" + +#: aiogram.handlers.callback_query.CallbackQueryHandler.message:1 of +msgid "Is alias for `event.message`" +msgstr "Псевдонім для `event.message`" + +#: aiogram.handlers.callback_query.CallbackQueryHandler.callback_data:1 of +msgid "Is alias for `event.data`" +msgstr "Псевдонім для `event.data`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/chat_member.po new file mode 100644 index 00000000..acbcac9b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/chat_member.po @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"PO-Revision-Date: 2022-12-11 23:00+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.10.3\n" +"X-Generator: Poedit 3.2.2\n" + +#: ../../dispatcher/class_based_handlers/chat_member.rst:3 +msgid "ChatMemberHandler" +msgstr "ChatMemberHandler" + +#: ../../dispatcher/class_based_handlers/chat_member.rst:5 +msgid "There is base class for chat member updated events." +msgstr "Це базовий клас для подій оновлення статусу учасника чату." + +#: ../../dispatcher/class_based_handlers/chat_member.rst:8 +msgid "Simple usage" +msgstr "Просте застосування" + +#: ../../dispatcher/class_based_handlers/chat_member.rst:23 +msgid "Extension" +msgstr "Розширення" + +#: ../../dispatcher/class_based_handlers/chat_member.rst:25 +msgid "" +"This base handler is subclass of :ref:`BaseHandler ` " +"with some extensions:" +msgstr "" +"Цей базовий обробник є підкласом :ref:`BaseHandler ` " +"з деякими розширеннями:" + +#: ../../dispatcher/class_based_handlers/chat_member.rst:27 +msgid ":code:`self.chat` is alias for :code:`self.event.chat`" +msgstr ":code:`self.chat` псевдонім для :code:`self.event.chat`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/chosen_inline_result.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/chosen_inline_result.po new file mode 100644 index 00000000..e77d99eb --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/chosen_inline_result.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"PO-Revision-Date: 2022-12-11 22:42+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.10.3\n" +"X-Generator: Poedit 3.2.2\n" + +#: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:3 +msgid "ChosenInlineResultHandler" +msgstr "ChosenInlineResultHandler" + +#: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:5 +msgid "There is base class for chosen inline result handlers." +msgstr "Це базовий клас для обробників вибраних inline результатів." + +#: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:8 +msgid "Simple usage" +msgstr "Просте застосування" + +#: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:22 +msgid "Extension" +msgstr "Розширення" + +#: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:24 +msgid "" +"This base handler is subclass of :ref:`BaseHandler ` " +"with some extensions:" +msgstr "" +"Цей базовий обробник є підкласом :ref:`BaseHandler ` " +"з деякими розширеннями:" + +#: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:26 +msgid ":code:`self.chat` is alias for :code:`self.event.chat`" +msgstr ":code:`self.chat` це псевдонім для :code:`self.event.chat`" + +#: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:27 +msgid ":code:`self.from_user` is alias for :code:`self.event.from_user`" +msgstr "" +":code:`self.from_user` це псевдонім для :code:`self.event.from_user`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/error.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/error.po new file mode 100644 index 00000000..d9df2504 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/error.po @@ -0,0 +1,55 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"PO-Revision-Date: 2022-12-11 22:45+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.10.3\n" +"X-Generator: Poedit 3.2.2\n" + +#: ../../dispatcher/class_based_handlers/error.rst:3 +msgid "ErrorHandler" +msgstr "ErrorHandler" + +#: ../../dispatcher/class_based_handlers/error.rst:5 +msgid "There is base class for error handlers." +msgstr "Це базовий клас для обробників помилок." + +#: ../../dispatcher/class_based_handlers/error.rst:8 +msgid "Simple usage" +msgstr "Просте застосування" + +#: ../../dispatcher/class_based_handlers/error.rst:27 +msgid "Extension" +msgstr "Розширення" + +#: ../../dispatcher/class_based_handlers/error.rst:29 +msgid "" +"This base handler is subclass of :ref:`BaseHandler ` " +"with some extensions:" +msgstr "" +"Цей базовий обробник є підкласом :ref:`BaseHandler ` з " +"деякими розширеннями:" + +#: ../../dispatcher/class_based_handlers/error.rst:31 +msgid "" +":code:`self.exception_name` is alias for :code:`self.event.__class__." +"__name__`" +msgstr "" +":code:`self.exception_name` це псевдонім для :code:`self.event.__class__." +"__name__`" + +#: ../../dispatcher/class_based_handlers/error.rst:32 +msgid ":code:`self.exception_message` is alias for :code:`str(self.event)`" +msgstr "" +":code:`self.exception_message` це псевдонім для :code:`str(self.event)`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/index.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/index.po new file mode 100644 index 00000000..41100197 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/index.po @@ -0,0 +1,50 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"PO-Revision-Date: 2022-12-11 22:30+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.10.3\n" +"X-Generator: Poedit 3.2.2\n" + +#: ../../dispatcher/class_based_handlers/index.rst:3 +msgid "Class based handlers" +msgstr "Обробники на основі класів" + +#: ../../dispatcher/class_based_handlers/index.rst:5 +msgid "" +"A handler is a async callable which takes a event with contextual data " +"and returns a response." +msgstr "" +"Обробник (handler) — це корутина, яка приймає подію з контекстними " +"даними та повертає відповідь." + +#: ../../dispatcher/class_based_handlers/index.rst:7 +msgid "" +"In **aiogram** it can be more than just an async function, these allow " +"you to use classes which can be used as Telegram event handlers to " +"structure your event handlers and reuse code by harnessing inheritance " +"and mixins." +msgstr "" +"В **aiogram** це може бути більш, ніж просто асинхронна функція, це " +"дозволяє вам використовувати класи, які можна використовувати як " +"обробники подій Telegram для структурування ваших обробників подій і " +"повторного використання коду за допомогою унаслідування та розширення." + +#: ../../dispatcher/class_based_handlers/index.rst:10 +msgid "" +"There are some base class based handlers what you need to use in your " +"own handlers:" +msgstr "" +"Нижче наведено кілька обробників на основі класів, які вам потрібно " +"використовувати у своїх власних обробниках:" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/inline_query.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/inline_query.po new file mode 100644 index 00000000..15b7e877 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/inline_query.po @@ -0,0 +1,50 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"PO-Revision-Date: 2022-12-11 22:48+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.10.3\n" +"X-Generator: Poedit 3.2.2\n" + +#: ../../dispatcher/class_based_handlers/inline_query.rst:3 +msgid "InlineQueryHandler" +msgstr "InlineQueryHandler" + +#: ../../dispatcher/class_based_handlers/inline_query.rst:5 +msgid "There is base class for inline query handlers." +msgstr "Це базовий клас для обробників inline запитів." + +#: ../../dispatcher/class_based_handlers/inline_query.rst:8 +msgid "Simple usage" +msgstr "Просте застосування" + +#: ../../dispatcher/class_based_handlers/inline_query.rst:22 +msgid "Extension" +msgstr "Розширення" + +#: ../../dispatcher/class_based_handlers/inline_query.rst:24 +msgid "" +"This base handler is subclass of :ref:`BaseHandler ` " +"with some extensions:" +msgstr "" +"Цей базовий обробник є підкласом :ref:`BaseHandler ` " +"з деякими розширеннями:" + +#: ../../dispatcher/class_based_handlers/inline_query.rst:26 +msgid ":code:`self.chat` is alias for :code:`self.event.chat`" +msgstr ":code:`self.chat` це псевдонім для :code:`self.event.chat`" + +#: ../../dispatcher/class_based_handlers/inline_query.rst:27 +msgid ":code:`self.query` is alias for :code:`self.event.query`" +msgstr ":code:`self.query` це псевдонім для :code:`self.event.query`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/message.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/message.po new file mode 100644 index 00000000..bae24729 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/message.po @@ -0,0 +1,50 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-10-08 19:04+0300\n" +"PO-Revision-Date: 2022-12-11 22:52+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" + +#: ../../dispatcher/class_based_handlers/message.rst:3 +msgid "MessageHandler" +msgstr "MessageHandler" + +#: ../../dispatcher/class_based_handlers/message.rst:5 +msgid "There is base class for message handlers." +msgstr "Це базовий клас для обробників повідомлень." + +#: ../../dispatcher/class_based_handlers/message.rst:8 +msgid "Simple usage" +msgstr "Просте застосування" + +#: ../../dispatcher/class_based_handlers/message.rst:22 +msgid "Extension" +msgstr "Розширення" + +#: ../../dispatcher/class_based_handlers/message.rst:24 +#, fuzzy +msgid "" +"This base handler is subclass of :ref:`BaseHandler ` " +"with some extensions:" +msgstr "" +"Цей базовий обробник є підкласом [BaseHandler](basics.md#basehandler) з " +"деякими розширеннями:" + +#: ../../dispatcher/class_based_handlers/message.rst:26 +msgid ":code:`self.chat` is alias for :code:`self.event.chat`" +msgstr ":code:`self.chat` це псевдонім для :code:`self.event.chat`" + +#: ../../dispatcher/class_based_handlers/message.rst:27 +msgid ":code:`self.from_user` is alias for :code:`self.event.from_user`" +msgstr ":code:`self.from_user` це псевдонім для :code:`self.event.from_user`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/poll.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/poll.po new file mode 100644 index 00000000..a6e85eb2 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/poll.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"PO-Revision-Date: 2022-12-11 22:53+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.10.3\n" +"X-Generator: Poedit 3.2.2\n" + +#: ../../dispatcher/class_based_handlers/poll.rst:3 +msgid "PollHandler" +msgstr "PollHandler" + +#: ../../dispatcher/class_based_handlers/poll.rst:5 +msgid "There is base class for poll handlers." +msgstr "Це базовий клас для обробників опитувань." + +#: ../../dispatcher/class_based_handlers/poll.rst:8 +msgid "Simple usage" +msgstr "Просте застосування" + +#: ../../dispatcher/class_based_handlers/poll.rst:21 +msgid "Extension" +msgstr "Розширення" + +#: ../../dispatcher/class_based_handlers/poll.rst:23 +msgid "" +"This base handler is subclass of :ref:`BaseHandler ` " +"with some extensions:" +msgstr "" +"Цей базовий обробник є підкласом :ref:`BaseHandler ` " +"з деякими розширеннями:" + +#: ../../dispatcher/class_based_handlers/poll.rst:25 +msgid ":code:`self.question` is alias for :code:`self.event.question`" +msgstr "" +":code:`self.question` це псевдонім для :code:`self.event.question`" + +#: ../../dispatcher/class_based_handlers/poll.rst:26 +msgid ":code:`self.options` is alias for :code:`self.event.options`" +msgstr ":code:`self.options` це псевдонім для :code:`self.event.options`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/pre_checkout_query.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/pre_checkout_query.po new file mode 100644 index 00000000..aa7b209d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/pre_checkout_query.po @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"PO-Revision-Date: 2022-12-11 22:56+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.10.3\n" +"X-Generator: Poedit 3.2.2\n" + +#: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:3 +msgid "PreCheckoutQueryHandler" +msgstr "PreCheckoutQueryHandler" + +#: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:5 +msgid "There is base class for callback query handlers." +msgstr "" +"!!! Це базовий клас для обробників запитів перед оформленням " +"замовлення." + +#: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:8 +msgid "Simple usage" +msgstr "Просте застосування" + +#: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:21 +msgid "Extension" +msgstr "Розширення" + +#: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:23 +msgid "" +"This base handler is subclass of :ref:`BaseHandler ` " +"with some extensions:" +msgstr "" +"Цей базовий обробник є підкласом :ref:`BaseHandler ` " +"з деякими розширеннями:" + +#: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:25 +msgid ":code:`self.from_user` is alias for :code:`self.event.from_user`" +msgstr "" +":code:`self.from_user` псевдонім для :code:`self.event.from_user`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/shipping_query.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/shipping_query.po new file mode 100644 index 00000000..90c1aac4 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/shipping_query.po @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"PO-Revision-Date: 2022-12-11 22:58+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.10.3\n" +"X-Generator: Poedit 3.2.2\n" + +#: ../../dispatcher/class_based_handlers/shipping_query.rst:3 +msgid "ShippingQueryHandler" +msgstr "ShippingQueryHandler" + +#: ../../dispatcher/class_based_handlers/shipping_query.rst:5 +msgid "There is base class for callback query handlers." +msgstr "" +"!!! Це базовий клас для обробників запитів підтвердження доставки." + +#: ../../dispatcher/class_based_handlers/shipping_query.rst:8 +msgid "Simple usage" +msgstr "Просте застосування" + +#: ../../dispatcher/class_based_handlers/shipping_query.rst:21 +msgid "Extension" +msgstr "Розширення" + +#: ../../dispatcher/class_based_handlers/shipping_query.rst:23 +msgid "" +"This base handler is subclass of :ref:`BaseHandler ` " +"with some extensions:" +msgstr "" +"Цей базовий обробник є підкласом :ref:`BaseHandler ` " +"з деякими розширеннями:" + +#: ../../dispatcher/class_based_handlers/shipping_query.rst:25 +msgid ":code:`self.from_user` is alias for :code:`self.event.from_user`" +msgstr "" +":code:`self.from_user` псевдонім для :code:`self.event.from_user`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dependency_injection.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dependency_injection.po new file mode 100644 index 00000000..aff32317 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dependency_injection.po @@ -0,0 +1,207 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, 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-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.13.1\n" + +#: ../../dispatcher/dependency_injection.rst:3 +msgid "Dependency injection" +msgstr "Ін'єкція залежностей" + +#: ../../dispatcher/dependency_injection.rst:5 +msgid "" +"Dependency injection is a programming technique that makes a class " +"independent of its dependencies. It achieves that by decoupling the usage" +" of an object from its creation. This helps you to follow `SOLID's " +"`_ dependency inversion and single " +"responsibility principles." +msgstr "" +"Ін'єкція залежностей — це техніка програмування, яка робить класи " +"незалежними від їхніх залежностей. Вона досягається шляхом відділення " +"використання об'єкта від його створення. Це допомагає дотримуватися " +"принципів інверсії залежностей та єдиної відповідальності за SOLID." + +#: ../../dispatcher/dependency_injection.rst:12 +msgid "How it works in aiogram" +msgstr "Як це працює в aiogram" + +#: ../../dispatcher/dependency_injection.rst:14 +msgid "" +"For each update :class:`aiogram.dispatcher.dispatcher.Dispatcher` passes " +"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 "" +"To access contextual data you should specify corresponding keyword " +"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 "Ін'єкція власних залежностей" + +#: ../../dispatcher/dependency_injection.rst:32 +msgid "Aiogram provides several ways to complement / modify contextual data." +msgstr "Aiogram надає кілька способів для доповнення/модифікації контекстних даних." + +#: ../../dispatcher/dependency_injection.rst:34 +msgid "" +"The first and easiest way is to simply specify the named arguments in " +":class:`aiogram.dispatcher.dispatcher.Dispatcher` initialization, polling" +" start methods or " +":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 "Аналогія для вебхука:" + +#: ../../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 ":ref:`Проміжне програмне забезпечення `" + +#: ../../dispatcher/dependency_injection.rst:68 +msgid "The last way is to return a dictionary from the filter:" +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 new file mode 100644 index 00000000..6e922b5c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dispatcher.po @@ -0,0 +1,193 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +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: 2022-12-10 19:44+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.13.1\n" + +#: ../../dispatcher/dispatcher.rst:3 +msgid "Dispatcher" +msgstr "Диспетчер" + +#: ../../dispatcher/dispatcher.rst:5 +#, fuzzy +msgid "" +"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 "" +"Диспетчер - це кореневий маршрутизатор, і в коді диспетчер може " +"використовуватися безпосередньо для маршрутизації подій або підключення " +"інших маршрутизаторів до диспетчера." + +#: ../../dispatcher/dispatcher.rst:7 +#, fuzzy +msgid "" +"Here is only listed base information about Dispatcher. All about writing " +"handlers, filters and etc. you can find in next pages:" +msgstr "" +"Тут наведена лише базова інформація про диспетчер. Усе про написання " +"обробників, фільтрів і т.п. ви можете знайти на наступних сторінках:" + +#: ../../dispatcher/dispatcher.rst:9 +#, fuzzy +msgid ":ref:`Router `" +msgstr "`Маршрутизатор `__" + +#: ../../dispatcher/dispatcher.rst:10 +msgid ":ref:`Filtering events`" +msgstr ":ref:`Фільтрація подій`" + +#: aiogram.dispatcher.dispatcher.Dispatcher:1 +#: aiogram.dispatcher.dispatcher.Dispatcher.__init__:1 of +msgid "Root router" +msgstr "Кореневий маршрутизатор" + +#: ../../dispatcher/dispatcher.rst +msgid "Parameters" +msgstr "Параметри" + +#: aiogram.dispatcher.dispatcher.Dispatcher.__init__:3 of +msgid "Storage for FSM" +msgstr "Сховище для кінцевого автомату (FSM)" + +#: aiogram.dispatcher.dispatcher.Dispatcher.__init__:4 of +msgid "FSM strategy" +msgstr "Стратегія кінцевого автомату" + +#: aiogram.dispatcher.dispatcher.Dispatcher.__init__:5 of +msgid "Events isolation" +msgstr "Ізоляція подій" + +#: aiogram.dispatcher.dispatcher.Dispatcher.__init__:6 of +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" +msgstr "Інші аргументи будуть передані обробникам як іменовані аргументи" + +#: aiogram.dispatcher.dispatcher.Dispatcher.feed_raw_update:1 of +msgid "" +"Main entry point for incoming updates with automatic Dict->Update " +"serializer" +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 "Запуск кількох ботів із використанням опитування" + +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:3 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:3 of +#, fuzzy +msgid "Bot instances (one or more)" +msgstr "Екземпляри ботів (один або кілька)" + +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:4 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:4 of +msgid "Long-polling wait time" +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 "Запуск завдання для кожної події без очікування результату" + +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:6 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:6 of +msgid "backoff-retry config" +msgstr "конфігурація повторів із затримкою" + +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:7 of +msgid "List of the update types you want your bot to receive" +msgstr "Список типів оновлень, які має отримувати ваш бот" + +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:8 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:9 of +msgid "handle signals (SIGINT/SIGTERM)" +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 "закривати сесії бота під час завершення роботи" + +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:10 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:11 of +msgid "contextual data" +msgstr "контекстні дані" + +#: ../../dispatcher/dispatcher.rst +msgid "Returns" +msgstr "Повертає" + +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:1 of +msgid "Polling runner" +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 "Використовуйте цей метод, якщо хочете зупинити опитування програмно" + +#: ../../dispatcher/dispatcher.rst:18 +msgid "Simple usage" +msgstr "Просте використання" + +#: ../../dispatcher/dispatcher.rst:20 ../../dispatcher/dispatcher.rst:33 +msgid "Example:" +msgstr "Приклад:" + +#: ../../dispatcher/dispatcher.rst:31 +msgid "Including routers" +msgstr "Додавання маршрутизаторів" + +#: ../../dispatcher/dispatcher.rst:46 +msgid "Handling updates" +msgstr "Обробка оновлень" + +#: ../../dispatcher/dispatcher.rst:48 +msgid "" +"All updates can be propagated to the dispatcher by " +":meth:`~aiogram.dispatcher.dispatcher.Dispatcher.feed_update` method:" +msgstr "" +"Усі оновлення можна передати диспетчеру через метод " +":meth:`~aiogram.dispatcher.dispatcher.Dispatcher.feed_update`:" + +#: ../../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/errors.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/errors.po new file mode 100644 index 00000000..f6c296c5 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/errors.po @@ -0,0 +1,163 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-23 00:44+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.13.1\n" + +#: ../../dispatcher/errors.rst:3 +msgid "Errors" +msgstr "" + +#: ../../dispatcher/errors.rst:7 +msgid "Handling errors" +msgstr "" + +#: ../../dispatcher/errors.rst:9 +msgid "" +"Is recommended way that you should use errors inside handlers using try-" +"except block, but in common cases you can use global errors handler at " +"router or dispatcher level." +msgstr "" + +#: ../../dispatcher/errors.rst:12 +msgid "" +"If you specify errors handler for router - it will be used for all " +"handlers inside this router." +msgstr "" + +#: ../../dispatcher/errors.rst:14 +msgid "" +"If you specify errors handler for dispatcher - it will be used for all " +"handlers inside all routers." +msgstr "" + +#: ../../dispatcher/errors.rst:34 +msgid "ErrorEvent" +msgstr "" + +#: aiogram.types.error_event.ErrorEvent:1 of +msgid "" +"Internal event, should be used to receive errors while processing Updates" +" from Telegram" +msgstr "" + +#: aiogram.types.error_event.ErrorEvent:3 of +msgid "Source: https://core.telegram.org/bots/api#error-event" +msgstr "" + +#: ../../docstring aiogram.types.error_event.ErrorEvent.update:1 of +msgid "Received update" +msgstr "" + +#: ../../docstring aiogram.types.error_event.ErrorEvent.exception:1 of +msgid "Exception" +msgstr "" + +#: ../../dispatcher/errors.rst:45 +msgid "Error types" +msgstr "" + +#: aiogram.exceptions.AiogramError:1 of +msgid "Base exception for all aiogram errors." +msgstr "" + +#: aiogram.exceptions.DetailedAiogramError:1 of +msgid "Base exception for all aiogram errors with detailed message." +msgstr "" + +#: aiogram.exceptions.CallbackAnswerException:1 of +msgid "Exception for callback answer." +msgstr "" + +#: aiogram.exceptions.SceneException:1 of +msgid "Exception for scenes." +msgstr "" + +#: aiogram.exceptions.UnsupportedKeywordArgument:1 of +msgid "Exception raised when a keyword argument is passed as filter." +msgstr "" + +#: aiogram.exceptions.TelegramAPIError:1 of +msgid "Base exception for all Telegram API errors." +msgstr "" + +#: aiogram.exceptions.TelegramNetworkError:1 of +msgid "Base exception for all Telegram network errors." +msgstr "" + +#: aiogram.exceptions.TelegramRetryAfter:1 of +msgid "Exception raised when flood control exceeds." +msgstr "" + +#: aiogram.exceptions.TelegramMigrateToChat:1 of +msgid "Exception raised when chat has been migrated to a supergroup." +msgstr "" + +#: aiogram.exceptions.TelegramBadRequest:1 of +msgid "Exception raised when request is malformed." +msgstr "" + +#: aiogram.exceptions.TelegramNotFound:1 of +msgid "Exception raised when chat, message, user, etc. not found." +msgstr "" + +#: aiogram.exceptions.TelegramConflictError:1 of +msgid "" +"Exception raised when bot token is already used by another application in" +" polling mode." +msgstr "" + +#: aiogram.exceptions.TelegramUnauthorizedError:1 of +msgid "Exception raised when bot token is invalid." +msgstr "" + +#: aiogram.exceptions.TelegramForbiddenError:1 of +msgid "Exception raised when bot is kicked from chat or etc." +msgstr "" + +#: aiogram.exceptions.TelegramServerError:1 of +msgid "Exception raised when Telegram server returns 5xx error." +msgstr "" + +#: aiogram.exceptions.RestartingTelegram:1 of +msgid "Exception raised when Telegram server is restarting." +msgstr "" + +#: aiogram.exceptions.RestartingTelegram:3 of +msgid "" +"It seems like this error is not used by Telegram anymore, but it's still " +"here for backward compatibility." +msgstr "" + +#: aiogram.exceptions.RestartingTelegram:6 of +msgid "" +"Currently, you should expect that Telegram can raise RetryAfter (with " +"timeout 5 seconds)" +msgstr "" + +#: aiogram.exceptions.RestartingTelegram:7 of +msgid "error instead of this one." +msgstr "" + +#: aiogram.exceptions.TelegramEntityTooLarge:1 of +msgid "Exception raised when you are trying to send a file that is too large." +msgstr "" + +#: aiogram.exceptions.ClientDecodeError:1 of +msgid "" +"Exception raised when client can't decode response. (Malformed response, " +"etc.)" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/callback_data.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/callback_data.po new file mode 100644 index 00000000..fbe68031 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/callback_data.po @@ -0,0 +1,171 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"PO-Revision-Date: 2022-10-25 18:31+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" + +#: ../../dispatcher/filters/callback_data.rst:3 +msgid "Callback Data Factory & Filter" +msgstr "Фабрика міток зворотнього виклику та фільтрування" + +#: aiogram.filters.callback_data.CallbackData:1 of +msgid "Base class for callback data wrapper" +msgstr "Базовий клас для обгортки мітки зворотного виклику" + +#: aiogram.filters.callback_data.CallbackData:3 of +msgid "This class should be used as super-class of user-defined callbacks." +msgstr "" +"Цей клас слід використовувати як супер-клас зворотних викликів, визначених " +"користувачем." + +#: aiogram.filters.callback_data.CallbackData:5 of +msgid "" +"The class-keyword :code:`prefix` is required to define prefix and also the " +"argument :code:`sep` can be passed to define separator (default is :code:`:`)." +msgstr "" +"Ключове слово класу :code:`prefix` потрібне для визначення префікса, а також " +"аргумент :code:`sep` можна передати для визначення роздільника (за " +"замовчуванням це :code:`:`)." + +#: aiogram.filters.callback_data.CallbackData.pack:1 of +msgid "Generate callback data string" +msgstr "Генерування рядок мітки зворотного виклику" + +#: aiogram.filters.callback_data.CallbackData.filter +#: aiogram.filters.callback_data.CallbackData.pack +#: aiogram.filters.callback_data.CallbackData.unpack of +msgid "Returns" +msgstr "Повертає" + +#: aiogram.filters.callback_data.CallbackData.pack:3 of +msgid "valid callback data for Telegram Bot API" +msgstr "дійсна мітка зворотного виклику для Telegram Bot API" + +#: aiogram.filters.callback_data.CallbackData.unpack:1 of +msgid "Parse callback data string" +msgstr "Аналіз рядка мітки зворотного виклику" + +#: aiogram.filters.callback_data.CallbackData.filter +#: aiogram.filters.callback_data.CallbackData.unpack of +msgid "Parameters" +msgstr "Параметри" + +#: aiogram.filters.callback_data.CallbackData.unpack:3 of +msgid "value from Telegram" +msgstr "значення з Telegram" + +#: aiogram.filters.callback_data.CallbackData.unpack:4 of +msgid "instance of CallbackData" +msgstr "екземпляр мітки зворотного виклику" + +#: aiogram.filters.callback_data.CallbackData.filter:1 of +msgid "Generates a filter for callback query with rule" +msgstr "Створює фільтр для запиту зворотного виклику з правилом" + +#: aiogram.filters.callback_data.CallbackData.filter:3 of +msgid "magic rule" +msgstr "магічне правило" + +#: aiogram.filters.callback_data.CallbackData.filter:4 of +msgid "instance of filter" +msgstr "екземпляр фільтру" + +#: ../../dispatcher/filters/callback_data.rst:11 +msgid "Usage" +msgstr "Використання" + +#: ../../dispatcher/filters/callback_data.rst:13 +msgid "Create subclass of :code:`CallbackData`:" +msgstr "Створення підкласу :code:`CallbackData`:" + +#: ../../dispatcher/filters/callback_data.rst:21 +msgid "After that you can generate any callback based on this class, for example:" +msgstr "" +"Після цього ви можете створити будь-який зворотній виклик на основі цього " +"класу, наприклад:" + +#: ../../dispatcher/filters/callback_data.rst:29 +msgid "" +"So... Now you can use this class to generate any callbacks with defined " +"structure" +msgstr "" +"Отже... Тепер ви можете використовувати цей клас для створення будь-яких " +"зворотних викликів із визначеною структурою" + +#: ../../dispatcher/filters/callback_data.rst:41 +msgid "... and handle by specific rules" +msgstr "... і обробляти за певними правилами" + +#: ../../dispatcher/filters/callback_data.rst:52 +msgid "Also can be used in :doc:`Keyboard builder `:" +msgstr "" + +#: ../../dispatcher/filters/callback_data.rst:63 +msgid "Another abstract example:" +msgstr "Ще один абстрактний приклад:" + +#: ../../dispatcher/filters/callback_data.rst:101 +msgid "Known limitations" +msgstr "Відомі обмеження" + +#: ../../dispatcher/filters/callback_data.rst:103 +msgid "Allowed types and their subclasses:" +msgstr "Дозволені типи та їх підкласи:" + +#: ../../dispatcher/filters/callback_data.rst:105 +msgid ":code:`str`" +msgstr ":code:`str`" + +#: ../../dispatcher/filters/callback_data.rst:106 +msgid ":code:`int`" +msgstr ":code:`int`" + +#: ../../dispatcher/filters/callback_data.rst:107 +msgid ":code:`bool`" +msgstr ":code:`bool`" + +#: ../../dispatcher/filters/callback_data.rst:108 +msgid ":code:`float`" +msgstr ":code:`float`" + +#: ../../dispatcher/filters/callback_data.rst:109 +msgid ":code:`Decimal` (:code:`from decimal import Decimal`)" +msgstr ":code:`Decimal` (:code:`from decimal import Decimal`)" + +#: ../../dispatcher/filters/callback_data.rst:110 +msgid ":code:`Fraction` (:code:`from fractions import Fraction`)" +msgstr ":code:`Fraction` (:code:`from fractions import Fraction`)" + +#: ../../dispatcher/filters/callback_data.rst:111 +msgid ":code:`UUID` (:code:`from uuid import UUID`)" +msgstr ":code:`UUID` (:code:`from uuid import UUID`)" + +#: ../../dispatcher/filters/callback_data.rst:112 +msgid ":code:`Enum` (:code:`from enum import Enum`, only for string enums)" +msgstr ":code:`Enum` (:code:`from enum import Enum`, лише для переліків рядків)" + +#: ../../dispatcher/filters/callback_data.rst:113 +msgid ":code:`IntEnum` (:code:`from enum import IntEnum`, only for int enums)" +msgstr "" +":code:`IntEnum` (:code:`from enum import IntEnum`, тільки для переліків int)" + +#: ../../dispatcher/filters/callback_data.rst:118 +msgid "" +"Note that the integer Enum's should be always is subclasses of :code:`IntEnum` " +"in due to parsing issues." +msgstr "" +"Зауважте, що ціле число Enum завжди має бути підкласом :code:`IntEnum` через " +"проблеми з синтаксичним аналізом." diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/chat_member_updated.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/chat_member_updated.po new file mode 100644 index 00000000..6b144595 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/chat_member_updated.po @@ -0,0 +1,256 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-08-26 23:17+0300\n" +"PO-Revision-Date: 2022-10-25 18:00+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.12.1\n" + +#: ../../dispatcher/filters/chat_member_updated.rst:3 +msgid "ChatMemberUpdated" +msgstr "Зміна статусу користувача в чаті" + +#: ../../dispatcher/filters/chat_member_updated.rst:6 +msgid "Usage" +msgstr "Використання" + +#: ../../dispatcher/filters/chat_member_updated.rst:8 +msgid "Handle user leave or join events" +msgstr "Керуйте подіями, які залишають користувачів або приєднуються" + +#: ../../dispatcher/filters/chat_member_updated.rst:20 +msgid "" +"Or construct your own terms via using pre-defined set of statuses and " +"transitions." +msgstr "" +"Або створіть власні умови, використовуючи попередньо визначений набір " +"статусів і переходів." + +#: ../../dispatcher/filters/chat_member_updated.rst:24 +msgid "Explanation" +msgstr "" + +#: ../../dispatcher/filters/chat_member_updated.rst:31 +msgid "" +"You can import from :code:`aiogram.filters` all available variants of " +"`statuses`_, `status groups`_ or `transitions`_:" +msgstr "" +"Ви можете імпортувати з :code:`aiogram.filters` усі доступні варіанти " +"`statuses`_, `status group`_ або `transitions`_:" + +#: ../../dispatcher/filters/chat_member_updated.rst:35 +msgid "Statuses" +msgstr "Статуси" + +#: ../../dispatcher/filters/chat_member_updated.rst:38 +#: ../../dispatcher/filters/chat_member_updated.rst:63 +#: ../../dispatcher/filters/chat_member_updated.rst:83 +msgid "name" +msgstr "ім'я" + +#: ../../dispatcher/filters/chat_member_updated.rst:38 +#: ../../dispatcher/filters/chat_member_updated.rst:63 +#: ../../dispatcher/filters/chat_member_updated.rst:83 +msgid "Description" +msgstr "Опис" + +#: ../../dispatcher/filters/chat_member_updated.rst:40 +msgid ":code:`CREATOR`" +msgstr ":code:`CREATOR`" + +#: ../../dispatcher/filters/chat_member_updated.rst:40 +msgid "Chat owner" +msgstr "Власник чату" + +#: ../../dispatcher/filters/chat_member_updated.rst:42 +msgid ":code:`ADMINISTRATOR`" +msgstr ":code:`ADMINISTRATOR`" + +#: ../../dispatcher/filters/chat_member_updated.rst:42 +msgid "Chat administrator" +msgstr "Адміністратор чату" + +#: ../../dispatcher/filters/chat_member_updated.rst:44 +msgid ":code:`MEMBER`" +msgstr ":code:`MEMBER`" + +#: ../../dispatcher/filters/chat_member_updated.rst:44 +msgid "Member of the chat" +msgstr "Учасник чату" + +#: ../../dispatcher/filters/chat_member_updated.rst:46 +msgid ":code:`RESTRICTED`" +msgstr ":code:`RESTRICTED`" + +#: ../../dispatcher/filters/chat_member_updated.rst:46 +msgid "Restricted user (can be not member)" +msgstr "Обмежений користувач (може бути не учасником)" + +#: ../../dispatcher/filters/chat_member_updated.rst:48 +msgid ":code:`LEFT`" +msgstr ":code:`LEFT`" + +#: ../../dispatcher/filters/chat_member_updated.rst:48 +msgid "Isn't member of the chat" +msgstr "Не є учасником чату" + +#: ../../dispatcher/filters/chat_member_updated.rst:50 +msgid ":code:`KICKED`" +msgstr ":code:`KICKED`" + +#: ../../dispatcher/filters/chat_member_updated.rst:50 +msgid "Kicked member by administrators" +msgstr "Вигнанийадміністраторами учасник" + +#: ../../dispatcher/filters/chat_member_updated.rst:53 +msgid "" +"Statuses can be extended with `is_member` flag by prefixing with " +":code:`+` (for :code:`is_member == True)` or :code:`-` (for " +":code:`is_member == False`) symbol, like :code:`+RESTRICTED` or " +":code:`-RESTRICTED`" +msgstr "" +"Статуси можна розширити маркером `is_member`, додавши префікс :code:`+` " +"(для :code:`is_member == True)` або :code:`-` (для :code:`is_member == " +"False`) , наприклад :code:`+RESTRICTED` або :code:`-RESTRICTED`" + +#: ../../dispatcher/filters/chat_member_updated.rst:58 +msgid "Status groups" +msgstr "Групи статусів" + +#: ../../dispatcher/filters/chat_member_updated.rst:60 +msgid "" +"The particular statuses can be combined via bitwise :code:`or` operator, " +"like :code:`CREATOR | ADMINISTRATOR`" +msgstr "" +"Окремі статуси можна комбінувати за допомогою побітового оператора " +":code:`or`, наприклад :code:`CREATOR | ADMINISTRATOR`" + +#: ../../dispatcher/filters/chat_member_updated.rst:65 +msgid ":code:`IS_MEMBER`" +msgstr ":code:`IS_MEMBER`" + +#: ../../dispatcher/filters/chat_member_updated.rst:65 +msgid "" +"Combination of :code:`(CREATOR | ADMINISTRATOR | MEMBER | +RESTRICTED)` " +"statuses." +msgstr "" +"Комбінація статусів :code:`(CREATOR | ADMINISTRATOR | MEMBER | " +"+RESTRICTED)`." + +#: ../../dispatcher/filters/chat_member_updated.rst:67 +msgid ":code:`IS_ADMIN`" +msgstr ":code:`IS_ADMIN`" + +#: ../../dispatcher/filters/chat_member_updated.rst:67 +msgid "Combination of :code:`(CREATOR | ADMINISTRATOR)` statuses." +msgstr "Комбінація статусів :code:`(CREATOR | ADMINISTRATOR)`." + +#: ../../dispatcher/filters/chat_member_updated.rst:69 +msgid ":code:`IS_NOT_MEMBER`" +msgstr ":code:`IS_NOT_MEMBER`" + +#: ../../dispatcher/filters/chat_member_updated.rst:69 +msgid "Combination of :code:`(LEFT | KICKED | -RESTRICTED)` statuses." +msgstr "Комбінація статусів :code:`(LEFT | KICKED | -RESTRICTED)` ." + +#: ../../dispatcher/filters/chat_member_updated.rst:73 +msgid "Transitions" +msgstr "Переходи" + +#: ../../dispatcher/filters/chat_member_updated.rst:75 +msgid "" +"Transitions can be defined via bitwise shift operators :code:`>>` and " +":code:`<<`. Old chat member status should be defined in the left side for" +" :code:`>>` operator (right side for :code:`<<`) and new status should be" +" specified on the right side for :code:`>>` operator (left side for " +":code:`<<`)" +msgstr "" +"Переходи можна визначити за допомогою операторів порозрядного зсуву " +":code:`>>` і :code:`<<`. Старий статус учасника чату має бути визначений " +"ліворуч для оператора :code:`>>` (праворуч для :code:`<<`), а новий " +"статус має бути вказаний праворуч для :code:`>>` оператор (ліворуч для " +":code:`<<`)" + +#: ../../dispatcher/filters/chat_member_updated.rst:79 +msgid "" +"The direction of transition can be changed via bitwise inversion " +"operator: :code:`~JOIN_TRANSITION` will produce swap of old and new " +"statuses." +msgstr "" +"Напрямок переходу можна змінити за допомогою оператора побітової " +"інверсії: :code:`~JOIN_TRANSITION` призведе до обміну старих і нових " +"статусів." + +#: ../../dispatcher/filters/chat_member_updated.rst:85 +msgid ":code:`JOIN_TRANSITION`" +msgstr ":code:`JOIN_TRANSITION`" + +#: ../../dispatcher/filters/chat_member_updated.rst:85 +msgid "" +"Means status changed from :code:`IS_NOT_MEMBER` to :code:`IS_MEMBER` " +"(:code:`IS_NOT_MEMBER >> IS_MEMBER`)" +msgstr "" +"Означає, що статус змінено з :code:`IS_NOT_MEMBER` на :code:`IS_MEMBER` " +"(:code:`IS_NOT_MEMBER >> IS_MEMBER`)" + +#: ../../dispatcher/filters/chat_member_updated.rst:88 +msgid ":code:`LEAVE_TRANSITION`" +msgstr ":code:`LEAVE_TRANSITION`" + +#: ../../dispatcher/filters/chat_member_updated.rst:88 +msgid "" +"Means status changed from :code:`IS_MEMBER` to :code:`IS_NOT_MEMBER` " +"(:code:`~JOIN_TRANSITION`)" +msgstr "" +"Означає, що статус змінено з :code:`IS_MEMBER` на :code:`IS_NOT_MEMBER` " +"(:code:`~JOIN_TRANSITION`)" + +#: ../../dispatcher/filters/chat_member_updated.rst:91 +msgid ":code:`PROMOTED_TRANSITION`" +msgstr ":code:`PROMOTED_TRANSITION`" + +#: ../../dispatcher/filters/chat_member_updated.rst:91 +msgid "" +"Means status changed from :code:`(MEMBER | RESTRICTED | LEFT | KICKED) >>" +" ADMINISTRATOR` (:code:`(MEMBER | RESTRICTED | LEFT | KICKED) >> " +"ADMINISTRATOR`)" +msgstr "" +"Означає, що статус змінено з :code:`(MEMBER | RESTRICTED | LEFT | KICKED)" +" >> ADMINISTRATOR` (:code:`(MEMBER | RESTRICTED | LEFT | KICKED) >> " +"ADMINISTRATOR`)" + +#: ../../dispatcher/filters/chat_member_updated.rst:98 +msgid "" +"Note that if you define the status unions (via :code:`|`) you will need " +"to add brackets for the statement before use shift operator in due to " +"operator priorities." +msgstr "" +"Зауважте, що якщо ви визначаєте об’єднання статусів (через :code:`|`), " +"вам потрібно буде додати дужки для оператора перед використанням " +"оператора зсуву через пріоритети оператора." + +#: ../../dispatcher/filters/chat_member_updated.rst:103 +msgid "Allowed handlers" +msgstr "Дозволені обробники" + +#: ../../dispatcher/filters/chat_member_updated.rst:105 +msgid "Allowed update types for this filter:" +msgstr "Дозволені типи оновлень для цього фільтра:" + +#: ../../dispatcher/filters/chat_member_updated.rst:107 +msgid "`my_chat_member`" +msgstr "`my_chat_member`" + +#: ../../dispatcher/filters/chat_member_updated.rst:108 +msgid "`chat_member`" +msgstr "`chat_member`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/command.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/command.po new file mode 100644 index 00000000..c43c54d5 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/command.po @@ -0,0 +1,183 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +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: 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.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 "Цей фільтр може бути корисним для обробки команд із текстових повідомлень." + +#: aiogram.filters.command.Command:3 of +msgid "" +"Works only with :class:`aiogram.types.message.Message` events which have " +"the :code:`text`." +msgstr "" +"Працює лише з подіями :class:`aiogram.types.message.Message` , що мають " +":code:`text`." + +#: aiogram.filters.command.Command.__init__:1 of +msgid "List of commands (string or compiled regexp patterns)" +msgstr "Перелік команд (рядки або скомпільовані шаблони регулярних виразів)" + +#: ../../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:`\"!\"`." +msgstr "" +"Префікс для команди. Префікс завжди складається з одного символу, але тут" +" ви можете передати всі дозволені префікси, наприклад: :code:`\"/!\"` " +"працюватиме з командами з префіксом :code:`\"/\"` або :code:`\"!\" `." + +#: aiogram.filters.command.Command.__init__:7 of +msgid "Ignore case (Does not work with regexp, use flags instead)" +msgstr "" +"Ігнорувати регістр (не працює з регулярним виразом, замість цього " +"використовуйте маркери)" + +#: aiogram.filters.command.Command.__init__:8 of +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:24 +msgid "" +"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`" + +#: 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" +msgstr "" +"Екземпляр цього об’єкта завжди має команду та її префікс. Можна передати " +"обробнику (handler) як аргумент ключового слова **command**" + +#: ../../docstring aiogram.filters.command.CommandObject.prefix:1 of +msgid "Command prefix" +msgstr "Префікс команди" + +#: ../../docstring aiogram.filters.command.CommandObject.command:1 of +msgid "Command without prefix and mention" +msgstr "Команда без префікса та згадки" + +#: ../../docstring aiogram.filters.command.CommandObject.mention:1 of +msgid "Mention (if available)" +msgstr "Згадка (за наявності)" + +#: ../../docstring aiogram.filters.command.CommandObject.args:1 of +msgid "Command argument" +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" +msgstr "" +"Буде представлено результат відповідності, якщо команда представлена як " +"регулярний вираз у фільтрі" + +#: aiogram.filters.command.CommandObject.mentioned:1 of +msgid "This command has mention?" +msgstr "Ця команда згадується?" + +#: aiogram.filters.command.CommandObject.text:1 of +msgid "Generate original text from object" +msgstr "Створення оригінального тексту з об'єкта" + +#: ../../dispatcher/filters/command.rst:32 +msgid "Allowed handlers" +msgstr "Дозволені обробники (handler)" + +#: ../../dispatcher/filters/command.rst:34 +msgid "Allowed update types for this filter:" +msgstr "Дозволені типи оновлень для цього фільтра:" + +#: ../../dispatcher/filters/command.rst:36 +msgid "`message`" +msgstr "`message`" + +#: ../../dispatcher/filters/command.rst:37 +msgid "`edited_message`" +msgstr "`edited_message`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/exception.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/exception.po new file mode 100644 index 00000000..cd8cd3c5 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/exception.po @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"PO-Revision-Date: 2022-10-25 18:34+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" + +#: ../../dispatcher/filters/exception.rst:3 +msgid "Exceptions" +msgstr "Помилки" + +#: ../../dispatcher/filters/exception.rst:5 +msgid "This filters can be helpful for handling errors from the text messages." +msgstr "Ці фільтри можуть бути корисними для обробки помилок у текстових повідомленнях." + +#: aiogram.filters.exception.ExceptionTypeFilter:1 of +msgid "Allows to match exception by type" +msgstr "Дозволяє зіставляти винятки за типом" + +#: aiogram.filters.exception.ExceptionMessageFilter:1 of +msgid "Allow to match exception by message" +msgstr "Дозвол зіставляти винятки з повідомленням" + +#: ../../dispatcher/filters/exception.rst:18 +msgid "Allowed handlers" +msgstr "Дозволені обробники" + +#: ../../dispatcher/filters/exception.rst:20 +msgid "Allowed update types for this filters:" +msgstr "Дозволені типи оновлення для цього фільтра:" + +#: ../../dispatcher/filters/exception.rst:22 +msgid ":code:`error`" +msgstr ":code:`error`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/index.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/index.po new file mode 100644 index 00000000..d3fe7556 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/index.po @@ -0,0 +1,197 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-09-14 17:21+0300\n" +"PO-Revision-Date: 2022-10-25 15:53+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.12.1\n" + +#: ../../dispatcher/filters/index.rst:5 +msgid "Filtering events" +msgstr "Фільтрування подій" + +#: ../../dispatcher/filters/index.rst:7 +#, fuzzy +msgid "" +"Filters is needed for routing updates to the specific handler. Searching " +"of handler is always stops on first match set of filters are pass. By " +"default, all handlers has empty set of filters, so all updates will be " +"passed to first handler that has empty set of filters." +msgstr "" +"Фільтри потрібні для маршрутизації оновлень до конкретного обробника " +"(handler) . Пошук обробника (handler) завжди зупиняється після першого " +"збігу набору фільтрів." + +#: ../../dispatcher/filters/index.rst:11 +#, fuzzy +msgid "*aiogram* has some builtin useful filters or you can write own filters." +msgstr "*aiogram* має декілька вбудованих корисних фільтрів." + +#: ../../dispatcher/filters/index.rst:14 +msgid "Builtin filters" +msgstr "Вбудовані фільтри" + +#: ../../dispatcher/filters/index.rst:16 +msgid "Here is list of builtin filters:" +msgstr "Ось список вбудованих фільтрів:" + +#: ../../dispatcher/filters/index.rst:29 +msgid "Writing own filters" +msgstr "Написання власних фільтрів" + +#: ../../dispatcher/filters/index.rst:31 +msgid "Filters can be:" +msgstr "Фільтри бувають:" + +#: ../../dispatcher/filters/index.rst:33 +msgid "Asynchronous function (:code:`async def my_filter(*args, **kwargs): pass`)" +msgstr "Асинхронною функцією (:code:`async def my_filter(*args, **kwargs): pass`)" + +#: ../../dispatcher/filters/index.rst:34 +msgid "Synchronous function (:code:`def my_filter(*args, **kwargs): pass`)" +msgstr "Синхронною функцією (:code:`def my_filter(*args, **kwargs): pass`)" + +#: ../../dispatcher/filters/index.rst:35 +msgid "Anonymous function (:code:`lambda event: True`)" +msgstr "Анонімною функцією (:code:`lambda event: True`)" + +#: ../../dispatcher/filters/index.rst:36 +msgid "Any awaitable object" +msgstr "" +"Будь-яким очікуваним об'єктом (awaitable object, об'єкт, який може бути " +"використаний в :code:`await` виразі)" + +#: ../../dispatcher/filters/index.rst:37 +msgid "Subclass of :class:`aiogram.filters.base.Filter`" +msgstr "Підкласом :class:`aiogram.filters.base.Filter`" + +#: ../../dispatcher/filters/index.rst:38 +msgid "Instances of :ref:`MagicFilter `" +msgstr "Екземпляром :ref:`MagicFilter `" + +#: ../../dispatcher/filters/index.rst:40 +msgid "" +"and should return bool or dict. If the dictionary is passed as result of " +"filter - resulted data will be propagated to the next filters and handler" +" as keywords arguments." +msgstr "" +"і має повертати bool або dict. Якщо словник передається як результат " +"фільтра, отримані дані будуть передані до наступних фільтрів і обробника " +"як аргументи ключових слів." + +#: ../../dispatcher/filters/index.rst:45 +msgid "Base class for own filters" +msgstr "Базовий клас для власних фільтрів" + +#: aiogram.filters.base.Filter:1 of +msgid "" +"If you want to register own filters like builtin filters you will need to" +" write subclass of this class with overriding the :code:`__call__` method" +" and adding filter attributes." +msgstr "" +"Якщо Ви хочете зареєструвати власні фільтри, як вбудовані фільтри, Вам " +"потрібно буде написати підклас цього класу з заміною методу " +":code:`__call__` і додаванням атрибутів фільтра." + +#: aiogram.filters.base.Filter.__call__:1 of +msgid "This method should be overridden." +msgstr "Цей метод слід перевизначити." + +#: aiogram.filters.base.Filter.__call__:3 of +msgid "Accepts incoming event and should return boolean or dict." +msgstr "Приймає вхідну подію та має повертати логічне (bool) значення або dict." + +#: aiogram.filters.base.Filter.__call__ of +msgid "Returns" +msgstr "Повертає" + +#: aiogram.filters.base.Filter.__call__:5 of +msgid ":class:`bool` or :class:`Dict[str, Any]`" +msgstr ":class:`bool` or :class:`Dict[str, Any]`" + +#: aiogram.filters.base.Filter.update_handler_flags:1 of +msgid "" +"Also if you want to extend handler flags with using this filter you " +"should implement this method" +msgstr "" +"Крім того, якщо ви хочете розширити маркери обробника (handler) за " +"допомогою цього фільтра, вам слід реалізувати цей метод" + +#: aiogram.filters.base.Filter.update_handler_flags of +msgid "Parameters" +msgstr "Параметри" + +#: aiogram.filters.base.Filter.update_handler_flags:4 of +msgid "existing flags, can be updated directly" +msgstr "існуючі маркери, можна оновити безпосередньо" + +#: ../../dispatcher/filters/index.rst:53 +msgid "Own filter example" +msgstr "Приклад власного фільтра" + +#: ../../dispatcher/filters/index.rst:55 +msgid "For example if you need to make simple text filter:" +msgstr "Наприклад, якщо Вам потрібно створити простий текстовий фільтр:" + +#: ../../dispatcher/filters/index.rst:62 +msgid "Combining Filters" +msgstr "Комбінування фільтрів" + +#: ../../dispatcher/filters/index.rst:64 +msgid "In general, all filters can be combined in two ways" +msgstr "Взагалом, усі фільтри можна комбінувати двома способами" + +#: ../../dispatcher/filters/index.rst:68 +msgid "Recommended way" +msgstr "Рекомендований спосіб" + +#: ../../dispatcher/filters/index.rst:70 +msgid "" +"If you specify multiple filters in a row, it will be checked with an " +"\"and\" condition:" +msgstr "" +"Якщо Ви вкажете кілька фільтрів поспіль, це буде перевірено умовою " +"\"and\" :" + +#: ../../dispatcher/filters/index.rst:77 +msgid "" +"Also, if you want to use two alternative ways to run the same handler " +"(\"or\" condition) you can register the handler twice or more times as " +"you like" +msgstr "" +"Крім того, якщо ви хочете використовувати два альтернативні способи " +"запуску одного обробника (умова \"or\"), ви можете зареєструвати обробник" +" двічі або більше разів, як вам подобається" + +#: ../../dispatcher/filters/index.rst:86 +msgid "" +"Also sometimes you will need to invert the filter result, for example you" +" have an *IsAdmin* filter and you want to check if the user is not an " +"admin" +msgstr "" +"Також іноді Вам потрібно буде інвертувати результат фільтра, наприклад, у" +" вас є фільтр *IsAdmin* і ви хочете перевірити, чи користувач не є " +"адміністратором" + +#: ../../dispatcher/filters/index.rst:95 +msgid "Another possible way" +msgstr "Інший можливий спосіб" + +#: ../../dispatcher/filters/index.rst:97 +msgid "" +"An alternative way is to combine using special functions (:func:`and_f`, " +":func:`or_f`, :func:`invert_f` from :code:`aiogram.filters` module):" +msgstr "" +"Альтернативним способом є об’єднання за допомогою спеціальних функцій " +"(:func:`and_f`, :func:`or_f`, :func:`invert_f` з модуля " +":code:`aiogram.filters`):" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/magic_data.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/magic_data.po new file mode 100644 index 00000000..5025169e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/magic_data.po @@ -0,0 +1,117 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-08-26 23:17+0300\n" +"PO-Revision-Date: 2022-10-25 16:00+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.12.1\n" + +#: ../../dispatcher/filters/magic_data.rst:3 +msgid "MagicData" +msgstr "MagicData" + +#: ../../dispatcher/filters/magic_data.rst:6 +msgid "Usage" +msgstr "Використання" + +#: ../../dispatcher/filters/magic_data.rst:8 +msgid "" +":code:`MagicData(F.event.from_user.id == F.config.admin_id)` (Note that " +":code:`config` should be passed from middleware)" +msgstr "" +":code:`MagicData(F.event.from_user.id == F.config.admin_id)` (Зауважте, " +"що :code:`config` слід передати з проміжної програми)" + +#: ../../dispatcher/filters/magic_data.rst:11 +msgid "Explanation" +msgstr "" + +#: aiogram.filters.magic_data.MagicData:1 of +msgid "This filter helps to filter event with contextual data" +msgstr "Цей фільтр допомагає фільтрувати події з контекстними даними" + +#: ../../dispatcher/filters/magic_data.rst:18 +msgid "Can be imported:" +msgstr "Можна імпортувати:" + +#: ../../dispatcher/filters/magic_data.rst:20 +msgid ":code:`from aiogram.filters import MagicData`" +msgstr ":code:`from aiogram.filters import MagicData`" + +#: ../../dispatcher/filters/magic_data.rst:24 +msgid "Allowed handlers" +msgstr "Дозволені типи обробників (handler)" + +#: ../../dispatcher/filters/magic_data.rst:26 +msgid "Allowed update types for this filter:" +msgstr "Дозволені типи оновлень для цього фільтра:" + +#: ../../dispatcher/filters/magic_data.rst:28 +msgid ":code:`message`" +msgstr ":code:`message`" + +#: ../../dispatcher/filters/magic_data.rst:29 +msgid ":code:`edited_message`" +msgstr ":code:`edited_message`" + +#: ../../dispatcher/filters/magic_data.rst:30 +msgid ":code:`channel_post`" +msgstr ":code:`channel_post`" + +#: ../../dispatcher/filters/magic_data.rst:31 +msgid ":code:`edited_channel_post`" +msgstr ":code:`edited_channel_post`" + +#: ../../dispatcher/filters/magic_data.rst:32 +msgid ":code:`inline_query`" +msgstr ":code:`inline_query`" + +#: ../../dispatcher/filters/magic_data.rst:33 +msgid ":code:`chosen_inline_result`" +msgstr ":code:`chosen_inline_result`" + +#: ../../dispatcher/filters/magic_data.rst:34 +msgid ":code:`callback_query`" +msgstr ":code:`callback_query`" + +#: ../../dispatcher/filters/magic_data.rst:35 +msgid ":code:`shipping_query`" +msgstr ":code:`shipping_query`" + +#: ../../dispatcher/filters/magic_data.rst:36 +msgid ":code:`pre_checkout_query`" +msgstr ":code:`pre_checkout_query`" + +#: ../../dispatcher/filters/magic_data.rst:37 +msgid ":code:`poll`" +msgstr ":code:`poll`" + +#: ../../dispatcher/filters/magic_data.rst:38 +msgid ":code:`poll_answer`" +msgstr ":code:`poll_answer`" + +#: ../../dispatcher/filters/magic_data.rst:39 +msgid ":code:`my_chat_member`" +msgstr ":code:`my_chat_member`" + +#: ../../dispatcher/filters/magic_data.rst:40 +msgid ":code:`chat_member`" +msgstr ":code:`chat_member`" + +#: ../../dispatcher/filters/magic_data.rst:41 +msgid ":code:`chat_join_request`" +msgstr ":code:`chat_join_request`" + +#: ../../dispatcher/filters/magic_data.rst:42 +msgid ":code:`error`" +msgstr ":code:`error`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/magic_filters.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/magic_filters.po new file mode 100644 index 00000000..55a681e8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/magic_filters.po @@ -0,0 +1,204 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"PO-Revision-Date: 2022-10-25 16:32+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" + +#: ../../dispatcher/filters/magic_filters.rst:5 +msgid "Magic filters" +msgstr "✨ Магічні 🔮 фільтри ✨" + +#: ../../dispatcher/filters/magic_filters.rst:9 +msgid "This page still in progress. Has many incorrectly worded sentences." +msgstr "" +"Ця сторінка все ще в розробці. Має багато неправильно сформульованих речень." + +#: ../../dispatcher/filters/magic_filters.rst:11 +msgid "Is external package maintained by *aiogram* core team." +msgstr "" +"Це зовнішній пакет, який підтримується основною командою розробки *aiogram*." + +#: ../../dispatcher/filters/magic_filters.rst:13 +msgid "" +"By default installs with *aiogram* and also is available on `PyPi - magic-" +"filter `_. That's mean you can " +"install it and use with any other libraries and in own projects without " +"depending *aiogram* installed." +msgstr "" +"За замовчуванням встановлюється разом з *aiogram* і, також, доступний в " +"`PyPi - magic-filter `_. Це означає, " +"що Ви можете встановити його та використовувати з будь-якими іншими " +"бібліотеками та у власних проектах, незалежно від того встановлено *aiogram* " +"чи ні." + +#: ../../dispatcher/filters/magic_filters.rst:17 +msgid "Usage" +msgstr "Використання" + +#: ../../dispatcher/filters/magic_filters.rst:19 +msgid "" +"The **magic_filter** package implements class shortly named :class:" +"`magic_filter.F` that's mean :code:`F` can be imported from :code:`aiogram` " +"or :code:`magic_filter`. :class:`F` is alias for :class:`MagicFilter`." +msgstr "" +"Пакет **magic_filter** реалізує клас із короткою назвою :class:`magic_filter." +"F`, тобто :code:`F` можна імпортувати з :code:`aiogram` або :code:" +"`magic_filter`. :class:`F` є псевдонімом для :class:`MagicFilter`." + +#: ../../dispatcher/filters/magic_filters.rst:23 +msgid "" +"Note that *aiogram* has an small extension over magic-filter and if you want " +"to use this extension you should import magic from *aiogram* instead of " +"*magic_filter* package" +msgstr "" +"Зауважте, що *aiogram* має невелике розширення для magic-filter, і якщо Ви " +"хочете використовувати це розширення, вам слід імпортувати магію з *aiogram* " +"замість пакета *magic_filter*" + +#: ../../dispatcher/filters/magic_filters.rst:25 +msgid "" +"The :class:`MagicFilter` object is callable, supports :ref:`some actions " +"` and memorize the attributes chain and the " +"action which should be checked on demand." +msgstr "" +"Об'єкт классу :class:`MagicFilter` можна викликати, підтримує :ref:`деякі " +"дії ` і запам’ятовує ланцюжок атрибутів і " +"дію, яку слід перевіряти на вимогу." + +#: ../../dispatcher/filters/magic_filters.rst:28 +msgid "" +"So that's mean you can chain attribute getters, describe simple data " +"validations and then call the resulted object passing single object as " +"argument, for example make attributes chain :code:`F.foo.bar.baz` then add " +"action ':code:`F.foo.bar.baz == 'spam'` and then call the resulted object - :" +"code:`(F.foo.bar.baz == 'spam').resolve(obj)`" +msgstr "" +"Тож це означає, що ви можете ланцюжком отримати атрибути, описати прості " +"перевірки даних, а потім викликати отриманий об’єкт, передаючи один об’єкт " +"як аргумент, наприклад, створити ланцюжок атрибутів :code:`F.foo.bar.baz`, а " +"потім додати дію ':code:`F.foo.bar.baz == 'spam'`, після чого викликати " +"отриманий об'єкт - :code:`(F.foo.bar.baz == 'spam').resolve(obj)`" + +#: ../../dispatcher/filters/magic_filters.rst:36 +msgid "Possible actions" +msgstr "Можливі дії" + +#: ../../dispatcher/filters/magic_filters.rst:38 +msgid "" +"Magic filter object supports some of basic logical operations over object " +"attributes" +msgstr "" +"Об'єкт магічного фільтра підтримує деякі основні логічні операції над " +"атрибутами об'єкта" + +#: ../../dispatcher/filters/magic_filters.rst:41 +msgid "Exists or not None" +msgstr "Атрибут існує, або не \"None\"" + +#: ../../dispatcher/filters/magic_filters.rst:43 +msgid "Default actions." +msgstr "Дії за замовчуванням." + +#: ../../dispatcher/filters/magic_filters.rst:50 +msgid "Equals" +msgstr "Перевірка на однаковість" + +#: ../../dispatcher/filters/magic_filters.rst:58 +msgid "Is one of" +msgstr "Перевірка на приналежність" + +#: ../../dispatcher/filters/magic_filters.rst:60 +msgid "" +"Can be used as method named :code:`in_` or as matmul operator :code:`@` with " +"any iterable" +msgstr "" +"Може використовуватися як метод із назвою :code:`in_` або як оператор " +"matmul :code:`@` з будь-яким ітерованим" + +#: ../../dispatcher/filters/magic_filters.rst:68 +msgid "Contains" +msgstr "Перевірка на наявність" + +#: ../../dispatcher/filters/magic_filters.rst:75 +msgid "String startswith/endswith" +msgstr "Рядок починається/закінчується на" + +#: ../../dispatcher/filters/magic_filters.rst:77 +msgid "Can be applied only for text attributes" +msgstr "Може застосовуватися лише для текстових атрибутів" + +#: ../../dispatcher/filters/magic_filters.rst:85 +msgid "Regexp" +msgstr "Перевірка регулярними виразами" + +#: ../../dispatcher/filters/magic_filters.rst:92 +msgid "Custom function" +msgstr "Власні функції" + +#: ../../dispatcher/filters/magic_filters.rst:94 +msgid "Accepts any callable. Callback will be called when filter checks result" +msgstr "Приймає будь-яку функцію" + +#: ../../dispatcher/filters/magic_filters.rst:101 +msgid "Inverting result" +msgstr "Інвертування результату" + +#: ../../dispatcher/filters/magic_filters.rst:103 +msgid "" +"Any of available operation can be inverted by bitwise inversion - :code:`~`" +msgstr "" +"Будь-яка доступна операція може бути інвертована за допомогою побітової " +"інверсії - :code:`~`" + +#: ../../dispatcher/filters/magic_filters.rst:111 +msgid "Combining" +msgstr "Комбінація" + +#: ../../dispatcher/filters/magic_filters.rst:113 +msgid "" +"All operations can be combined via bitwise and/or operators - :code:`&`/:" +"code:`|`" +msgstr "" +"Усі операції можна комбінувати за допомогою побітових і/або операторів - :" +"code:`&`/:code:`|`" + +#: ../../dispatcher/filters/magic_filters.rst:123 +msgid "Attribute modifiers - string manipulations" +msgstr "Модифікатори атрибутів - маніпуляції з рядками" + +#: ../../dispatcher/filters/magic_filters.rst:125 +msgid "Make text upper- or lower-case" +msgstr "Робить текст верхнім або нижнім регістром" + +#: ../../dispatcher/filters/magic_filters.rst:127 +msgid "Can be used only with string attributes." +msgstr "Можна використовувати лише з рядковими атрибутами." + +#: ../../dispatcher/filters/magic_filters.rst:137 +msgid "Get filter result as handler argument" +msgstr "Отримати результат фільтра як аргумент обробника" + +#: ../../dispatcher/filters/magic_filters.rst:139 +msgid "" +"This part is not available in *magic-filter* directly but can be used with " +"*aiogram*" +msgstr "" +"Ця частина недоступна безпосередньо в *magic-filter*, але її можна " +"використовувати з *aiogram*" + +#: ../../dispatcher/filters/magic_filters.rst:152 +msgid "Usage in *aiogram*" +msgstr "Використання в *aiogram*" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/text.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/text.po new file mode 100644 index 00000000..b5b6c91d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/text.po @@ -0,0 +1,130 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-01-07 23:01+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" + +#: ../../dispatcher/filters/text.rst:3 +msgid "Text" +msgstr "" + +#: aiogram.filters.text.Text:1 of +msgid "" +"Is useful for filtering text :class:`aiogram.types.message.Message`, any " +":class:`aiogram.types.callback_query.CallbackQuery` with `data`, " +":class:`aiogram.types.inline_query.InlineQuery` or " +":class:`aiogram.types.poll.Poll` question." +msgstr "" + +#: aiogram.filters.text.Text:7 of +msgid "" +"Only one of `text`, `contains`, `startswith` or `endswith` argument can " +"be used at once. Any of that arguments can be string, list, set or tuple " +"of strings." +msgstr "" + +#: aiogram.filters.text.Text:12 of +msgid "" +"use :ref:`magic-filter `. For example do :pycode:`F.text " +"== \"text\"` instead" +msgstr "" + +#: ../../dispatcher/filters/text.rst:10 +msgid "Can be imported:" +msgstr "" + +#: ../../dispatcher/filters/text.rst:12 +msgid ":code:`from aiogram.filters.text import Text`" +msgstr "" + +#: ../../dispatcher/filters/text.rst:13 +msgid ":code:`from aiogram.filters import Text`" +msgstr "" + +#: ../../dispatcher/filters/text.rst:16 +msgid "Usage" +msgstr "" + +#: ../../dispatcher/filters/text.rst:18 +msgid "" +"Text equals with the specified value: :code:`Text(text=\"text\") # value" +" == 'text'`" +msgstr "" + +#: ../../dispatcher/filters/text.rst:19 +msgid "" +"Text starts with the specified value: :code:`Text(startswith=\"text\") #" +" value.startswith('text')`" +msgstr "" + +#: ../../dispatcher/filters/text.rst:20 +msgid "" +"Text ends with the specified value: :code:`Text(endswith=\"text\") # " +"value.endswith('text')`" +msgstr "" + +#: ../../dispatcher/filters/text.rst:21 +msgid "" +"Text contains the specified value: :code:`Text(contains=\"text\") # " +"value in 'text'`" +msgstr "" + +#: ../../dispatcher/filters/text.rst:22 +msgid "" +"Any of previous listed filters can be list, set or tuple of strings " +"that's mean any of listed value should be " +"equals/startswith/endswith/contains: :code:`Text(text=[\"text\", " +"\"spam\"])`" +msgstr "" + +#: ../../dispatcher/filters/text.rst:23 +msgid "" +"Ignore case can be combined with any previous listed filter: " +":code:`Text(text=\"Text\", ignore_case=True) # value.lower() == " +"'text'.lower()`" +msgstr "" + +#: ../../dispatcher/filters/text.rst:26 +msgid "Allowed handlers" +msgstr "" + +#: ../../dispatcher/filters/text.rst:28 +msgid "Allowed update types for this filter:" +msgstr "" + +#: ../../dispatcher/filters/text.rst:30 +msgid ":code:`message`" +msgstr "" + +#: ../../dispatcher/filters/text.rst:31 +msgid ":code:`edited_message`" +msgstr "" + +#: ../../dispatcher/filters/text.rst:32 +msgid ":code:`channel_post`" +msgstr "" + +#: ../../dispatcher/filters/text.rst:33 +msgid ":code:`edited_channel_post`" +msgstr "" + +#: ../../dispatcher/filters/text.rst:34 +msgid ":code:`inline_query`" +msgstr "" + +#: ../../dispatcher/filters/text.rst:35 +msgid ":code:`callback_query`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/finite_state_machine/index.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/finite_state_machine/index.po new file mode 100644 index 00000000..626f5584 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/finite_state_machine/index.po @@ -0,0 +1,157 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"PO-Revision-Date: 2022-10-20 21:29+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" + +#: ../../dispatcher/finite_state_machine/index.rst:3 +msgid "Finite State Machine" +msgstr "Кінцевий автомат (FSM)" + +#: ../../dispatcher/finite_state_machine/index.rst:5 +msgid "" +"A finite-state machine (FSM) or finite-state automaton (FSA, plural: " +"automata), finite automaton, or simply a state machine, is a mathematical " +"model of computation." +msgstr "" +"Кінцевий автомат, кінцевий автоматон, або машина станів (FSM, FSA, finite " +"automaton, state machine) - це математична модель обчислень." + +#: ../../dispatcher/finite_state_machine/index.rst:8 +msgid "" +"It is an abstract machine that can be in exactly one of a finite number of " +"states at any given time. The FSM can change from one state to another in " +"response to some inputs; the change from one state to another is called a " +"transition." +msgstr "" +"Це абстрактна машина, яка може перебувати в одному зі скінченної кількості " +"станів у будь-який момент часу. Кінцевий автомат може переходити з одного " +"стану в інший у відповідь на деякі вхідні дані; перехід з одного стану в інший " +"називається переходом." + +#: ../../dispatcher/finite_state_machine/index.rst:12 +msgid "" +"An FSM is defined by a list of its states, its initial state, and the inputs " +"that trigger each transition." +msgstr "" +"Кінцевий автомат визначається списком його станів, початковим станом і " +"вхідними даними, які запускають кожен перехід." + +#: ../../dispatcher/finite_state_machine/index.rst:19 +msgid "Source: `WikiPedia `_" +msgstr "Джерело: `WikiPedia `_" + +#: ../../dispatcher/finite_state_machine/index.rst:22 +msgid "Usage example" +msgstr "Приклад використання" + +#: ../../dispatcher/finite_state_machine/index.rst:24 +msgid "" +"Not all functionality of the bot can be implemented as single handler, for " +"example you will need to collect some data from user in separated steps you " +"will need to use FSM." +msgstr "" +"Не всі функції бота можна реалізувати як єдиний обробник (handler), наприклад, " +"якщо Вам потрібно буде збирати деякі дані від користувача в окремих кроках, " +"вам потрібно буде використовувати FSM." + +#: ../../dispatcher/finite_state_machine/index.rst:-1 +msgid "FSM Example" +msgstr "Приклад кінцевого автомату" + +#: ../../dispatcher/finite_state_machine/index.rst:31 +msgid "Let's see how to do that step-by-step" +msgstr "Гайда, подивимось як реалізувати це крок за кроком" + +#: ../../dispatcher/finite_state_machine/index.rst:34 +msgid "Step by step" +msgstr "Крок за кроком" + +#: ../../dispatcher/finite_state_machine/index.rst:36 +msgid "" +"Before handle any states you will need to specify what kind of states you want " +"to handle" +msgstr "" +"Перед обробкою будь-яких станів Вам потрібно буде вказати тип станів, які Ви " +"хочете обробляти" + +#: ../../dispatcher/finite_state_machine/index.rst:44 +msgid "And then write handler for each state separately from the start of dialog" +msgstr "" +"А потім напишіть обробник (handler) для кожного стану окремо від початку " +"діалогу" + +#: ../../dispatcher/finite_state_machine/index.rst:46 +msgid "" +"Here is dialog can be started only via command :code:`/start`, so lets handle " +"it and make transition user to state :code:`Form.name`" +msgstr "" +"Тут діалог можна почати лише за допомогою команди :code:`/start`, тому давайте " +"обробимо її та зробимо перехід користувача до стану :code:`Form.name`" + +#: ../../dispatcher/finite_state_machine/index.rst:54 +msgid "" +"After that you will need to save some data to the storage and make transition " +"to next step." +msgstr "" +"Після цього Вам потрібно буде зберегти деякі дані в пам’яті та перейти до " +"наступного кроку." + +#: ../../dispatcher/finite_state_machine/index.rst:62 +msgid "" +"At the next steps user can make different answers, it can be `yes`, `no` or " +"any other" +msgstr "" +"На наступних кроках користувач може дати різні відповіді, це може бути «так», " +"«ні» або будь-що інше" + +#: ../../dispatcher/finite_state_machine/index.rst:64 +msgid "Handle :code:`yes` and soon we need to handle :code:`Form.language` state" +msgstr "" +"Обробка :code:`yes` і скоро нам потрібно буде обробити стан :code:`Form." +"language`" + +#: ../../dispatcher/finite_state_machine/index.rst:72 +msgid "Handle :code:`no`" +msgstr "Обробка :code:`no`" + +#: ../../dispatcher/finite_state_machine/index.rst:80 +msgid "And handle any other answers" +msgstr "І обробка будь-яких інших відповідей" + +#: ../../dispatcher/finite_state_machine/index.rst:88 +msgid "" +"All possible cases of `like_bots` step was covered, let's implement finally " +"step" +msgstr "" +"Всі можливі випадки кроку `like_bots` було розглянуто, нумо реалізуємо " +"останній крок" + +#: ../../dispatcher/finite_state_machine/index.rst:96 +msgid "" +"And now you have covered all steps from the image, but you can make " +"possibility to cancel conversation, lets do that via command or text" +msgstr "" +"І тепер Ви виконали всі кроки на зображенні, але ви можете зробити можливість " +"скасувати діалог, давайте зробимо це за допомогою команди або тексту" + +#: ../../dispatcher/finite_state_machine/index.rst:105 +msgid "Complete example" +msgstr "Повний приклад" + +#: ../../dispatcher/finite_state_machine/index.rst:112 +msgid "Read more" +msgstr "Читайте також" 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 new file mode 100644 index 00000000..3cef578c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/finite_state_machine/scene.po @@ -0,0 +1,836 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +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: 2023-11-23 01:27+0200\n" +"Last-Translator: \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/scene.rst:5 +msgid "Scenes Wizard" +msgstr "Майcтер сцен" + +#: ../../dispatcher/finite_state_machine/scene.rst:11 +msgid "This feature is experimental and may be changed in future versions." +msgstr "" +"Дана фіча є експериментальною, тому у наступних оновленнях може " +"змінюватись." + +#: ../../dispatcher/finite_state_machine/scene.rst:13 +msgid "" +"**aiogram's** basics API is easy to use and powerful, allowing the " +"implementation of simple interactions such as triggering a command or " +"message for a response. However, certain tasks require a dialogue between" +" the user and the bot. This is where Scenes come into play." +msgstr "" +"Базовий інтерфейс **aiogram**-у простий та потужний у використанні, що " +"дозволяє реалізувати прості взаємодії, такі як обробка команд або " +"повідомлень і відповідей. Однак деякі завдання вимагають поетапного " +"діалогу між користувачем і ботом. Ось де сцени вступають у гру." + +#: ../../dispatcher/finite_state_machine/scene.rst:20 +msgid "Understanding Scenes" +msgstr "Що ж таке сцени?" + +#: ../../dispatcher/finite_state_machine/scene.rst:22 +msgid "" +"A Scene in **aiogram** is like an abstract, isolated namespace or room " +"that a user can be ushered into via the code. When a user is within a " +"Scene, most other global commands or message handlers are bypassed, " +"unless they are specifically designed to function outside of the Scenes. " +"This helps in creating an experience of focused interactions. Scenes " +"provide a structure for more complex interactions, effectively isolating " +"and managing contexts for different stages of the conversation. They " +"allow you to control and manage the flow of the conversation in a more " +"organized manner." +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\" 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." +msgstr "" +"У кожну сцену можна \"увійти\", \"покинути\" або \"вийти\", що забезпечує" +" чіткі переходи між різними етапами розмови. Наприклад, у багатоетапній " +"взаємодії заповнення форми кожен крок може бути сценою - бот направляє " +"користувача від однієї сцени до наступної, коли вони надають необхідну " +"інформацію." + +#: ../../dispatcher/finite_state_machine/scene.rst:39 +msgid "Scene Listeners" +msgstr "Слухачі подій" + +#: ../../dispatcher/finite_state_machine/scene.rst:41 +msgid "" +"Scenes have their own hooks which are command or message listeners that " +"only act while the user is within the Scene. These hooks react to user " +"actions while the user is 'inside' the Scene, providing the responses or " +"actions appropriate for that context. When the user is ushered from one " +"Scene to another, the actions and responses change accordingly as the " +"user is now interacting with the set of listeners inside the new Scene. " +"These 'Scene-specific' hooks or listeners, detached from the global " +"listening context, allow for more streamlined and organized bot-user " +"interactions." +msgstr "" +"Сцени мають власні хуки, які є слухачами команд або повідомлень, які " +"діють лише тоді, коли користувач знаходиться всередині сцени. Ці хуки " +"реагують на дії користувача, коли користувач перебуває «всередині» Сцени," +" надаючи відповіді або дії, відповідні цьому контексту. Коли користувач " +"переходить від однієї сцени до іншої, дії та відповіді відповідно " +"змінюються, оскільки користувач тепер взаємодіє з групою слухачів у новій" +" сцені. Ці «специфічні для сцени» хуки або слухачі, відірвані від " +"глобального контексту прослуховування, дозволяють більш оптимізовану та " +"організовану взаємодію бот-користувач." + +#: ../../dispatcher/finite_state_machine/scene.rst:52 +msgid "Scene Interactions" +msgstr "Взаємодія" + +#: ../../dispatcher/finite_state_machine/scene.rst:54 +msgid "" +"Each Scene is like a self-contained world, with interactions defined " +"within the scope of that Scene. As such, only the handlers defined within" +" the specific Scene will react to user's input during the lifecycle of " +"that Scene." +msgstr "" +"Кожна сцена схожа на самодостатній світ із взаємодіями, визначеними в " +"межах цієї сцени. Таким чином, лише обробники, визначені в конкретній " +"сцені, реагуватимуть на введення користувача протягом життєвого циклу " +"цієї сцени." + +#: ../../dispatcher/finite_state_machine/scene.rst:60 +msgid "Scene Benefits" +msgstr "Переваги" + +#: ../../dispatcher/finite_state_machine/scene.rst:62 +msgid "" +"Scenes can help manage more complex interaction workflows and enable more" +" interactive and dynamic dialogs between the user and the bot. This " +"offers great flexibility in handling multi-step interactions or " +"conversations with the users." +msgstr "" +"Сцени можуть допомогти керувати більш складними робочими процесами " +"взаємодії та забезпечити більш інтерактивні та динамічні діалоги між " +"користувачем і ботом. Це забезпечує велику гнучкість у обробці " +"багатоетапних взаємодій або розмов з користувачами." + +#: ../../dispatcher/finite_state_machine/scene.rst:67 +msgid "How to use Scenes" +msgstr "Як це використовувати?" + +#: ../../dispatcher/finite_state_machine/scene.rst:69 +msgid "" +"For example we have a quiz bot, which asks the user a series of questions" +" and then displays the results." +msgstr "" +"Наприклад, у нас є тестовий бот, який задає користувачеві серію запитань," +" а потім відображає результати - назвемо його гра-вікторина." + +#: ../../dispatcher/finite_state_machine/scene.rst:71 +msgid "" +"Lets start with the data models, in this example simple data models are " +"used to represent the questions and answers, in real life you would " +"probably use a database to store the data." +msgstr "" +"Почнемо з моделей даних. У цьому прикладі прості моделі даних " +"використовуються для представлення запитань і відповідей, у реальному " +"житті ви, ймовірно, використовували б базу даних для зберігання даних." + +#: ../../dispatcher/finite_state_machine/scene.rst:74 +msgid "Questions list" +msgstr "Запитання" + +#: ../../dispatcher/finite_state_machine/scene.rst:79 +msgid "" +"Then, we need to create a Scene class that will represent the quiz game " +"scene:" +msgstr "" +"Потім нам потрібно створити клас Scene, який представлятиме сцену " +"вікторини:" + +#: ../../dispatcher/finite_state_machine/scene.rst:83 +msgid "" +"Keyword argument passed into class definition describes the scene name - " +"is the same as state of the scene." +msgstr "" +"Іменований аргумент, переданий у визначення класу, описує ім'я сцени - те" +" саме, що стан сцени." + +#: ../../dispatcher/finite_state_machine/scene.rst:85 +msgid "Quiz Scene" +msgstr "Сцена вікторини" + +#: ../../dispatcher/finite_state_machine/scene.rst:93 +msgid "Also we need to define a handler that helps to start the quiz game:" +msgstr "Також нам потрібно визначити обробник, який допоможе запустити вікторину:" + +#: ../../dispatcher/finite_state_machine/scene.rst:95 +msgid "Start command handler" +msgstr "Обробник для запуску вікторини" + +#: ../../dispatcher/finite_state_machine/scene.rst:100 +msgid "Once the scene is defined, we need to register it in the SceneRegistry:" +msgstr "Після визначення сцени нам потрібно зареєструвати її в SceneRegistry:" + +#: ../../dispatcher/finite_state_machine/scene.rst:102 +msgid "Registering the scene" +msgstr "Реєстрація сцени" + +#: ../../dispatcher/finite_state_machine/scene.rst:107 +msgid "" +"So, now we can implement the quiz game logic, each question is sent to " +"the user one by one, and the user's answer is checked at the end of all " +"questions." +msgstr "" +"Отже, тепер ми можемо реалізувати логіку гри-вікторини, кожне запитання " +"надсилається користувачеві одне за одним, а відповідь користувача " +"перевіряється в кінці всіх запитань." + +#: ../../dispatcher/finite_state_machine/scene.rst:110 +msgid "Now we need to write an entry point for the question handler:" +msgstr "Тепер нам потрібно написати точку входу для обробника запитань:" + +#: ../../dispatcher/finite_state_machine/scene.rst:112 +msgid "Question handler entry point" +msgstr "Точка входу обробника запитань" + +#: ../../dispatcher/finite_state_machine/scene.rst:118 +msgid "" +"Once scene is entered, we should expect the user's answer, so we need to " +"write a handler for it, this handler should expect the text message, save" +" the answer and retake the question handler for the next question:" +msgstr "" +"Після входу в сцену ми маємо очікувати відповіді користувача, тому нам " +"потрібно написати для неї обробник, цей обробник має очікувати текстове " +"повідомлення, зберегти відповідь і повторно виконати обробник запитання " +"для наступного запитання:" + +#: ../../dispatcher/finite_state_machine/scene.rst:122 +msgid "Answer handler" +msgstr "Обробник відповідей" + +#: ../../dispatcher/finite_state_machine/scene.rst:127 +msgid "" +"When user answer with unknown message, we should expect the text message " +"again:" +msgstr "" +"Коли користувач відповідає невідомим повідомленням, ми повинні знову " +"очікувати текстове повідомлення:" + +#: ../../dispatcher/finite_state_machine/scene.rst:129 +msgid "Unknown message handler" +msgstr "Невідомий обробник повідомлень" + +#: ../../dispatcher/finite_state_machine/scene.rst:134 +msgid "" +"When all questions are answered, we should show the results to the user, " +"as you can see in the code below, we use `await self.wizard.exit()` to " +"exit from the scene when questions list is over in the " +"`QuizScene.on_enter` handler." +msgstr "" +"Після відповіді на всі запитання ми маємо показати результати " +"користувачеві, як ви можете бачити в коді нижче, ми використовуємо `await" +" self.wizard.exit()`, щоб вийти зі сцени, коли список запитань у " +"`QuizScene» закінчено .on_enter` обробник." + +#: ../../dispatcher/finite_state_machine/scene.rst:137 +msgid "" +"Thats means that we need to write an exit handler to show the results to " +"the user:" +msgstr "" +"Це означає, що нам потрібно написати обробник виходу, щоб показати " +"результати користувачеві:" + +#: ../../dispatcher/finite_state_machine/scene.rst:139 +msgid "Show results handler" +msgstr "Обробник показу результатів" + +#: ../../dispatcher/finite_state_machine/scene.rst:144 +msgid "" +"Also we can implement a actions to exit from the quiz game or go back to " +"the previous question:" +msgstr "" +"Також ми можемо виконати дії для виходу з вікторини або повернення до " +"попереднього запитання:" + +#: ../../dispatcher/finite_state_machine/scene.rst:146 +msgid "Exit handler" +msgstr "Обробник виходу" + +#: ../../dispatcher/finite_state_machine/scene.rst:151 +msgid "Back handler" +msgstr "Обробник дії \"повернутись\"" + +#: ../../dispatcher/finite_state_machine/scene.rst:156 +msgid "Now we can run the bot and test the quiz game:" +msgstr "Тепер ми можемо запустити бота і протестувати гру-вікторину:" + +#: ../../dispatcher/finite_state_machine/scene.rst:158 +msgid "Run the bot" +msgstr "Запустіть бота" + +#: ../../dispatcher/finite_state_machine/scene.rst:163 +msgid "Complete them all" +msgstr "Зберемо все разом" + +#: ../../dispatcher/finite_state_machine/scene.rst:165 +msgid "Quiz Example" +msgstr "Приклад вікторини" + +#: ../../dispatcher/finite_state_machine/scene.rst:171 +msgid "Components" +msgstr "Компоненти" + +#: ../../dispatcher/finite_state_machine/scene.rst:173 +msgid ":class:`aiogram.fsm.scene.Scene` - represents a scene, contains handlers" +msgstr ":class:`aiogram.fsm.scene.Scene` - представляє сцену, містить обробники" + +#: ../../dispatcher/finite_state_machine/scene.rst:174 +msgid "" +":class:`aiogram.fsm.scene.SceneRegistry` - container for all scenes in " +"the bot, used to register scenes and resolve them by name" +msgstr "" +":class:`aiogram.fsm.scene.SceneRegistry` - контейнер для всіх сцен у " +"боті, використовується для реєстрації сцен та їх вирішення за назвою" + +#: ../../dispatcher/finite_state_machine/scene.rst:175 +msgid "" +":class:`aiogram.fsm.scene.ScenesManager` - manages scenes for each user, " +"used to enter, leave and resolve current scene for user" +msgstr "" +":class:`aiogram.fsm.scene.ScenesManager` - керує сценами для кожного " +"користувача, використовується для входу, виходу та вирішення поточної " +"сцени для користувача" + +#: ../../dispatcher/finite_state_machine/scene.rst:176 +msgid "" +":class:`aiogram.fsm.scene.SceneConfig` - scene configuration, used to " +"configure scene" +msgstr "" +":class:`aiogram.fsm.scene.SceneConfig` - конфігурація сцени, " +"використовується для налаштування сцени" + +#: ../../dispatcher/finite_state_machine/scene.rst:177 +msgid "" +":class:`aiogram.fsm.scene.SceneWizard` - scene wizard, used to interact " +"with user in scene from active scene handler" +msgstr "" +":class:`aiogram.fsm.scene.SceneWizard` - майстер сцени, який " +"використовується для взаємодії з користувачем у сцені з активного " +"обробника сцени" + +#: ../../dispatcher/finite_state_machine/scene.rst:178 +msgid "Markers - marker for scene handlers, used to mark scene handlers" +msgstr "" +"Markers - маркер для обробників сцен, використовується для позначення " +"обробників сцен" + +#: aiogram.fsm.scene.Scene:1 of +msgid "Represents a scene in a conversation flow." +msgstr "Представляє крок в діалозі." + +#: aiogram.fsm.scene.Scene:3 of +msgid "" +"A scene is a specific state in a conversation where certain actions can " +"take place." +msgstr "Сцена — це певний стан розмови, де можуть відбуватися певні дії." + +#: aiogram.fsm.scene.Scene:5 of +msgid "" +"Each scene has a set of filters that determine when it should be " +"triggered, and a set of handlers that define the actions to be executed " +"when the scene is active." +msgstr "" +"Кожна сцена має набір фільтрів, які визначають, коли вона має бути " +"запущена, і набір обробників, які визначають дії, які мають виконуватися," +" коли сцена активна." + +#: aiogram.fsm.scene.Scene:9 of +msgid "" +"This class is not meant to be used directly. Instead, it should be " +"subclassed to define custom scenes." +msgstr "" +"Цей клас не призначений для безпосереднього використання. Замість цього " +"слід створити підкласи для визначення власних сцен." + +#: aiogram.fsm.scene.Scene.add_to_router:1 of +msgid "Adds the scene to the given router." +msgstr "Додає сцену до заданого маршрутизатора." + +#: ../../dispatcher/finite_state_machine/scene.rst +msgid "Parameters" +msgstr "Параметри" + +#: ../../dispatcher/finite_state_machine/scene.rst +msgid "Returns" +msgstr "Повертає" + +#: aiogram.fsm.scene.Scene.as_handler:1 of +msgid "" +"Create an entry point handler for the scene, can be used to simplify the " +"handler that starts the scene." +msgstr "" +"Створіть обробник точки входу для сцени, який можна використовувати для " +"спрощення обробника, який запускає сцену." + +#: aiogram.fsm.scene.Scene.as_router:1 of +msgid "Returns the scene as a router." +msgstr "Returns the scene as a router." + +#: aiogram.fsm.scene.Scene.as_router:3 of +msgid "new router" +msgstr "новий роутер" + +#: aiogram.fsm.scene.SceneRegistry:1 of +msgid "A class that represents a registry for scenes in a Telegram bot." +msgstr "Клас, який представляє реєстр для сцен." + +#: aiogram.fsm.scene.SceneRegistry.add:1 of +msgid "" +"This method adds the specified scenes to the registry and optionally " +"registers it to the router." +msgstr "" +"Цей метод додає вказані сцени до реєстру та додатково реєструє їх на " +"маршрутизаторі." + +#: aiogram.fsm.scene.SceneRegistry.add:4 of +msgid "" +"If a scene with the same state already exists in the registry, a " +"SceneException is raised." +msgstr "" +"Якщо сцена з таким самим станом уже існує в реєстрі, виникає " +"SceneException." + +#: aiogram.fsm.scene.SceneRegistry.add:8 of +msgid "" +"If the router is not specified, the scenes will not be registered to the " +"router. You will need to include the scenes manually to the router or use" +" the register method." +msgstr "" +"If the router is not specified, the scenes will not be registered to the " +"router. You will need to include the scenes manually to the router or use" +" the register method." + +#: aiogram.fsm.scene.SceneRegistry.add:11 of +msgid "" +"A variable length parameter that accepts one or more types of scenes. " +"These scenes are instances of the Scene class." +msgstr "" +"Параметр змінної довжини, який приймає один або кілька типів сцен. Ці " +"сцени є екземплярами класу Scene." + +#: aiogram.fsm.scene.SceneRegistry.add:13 of +msgid "" +"An optional parameter that specifies the router to which the scenes " +"should be added." +msgstr "" +"Додатковий параметр, який визначає маршрутизатор, до якого слід додати " +"сцени." + +#: aiogram.fsm.scene.SceneRegistry.add:15 +#: aiogram.fsm.scene.SceneRegistry.register:4 +#: aiogram.fsm.scene.SceneWizard.back:4 +#: aiogram.fsm.scene.SceneWizard.clear_data:3 +#: aiogram.fsm.scene.SceneWizard.enter:6 aiogram.fsm.scene.SceneWizard.exit:4 +#: aiogram.fsm.scene.SceneWizard.goto:9 aiogram.fsm.scene.SceneWizard.leave:6 +#: aiogram.fsm.scene.SceneWizard.retake:4 +#: aiogram.fsm.scene.SceneWizard.set_data:4 +#: aiogram.fsm.scene.ScenesManager.close:4 +#: aiogram.fsm.scene.ScenesManager.enter:7 of +msgid "None" +msgstr "" + +#: aiogram.fsm.scene.SceneRegistry.get:1 of +msgid "" +"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 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." +msgstr "" +"Цей метод повертає зареєстрований об’єкт Scene для вказаної сцени. " +"Параметром сцени може бути або об’єкт Scene, або рядок, що представляє " +"назву сцени. Якщо надається об’єкт Scene, атрибут стану об’єкта " +"SceneConfig, пов’язаного з об’єктом Scene, використовуватиметься як ім’я " +"сцени. Якщо вказано None або недійсний тип, буде викликано " +"SceneException." + +#: aiogram.fsm.scene.SceneRegistry.get:7 of +msgid "" +"If the specified scene is not registered in the SceneRegistry object, a " +"SceneException will be raised." +msgstr "" +"Якщо вказану сцену не зареєстровано в об’єкті SceneRegistry, буде " +"породжено помилку SceneException." + +#: aiogram.fsm.scene.SceneRegistry.get:10 of +msgid "A Scene object or a string representing the name of the scene." +msgstr "Об’єкт Scene або рядок, що представляє назву сцени." + +#: aiogram.fsm.scene.SceneRegistry.get:11 of +msgid "The registered Scene object corresponding to the given scene parameter." +msgstr "Зареєстрований об’єкт Scene, що відповідає даному параметру сцени." + +#: aiogram.fsm.scene.SceneRegistry.register:1 of +msgid "Registers one or more scenes to the SceneRegistry." +msgstr "Реєструє одну або кілька сцен у SceneRegistry." + +#: aiogram.fsm.scene.SceneRegistry.register:3 of +msgid "One or more scene classes to register." +msgstr "Один або кілька класів сцен для реєстрації." + +#: aiogram.fsm.scene.ScenesManager:1 of +msgid "" +"The ScenesManager class is responsible for managing scenes in an " +"application. It provides methods for entering and exiting scenes, as well" +" as retrieving the active scene." +msgstr "" +"Клас ScenesManager відповідає за керування сценами в програмі. Він надає " +"методи входу та виходу зі сцен, а також відновлення активної сцени." + +#: aiogram.fsm.scene.ScenesManager.close:1 of +msgid "" +"Close method is used to exit the currently active scene in the " +"ScenesManager." +msgstr "" +"Метод Close використовується для виходу з поточної активної сцени в " +"ScenesManager." + +#: aiogram.fsm.scene.ScenesManager.close:3 of +msgid "Additional keyword arguments passed to the scene's exit method." +msgstr "Додаткові аргументи ключового слова, передані в метод виходу сцени." + +#: aiogram.fsm.scene.ScenesManager.enter:1 of +msgid "Enters the specified scene." +msgstr "Виходить на вказану сцену." + +#: aiogram.fsm.scene.ScenesManager.enter:3 of +msgid "Optional Type[Scene] or str representing the scene type to enter." +msgstr "" +"Додатково Type[Scene] або str, що представляє тип сцени, який потрібно " +"ввести." + +#: aiogram.fsm.scene.ScenesManager.enter:4 of +msgid "" +"Optional bool indicating whether to check if there is an active scene to " +"exit before entering the new scene. Defaults to True." +msgstr "" +"Необов’язковий параметр, що вказує, чи перевіряти наявність активної " +"сцени для виходу перед входом у нову сцену. За замовчуванням значення " +"True." + +#: aiogram.fsm.scene.ScenesManager.enter:6 of +msgid "Additional keyword arguments to pass to the scene's wizard.enter() method." +msgstr "Додаткові іменовані аргументи для передачі в метод wizard.enter() сцени." + +#: ../../docstring aiogram.fsm.scene.SceneConfig.actions:1 of +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" +msgstr "Створювати обробники кнопок без перевірки стану поточної сцени" + +#: ../../docstring aiogram.fsm.scene.SceneConfig.handlers:1 of +msgid "Scene handlers" +msgstr "Обробники сцени" + +#: ../../docstring aiogram.fsm.scene.SceneConfig.reset_data_on_enter:1 of +msgid "Reset scene data on enter" +msgstr "Скинути дані сцени після входу" + +#: ../../docstring aiogram.fsm.scene.SceneConfig.reset_history_on_enter:1 of +msgid "Reset scene history on enter" +msgstr "Скинути історію сцени під час входу" + +#: ../../docstring aiogram.fsm.scene.SceneConfig.state:1 of +msgid "Scene state" +msgstr "Стан сцени" + +#: aiogram.fsm.scene.SceneWizard:1 of +msgid "A class that represents a wizard for managing scenes in a Telegram bot." +msgstr "Клас, який представляє майстер сцен." + +#: aiogram.fsm.scene.SceneWizard:3 of +msgid "" +"Instance of this class is passed to each scene as a parameter. So, you " +"can use it to transition between scenes, get and set data, etc." +msgstr "" +"Екземпляр цього класу передається кожній сцені як параметр. Отже, ви " +"можете використовувати його для переходу між сценами, отримання та " +"встановлення даних тощо." + +#: aiogram.fsm.scene.SceneWizard:8 of +msgid "" +"This class is not meant to be used directly. Instead, it should be used " +"as a parameter in the scene constructor." +msgstr "" +"Цей клас не призначений для безпосереднього використання. Натомість його " +"слід використовувати як параметр у конструкторі сцени." + +#: aiogram.fsm.scene.SceneWizard.back:1 of +msgid "This method is used to go back to the previous scene." +msgstr "Цей метод використовується для повернення до попередньої сцени." + +#: aiogram.fsm.scene.SceneWizard.back:3 of +msgid "Keyword arguments that can be passed to the method." +msgstr "Аргументи ключових слів, які можна передати в метод." + +#: aiogram.fsm.scene.SceneWizard.clear_data:1 of +msgid "Clears the data." +msgstr "Очищає дані." + +#: aiogram.fsm.scene.SceneWizard.enter:1 of +msgid "" +"Enter method is used to transition into a scene in the SceneWizard class." +" It sets the state, clears data and history if specified, and triggers " +"entering event of the scene." +msgstr "" +"Метод Enter використовується для переходу в сцену в класі SceneWizard. " +"Він встановлює стан, очищає дані та історію, якщо вказано, і запускає " +"введення події сцени." + +#: aiogram.fsm.scene.SceneWizard.enter:5 aiogram.fsm.scene.SceneWizard.exit:3 +#: aiogram.fsm.scene.SceneWizard.leave:5 of +msgid "Additional keyword arguments." +msgstr "Додаткові іменовані аргументи." + +#: aiogram.fsm.scene.SceneWizard.exit:1 of +msgid "Exit the current scene and enter the default scene/state." +msgstr "Вийти з поточної сцени та перейти до стандартного стану чи сцени." + +#: aiogram.fsm.scene.SceneWizard.get_data:1 of +msgid "This method returns the data stored in the current state." +msgstr "Цей метод повертає дані, що зберігаються в поточному стані." + +#: aiogram.fsm.scene.SceneWizard.get_data:3 of +msgid "A dictionary containing the data stored in the scene state." +msgstr "Словник, що містить дані, що зберігаються в стані сцени." + +#: aiogram.fsm.scene.SceneWizard.goto:1 of +msgid "" +"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." +msgstr "" +"Метод `goto` переходить до нової сцени. Спочатку він викликає метод " +"`leave`, щоб виконати будь-яке необхідне очищення в поточній сцені, а " +"потім викликає подію `enter`, щоб увійти до вказаної сцени." + +#: aiogram.fsm.scene.SceneWizard.goto:5 of +msgid "" +"The scene to transition to. Can be either a `Scene` instance or a string " +"representing the scene." +msgstr "" +"Сцена для переходу. Може бути екземпляром `Scene` або рядком, що " +"представляє сцену." + +#: aiogram.fsm.scene.SceneWizard.goto:7 of +msgid "" +"Additional keyword arguments to pass to the `enter` method of the scene " +"manager." +msgstr "Додаткові іменовані аргументи для точки входу до `enter` менеджера сцен." + +#: aiogram.fsm.scene.SceneWizard.leave:1 of +msgid "" +"Leaves the current scene. This method is used to exit a scene and " +"transition to the next scene." +msgstr "" +"Залишає поточну сцену. Цей метод використовується для виходу зі сцени та " +"переходу до наступної сцени." + +#: aiogram.fsm.scene.SceneWizard.leave:4 of +msgid "Whether to include history in the snapshot. Defaults to True." +msgstr "Чи включати історію в знімок. За замовчуванням значення True." + +#: aiogram.fsm.scene.SceneWizard.retake:1 of +msgid "This method allows to re-enter the current scene." +msgstr "Цей метод дозволяє повторно увійти до поточної сцени." + +#: aiogram.fsm.scene.SceneWizard.retake:3 of +msgid "Additional keyword arguments to pass to the scene." +msgstr "Додаткові іменовані аргументи для передачі до сцени." + +#: aiogram.fsm.scene.SceneWizard.set_data:1 of +msgid "Sets custom data in the current state." +msgstr "Встановлює настроювані дані в поточний стан." + +#: aiogram.fsm.scene.SceneWizard.set_data:3 of +msgid "A dictionary containing the custom data to be set in the current state." +msgstr "" +"Словник, що містить настроювані дані, які потрібно встановити в поточному" +" стані." + +#: aiogram.fsm.scene.SceneWizard.update_data:1 of +msgid "This method updates the data stored in the current state" +msgstr "Цей метод оновлює дані, що зберігаються в поточному стані" + +#: aiogram.fsm.scene.SceneWizard.update_data:3 of +msgid "Optional dictionary of data to update." +msgstr "Додатковий словник даних для оновлення." + +#: aiogram.fsm.scene.SceneWizard.update_data:4 of +msgid "Additional key-value pairs of data to update." +msgstr "Додаткові пари ключ-значення даних для оновлення." + +#: aiogram.fsm.scene.SceneWizard.update_data:5 of +msgid "Dictionary of updated data" +msgstr "Словник оновлених даних" + +#: ../../dispatcher/finite_state_machine/scene.rst:197 +msgid "Markers" +msgstr "Маркери" + +#: ../../dispatcher/finite_state_machine/scene.rst:199 +msgid "" +"Markers are similar to the Router event registering mechanism, but they " +"are used to mark scene handlers in the Scene class." +msgstr "" +"Маркери подібні до механізму реєстрації подій Router, але вони " +"використовуються для позначення обробників сцени в класі Scene." + +#: ../../dispatcher/finite_state_machine/scene.rst:202 +msgid "" +"It can be imported from :code:`from aiogram.fsm.scene import on` and " +"should be used as decorator." +msgstr "" +"Його можна імпортувати з :code:`from aiogram.fsm.scene import on` і слід " +"використовувати як декоратор." + +#: ../../dispatcher/finite_state_machine/scene.rst:204 +msgid "Allowed event types:" +msgstr "Дозволені типи подій:" + +#: ../../dispatcher/finite_state_machine/scene.rst:206 +msgid "message" +msgstr "" + +#: ../../dispatcher/finite_state_machine/scene.rst:207 +msgid "edited_message" +msgstr "" + +#: ../../dispatcher/finite_state_machine/scene.rst:208 +msgid "channel_post" +msgstr "" + +#: ../../dispatcher/finite_state_machine/scene.rst:209 +msgid "edited_channel_post" +msgstr "" + +#: ../../dispatcher/finite_state_machine/scene.rst:210 +msgid "inline_query" +msgstr "" + +#: ../../dispatcher/finite_state_machine/scene.rst:211 +msgid "chosen_inline_result" +msgstr "" + +#: ../../dispatcher/finite_state_machine/scene.rst:212 +msgid "callback_query" +msgstr "" + +#: ../../dispatcher/finite_state_machine/scene.rst:213 +msgid "shipping_query" +msgstr "" + +#: ../../dispatcher/finite_state_machine/scene.rst:214 +msgid "pre_checkout_query" +msgstr "" + +#: ../../dispatcher/finite_state_machine/scene.rst:215 +msgid "poll" +msgstr "" + +#: ../../dispatcher/finite_state_machine/scene.rst:216 +msgid "poll_answer" +msgstr "" + +#: ../../dispatcher/finite_state_machine/scene.rst:217 +msgid "my_chat_member" +msgstr "" + +#: ../../dispatcher/finite_state_machine/scene.rst:218 +msgid "chat_member" +msgstr "" + +#: ../../dispatcher/finite_state_machine/scene.rst:219 +msgid "chat_join_request" +msgstr "" + +#: ../../dispatcher/finite_state_machine/scene.rst:221 +msgid "Each event type can be filtered in the same way as in the Router." +msgstr "Кожен тип події можна відфільтрувати так само, як і в маршрутизаторі." + +#: ../../dispatcher/finite_state_machine/scene.rst:223 +msgid "" +"Also each event type can be marked as scene entry point, exit point or " +"leave point." +msgstr "" +"Також кожен тип події можна позначити як точку входу в сцену, точку " +"виходу або точку переходу." + +#: ../../dispatcher/finite_state_machine/scene.rst:225 +msgid "" +"If you want to mark the scene can be entered from message or inline " +"query, you should use :code:`on.message` or :code:`on.inline_query` " +"marker:" +msgstr "" +"Якщо ви хочете позначити, що до сцени можна потрапити з повідомлення або " +"ін-лайн кнопки, вам слід використовувати маркер :code:`on.message` або " +":code:`on.inline_query`:" + +#: ../../dispatcher/finite_state_machine/scene.rst:240 +#, fuzzy +msgid "Scene has only three points for transitions:" +msgstr "Сцени мають три точки для переходів:" + +#: ../../dispatcher/finite_state_machine/scene.rst:242 +msgid "enter point - when user enters to the scene" +msgstr "Точка входу - коли користувач входить до сцени" + +#: ../../dispatcher/finite_state_machine/scene.rst:243 +msgid "leave point - when user leaves the scene and the enter another scene" +msgstr "Точка переходу - коли користувач переходить до іншої сцени" + +#: ../../dispatcher/finite_state_machine/scene.rst:244 +msgid "exit point - when user exits from the scene" +msgstr "Точка виходу - коли користувач завершує сцену" 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 new file mode 100644 index 00000000..d53b943c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/finite_state_machine/storages.po @@ -0,0 +1,261 @@ +# 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: 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.13.1\n" + +#: ../../dispatcher/finite_state_machine/storages.rst:3 +msgid "Storages" +msgstr "" + +#: ../../dispatcher/finite_state_machine/storages.rst:6 +msgid "Storages out of the box" +msgstr "" + +#: ../../dispatcher/finite_state_machine/storages.rst:9 +msgid "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 "" + +#: 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 "" + +#: ../../dispatcher/finite_state_machine/storages.rst:16 +msgid "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`)" + +#: ../../dispatcher/finite_state_machine/storages.rst +msgid "Parameters" +msgstr "" + +#: aiogram.fsm.storage.redis.RedisStorage.__init__:1 of +msgid "Instance of Redis connection" +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 "конструктор, який допомагає конвертувати контекстний ключ у рядок" + +#: aiogram.fsm.storage.redis.RedisStorage.__init__:3 of +msgid "TTL for state records" +msgstr "Час життя (TTL) для записів стану" + +#: aiogram.fsm.storage.redis.RedisStorage.__init__:4 of +msgid "TTL for data records" +msgstr "Час життя (TTL) для записів даних" + +#: aiogram.fsm.storage.redis.RedisStorage.from_url:1 of +msgid "" +"Create an instance of :class:`RedisStorage` with specifying the " +"connection string" +msgstr "Створити екземпляр :class:`RedisStorage`, вказавши строку підключення" + +#: aiogram.fsm.storage.redis.RedisStorage.from_url:3 of +msgid "for example :code:`redis://user:password@host:port/db`" +msgstr "наприклад :code:`redis://user:password@host:port/db`" + +#: aiogram.fsm.storage.redis.RedisStorage.from_url:4 of +msgid "see :code:`redis` docs" +msgstr "див. документацію :code:`redis`" + +#: aiogram.fsm.storage.redis.RedisStorage.from_url:5 of +msgid "arguments to be passed to :class:`RedisStorage`" +msgstr "аргументи, які потрібно передати :class:`RedisStorage`" + +#: ../../dispatcher/finite_state_machine/storages.rst +msgid "Returns" +msgstr "" + +#: aiogram.fsm.storage.redis.RedisStorage.from_url:6 of +#, fuzzy +msgid "an instance of :class:`RedisStorage`" +msgstr "екземпляр класу :class:`MongoStorage`" + +#: ../../dispatcher/finite_state_machine/storages.rst:23 +msgid "MongoStorage" +msgstr "" + +#: 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 "" + +#: ../../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 "контекстний ключ" + +#: aiogram.fsm.storage.base.DefaultKeyBuilder.build:4 +#: aiogram.fsm.storage.base.KeyBuilder.build:4 of +msgid "part of the record" +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.base.DefaultKeyBuilder:1 of +msgid "Simple key builder with default prefix." +msgstr "Простий конструктор ключів із стандартним префіксом." + +#: aiogram.fsm.storage.base.DefaultKeyBuilder:3 of +msgid "" +"Generates a colon-joined string with prefix, chat_id, user_id, optional " +"bot_id, business_connection_id, destiny and field." +msgstr "" +"Генерує рядок із префіксом, chat_id, user_id, додатковим bot_id, " +"business_connection_id, destiny та полем, розділеними двокрапкою." + +#: 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 "" + +#: aiogram.fsm.storage.base.BaseStorage:1 of +msgid "Base class for all FSM storages" +msgstr "" + +#: aiogram.fsm.storage.base.BaseStorage.set_state:1 of +msgid "Set state for specified key" +msgstr "" + +#: aiogram.fsm.storage.base.BaseStorage.get_data:3 +#: aiogram.fsm.storage.base.BaseStorage.get_state:3 +#: aiogram.fsm.storage.base.BaseStorage.set_data:3 +#: aiogram.fsm.storage.base.BaseStorage.set_state:3 +#: aiogram.fsm.storage.base.BaseStorage.update_data:3 of +msgid "storage key" +msgstr "" + +#: aiogram.fsm.storage.base.BaseStorage.set_state:4 of +msgid "new state" +msgstr "" + +#: aiogram.fsm.storage.base.BaseStorage.get_state:1 of +msgid "Get key state" +msgstr "" + +#: aiogram.fsm.storage.base.BaseStorage.get_state:4 of +msgid "current state" +msgstr "" + +#: aiogram.fsm.storage.base.BaseStorage.set_data:1 of +msgid "Write data (replace)" +msgstr "" + +#: aiogram.fsm.storage.base.BaseStorage.set_data:4 +#: aiogram.fsm.storage.base.BaseStorage.update_data:5 of +msgid "new data" +msgstr "" + +#: aiogram.fsm.storage.base.BaseStorage.get_data:1 of +msgid "Get current data for key" +msgstr "" + +#: aiogram.fsm.storage.base.BaseStorage.get_data:4 of +msgid "current data" +msgstr "" + +#: aiogram.fsm.storage.base.BaseStorage.update_data:1 of +msgid "Update date in the storage for key (like dict.update)" +msgstr "" + +#: aiogram.fsm.storage.base.BaseStorage.update_data:4 of +msgid "partial data" +msgstr "" + +#: aiogram.fsm.storage.base.BaseStorage.close:1 of +msgid "Close storage (database connection, file or etc.)" +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/flags.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/flags.po new file mode 100644 index 00000000..d9d8beb1 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/flags.po @@ -0,0 +1,135 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-01-07 23:33+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" + +#: ../../dispatcher/flags.rst:3 +msgid "Flags" +msgstr "Маркери" + +#: ../../dispatcher/flags.rst:5 +msgid "" +"Flags is a markers for handlers that can be used in `middlewares <#use-" +"in-middlewares>`_ or special `utilities <#use-in-utilities>`_ to make " +"classification of the handlers." +msgstr "" +"Маркери це, так звані мітки для обробників, які можна використовувати " +"`міддлварах <#use-in-middlewares>`_ або в спеціальних `утилітах <#use-in-" +"utilities>`_ щоб провести класифікацію обробників." + +#: ../../dispatcher/flags.rst:8 +msgid "" +"Flags can be added to the handler via `decorators <#via-decorators>`_, " +"`handlers registration <#via-handler-registration-method>`_ or `filters " +"`_." +msgstr "" +"Маркери можна додати до обробника через `декоратори <#via-decorators>`_, " +"`реєстрацію обробників <#via-handler-registration-method>`_ або `фільтри " +"`_." + +#: ../../dispatcher/flags.rst:13 +msgid "Via decorators" +msgstr "Через декоратори" + +#: ../../dispatcher/flags.rst:15 +msgid "For example mark handler with `chat_action` flag" +msgstr "Наприклад, відмітимо обробник маркером `chat_action`" + +#: ../../dispatcher/flags.rst:24 +msgid "Or just for rate-limit or something else" +msgstr "Або просто для рейт-ліміту чи чогось іншого" + +#: ../../dispatcher/flags.rst:34 +msgid "Via handler registration method" +msgstr "Через метод реєстрації обробника" + +#: ../../dispatcher/flags.rst:41 +msgid "Via filters" +msgstr "Через фільтри" + +#: ../../dispatcher/flags.rst:55 +msgid "Use in middlewares" +msgstr "Використовувати в міддлварах" + +#: aiogram.dispatcher.flags.check_flags:1 of +msgid "Check flags via magic filter" +msgstr "" + +#: aiogram.dispatcher.flags.check_flags aiogram.dispatcher.flags.extract_flags +#: aiogram.dispatcher.flags.get_flag of +msgid "Parameters" +msgstr "" + +#: aiogram.dispatcher.flags.check_flags:3 +#: aiogram.dispatcher.flags.extract_flags:3 aiogram.dispatcher.flags.get_flag:3 +#: of +msgid "handler object or data" +msgstr "" + +#: aiogram.dispatcher.flags.check_flags:4 of +msgid "instance of the magic" +msgstr "" + +#: aiogram.dispatcher.flags.check_flags aiogram.dispatcher.flags.extract_flags +#: aiogram.dispatcher.flags.get_flag of +msgid "Returns" +msgstr "" + +#: aiogram.dispatcher.flags.check_flags:5 of +msgid "the result of magic filter check" +msgstr "" + +#: aiogram.dispatcher.flags.extract_flags:1 of +msgid "Extract flags from handler or middleware context data" +msgstr "" + +#: aiogram.dispatcher.flags.extract_flags:4 of +msgid "dictionary with all handler flags" +msgstr "" + +#: aiogram.dispatcher.flags.get_flag:1 of +msgid "Get flag by name" +msgstr "" + +#: aiogram.dispatcher.flags.get_flag:4 of +msgid "name of the flag" +msgstr "" + +#: aiogram.dispatcher.flags.get_flag:5 of +msgid "default value (None)" +msgstr "" + +#: aiogram.dispatcher.flags.get_flag:6 of +msgid "value of the flag or default" +msgstr "" + +#: ../../dispatcher/flags.rst:62 +msgid "Example in middlewares" +msgstr "Приклад в міддлварах" + +#: ../../dispatcher/flags.rst:75 +msgid "Use in utilities" +msgstr "Використання в утилітах" + +#: ../../dispatcher/flags.rst:77 +msgid "" +"For example you can collect all registered commands with handler " +"description and then it can be used for generating commands help" +msgstr "" +"Наприклад, ви можете зібрати всі зареєстровані команди з описом " +"обробника, а потім його можна використовувати для створення довідки щодо " +"команд" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/index.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/index.po new file mode 100644 index 00000000..67414eef --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/index.po @@ -0,0 +1,76 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-08-06 16:52+0300\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" + +#: ../../dispatcher/index.rst:3 +msgid "Handling events" +msgstr "Обробка подій" + +#: ../../dispatcher/index.rst:5 +msgid "" +"*aiogram* includes Dispatcher mechanism. Dispatcher is needed for " +"handling incoming updates from Telegram." +msgstr "" + +#: ../../dispatcher/index.rst:8 +msgid "With dispatcher you can do:" +msgstr "" + +#: ../../dispatcher/index.rst:10 +msgid "Handle incoming updates;" +msgstr "" + +#: ../../dispatcher/index.rst:11 +msgid "Filter incoming events before it will be processed by specific handler;" +msgstr "" + +#: ../../dispatcher/index.rst:12 +msgid "Modify event and related data in middlewares;" +msgstr "" + +#: ../../dispatcher/index.rst:13 +msgid "" +"Separate bot functionality between different handlers, modules and " +"packages" +msgstr "" + +#: ../../dispatcher/index.rst:15 +msgid "" +"Dispatcher is also separated into two entities - Router and Dispatcher. " +"Dispatcher is subclass of router and should be always is root router." +msgstr "" + +#: ../../dispatcher/index.rst:18 +msgid "Telegram supports two ways of receiving updates:" +msgstr "" + +#: ../../dispatcher/index.rst:20 +msgid "" +":ref:`Webhook ` - you should configure your web server to " +"receive updates from Telegram;" +msgstr "" + +#: ../../dispatcher/index.rst:21 +msgid "" +":ref:`Long polling ` - you should request updates from " +"Telegram." +msgstr "" + +#: ../../dispatcher/index.rst:23 +msgid "So, you can use both of them with *aiogram*." +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/long_polling.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/long_polling.po new file mode 100644 index 00000000..d5581be5 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/long_polling.po @@ -0,0 +1,62 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-08-06 16:52+0300\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" + +#: ../../dispatcher/long_polling.rst:5 +msgid "Long-polling" +msgstr "" + +#: ../../dispatcher/long_polling.rst:7 +msgid "" +"Long-polling is a technology that allows a Telegram server to send " +"updates in case when you don't have dedicated IP address or port to " +"receive webhooks for example on a developer machine." +msgstr "" + +#: ../../dispatcher/long_polling.rst:11 +msgid "" +"To use long-polling mode you should use " +":meth:`aiogram.dispatcher.dispatcher.Dispatcher.start_polling` or " +":meth:`aiogram.dispatcher.dispatcher.Dispatcher.run_polling` methods." +msgstr "" + +#: ../../dispatcher/long_polling.rst:16 +msgid "" +"You can use polling from only one polling process per single Bot token, " +"in other case Telegram server will return an error." +msgstr "" + +#: ../../dispatcher/long_polling.rst:21 +msgid "" +"If you will need to scale your bot, you should use webhooks instead of " +"long-polling." +msgstr "" + +#: ../../dispatcher/long_polling.rst:25 +msgid "If you will use multibot mode, you should use webhook mode for all bots." +msgstr "" + +#: ../../dispatcher/long_polling.rst:28 +msgid "Example" +msgstr "" + +#: ../../dispatcher/long_polling.rst:30 +msgid "" +"This example will show you how to create simple echo bot based on long-" +"polling." +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/middlewares.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/middlewares.po new file mode 100644 index 00000000..862a7f31 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/middlewares.po @@ -0,0 +1,220 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-16 02:34+0200\n" +"PO-Revision-Date: 2022-10-20 20:56+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.13.1\n" + +#: ../../dispatcher/middlewares.rst:5 +msgid "Middlewares" +msgstr "Проміжні програми" + +#: ../../dispatcher/middlewares.rst:7 +msgid "" +"**aiogram** provides powerful mechanism for customizing event handlers " +"via middlewares." +msgstr "" +"**aiogram** надає потужний механізм для налаштування обробників(handler) " +"подій через проміжні програми." + +#: ../../dispatcher/middlewares.rst:9 +msgid "" +"Middlewares in bot framework seems like Middlewares mechanism in web-" +"frameworks like `aiohttp " +"`_, `fastapi " +"`_, `Django " +"`_ or " +"etc.) with small difference - here is implemented two layers of " +"middlewares (before and after filters)." +msgstr "" +"Проміжні програми у фреймворку для ботів виглядають як механізм проміжних" +" програм у веб-фреймворках, таких як `aiohttp " +"`_, `fastapi " +"`_, `Django " +"`_ тощо) " +"з невеликою різницею – тут реалізовано два рівні проміжного програмних " +"програм (до та після фільтрів)." + +#: ../../dispatcher/middlewares.rst:17 +msgid "" +"Middleware is function that triggered on every event received from " +"Telegram Bot API in many points on processing pipeline." +msgstr "" +"Проміжна програма — це функція, яка запускається під час кожної події, " +"отриманої від Telegram Bot API у багатьох точках процесу обробки." + +#: ../../dispatcher/middlewares.rst:21 +msgid "Base theory" +msgstr "Основні поняття" + +#: ../../dispatcher/middlewares.rst:23 +msgid "As many books and other literature in internet says:" +msgstr "Більшість книг та Інтернет-джерел стверджують:" + +#: ../../dispatcher/middlewares.rst:25 +msgid "" +"Middleware is reusable software that leverages patterns and frameworks to" +" bridge the gap between the functional requirements of applications and " +"the underlying operating systems, network protocol stacks, and databases." +msgstr "" +"Проміжна програма — це програма, багаторазового використання, що " +"використовує шаблони та фреймворки для ліквідування розриву між " +"функціональними вимогами додатків і основними операційними системами, " +"стеками мережевих протоколів і базами даних." + +#: ../../dispatcher/middlewares.rst:29 +msgid "" +"Middleware can modify, extend or reject processing event in many places " +"of pipeline." +msgstr "" +"Проміжна програма може змінювати, розширювати або відхиляти подію обробки" +" у багатьох точках процесу обробки." + +#: ../../dispatcher/middlewares.rst:32 +msgid "Basics" +msgstr "Основи" + +#: ../../dispatcher/middlewares.rst:34 +msgid "" +"Middleware instance can be applied for every type of Telegram Event " +"(Update, Message, etc.) in two places" +msgstr "" +"Екземпляр проміжної програми можна застосувати для кожного типу події " +"Telegram (оновлення, повідомлення тощо) у двох місцях" + +#: ../../dispatcher/middlewares.rst:36 +msgid "" +"Outer scope - before processing filters " +"(:code:`..outer_middleware(...)`)" +msgstr "" +"Зовнішня область - перед обробкою фільтрами " +"(:code:`..outer_middleware(...)`)" + +#: ../../dispatcher/middlewares.rst:37 +msgid "" +"Inner scope - after processing filters but before handler " +"(:code:`..middleware(...)`)" +msgstr "" +"Внутрішня область – після обробки фільтрами, але перед обробником " +"(handler) (:code:`..middleware(...)`)" + +#: ../../dispatcher/middlewares.rst:-1 +msgid "Middleware basics" +msgstr "Основи проміжних програм" + +#: ../../dispatcher/middlewares.rst:44 +msgid "" +"Middleware should be subclass of :code:`BaseMiddleware` (:code:`from " +"aiogram import BaseMiddleware`) or any async callable" +msgstr "" +"Проміжна програма має бути підкласом :code:`BaseMiddleware` (:code:`from " +"aiogram import BaseMiddleware`) або будь-якою асинхронною функцією" + +#: ../../dispatcher/middlewares.rst:47 +msgid "Arguments specification" +msgstr "Специфікація аргументів" + +#: aiogram.dispatcher.middlewares.base.BaseMiddleware:1 of +msgid "Bases: :py:class:`~abc.ABC`" +msgstr "Основа: :py:class:`~abc.ABC`" + +#: aiogram.dispatcher.middlewares.base.BaseMiddleware:1 of +msgid "Generic middleware class" +msgstr "Узагальнений клас проміжних програм" + +#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__:1 of +msgid "Execute middleware" +msgstr "Виконання проміжної програми" + +#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__ of +msgid "Parameters" +msgstr "Параметри" + +#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__:3 of +msgid "Wrapped handler in middlewares chain" +msgstr "Обробник (handler), обгорнутий у ланцюжок проміжних програм" + +#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__:4 of +msgid "Incoming event (Subclass of :class:`aiogram.types.base.TelegramObject`)" +msgstr "Вхідна подія (підклас :class:`aiogram.types.base.TelegramObject`)" + +#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__:5 of +msgid "Contextual data. Will be mapped to handler arguments" +msgstr "Контекстні дані. Будуть зіставлені з аргументами обробника" + +#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__ of +msgid "Returns" +msgstr "Повертає" + +#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__:6 of +msgid ":class:`Any`" +msgstr ":class:`Any`" + +#: ../../dispatcher/middlewares.rst:58 +msgid "Examples" +msgstr "Приклади" + +#: ../../dispatcher/middlewares.rst:62 +#, fuzzy +msgid "" +"Middleware should always call :code:`await handler(event, data)` to " +"propagate event for next middleware/handler. If you want to stop " +"processing event in middleware you should not call :code:`await " +"handler(event, data)`." +msgstr "" +"Проміжні програми мають завжди викликати :code:`await handler(event, " +"data)` , щоб передавати подію для наступної проміжної програми/обробника " +"(handler)" + +#: ../../dispatcher/middlewares.rst:67 +msgid "Class-based" +msgstr "Класово орієнтований" + +#: ../../dispatcher/middlewares.rst:88 +msgid "and then" +msgstr "і тоді" + +#: ../../dispatcher/middlewares.rst:97 +msgid "Function-based" +msgstr "Функціонально-орієнтований" + +#: ../../dispatcher/middlewares.rst:112 +msgid "Facts" +msgstr "Факти" + +#: ../../dispatcher/middlewares.rst:114 +msgid "Middlewares from outer scope will be called on every incoming event" +msgstr "" +"Проміжні програми із зовнішньої області викликатимуться під час кожної " +"вхідної події" + +#: ../../dispatcher/middlewares.rst:115 +msgid "Middlewares from inner scope will be called only when filters pass" +msgstr "" +"Проміжні програми із внутрішньої області викликатимуться лише після " +"проходження фільтрів" + +#: ../../dispatcher/middlewares.rst:116 +msgid "" +"Inner middlewares is always calls for " +":class:`aiogram.types.update.Update` event type in due to all incoming " +"updates going to specific event type handler through built in update " +"handler" +msgstr "" +"Внутрішні проміжні програми викликають тип події " +":class:`aiogram.types.update.Update` , через те, що всі вхідні оновлення " +"надходять до обробника (handler) певного типу подій через вбудований " +"обробник (handler) оновлень" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/observer.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/observer.po new file mode 100644 index 00000000..437bf41d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/observer.po @@ -0,0 +1,108 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-19 22:52+0300\n" +"PO-Revision-Date: 2022-10-19 22:50+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" + +#: ../../dispatcher/observer.rst:3 +msgid "Observer" +msgstr "Обсервер" + +#: ../../dispatcher/observer.rst:5 +msgid "" +"Observer is used for filtering and handling different events. That is " +"part of internal API with some public methods and is recommended to don't" +" use methods is not listed here." +msgstr "" +"Обсервер використовується для фільтрації та обробки різних подій. Це " +"частина внутрішнього API з деякими публічними методами, тому " +"рекомендується не використовувати методи, яких тут немає." + +#: ../../dispatcher/observer.rst:7 +msgid "In `aiogram` framework is available two variants of observer:" +msgstr "У фреймвоку `aiogram` доступні два варіанти обсервера:" + +#: ../../dispatcher/observer.rst:9 +msgid "`EventObserver <#eventobserver>`__" +msgstr "`EventObserver <#eventobserver>`__" + +#: ../../dispatcher/observer.rst:10 +msgid "`TelegramEventObserver <#telegrameventobserver>`__" +msgstr "`TelegramEventObserver <#telegrameventobserver>`__" + +#: ../../dispatcher/observer.rst:14 +msgid "EventObserver" +msgstr "EventObserver" + +#: aiogram.dispatcher.event.event.EventObserver:1 of +msgid "Simple events observer" +msgstr "Простий обсервер(спостерігач) подій" + +#: aiogram.dispatcher.event.event.EventObserver:3 of +msgid "" +"Is used for managing events is not related with Telegram (For example " +"startup/shutdown processes)" +msgstr "" +"Використовується для керування подіями, не пов’язаними з Telegram " +"(наприклад, запуску/вимкнення процесів)" + +#: aiogram.dispatcher.event.event.EventObserver:5 of +msgid "Handlers can be registered via decorator or method" +msgstr "Обробники(Handler) можна зареєструвати за допомогою декоратора або методу" + +#: aiogram.dispatcher.event.event.EventObserver.register:1 of +msgid "Register callback with filters" +msgstr "Реєстрація обробника(callback) з фільтрами" + +#: aiogram.dispatcher.event.event.EventObserver.trigger:1 of +msgid "" +"Propagate event to handlers. Handler will be called when all its filters " +"is pass." +msgstr "" +"Передача події обробникам подій(handler). Обробник буде викликано, коли " +"всі його фільтри пройдено." + +#: aiogram.dispatcher.event.event.EventObserver.__call__:1 +#: aiogram.dispatcher.event.telegram.TelegramEventObserver.__call__:1 of +msgid "Decorator for registering event handlers" +msgstr "Декоратор для реєстрації обробника подій(handler)" + +#: ../../dispatcher/observer.rst:22 +msgid "TelegramEventObserver" +msgstr "TelegramEventObserver" + +#: aiogram.dispatcher.event.telegram.TelegramEventObserver:1 of +msgid "Event observer for Telegram events" +msgstr "Обсервер подій для подій Telegram" + +#: aiogram.dispatcher.event.telegram.TelegramEventObserver:3 of +msgid "" +"Here you can register handler with filter. This observer will stop event " +"propagation when first handler is pass." +msgstr "" +"Тут Ви можете зареєструвати обробник(handler) із фільтрами. Цей обсервер " +"зупинить розповсюдження події, коли справцює перший обробник(handler)." + +#: aiogram.dispatcher.event.telegram.TelegramEventObserver.register:1 of +msgid "Register event handler" +msgstr "Реєстрація обробника подій(handler)" + +#: aiogram.dispatcher.event.telegram.TelegramEventObserver.trigger:1 of +msgid "" +"Propagate event to handlers and stops propagation on first match. Handler" +" will be called when all its filters is pass." +msgstr "" +"Передача події обробнику подій(handler) та зупинка при першому ж збігу. " +"Обробник(handler) буде викликало, коли всі його фільтри пройдено." diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/router.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/router.po new file mode 100644 index 00000000..0139b67f --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/router.po @@ -0,0 +1,346 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"PO-Revision-Date: 2022-12-10 20:41+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.13.1\n" + +#: ../../dispatcher/router.rst:5 +msgid "Router" +msgstr "Маршрутизатор" + +#: ../../dispatcher/router.rst:7 +#, fuzzy +msgid "Usage:" +msgstr "Повідомлення" + +#: aiogram.dispatcher.router.Router:1 of +msgid "Bases: :py:class:`object`" +msgstr "Базується на :py:class:`object`" + +#: aiogram.dispatcher.router.Router:1 of +msgid "" +"Router can route update, and it nested update types like messages, " +"callback query, polls and all other event types." +msgstr "" +"Маршрутизатор може маршрутизувати події, а також вкладені типи оновлень, " +"такі як повідомлення, запит зворотного виклику, опитування та всі інші " +"типи подій." + +#: aiogram.dispatcher.router.Router:4 of +msgid "Event handlers can be registered in observer by two ways:" +msgstr "Обробники подій можуть бути зареєстровані в обсервері двома шляхами:" + +#: aiogram.dispatcher.router.Router:6 of +msgid "" +"By observer method - :obj:`router..register(handler, " +")`" +msgstr "" +"За допомогою методу обсервера - " +":obj:`router..register(handler, )`" + +#: aiogram.dispatcher.router.Router:7 of +msgid "By decorator - :obj:`@router.()`" +msgstr "За допомогою декоратора - :obj:`@router.()`" + +#: aiogram.dispatcher.router.Router.__init__ +#: aiogram.dispatcher.router.Router.include_router +#: aiogram.dispatcher.router.Router.include_routers +#: aiogram.dispatcher.router.Router.resolve_used_update_types of +msgid "Parameters" +msgstr "Параметри" + +#: aiogram.dispatcher.router.Router.__init__:1 of +msgid "Optional router name, can be useful for debugging" +msgstr "Додаткова назва маршрутизатора, може бути корисною для відлагодження" + +#: aiogram.dispatcher.router.Router.include_router:1 of +msgid "Attach another router." +msgstr "Підключення маршрутизатора." + +#: aiogram.dispatcher.router.Router.include_router +#: aiogram.dispatcher.router.Router.include_routers +#: aiogram.dispatcher.router.Router.resolve_used_update_types of +msgid "Returns" +msgstr "Повертає" + +#: aiogram.dispatcher.router.Router.include_routers:1 of +#, fuzzy +msgid "Attach multiple routers." +msgstr "Підключення маршрутизатора." + +#: aiogram.dispatcher.router.Router.resolve_used_update_types:1 of +msgid "Resolve registered event names" +msgstr "" + +#: aiogram.dispatcher.router.Router.resolve_used_update_types:3 of +msgid "Is useful for getting updates only for registered event types." +msgstr "" + +#: aiogram.dispatcher.router.Router.resolve_used_update_types:5 of +msgid "skip specified event names" +msgstr "" + +#: aiogram.dispatcher.router.Router.resolve_used_update_types:6 of +msgid "set of registered names" +msgstr "" + +#: ../../dispatcher/router.rst:29 +msgid "Event observers" +msgstr "Обсервери подій" + +#: ../../dispatcher/router.rst:33 +msgid "" +"All handlers always should be asynchronous. The name of the handler " +"function is not important. The event argument name is also not important " +"but it is recommended to not overlap the name with contextual data in due" +" to function can not accept two arguments with the same name." +msgstr "" +"Усі обробники завжди мають бути асинхронними. Ім'я функції обробки не має" +" значення. Назва аргументу події також не важлива, але рекомендується не " +"накладати назву на контекстні дані, оскільки функція не може прийняти два" +" аргументи з однаковою назвою." + +#: ../../dispatcher/router.rst:36 +msgid "" +"Here is the list of available observers and examples of how to register " +"handlers" +msgstr "" +"Ось список доступних обсерверів і приклади того, як зареєструвати " +"обробники" + +#: ../../dispatcher/router.rst:38 +msgid "" +"In these examples only decorator-style registering handlers are used, but" +" if you don't like @decorators just use :obj:`.register(...)`" +" method instead." +msgstr "" +"У цих прикладах використовуються лише обробники реєстрації у стилі " +"декоратора, але якщо вам не подобаються @decorators, просто " +"використовуйте :obj:`.register(...)` method instead." + +#: ../../dispatcher/router.rst:41 +msgid "Message" +msgstr "Повідомлення" + +#: ../../dispatcher/router.rst:46 +msgid "Be attentive with filtering this event" +msgstr "Будьте уважні при фільтруванні цієї події" + +#: ../../dispatcher/router.rst:48 +msgid "" +"You should expect that this event can be with different sets of " +"attributes in different cases" +msgstr "" +"Вам слід очікувати, що ця подія може мати різні набори атрибутів у різних" +" випадках" + +#: ../../dispatcher/router.rst:50 +msgid "" +"(For example text, sticker and document are always of different content " +"types of message)" +msgstr "(Наприклад, текст, стікер та документ завжди мають різні типи вмісту)" + +#: ../../dispatcher/router.rst:52 +msgid "" +"Recommended way to check field availability before usage, for example via" +" :ref:`magic filter `: :code:`F.text` to handle text, " +":code:`F.sticker` to handle stickers only and etc." +msgstr "" +"Рекомендований спосіб перевірити наявність полів перед використанням, " +"наприклад за допомогою :ref:`magic filter `: " +":code:`F.text` для обробки тексту, :code:`F.sticker` для обробки лише " +"стікерів і тощо." + +#: ../../dispatcher/router.rst:63 +msgid "Edited message" +msgstr "Відредаговане повідомлення" + +#: ../../dispatcher/router.rst:71 +msgid "Channel post" +msgstr "Пост на каналі" + +#: ../../dispatcher/router.rst:79 +msgid "Edited channel post" +msgstr "Відредагований пост на каналі" + +#: ../../dispatcher/router.rst:88 +msgid "Inline query" +msgstr "Inline запит" + +#: ../../dispatcher/router.rst:96 +msgid "Chosen inline query" +msgstr "Вибраний результат inline запиту" + +#: ../../dispatcher/router.rst:104 +msgid "Callback query" +msgstr "Запит зворотної відповіді" + +#: ../../dispatcher/router.rst:112 +msgid "Shipping query" +msgstr "Запит підтвердження доставки" + +#: ../../dispatcher/router.rst:120 +msgid "Pre checkout query" +msgstr "Запит перед оформленням замовлення" + +#: ../../dispatcher/router.rst:128 +msgid "Poll" +msgstr "Опитування" + +#: ../../dispatcher/router.rst:136 +msgid "Poll answer" +msgstr "Відповідь на опитування" + +#: ../../dispatcher/router.rst:145 +msgid "My chat member" +msgstr "" + +#: ../../dispatcher/router.rst:154 +msgid "Chat member" +msgstr "" + +#: ../../dispatcher/router.rst:163 +msgid "Chat join request" +msgstr "" + +#: ../../dispatcher/router.rst:172 +#, fuzzy +msgid "Message reaction" +msgstr "Повідомлення" + +#: ../../dispatcher/router.rst:181 +msgid "Message reaction count" +msgstr "" + +#: ../../dispatcher/router.rst:190 +#, fuzzy +msgid "Chat boost" +msgstr "Пост на каналі" + +#: ../../dispatcher/router.rst:199 +msgid "Remove chat boost" +msgstr "" + +#: ../../dispatcher/router.rst:208 +msgid "Errors" +msgstr "Помилки" + +#: ../../dispatcher/router.rst:215 +#, fuzzy +msgid "" +"Is useful for handling errors from other handlers, error event described " +":ref:`here `" +msgstr "Корисно для обробки помилок інших обробників" + +#: ../../dispatcher/router.rst:222 +msgid "Nested routers" +msgstr "Вкладені маршрутизатори" + +#: ../../dispatcher/router.rst:227 +msgid "" +"Routers by the way can be nested to an another routers with some " +"limitations:" +msgstr "" +"До речі, маршрутизатори можуть бути вкладеними в інші маршрутизатори з " +"деякими обмеженнями:" + +#: ../../dispatcher/router.rst:227 +msgid "" +"1. Router **CAN NOT** include itself 1. Routers **CAN NOT** be used for " +"circular including (router 1 include router 2, router 2 include router 3," +" router 3 include router 1)" +msgstr "" +"1. Маршрутизатор **НЕ МОЖЕ** включити себе \n" +"2. Маршрутизатори **НЕ МОЖНА** використовувати для циклічного включення " +"(маршрутизатор 1 включає маршрутизатор 2, маршрутизатор 2 включає " +"маршрутизатор 3, маршрутизатор 3 включає маршрутизатор 1)" + +#: ../../dispatcher/router.rst:231 +msgid "Example:" +msgstr "Приклад:" + +#: ../../dispatcher/router.rst:233 +#, fuzzy +msgid "module_1.py" +msgstr "module_2.py" + +#: ../../dispatcher/router.rst +msgid "name" +msgstr "" + +#: ../../dispatcher/router.rst:235 +#, fuzzy +msgid "module_1" +msgstr "module_2.py" + +#: ../../dispatcher/router.rst:237 +msgid "router2 = Router()" +msgstr "" + +#: ../../dispatcher/router.rst:239 +msgid "@router2.message() ..." +msgstr "" + +#: ../../dispatcher/router.rst:243 +msgid "module_2.py" +msgstr "module_2.py" + +#: ../../dispatcher/router.rst:245 +#, fuzzy +msgid "module_2" +msgstr "module_2.py" + +#: ../../dispatcher/router.rst:247 +msgid "from module_2 import router2" +msgstr "" + +#: ../../dispatcher/router.rst:250 +msgid "router1 = Router() router1.include_router(router2)" +msgstr "" + +#: ../../dispatcher/router.rst:255 +msgid "Update" +msgstr "Оновлення" + +#: ../../dispatcher/router.rst:264 +msgid "The only root Router (Dispatcher) can handle this type of event." +msgstr "" + +#: ../../dispatcher/router.rst:268 +msgid "" +"Dispatcher already has default handler for this event type, so you can " +"use it for handling all updates that are not handled by any other " +"handlers." +msgstr "" + +#: ../../dispatcher/router.rst:271 +msgid "How it works?" +msgstr "Як це працює?" + +#: ../../dispatcher/router.rst:273 +msgid "" +"For example, dispatcher has 2 routers, the last router also has one " +"nested router:" +msgstr "" +"Наприклад, диспетчер має 2 маршрутизатори, останній маршрутизатор також " +"має один вкладений маршрутизатор:" + +#: ../../dispatcher/router.rst:-1 +msgid "Nested routers example" +msgstr "Приклад вкладених маршрутизаторів" + +#: ../../dispatcher/router.rst:278 +msgid "In this case update propagation flow will have form:" +msgstr "У цьому випадку потік розповсюдження оновлення матиме вигляд:" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/webhook.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/webhook.po new file mode 100644 index 00000000..ee10e8ca --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/webhook.po @@ -0,0 +1,357 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-10-29 02:22+0300\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.13.1\n" + +#: ../../dispatcher/webhook.rst:5 +msgid "Webhook" +msgstr "" + +#: ../../dispatcher/webhook.rst:7 +msgid "" +"Telegram Bot API supports webhook. If you set webhook for your bot, " +"Telegram will send updates to the specified url. You can use " +":meth:`aiogram.methods.set_webhook.SetWebhook` method to specify a url " +"and receive incoming updates on it." +msgstr "" + +#: ../../dispatcher/webhook.rst:14 +msgid "If you use webhook, you can't use long polling at the same time." +msgstr "" + +#: ../../dispatcher/webhook.rst:16 +msgid "" +"Before start i'll recommend you to read `official Telegram's " +"documentation about webhook `_" +msgstr "" + +#: ../../dispatcher/webhook.rst:18 +msgid "After you read it, you can start to read this section." +msgstr "" + +#: ../../dispatcher/webhook.rst:20 +msgid "" +"Generally to use webhook with aiogram you should use any async web " +"framework. By out of the box aiogram has an aiohttp integration, so we'll" +" use it." +msgstr "" + +#: ../../dispatcher/webhook.rst:25 +msgid "" +"You can use any async web framework you want, but you should write your " +"own integration if you don't use aiohttp." +msgstr "" + +#: ../../dispatcher/webhook.rst:29 +msgid "aiohttp integration" +msgstr "" + +#: ../../dispatcher/webhook.rst:31 +msgid "Out of the box aiogram has aiohttp integration, so you can use it." +msgstr "" + +#: ../../dispatcher/webhook.rst:33 +msgid "" +"Here is available few ways to do it using different implementations of " +"the webhook controller:" +msgstr "" + +#: ../../dispatcher/webhook.rst:35 +msgid "" +":class:`aiogram.webhook.aiohttp_server.BaseRequestHandler` - Abstract " +"class for aiohttp webhook controller" +msgstr "" + +#: ../../dispatcher/webhook.rst:36 +msgid "" +":class:`aiogram.webhook.aiohttp_server.SimpleRequestHandler` - Simple " +"webhook controller, uses single Bot instance" +msgstr "" + +#: ../../dispatcher/webhook.rst:37 +msgid "" +":class:`aiogram.webhook.aiohttp_server.TokenBasedRequestHandler` - Token" +" based webhook controller, uses multiple Bot instances and tokens" +msgstr "" + +#: ../../dispatcher/webhook.rst:39 +msgid "You can use it as is or inherit from it and override some methods." +msgstr "" + +#: aiogram.webhook.aiohttp_server.BaseRequestHandler.__init__:1 of +msgid "" +"Base handler that helps to handle incoming request from aiohttp and " +"propagate it to the Dispatcher" +msgstr "" + +#: aiogram.webhook.aiohttp_server.BaseRequestHandler.__init__ +#: aiogram.webhook.aiohttp_server.BaseRequestHandler.register +#: aiogram.webhook.aiohttp_server.BaseRequestHandler.resolve_bot +#: aiogram.webhook.aiohttp_server.SimpleRequestHandler.__init__ +#: aiogram.webhook.aiohttp_server.SimpleRequestHandler.resolve_bot +#: aiogram.webhook.aiohttp_server.TokenBasedRequestHandler.__init__ +#: aiogram.webhook.aiohttp_server.TokenBasedRequestHandler.register +#: aiogram.webhook.aiohttp_server.TokenBasedRequestHandler.resolve_bot +#: aiogram.webhook.aiohttp_server.ip_filter_middleware of +msgid "Parameters" +msgstr "" + +#: aiogram.webhook.aiohttp_server.BaseRequestHandler.__init__:4 +#: aiogram.webhook.aiohttp_server.SimpleRequestHandler.__init__:3 +#: aiogram.webhook.aiohttp_server.TokenBasedRequestHandler.__init__:9 of +msgid "instance of :class:`aiogram.dispatcher.dispatcher.Dispatcher`" +msgstr "" + +#: aiogram.webhook.aiohttp_server.BaseRequestHandler.__init__:5 of +msgid "" +"immediately responds to the Telegram instead of a waiting end of a " +"handler process" +msgstr "" + +#: aiogram.webhook.aiohttp_server.BaseRequestHandler.register:1 of +msgid "Register route and shutdown callback" +msgstr "" + +#: aiogram.webhook.aiohttp_server.BaseRequestHandler.register:3 +#: aiogram.webhook.aiohttp_server.TokenBasedRequestHandler.register:3 of +msgid "instance of aiohttp Application" +msgstr "" + +#: aiogram.webhook.aiohttp_server.BaseRequestHandler.register:4 +#: aiogram.webhook.aiohttp_server.TokenBasedRequestHandler.register:4 of +msgid "route path" +msgstr "" + +#: aiogram.webhook.aiohttp_server.BaseRequestHandler.resolve_bot:1 +#: aiogram.webhook.aiohttp_server.SimpleRequestHandler.resolve_bot:1 of +msgid "This method should be implemented in subclasses of this class." +msgstr "" + +#: aiogram.webhook.aiohttp_server.BaseRequestHandler.resolve_bot:3 +#: aiogram.webhook.aiohttp_server.SimpleRequestHandler.resolve_bot:3 of +msgid "Resolve Bot instance from request." +msgstr "" + +#: aiogram.webhook.aiohttp_server.BaseRequestHandler.resolve_bot +#: aiogram.webhook.aiohttp_server.SimpleRequestHandler.resolve_bot +#: aiogram.webhook.aiohttp_server.TokenBasedRequestHandler.resolve_bot +#: aiogram.webhook.aiohttp_server.ip_filter_middleware of +msgid "Returns" +msgstr "" + +#: aiogram.webhook.aiohttp_server.BaseRequestHandler.resolve_bot:6 +#: aiogram.webhook.aiohttp_server.SimpleRequestHandler.resolve_bot:6 of +msgid "Bot instance" +msgstr "" + +#: aiogram.webhook.aiohttp_server.SimpleRequestHandler.__init__:1 of +msgid "Handler for single Bot instance" +msgstr "" + +#: aiogram.webhook.aiohttp_server.SimpleRequestHandler.__init__:4 +#: aiogram.webhook.aiohttp_server.TokenBasedRequestHandler.__init__:10 of +msgid "" +"immediately responds to the Telegram instead of a waiting end of handler " +"process" +msgstr "" + +#: aiogram.webhook.aiohttp_server.SimpleRequestHandler.__init__:6 of +msgid "instance of :class:`aiogram.client.bot.Bot`" +msgstr "" + +#: aiogram.webhook.aiohttp_server.SimpleRequestHandler.close:1 of +msgid "Close bot session" +msgstr "" + +#: aiogram.webhook.aiohttp_server.TokenBasedRequestHandler.__init__:1 of +msgid "" +"Handler that supports multiple bots the context will be resolved from " +"path variable 'bot_token'" +msgstr "" + +#: aiogram.webhook.aiohttp_server.TokenBasedRequestHandler.__init__:6 of +msgid "" +"This handler is not recommended in due to token is available in URL and " +"can be logged by reverse proxy server or other middleware." +msgstr "" + +#: aiogram.webhook.aiohttp_server.TokenBasedRequestHandler.__init__:12 of +msgid "kwargs that will be passed to new Bot instance" +msgstr "" + +#: aiogram.webhook.aiohttp_server.TokenBasedRequestHandler.register:1 of +msgid "Validate path, register route and shutdown callback" +msgstr "" + +#: aiogram.webhook.aiohttp_server.TokenBasedRequestHandler.resolve_bot:1 of +msgid "Get bot token from a path and create or get from cache Bot instance" +msgstr "" + +#: ../../dispatcher/webhook.rst:51 +msgid "Security" +msgstr "Безпека" + +#: ../../dispatcher/webhook.rst:53 +msgid "" +"Telegram supports two methods to verify incoming requests that they are " +"from Telegram:" +msgstr "Telegram підтримує два методи перевірки вхідних запитів, що вони надходять від Telegram:" + +#: ../../dispatcher/webhook.rst:56 +msgid "Using a secret token" +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 "Використання фільтрації за 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" +msgstr "" + +#: ../../dispatcher/webhook.rst:78 +msgid "Behind reverse proxy" +msgstr "" + +#: ../../dispatcher/webhook.rst:80 +msgid "" +"In this example we'll use aiohttp as web framework and nginx as reverse " +"proxy." +msgstr "" + +#: ../../dispatcher/webhook.rst:84 +msgid "" +"When you use nginx as reverse proxy, you should set `proxy_pass` to your " +"aiohttp server address." +msgstr "" + +#: ../../dispatcher/webhook.rst:98 +msgid "Without reverse proxy (not recommended)" +msgstr "" + +#: ../../dispatcher/webhook.rst:100 +msgid "In case without using reverse proxy, you can use aiohttp's ssl context." +msgstr "" + +#: ../../dispatcher/webhook.rst:102 +msgid "Also this example contains usage with self-signed certificate." +msgstr "" + +#: ../../dispatcher/webhook.rst:108 +msgid "With using other web framework" +msgstr "" + +#: ../../dispatcher/webhook.rst:110 +msgid "" +"You can pass incoming request to aiogram's webhook controller from any " +"web framework you want." +msgstr "" + +#: ../../dispatcher/webhook.rst:112 +msgid "" +"Read more about it in " +":meth:`aiogram.dispatcher.dispatcher.Dispatcher.feed_webhook_update` or " +":meth:`aiogram.dispatcher.dispatcher.Dispatcher.feed_update` methods." +msgstr "" + +#: ../../dispatcher/webhook.rst:123 +msgid "" +"If you want to use reply into webhook, you should check that result of " +"the :code:`feed_update` methods is an instance of API method and build " +":code:`multipart/form-data` or :code:`application/json` response body " +"manually." +msgstr "" + +#~ msgid "" +#~ "In case you want can't use reverse" +#~ " proxy, you can use aiohttp's ssl " +#~ "context." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/index.po b/docs/locale/uk_UA/LC_MESSAGES/index.po new file mode 100644 index 00000000..808c81a9 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/index.po @@ -0,0 +1,223 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, 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-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.13.1\n" + +#: ../../../README.rst:3 +msgid "aiogram" +msgstr "" + +#: ../../../README.rst:5 +msgid "MIT License" +msgstr "" + +#: ../../../README.rst:9 +msgid "PyPi status" +msgstr "" + +#: ../../../README.rst:13 +msgid "PyPi Package Version" +msgstr "" + +#: ../../../README.rst:17 +msgid "Downloads" +msgstr "Завантаження" + +#: ../../../README.rst:21 +msgid "Supported python versions" +msgstr "Підтримувані версії Python" + +#: ../../../README.rst:25 +msgid "Telegram Bot API" +msgstr "" + +#: ../../../README.rst:29 +msgid "Tests" +msgstr "Тести" + +#: ../../../README.rst:33 +msgid "Codecov" +msgstr "Покриття коду" + +#: ../../../README.rst:37 +msgid "" +"**aiogram** is a modern and fully asynchronous framework for `Telegram " +"Bot API `_ written in Python 3.8+ " +"using `asyncio `_ and " +"`aiohttp `_." +msgstr "" +"**aiogram** це сучасний та повністю асинхронний фреймворк для розробки " +"чат-ботів `Telegram Bot API `_ на " +"Python 3.8 з використанням `asyncio " +"`_ та `aiohttp " +"`_." + +#: ../../../README.rst:42 +msgid "Make your bots faster and more powerful!" +msgstr "Зробіть своїх ботів швидшими та потужнішими!" + +#: ../../../README.rst:44 +msgid "Documentation:" +msgstr "Документація" + +#: ../../../README.rst:45 +msgid "🇺🇸 `English `_" +msgstr "🇺🇸 `English `_" + +#: ../../../README.rst:46 +msgid "🇺🇦 `Ukrainian `_" +msgstr "🇺🇦 `Українською `_" + +#: ../../../README.rst:50 +msgid "Features" +msgstr "Особливості" + +#: ../../../README.rst:52 +msgid "" +"Asynchronous (`asyncio docs " +"`_, :pep:`492`)" +msgstr "" +"Асинхронність (`asyncio docs " +"`_, :pep:`492`)" + +#: ../../../README.rst:53 +msgid "" +"Has type hints (:pep:`484`) and can be used with `mypy `_" +msgstr "" +"Має анотації типів (:pep:`484`) та може використовуватись з `mypy `_" + +#: ../../../README.rst:54 +msgid "Supports `PyPy `_" +msgstr "Працює з `PyPy `_" + +#: ../../../README.rst:55 +msgid "" +"Supports `Telegram Bot API 8.3 `_ and" +" gets fast updates to the latest versions of the Bot API" +msgstr "" +"Підтримує найсвіжішу версію `Telegram Bot API `_ та" +" швидко отримує оновлення до нових версії АПІ" + +#: ../../../README.rst:56 +msgid "" +"Telegram Bot API integration code was `autogenerated " +"`_ and can be easily re-generated " +"when API gets updated" +msgstr "" +"Код інтеграції з Bot API є `автогенерованим `_ що надає змогу дуже легко оновлювати фреймворк до останніх" +" версій АПІ" + +#: ../../../README.rst:57 +msgid "Updates router (Blueprints)" +msgstr "Має роутери подій (Blueprints)" + +#: ../../../README.rst:58 +msgid "Has Finite State Machine" +msgstr "Має вбудований кінцевий автомат" + +#: ../../../README.rst:59 +msgid "" +"Uses powerful `magic filters " +"`_" +msgstr "" + +#: ../../../README.rst:60 +msgid "Middlewares (incoming updates and API calls)" +msgstr "" +"Підтримує мідлвари (для вхідних подій від АПІ та для вихідних запитів до " +"АПІ)" + +#: ../../../README.rst:61 +msgid "" +"Provides `Replies into Webhook `_" +msgstr "" +"Підтримує можливість `відповіді у вебхук " +"`_" + +#: ../../../README.rst:62 +msgid "Integrated I18n/L10n support with GNU Gettext (or Fluent)" +msgstr "" +"Має вбудовану інтеграцію для використання інтернаціоналізації та " +"локалізації GNU Gettext (або Fluent)" + +#: ../../../README.rst:67 +msgid "" +"It is strongly advised that you have prior experience working with " +"`asyncio `_ before " +"beginning to use **aiogram**." +msgstr "" +"Наполегливо рекомендується навчитись працювати з asyncio перед тим, як " +"починати використовувати цей фреймворк. `asyncio " +"`_" + +#: ../../../README.rst:71 +msgid "If you have any questions, you can visit our community chats on Telegram:" +msgstr "Якщо є додаткові запитання, ласкаво просимо до онлайн-спільнот:" + +#: ../../../README.rst:73 +msgid "🇺🇸 `@aiogram `_" +msgstr "" + +#: ../../../README.rst:74 +msgid "🇺🇦 `@aiogramua `_" +msgstr "" + +#: ../../../README.rst:75 +msgid "🇺🇿 `@aiogram_uz `_" +msgstr "" + +#: ../../../README.rst:76 +msgid "🇰🇿 `@aiogram_kz `_" +msgstr "" + +#: ../../../README.rst:77 +msgid "🇷🇺 `@aiogram_ru `_" +msgstr "💩 `@aiogram_ru `_" + +#: ../../../README.rst:78 +msgid "🇮🇷 `@aiogram_fa `_" +msgstr "" + +#: ../../../README.rst:79 +msgid "🇮🇹 `@aiogram_it `_" +msgstr "" + +#: ../../../README.rst:80 +msgid "🇧🇷 `@aiogram_br `_" +msgstr "" + +#: ../../index.rst:4 +msgid "Simple usage" +msgstr "Приклад використання" + +#: ../../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 new file mode 100644 index 00000000..c61cbb4e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/install.po @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +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: 2022-10-14 00:10+0300\n" +"Last-Translator: \n" +"Language: uk_UA\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" + +#: ../../install.rst:3 +msgid "Installation" +msgstr "Встановлення" + +#: ../../install.rst:6 +msgid "From PyPI" +msgstr "З PyPI" + +#: ../../install.rst:13 +msgid "From Arch Linux Repository" +msgstr "З репозиторію Arch Linux" + +#: ../../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: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 new file mode 100644 index 00000000..fdcc86e8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/migration_2_to_3.po @@ -0,0 +1,547 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +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: 2023-09-14 18:34+0300\n" +"Last-Translator: \n" +"Language: uk_UA\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" + +#: ../../migration_2_to_3.rst:7 +msgid "Migration FAQ (2.x -> 3.0)" +msgstr "FAQ по переходу з версії 2.x на 3.0" + +#: ../../migration_2_to_3.rst:11 +msgid "This guide is still in progress." +msgstr "Цей посібник все ще в розробці." + +#: ../../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," +" provides useful mechanisms to modularize your code, and enables the " +"creation of shareable modules via packages on PyPI. It also makes " +"middlewares and filters more controllable, among other improvements." +msgstr "" +"Ця версія містить численні суттєві зміни та архітектурні покращення. Вона" +" допомагає зменшити кількість глобальних змінних у вашому коді, надає " +"корисні механізми для модуляризації вашого коду та дозволяє створювати " +"спільні модулі за допомогою пакетів на PyPI. Крім того, серед інших " +"покращень, він робить проміжне програмне забезпечення (мідлварі) та " +"фільтри більш контрольованими." + +#: ../../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." +msgstr "" +"На цій сторінці ви можете прочитати про зміни, внесені в останню " +"стабільну версію 2.x." + +#: ../../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." +msgstr "" +"Ця сторінка більше нагадує детальний список змін, ніж посібник з " +"міграції, але вона буде оновлюватися в майбутньому." + +#: ../../migration_2_to_3.rst:26 +msgid "" +"Feel free to contribute to this page, if you find something that is not " +"mentioned here." +msgstr "" +"Не соромтеся зробити свій внесок у цю сторінку, якщо ви знайшли щось, про" +" що тут не згадано." + +#: ../../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:38 +msgid "Dispatcher" +msgstr "Диспетчер" + +#: ../../migration_2_to_3.rst:40 +msgid "" +"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\")." +msgstr "" +"Клас :class:`Dispatcher` більше не приймає екземпляр `Bot` у своєму " +"ініціалізаторі. Замість цього екземпляр `Bot` слід передавати диспетчеру " +"тільки для запуску полінгу або обробки подій з вебхуків. Такий підхід " +"також дозволяє використовувати декілька екземплярів бота одночасно " +"(\"мультибот\")." + +#: ../../migration_2_to_3.rst:44 +msgid "" +"|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:47 +msgid "" +"Removed the **_handler** suffix from all event handler decorators and " +"registering methods. (:ref:`Read more » `)" +msgstr "" +"Видалено суфікс **_handler** з усіх декораторів обробників подій та " +"методів реєстрації. (:ref:`Детальніше » `)" + +#: ../../migration_2_to_3.rst:49 +msgid "" +"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:50 +msgid "" +"The throttling method has been completely removed; you can now use " +"middlewares to control the execution context and implement any throttling" +" mechanism you desire." +msgstr "" +"Метод дроселювання (Throttling) повністю вилучено; тепер ви можете " +"використовувати проміжне програмне забезпечення (middleware) для " +"керування контекстом виконання та реалізовувати будь-який механізм " +"дроселювання за вашим бажанням." + +#: ../../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\"]`." +msgstr "" +"Вилучено глобальні контекстні змінні з типів API, об'єктів Bot та " +"Dispatcher, Відтепер, якщо ви хочете отримати доступ до поточного " +"екземпляру бота в обробниках або фільтрах, ви повинні приймати аргумент " +":code:`bot: Bot` і використовувати його замість " +":code:`Bot.get_current()`. У проміжному програмному забезпеченні " +"(middleware) доступ до нього можна отримати через :code:`data[\"bot\"]`." + +#: ../../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, " +"rather than passing :code:`skip_updates=True` to the start polling " +"method." +msgstr "" +"Щоб пропустити очікувані оновлення, тепер вам слід викликати метод " +":class:`aiogram.methods.delete_webhook.DeleteWebhook` безпосередньо, а не" +" передавати :code:`skip_updates=True` до методу запуску полінгу." + +#: ../../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:65 +msgid "" +"Keyword filters can no longer be used; use filters explicitly. (`Read " +"more » `_)" +msgstr "" +"Фільтри за ключовими словами більше не можна використовувати; " +"використовуйте фільтри явно. (`Детальніше » " +"`_)" + +#: ../../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 " +"specify them explicitly if you wish to use them. For example instead of " +"using :code:`@dp.message_handler(content_types=ContentType.PHOTO)` you " +"should use :code:`@router.message(F.photo)`" +msgstr "" +"У зв'язку з вилученням keyword фільтрів, всі раніше ввімкнені за " +"замовчуванням фільтри (такі як state і content_type) тепер вимкнено. Якщо" +" ви бажаєте їх використовувати, ви повинні вказати їх явно. Наприклад, " +"замість :code:`@dp.message_handler(content_types=ContentType.PHOTO)` слід" +" використовувати :code:`@router.message(F.photo)`." + +#: ../../migration_2_to_3.rst:71 +#, fuzzy +msgid "" +"Most common filters have been replaced with the \"magic filter.\" " +"(:ref:`Read more » `)" +msgstr "" +"Більшість звичайних фільтрів було замінено на \"магічний фільтр\". " +"(:ref:`Детальніше далі » `)" + +#: ../../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 " +"other)." +msgstr "" +"За замовчуванням обробник повідомлень тепер отримує будь-який тип вмісту." +" Якщо вам потрібен певний тип, просто додайте відповідні фільтри (Magic " +"або будь-який інший)." + +#: ../../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 " +"v3. Conversely, if the state was not specified in v2, you will now need " +"to specify it in v3." +msgstr "" +"Фільтр стану більше не вмикається за замовчуванням. Це означає, що якщо " +"ви використовували :code:`state=\"*\"` у v2, вам не слід передавати " +"фільтр стану у v3. І навпаки, якщо стан не було вказано у v2, вам " +"потрібно буде вказати його у v3." + +#: ../../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" +" purpose of each router." +msgstr "" +"Додано можливість реєстрації глобальних фільтрів для кожного роутера, що " +"допомагає зменшити повторення коду і полегшує контроль призначення " +"кожного роутера." + +#: ../../migration_2_to_3.rst:83 +msgid "Bot API" +msgstr "" + +#: ../../migration_2_to_3.rst:85 +msgid "" +"All API methods are now classes with validation, implemented via " +"`pydantic `. These API calls are also " +"available as methods in the Bot class." +msgstr "" +"Всі методи API тепер є класами з валідацією, реалізованими через " +"`pydantic `. Ці виклики API також доступні як" +" методи в класі Bot." + +#: ../../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 " +":class:`aiogram.enums.ChatType` instead of " +":class:`aiogram.types.chat.ChatType`." +msgstr "" +"Додано більше попередньо визначених enums та переміщено їх до підпакету " +"`aiogram.enums`. Наприклад, enum типу чату тепер має вигляд " +":class:`aiogram.enums.ChatType` замість " +":class:`aiogram.types.chat.ChatType`." + +#: ../../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." +msgstr "" +"Клієнтська сесія HTTP була відокремлена в контейнер, який можна повторно " +"використовувати для різних екземплярів бота в додатку." + +#: ../../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 " +"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." +msgstr "" +"Виключення API більше не класифікуються за конкретними повідомленнями, " +"оскільки Telegram не має задокументованих кодів помилок. Проте всі " +"помилки класифікуються за кодами статусу HTTP, і для кожного методу з " +"певним кодом може бути пов'язаний лише один тип помилки. Тому в більшості" +" випадків слід перевіряти лише тип помилки (за кодом статусу), не " +"перевіряючи повідомлення про помилку." + +#: ../../migration_2_to_3.rst:102 +msgid "Middlewares" +msgstr "Проміжне ПО (Middlewares)" + +#: ../../migration_2_to_3.rst:104 +msgid "" +"Middlewares can now control an execution context, e.g., using context " +"managers. (:ref:`Read more » `)" +msgstr "" +"Проміжне програмне забезпечення тепер може керувати контекстом виконання," +" наприклад, за допомогою менеджерів контексту. (:ref:`Детальніше » " +"`)" + +#: ../../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" +" context inside middleware and get it in the filters layer as the same " +"way as in the handlers via keyword arguments." +msgstr "" +"Всі контекстні дані тепер наскрізно використовуються між проміжним " +"програмним забезпеченням, фільтрами та обробниками. Наприклад, тепер ви " +"можете легко передати деякі дані в контекст у проміжному програмному " +"забезпеченні і отримати їх у шарі фільтрів так само, як і в обробниках " +"через аргументи ключових слів." + +#: ../../migration_2_to_3.rst:109 +msgid "" +"Added a mechanism named **flags** that helps customize handler behavior " +"in conjunction with middlewares. (:ref:`Read more » `)" +msgstr "" +"Додано механізм з назвою **flags**, який допомагає налаштовувати " +"поведінку обробника у поєднанні з проміжним програмним забезпеченням. " +"(:ref:`Детальніше про » `)" + +#: ../../migration_2_to_3.rst:114 +msgid "Keyboard Markup" +msgstr "Розмітка клавіатури" + +#: ../../migration_2_to_3.rst:116 +msgid "" +"Now :class:`aiogram.types.inline_keyboard_markup.InlineKeyboardMarkup` " +"and :class:`aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup` no " +"longer have methods for extension, instead you have to use markup " +"builders :class:`aiogram.utils.keyboard.ReplyKeyboardBuilder` and " +":class:`aiogram.utils.keyboard.KeyboardBuilder` respectively (:ref:`Read " +"more » `)" +msgstr "" +"Тепер :class:`aiogram.types.inline_keyboard_markup.InlineKeyboardMarkup` " +"та :class:`aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup` " +"більше не мають методів для розширення, натомість вам слід " +"використовувати будівники розмітки " +":class:`aiogram.utils.keyboard.ReplyKeyboardBuilder` та " +":class:`aiogram.utils.keyboard.InlineKeyboardBuilder` відповідно " +"(:ref:`Детальніше » `)" + +#: ../../migration_2_to_3.rst:124 +msgid "Callbacks data" +msgstr "Дані зворотного виклику" + +#: ../../migration_2_to_3.rst:126 +msgid "" +"The callback data factory is now strictly typed using `pydantic " +"`_ models. (:ref:`Read more » `)" +msgstr "" +"Фабрику даних зворотного виклику тепер строго типізовано за допомогою " +"моделей `pydantic `_. (:ref:`Детальніше » " +"`)" + +#: ../../migration_2_to_3.rst:131 +msgid "Finite State machine" +msgstr "Скінченний автомат" + +#: ../../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." +msgstr "" +"Фільтри станів більше не будуть автоматично додаватися до всіх " +"обробників; вам потрібно буде вказати стан, якщо ви хочете його " +"використати." + +#: ../../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|." +msgstr "" +"Додано можливість змінювати стратегію FSM. Наприклад, якщо ви хочете " +"контролювати стан для кожного користувача на основі топіків чату, а не " +"користувача в чаті, ви можете вказати це в Диспетчері." + +#: ../../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. 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:142 +msgid "" +"The state proxy is deprecated; you should update the state data by " +"calling :code:`state.set_data(...)` and :code:`state.get_data()` " +"respectively." +msgstr "" +"Проксі стану є застарілим; вам слід оновити дані стану, викликавши " +":code:`state.set_data(...)` та :code:`state.get_data()` відповідно." + +#: ../../migration_2_to_3.rst:147 +msgid "Sending Files" +msgstr "Надсилання файлів" + +#: ../../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. " +"(:ref:`Read more » `)" +msgstr "" +"Відтепер перед відправкою файлів слід обертати їх в об'єкт InputFile " +"замість того, щоб передавати об'єкт вводу-виводу безпосередньо до методу " +"API. (:ref:`Детальніше » `)" + +#: ../../migration_2_to_3.rst:154 +msgid "Webhook" +msgstr "Вебхук" + +#: ../../migration_2_to_3.rst:156 +msgid "The aiohttp web app configuration has been simplified." +msgstr "Спрощено налаштування веб-застосунку aiohttp." + +#: ../../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 "За замовчуванням додана можливість завантаження файлів при `відповідях на оновлення `_ (доступно тільки для вебхука)." + +#: ../../migration_2_to_3.rst:161 +msgid "Telegram API Server" +msgstr "Сервер Telegram API" + +#: ../../migration_2_to_3.rst:163 +#, fuzzy +msgid "" +"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:164 +#, fuzzy +msgid "" +"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 new file mode 100644 index 00000000..3bd4280c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/callback_answer.po @@ -0,0 +1,204 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-02-12 00:22+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" + +#: ../../utils/callback_answer.rst:4 +msgid "Callback answer" +msgstr "" + +#: ../../utils/callback_answer.rst:6 +msgid "" +"Helper for callback query handlers, can be useful in bots with a lot of " +"callback handlers to automatically take answer to all requests." +msgstr "" + +#: ../../utils/callback_answer.rst:10 +msgid "Simple usage" +msgstr "" + +#: ../../utils/callback_answer.rst:12 +msgid "" +"For use, it is enough to register the inner middleware " +":class:`aiogram.utils.callback_answer.CallbackAnswerMiddleware` in " +"dispatcher or specific router:" +msgstr "" + +#: ../../utils/callback_answer.rst:18 +msgid "" +"After that all handled callback queries will be answered automatically " +"after processing the handler." +msgstr "" + +#: ../../utils/callback_answer.rst:21 +msgid "Advanced usage" +msgstr "" + +#: ../../utils/callback_answer.rst:23 +msgid "" +"In some cases you need to have some non-standard response parameters, " +"this can be done in several ways:" +msgstr "" + +#: ../../utils/callback_answer.rst:26 +msgid "Global defaults" +msgstr "" + +#: ../../utils/callback_answer.rst:28 +msgid "" +"Change default parameters while initializing middleware, for example " +"change answer to `pre` mode and text \"OK\":" +msgstr "" + +#: ../../utils/callback_answer.rst:35 +msgid "" +"Look at :class:`aiogram.utils.callback_answer.CallbackAnswerMiddleware` " +"to get all available parameters" +msgstr "" + +#: ../../utils/callback_answer.rst:39 +msgid "Handler specific" +msgstr "" + +#: ../../utils/callback_answer.rst:41 +msgid "" +"By using :ref:`flags ` you can change the behavior for specific " +"handler" +msgstr "" + +#: ../../utils/callback_answer.rst:50 +msgid "" +"Flag arguments is the same as in " +":class:`aiogram.utils.callback_answer.CallbackAnswerMiddleware` with " +"additional one :code:`disabled` to disable answer." +msgstr "" + +#: ../../utils/callback_answer.rst:54 +msgid "A special case" +msgstr "" + +#: ../../utils/callback_answer.rst:56 +msgid "" +"It is not always correct to answer the same in every case, so there is an" +" option to change the answer inside the handler. You can get an instance " +"of :class:`aiogram.utils.callback_answer.CallbackAnswer` object inside " +"handler and change whatever you want." +msgstr "" + +#: ../../utils/callback_answer.rst:61 +msgid "" +"Note that is impossible to change callback answer attributes when you use" +" :code:`pre=True` mode." +msgstr "" + +#: ../../utils/callback_answer.rst:76 +msgid "Combine that all at once" +msgstr "" + +#: ../../utils/callback_answer.rst:78 +msgid "" +"For example you want to answer in most of cases before handler with text " +"\"🤔\" but at some cases need to answer after the handler with custom " +"text, so you can do it:" +msgstr "" + +#: ../../utils/callback_answer.rst:94 +msgid "Description of objects" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware:1 of +msgid "Bases: :py:class:`~aiogram.dispatcher.middlewares.base.BaseMiddleware`" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:1 of +msgid "" +"Inner middleware for callback query handlers, can be useful in bots with " +"a lot of callback handlers to automatically take answer to all requests" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__ +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__ of +msgid "Parameters" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:4 of +msgid "send answer before execute handler" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:5 +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:5 of +msgid "answer with text" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:6 +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:6 of +msgid "show alert" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:7 +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:7 of +msgid "game url" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:8 +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:8 of +msgid "cache answer for some time" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer:1 of +msgid "Bases: :py:class:`object`" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:1 of +msgid "Callback answer configuration" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:3 of +msgid "this request is already answered by middleware" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:4 of +msgid "answer will not be performed" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.disable:1 of +msgid "Deactivate answering for this handler" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.disabled:1 of +msgid "Indicates that automatic answer is disabled in this handler" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.answered:1 of +msgid "Indicates that request is already answered by middleware" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.text:1 of +msgid "Response text :return:" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.show_alert:1 of +msgid "Whether to display an alert" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.url:1 of +msgid "Game url" +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 new file mode 100644 index 00000000..6748aef8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/chat_action.po @@ -0,0 +1,162 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +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: 2022-10-13 21:22+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.13.1\n" + +#: ../../utils/chat_action.rst:3 +msgid "Chat action sender" +msgstr "Відправник дій у чаті" + +#: ../../utils/chat_action.rst:6 +msgid "Sender" +msgstr "Відправник" + +#: aiogram.utils.chat_action.ChatActionSender:1 of +msgid "" +"This utility helps to automatically send chat action until long actions " +"is done to take acknowledge bot users the bot is doing something and not " +"crashed." +msgstr "" +"Ця утиліта допомагає автоматично надсилати дії чату, допоки виконуються " +"тривалі дії боттом,щоб повідомити користувачів бота про те що бот щось " +"робить і не завершив роботу аварійно." + +#: aiogram.utils.chat_action.ChatActionSender:4 of +msgid "Provides simply to use context manager." +msgstr "Надає простий для використання контекстний менеджер." + +#: aiogram.utils.chat_action.ChatActionSender:6 of +msgid "" +"Technically sender start background task with infinity loop which works " +"until action will be finished and sends the `chat action " +"`_ every 5 seconds." +msgstr "" +"Технічно, відправник запускає фонову завдачу з нескінченним циклом, який " +"працює до завершення дії та надсилає `дію чату " +"`_ кожні 5 секунд." + +#: ../../utils/chat_action.rst +msgid "Parameters" +msgstr "Параметри" + +#: aiogram.utils.chat_action.ChatActionSender.__init__:1 of +msgid "instance of the bot" +msgstr "екземпляр бота, необов'язковий параметр" + +#: aiogram.utils.chat_action.ChatActionSender.__init__:2 of +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__:5 of +msgid "interval between iterations" +msgstr "інтервал між ітераціями" + +#: aiogram.utils.chat_action.ChatActionSender.__init__:6 of +#, fuzzy +msgid "sleep before first sending of the action" +msgstr "затримка перед першою ітерацією" + +#: aiogram.utils.chat_action.ChatActionSender.choose_sticker:1 of +msgid "Create instance of the sender with `choose_sticker` action" +msgstr "Створення екземпляру відправника з дією `choose_sticker` " + +#: aiogram.utils.chat_action.ChatActionSender.find_location:1 of +msgid "Create instance of the sender with `find_location` action" +msgstr "Створення екземпляру відправника з дією `find_location`" + +#: aiogram.utils.chat_action.ChatActionSender.record_video:1 of +msgid "Create instance of the sender with `record_video` action" +msgstr "Створення екземпляру відправника з дією `record_video`" + +#: aiogram.utils.chat_action.ChatActionSender.record_video_note:1 of +msgid "Create instance of the sender with `record_video_note` action" +msgstr "Створення екземпляру відправника з дією `record_video_note`" + +#: aiogram.utils.chat_action.ChatActionSender.record_voice:1 of +msgid "Create instance of the sender with `record_voice` action" +msgstr "Створення екземпляру відправника з дією `record_voice`" + +#: aiogram.utils.chat_action.ChatActionSender.typing:1 of +msgid "Create instance of the sender with `typing` action" +msgstr "Створення екземпляру відправника з дією `typing` " + +#: aiogram.utils.chat_action.ChatActionSender.upload_document:1 of +msgid "Create instance of the sender with `upload_document` action" +msgstr "Створення екземпляру відправника з дією `upload_document` " + +#: aiogram.utils.chat_action.ChatActionSender.upload_photo:1 of +msgid "Create instance of the sender with `upload_photo` action" +msgstr "Створення екземпляру відправника з дією `upload_photo`" + +#: aiogram.utils.chat_action.ChatActionSender.upload_video:1 of +msgid "Create instance of the sender with `upload_video` action" +msgstr "Створення екземпляру відправника з дією `upload_video" + +#: aiogram.utils.chat_action.ChatActionSender.upload_video_note:1 of +msgid "Create instance of the sender with `upload_video_note` action" +msgstr "Створення екземпляру відправника з дією `upload_video_note`" + +#: aiogram.utils.chat_action.ChatActionSender.upload_voice:1 of +msgid "Create instance of the sender with `upload_voice` action" +msgstr "Створення екземпляру відправника з дією `upload_voice`" + +#: ../../utils/chat_action.rst:12 ../../utils/chat_action.rst:29 +msgid "Usage" +msgstr "Використання" + +#: ../../utils/chat_action.rst:23 +msgid "Middleware" +msgstr "Проміжні програми" + +#: aiogram.utils.chat_action.ChatActionMiddleware:1 of +msgid "Helps to automatically use chat action sender for all message handlers" +msgstr "" +"Допомагає автоматично використовувати відправника дій чату для всіх " +"обробників повідомлень" + +#: ../../utils/chat_action.rst:31 +msgid "Before usa should be registered for the `message` event" +msgstr "Перед використанням слід зареєструвати для події `message`" + +#: ../../utils/chat_action.rst:37 +msgid "" +"After this action all handlers which works longer than `initial_sleep` " +"will produce the '`typing`' chat action." +msgstr "" +"Після цього всі обробники, що працюють довше за `initial_sleep`, " +"виконуватимуть дію '`typing`' чату" + +#: ../../utils/chat_action.rst:39 +msgid "Also sender can be customized via flags feature for particular handler." +msgstr "" +"Також відправник може бути налаштованим за допомогою функції міток для " +"певного обробника." + +#: ../../utils/chat_action.rst:41 +msgid "Change only action type:" +msgstr "Зміна лише типу дії:" + +#: ../../utils/chat_action.rst:50 +msgid "Change sender configuration:" +msgstr "Зміна конфігурації відправника:" diff --git a/docs/locale/uk_UA/LC_MESSAGES/utils/deep_linking.po b/docs/locale/uk_UA/LC_MESSAGES/utils/deep_linking.po new file mode 100644 index 00000000..dc5ec514 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/deep_linking.po @@ -0,0 +1,113 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+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/deep_linking.rst:3 +msgid "Deep Linking" +msgstr "" + +#: ../../utils/deep_linking.rst:5 +msgid "" +"Telegram bots have a deep linking mechanism, that allows for passing " +"additional parameters to the bot on startup. It could be a command that " +"launches the bot — or an auth token to connect the user's Telegram " +"account to their account on some external service." +msgstr "" + +#: ../../utils/deep_linking.rst:10 +msgid "" +"You can read detailed description in the source: " +"https://core.telegram.org/bots/features#deep-linking" +msgstr "" + +#: ../../utils/deep_linking.rst:13 +msgid "We have added some utils to get deep links more handy." +msgstr "" + +#: ../../utils/deep_linking.rst:16 +msgid "Examples" +msgstr "" + +#: ../../utils/deep_linking.rst:19 +msgid "Basic link example" +msgstr "" + +#: ../../utils/deep_linking.rst:30 +msgid "Encoded link" +msgstr "" + +#: ../../utils/deep_linking.rst:40 +msgid "Decode it back" +msgstr "" + +#: ../../utils/deep_linking.rst:56 +msgid "References" +msgstr "" + +#: aiogram.utils.deep_linking.create_start_link:1 of +msgid "Create 'start' deep link with your payload." +msgstr "" + +#: aiogram.utils.deep_linking.create_start_link:4 of +msgid "If you need to encode payload or pass special characters -" +msgstr "" + +#: aiogram.utils.deep_linking.create_start_link:4 of +msgid "set encode as True" +msgstr "" + +#: aiogram.utils.deep_linking.create_start_link of +msgid "Parameters" +msgstr "" + +#: aiogram.utils.deep_linking.create_start_link:6 of +msgid "bot instance" +msgstr "" + +#: aiogram.utils.deep_linking.create_start_link:7 of +msgid "args passed with /start" +msgstr "" + +#: aiogram.utils.deep_linking.create_start_link:8 of +msgid "encode payload with base64url or custom encoder" +msgstr "" + +#: aiogram.utils.deep_linking.create_start_link:9 of +msgid "custom encoder callable" +msgstr "" + +#: aiogram.utils.deep_linking.create_start_link of +msgid "Returns" +msgstr "" + +#: aiogram.utils.deep_linking.create_start_link:10 of +msgid "link" +msgstr "" + +#: aiogram.utils.payload.decode_payload:1 of +msgid "Decode URL-safe base64url payload with decoder." +msgstr "" + +#~ msgid "" +#~ "You can read detailed description in " +#~ "the source: https://core.telegram.org/bots#deep-" +#~ "linking" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/utils/formatting.po b/docs/locale/uk_UA/LC_MESSAGES/utils/formatting.po new file mode 100644 index 00000000..222e9569 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/formatting.po @@ -0,0 +1,472 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, 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-Team: Українська \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/formatting.rst:5 +msgid "Formatting" +msgstr "Форматування" + +#: ../../utils/formatting.rst:7 +msgid "Make your message formatting flexible and simple" +msgstr "Зробіть форматування ваших повідомлень гнучким і простим" + +#: ../../utils/formatting.rst:9 +msgid "" +"This instrument works on top of Message entities instead of using HTML or" +" Markdown markups, you can easily construct your message and sent it to " +"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 "Використання" + +#: ../../utils/formatting.rst:17 +msgid "Basic scenario" +msgstr "Основний сценарій" + +#: ../../utils/formatting.rst:19 +msgid "Construct your message and send it to the Telegram." +msgstr "Складіть своє повідомлення та надішліть його у Telegram." + +#: ../../utils/formatting.rst:26 +msgid "Is the same as the next example, but without usage markup" +msgstr "Такий самий, як наступний приклад, але без використання розмітки" + +#: ../../utils/formatting.rst:35 +msgid "" +"Literally when you execute :code:`as_kwargs` method the Text object is " +"converted into text :code:`Hello, Alex!` with entities list " +":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 "Розширений сценарій" + +#: ../../utils/formatting.rst:44 +msgid "" +"On top of base elements can be implemented content rendering structures, " +"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 "Об'єднайте кілька вузлів у рядок із :code:`\\\\n` в кінці рядка." + +#: ../../utils/formatting.rst +msgid "Parameters" +msgstr "Параметри" + +#: aiogram.utils.formatting.as_line:3 of +msgid "Text or Any" +msgstr "Текст або Інше" + +#: aiogram.utils.formatting.as_line:4 of +msgid "ending of the line, by default is :code:`\\\\n`" +msgstr "завершення рядка, за замовчуванням :code:`\\\\n`" + +#: aiogram.utils.formatting.as_line:5 of +msgid "separator between items, by default is empty string" +msgstr "роздільник між елементами, за замовчуванням порожній рядок" + +#: ../../utils/formatting.rst +msgid "Returns" +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 "Текст" + +#: aiogram.utils.formatting.as_list:1 of +msgid "Wrap each element to separated lines" +msgstr "Обгорніть кожен елемент у окремий рядок" + +#: aiogram.utils.formatting.as_marked_list:1 of +msgid "Wrap elements as marked list" +msgstr "Обгорніть елементи у маркований список" + +#: aiogram.utils.formatting.as_marked_list:4 of +msgid "line marker, by default is '- '" +msgstr "маркер рядка, за замовчуванням '- '" + +#: aiogram.utils.formatting.as_numbered_list:1 of +msgid "Wrap elements as numbered list" +msgstr "Обгорніть елементи у нумерований список" + +#: aiogram.utils.formatting.as_numbered_list:4 of +msgid "initial number, by default 1" +msgstr "початковий номер, за замовчуванням 1" + +#: aiogram.utils.formatting.as_numbered_list:5 of +msgid "number format, by default '{}. '" +msgstr "формат номера, за замовчуванням '{}. '" + +#: aiogram.utils.formatting.as_section:1 of +msgid "Wrap elements as simple section, section has title and body" +msgstr "Обгорніть елементи у простий розділ, розділ має заголовок та тіло" + +#: aiogram.utils.formatting.as_marked_section:1 of +msgid "Wrap elements as section with marked list" +msgstr "Обгорніть елементи у розділ із маркованим списком" + +#: aiogram.utils.formatting.as_numbered_section:1 of +msgid "Wrap elements as section with numbered list" +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 "і давайте завершимо їх всіх:" + +#: ../../utils/formatting.rst:92 +msgid "Will be rendered into:" +msgstr "Буде відрендерено у:" + +#: ../../utils/formatting.rst:94 +msgid "**Success:**" +msgstr "**Успішно:**" + +#: ../../utils/formatting.rst:96 +msgid "✅ Test 1" +msgstr "✅ Тест 1" + +#: ../../utils/formatting.rst:98 +msgid "✅ Test 3" +msgstr "✅ Тест 3" + +#: ../../utils/formatting.rst:100 +msgid "✅ Test 4" +msgstr "✅ Тест 4" + +#: ../../utils/formatting.rst:102 +msgid "**Failed:**" +msgstr "**Помилки:**" + +#: ../../utils/formatting.rst:104 +msgid "❌ Test 2" +msgstr "❌ Тест 2" + +#: ../../utils/formatting.rst:106 +msgid "**Summary:**" +msgstr "**Підсумки:**" + +#: ../../utils/formatting.rst:108 +msgid "**Total**: 4" +msgstr "**Загалом**: 4" + +#: ../../utils/formatting.rst:110 +msgid "**Success**: 3" +msgstr "**Успішно**: 3" + +#: ../../utils/formatting.rst:112 +msgid "**Failed**: 1" +msgstr "**Помилки**: 1" + +#: ../../utils/formatting.rst:114 +msgid "#test" +msgstr "#тест" + +#: ../../utils/formatting.rst:117 +msgid "Or as HTML:" +msgstr "Або як HTML:" + +#: ../../utils/formatting.rst:137 +msgid "Available methods" +msgstr "" + +#: aiogram.utils.formatting.Text:1 of +msgid "Bases: :py:class:`~typing.Iterable`\\ [:py:obj:`~typing.Any`]" +msgstr "" + +#: aiogram.utils.formatting.Text:1 of +msgid "Simple text element" +msgstr "" + +#: aiogram.utils.formatting.Text.render:1 of +#, fuzzy +msgid "Render elements tree as text with entities list" +msgstr "Обгорніть елементи у розділ із нумерованим списком" + +#: aiogram.utils.formatting.Text.as_kwargs:1 of +msgid "" +"Render elements tree as keyword arguments for usage in the API call, for " +"example:" +msgstr "" + +#: aiogram.utils.formatting.Text.as_html:1 of +msgid "Render elements tree as HTML markup" +msgstr "" + +#: aiogram.utils.formatting.Text.as_markdown:1 of +msgid "Render elements tree as MarkdownV2 markup" +msgstr "" + +#: ../../utils/formatting.rst:147 +msgid "Available elements" +msgstr "" + +#: 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 +#: aiogram.utils.formatting.TextLink:1 aiogram.utils.formatting.TextMention:1 +#: aiogram.utils.formatting.Underline:1 aiogram.utils.formatting.Url:1 of +msgid "Bases: :py:class:`~aiogram.utils.formatting.Text`" +msgstr "" + +#: aiogram.utils.formatting.HashTag:1 of +msgid "Hashtag element." +msgstr "" + +#: aiogram.utils.formatting.HashTag:5 of +msgid "The value should always start with '#' symbol" +msgstr "" + +#: aiogram.utils.formatting.HashTag:7 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type " +":obj:`aiogram.enums.message_entity_type.MessageEntityType.HASHTAG`" +msgstr "" + +#: aiogram.utils.formatting.CashTag:1 of +msgid "Cashtag element." +msgstr "" + +#: aiogram.utils.formatting.CashTag:5 of +msgid "The value should always start with '$' symbol" +msgstr "" + +#: aiogram.utils.formatting.CashTag:7 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type " +":obj:`aiogram.enums.message_entity_type.MessageEntityType.CASHTAG`" +msgstr "" + +#: aiogram.utils.formatting.BotCommand:1 of +msgid "Bot command element." +msgstr "" + +#: aiogram.utils.formatting.BotCommand:5 of +msgid "The value should always start with '/' symbol" +msgstr "" + +#: aiogram.utils.formatting.BotCommand:7 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type " +":obj:`aiogram.enums.message_entity_type.MessageEntityType.BOT_COMMAND`" +msgstr "" + +#: aiogram.utils.formatting.Url:1 of +msgid "Url element." +msgstr "" + +#: aiogram.utils.formatting.Url:3 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.URL`" +msgstr "" + +#: aiogram.utils.formatting.Email:1 of +msgid "Email element." +msgstr "" + +#: aiogram.utils.formatting.Email:3 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type " +":obj:`aiogram.enums.message_entity_type.MessageEntityType.EMAIL`" +msgstr "" + +#: aiogram.utils.formatting.PhoneNumber:1 of +msgid "Phone number element." +msgstr "" + +#: aiogram.utils.formatting.PhoneNumber:3 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type " +":obj:`aiogram.enums.message_entity_type.MessageEntityType.PHONE_NUMBER`" +msgstr "" + +#: aiogram.utils.formatting.Bold:1 of +msgid "Bold element." +msgstr "" + +#: aiogram.utils.formatting.Bold:3 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.BOLD`" +msgstr "" + +#: aiogram.utils.formatting.Italic:1 of +msgid "Italic element." +msgstr "" + +#: aiogram.utils.formatting.Italic:3 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type " +":obj:`aiogram.enums.message_entity_type.MessageEntityType.ITALIC`" +msgstr "" + +#: aiogram.utils.formatting.Underline:1 of +msgid "Underline element." +msgstr "" + +#: aiogram.utils.formatting.Underline:3 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type " +":obj:`aiogram.enums.message_entity_type.MessageEntityType.UNDERLINE`" +msgstr "" + +#: aiogram.utils.formatting.Strikethrough:1 of +msgid "Strikethrough element." +msgstr "" + +#: aiogram.utils.formatting.Strikethrough:3 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type " +":obj:`aiogram.enums.message_entity_type.MessageEntityType.STRIKETHROUGH`" +msgstr "" + +#: aiogram.utils.formatting.Spoiler:1 of +msgid "Spoiler element." +msgstr "" + +#: aiogram.utils.formatting.Spoiler:3 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type " +":obj:`aiogram.enums.message_entity_type.MessageEntityType.SPOILER`" +msgstr "" + +#: aiogram.utils.formatting.Code:1 of +msgid "Code element." +msgstr "" + +#: aiogram.utils.formatting.Code:3 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.CODE`" +msgstr "" + +#: aiogram.utils.formatting.Pre:1 of +msgid "Pre element." +msgstr "" + +#: aiogram.utils.formatting.Pre:3 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.PRE`" +msgstr "" + +#: aiogram.utils.formatting.TextLink:1 of +msgid "Text link element." +msgstr "" + +#: aiogram.utils.formatting.TextLink:3 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type " +":obj:`aiogram.enums.message_entity_type.MessageEntityType.TEXT_LINK`" +msgstr "" + +#: aiogram.utils.formatting.TextMention:1 of +msgid "Text mention element." +msgstr "" + +#: aiogram.utils.formatting.TextMention:3 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type " +":obj:`aiogram.enums.message_entity_type.MessageEntityType.TEXT_MENTION`" +msgstr "" + +#: aiogram.utils.formatting.CustomEmoji:1 of +msgid "Custom emoji element." +msgstr "" + +#: aiogram.utils.formatting.CustomEmoji:3 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"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/i18n.po b/docs/locale/uk_UA/LC_MESSAGES/utils/i18n.po new file mode 100644 index 00000000..00f35fbd --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/i18n.po @@ -0,0 +1,412 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"PO-Revision-Date: 2022-10-13 20:56+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.13.1\n" + +#: ../../utils/i18n.rst:3 +msgid "Translation" +msgstr "Переклад" + +#: ../../utils/i18n.rst:5 +msgid "" +"In order to make you bot translatable you have to add a minimal number of" +" hooks to your Python code." +msgstr "" +"Для того, щоб Ваш бот володів декількома мовами, необхідно додати " +"мінімальну кількість хуків до вашого Python коду" + +#: ../../utils/i18n.rst:7 +msgid "These hooks are called translation strings." +msgstr "Ці хуки звуться рядками передкладу" + +#: ../../utils/i18n.rst:9 +msgid "" +"The aiogram translation utils is build on top of `GNU gettext Python " +"module `_ and `Babel " +"library `_." +msgstr "" +"Утиліти перекладу побудовані на основі модулю `GNU gettext Python " +"`_ і `Babel library " +"`_." + +#: ../../utils/i18n.rst:13 +msgid "Installation" +msgstr "Встановлення" + +#: ../../utils/i18n.rst:15 +msgid "" +"Babel is required to make simple way to extract translation strings from " +"your code" +msgstr "" +"Babel потрібний для забезпечення простоти експорту рядків перекладу з " +"Вашого коду." + +#: ../../utils/i18n.rst:17 +msgid "Can be installed from pip directly:" +msgstr "Можна встановити безпосередньо з pip:" + +#: ../../utils/i18n.rst:24 +msgid "or as `aiogram` extra dependency:" +msgstr "чи як додаткову залежність `aiogram`:" + +#: ../../utils/i18n.rst:32 +msgid "Make messages translatable" +msgstr "Як зробити повідомлення перекладаваними?" + +#: ../../utils/i18n.rst:34 +msgid "" +"In order to gettext need to know what the strings should be translated " +"you will need to write translation strings." +msgstr "" +"Для того, щоб gettext знав які рядки слід перекласти, Вам необхідно " +"відмітити рядки перекладу." + +#: ../../utils/i18n.rst:36 +msgid "For example:" +msgstr "Наприклад:" + +#: ../../utils/i18n.rst:54 +msgid "" +"f-strings can't be used as translations string because any dynamic " +"variables should be added to message after getting translated message" +msgstr "" +"f-рядки не можна використовувати як рядки перекладу, оскільки будь-які " +"динамічні змінні слід додати до повідомлення після отримання " +"перекладеного повідомлення" + +#: ../../utils/i18n.rst:57 +msgid "" +"Also if you want to use translated string in keyword- or magic- filters " +"you will need to use lazy gettext calls:" +msgstr "" +"Крім того, якщо Ви бажаєте використати перекладений рядок у фільтрах, Вам" +" треба використати відкладений переклад (lazy gettext):" + +#: ../../utils/i18n.rst:72 +msgid "" +"Lazy gettext calls should always be used when the current language is not" +" know at the moment" +msgstr "" +"Відкладені виклики gettext слід завжди використовувати, коли поточна мова" +" на даний момент невідома." + +#: ../../utils/i18n.rst:77 +msgid "" +"Lazy gettext can't be used as value for API methods or any Telegram " +"Object (like " +":class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton` or " +"etc.)" +msgstr "" +"Відкладені виклики gettext не можна використовувати як значення для " +"методів API або будь-якого об’єкта Telegram (наприклад, " +":class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton` тощо)" + +#: ../../utils/i18n.rst:79 ../../utils/i18n.rst:161 +msgid "**Working with plural forms**" +msgstr "" + +#: ../../utils/i18n.rst:81 +msgid "" +"The `gettext` from `aiogram.utils.i18n` is the one alias for two " +"functions _gettext_ and _ngettext_ of `GNU gettext Python module " +"`_. Therefore, the " +"wrapper for message strings is the same `_()`. You need to pass three " +"parameters to the function: a singular string, a plural string, and a " +"value." +msgstr "" + +#: ../../utils/i18n.rst:102 +msgid "Configuring engine" +msgstr "Налаштування рушія" + +#: ../../utils/i18n.rst:104 +msgid "" +"After you messages is already done to use gettext your bot should know " +"how to detect user language" +msgstr "" +"Коли ваші повідомлення вже готові використовувати gettext, Ваш бот " +"повинен знати, як визначити мову користувача." + +#: ../../utils/i18n.rst:106 +msgid "" +"On top of your application the instance of " +":class:`aiogram.utils.i18n.I18n` should be created" +msgstr "" +"Поруч з місцем ініціалізації диспетчера має бути створений екземпляр " +"перекладача:class:`aiogram.utils.i18n.I18n`." + +#: ../../utils/i18n.rst:114 +msgid "" +"After that you will need to choose one of builtin I18n middleware or " +"write your own." +msgstr "" +"Після цього Вам потрібно буде вибрати одну з вбудованих проміжних програм" +" (middleware) I18n або написати власну." + +#: ../../utils/i18n.rst:116 +msgid "Builtin middlewares:" +msgstr "Вбудовані проміжні програми:" + +#: ../../utils/i18n.rst:120 +msgid "SimpleI18nMiddleware" +msgstr "SimpleI18nMiddleware" + +#: aiogram.utils.i18n.middleware.SimpleI18nMiddleware:1 of +msgid "Simple I18n middleware." +msgstr "Проста I18n проміжна програма." + +#: aiogram.utils.i18n.middleware.SimpleI18nMiddleware:3 of +msgid "Chooses language code from the User object received in event" +msgstr "Вибирає код мови з об’єкта User, отриманого в події." + +#: aiogram.utils.i18n.middleware.ConstI18nMiddleware.__init__:1 +#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.__init__:1 +#: aiogram.utils.i18n.middleware.I18nMiddleware.__init__:1 +#: aiogram.utils.i18n.middleware.SimpleI18nMiddleware.__init__:1 of +msgid "Create an instance of middleware" +msgstr "Створення екземпляру проміжної програми." + +#: aiogram.utils.i18n.middleware.ConstI18nMiddleware.__init__ +#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.__init__ +#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.set_locale +#: aiogram.utils.i18n.middleware.I18nMiddleware.__init__ +#: aiogram.utils.i18n.middleware.I18nMiddleware.get_locale +#: aiogram.utils.i18n.middleware.I18nMiddleware.setup +#: aiogram.utils.i18n.middleware.SimpleI18nMiddleware.__init__ of +msgid "Parameters" +msgstr "Параметри" + +#: aiogram.utils.i18n.middleware.ConstI18nMiddleware.__init__:3 +#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.__init__:3 +#: aiogram.utils.i18n.middleware.I18nMiddleware.__init__:3 +#: aiogram.utils.i18n.middleware.SimpleI18nMiddleware.__init__:3 of +msgid "instance of I18n" +msgstr "екземпляр I18n" + +#: aiogram.utils.i18n.middleware.ConstI18nMiddleware.__init__:4 +#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.__init__:4 +#: aiogram.utils.i18n.middleware.I18nMiddleware.__init__:4 +#: aiogram.utils.i18n.middleware.SimpleI18nMiddleware.__init__:4 of +msgid "context key for I18n instance" +msgstr "ключ (назва ключа) екземпляру I18n в контексті" + +#: aiogram.utils.i18n.middleware.ConstI18nMiddleware.__init__:5 +#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.__init__:5 +#: aiogram.utils.i18n.middleware.I18nMiddleware.__init__:5 +#: aiogram.utils.i18n.middleware.SimpleI18nMiddleware.__init__:5 of +msgid "context key for this middleware" +msgstr "контекстний ключ для цієї проміжної програми" + +#: ../../utils/i18n.rst:126 +msgid "ConstI18nMiddleware" +msgstr "ConstI18nMiddleware" + +#: aiogram.utils.i18n.middleware.ConstI18nMiddleware:1 of +msgid "Const middleware chooses statically defined locale" +msgstr "Проміжна програма Const вибирає статично визначену локаль." + +#: ../../utils/i18n.rst:132 +msgid "FSMI18nMiddleware" +msgstr "FSMI18nMiddleware" + +#: aiogram.utils.i18n.middleware.FSMI18nMiddleware:1 of +msgid "This middleware stores locale in the FSM storage" +msgstr "Ця проміжна програма зберігає локаль у сховищі FSM." + +#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.set_locale:1 of +msgid "Write new locale to the storage" +msgstr "Запис нової локалі у сховище" + +#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.set_locale:3 of +msgid "instance of FSMContext" +msgstr "екземпляр FSMContext" + +#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.set_locale:4 of +msgid "new locale" +msgstr "нова локаль" + +#: ../../utils/i18n.rst:139 +msgid "I18nMiddleware" +msgstr "I18nMiddleware" + +#: ../../utils/i18n.rst:141 +msgid "or define you own based on abstract I18nMiddleware middleware:" +msgstr "" +"або визначте вашу власну проміжну програму, основану на абстракції " +"I18nMiddleware:" + +#: aiogram.utils.i18n.middleware.I18nMiddleware:1 of +msgid "Abstract I18n middleware." +msgstr "Абстракція проміжної програми I18n" + +#: aiogram.utils.i18n.middleware.I18nMiddleware.get_locale:1 of +msgid "Detect current user locale based on event and context." +msgstr "Визначення поточної мови користувача на основі події та контексту." + +#: aiogram.utils.i18n.middleware.I18nMiddleware.get_locale:3 of +msgid "**This method must be defined in child classes**" +msgstr "**Цей метод повинен бути перевизначеним у дочірніх класах**" + +#: aiogram.utils.i18n.middleware.I18nMiddleware.get_locale +#: aiogram.utils.i18n.middleware.I18nMiddleware.setup of +msgid "Returns" +msgstr "Повертає" + +#: aiogram.utils.i18n.middleware.I18nMiddleware.setup:1 of +msgid "Register middleware for all events in the Router" +msgstr "Реєстрація проміжної програми для всіх подій у Роутері" + +#: ../../utils/i18n.rst:148 +msgid "Deal with Babel" +msgstr "Працюємо з Babel" + +#: ../../utils/i18n.rst:151 +msgid "Step 1 Extract messages" +msgstr "Крок 1: Видобування текстів" + +#: ../../utils/i18n.rst:158 +msgid "" +"Here is :code:`--input-dirs=.` - path to code and the " +":code:`locales/messages.pot` is template where messages will be extracted" +" and `messages` is translation domain." +msgstr "" +"Де :code:`--input-dirs=.`- шлях до коду, :code:`locales/messages.pot` — " +"це шаблон, куди витягуватимуться повідомлення, а `messages` — домен " +"перекладу." + +#: ../../utils/i18n.rst:163 +msgid "Extracting with Pybabel all strings options:" +msgstr "" + +#: ../../utils/i18n.rst:165 +msgid ":code:`-k _:1,1t -k _:1,2` - for both singular and plural" +msgstr "" + +#: ../../utils/i18n.rst:166 +msgid ":code:`-k __` - for lazy strings" +msgstr "" + +#: ../../utils/i18n.rst:174 +msgid "Some useful options:" +msgstr "Деякі корисні опції:" + +#: ../../utils/i18n.rst:176 +msgid "" +"Add comments for translators, you can use another tag if you want (TR) " +":code:`--add-comments=NOTE`" +msgstr "" +"Для додавання коментарів для перекладачів, ви можете використовувати " +"інший тег, якщо хочете (TR) :code:`--add-comments=NOTE`" + +#: ../../utils/i18n.rst:177 +msgid "Contact email for bugreport :code:`--msgid-bugs-address=EMAIL`" +msgstr "" + +#: ../../utils/i18n.rst:178 +msgid "Disable comments with string location in code :code:`--no-location`" +msgstr "Вимкнути коментарі з розташуванням рядків у коді :code:`--no-location`" + +#: ../../utils/i18n.rst:179 +msgid "Copyrights :code:`--copyright-holder=AUTHOR`" +msgstr "" + +#: ../../utils/i18n.rst:180 +msgid "Set project name :code:`--project=MySuperBot`" +msgstr "Встановлення назви проекту :code:`--project=MySuperBot`" + +#: ../../utils/i18n.rst:181 +msgid "Set version :code:`--version=2.2`" +msgstr "Встановлення версії :code:`--version=2.2`" + +#: ../../utils/i18n.rst:185 +msgid "Step 2: Init language" +msgstr "Крок 2: Ініціалізація перекладу" + +#: ../../utils/i18n.rst:191 +msgid ":code:`-i locales/messages.pot` - pre-generated template" +msgstr ":code:`-i locales/messages.pot` - попередньо створений шаблон" + +#: ../../utils/i18n.rst:192 +msgid ":code:`-d locales` - translations directory" +msgstr ":code:`-d locales`- тека перекладів" + +#: ../../utils/i18n.rst:193 +msgid ":code:`-D messages` - translations domain" +msgstr ":code:`-D messages` - домен перекладів" + +#: ../../utils/i18n.rst:194 +msgid "" +":code:`-l en` - language. Can be changed to any other valid language code" +" (For example :code:`-l uk` for ukrainian language)" +msgstr "" +":code:`-l en` - мова. Може бути змінений на будь-який інший дійсний код " +"мови (Наприклад :code:`-l uk` для української мови)" + +#: ../../utils/i18n.rst:198 +msgid "Step 3: Translate texts" +msgstr "Крок 3: Переклад текстів" + +#: ../../utils/i18n.rst:200 +msgid "" +"To open .po file you can use basic text editor or any PO editor, e.g. " +"`Poedit `_" +msgstr "" +"Щоб відкрити файл .po, ви можете використовувати базовий текстовий " +"редактор або будь-який редактор .po файлів, напр. `Poedit " +"`_" + +#: ../../utils/i18n.rst:202 +msgid "" +"Just open the file named " +":code:`locales/{language}/LC_MESSAGES/messages.po` and write translations" +msgstr "" +"Просто відкрийте файл із назвою " +":code:`locales/{language}/LC_MESSAGES/messages.po` і впишіть переклади" + +#: ../../utils/i18n.rst:205 +msgid "Step 4: Compile translations" +msgstr "Крок 4: Компіляція перекладів" + +#: ../../utils/i18n.rst:213 +msgid "Step 5: Updating messages" +msgstr "Крок 5: Оновлення текстів" + +#: ../../utils/i18n.rst:215 +msgid "When you change the code of your bot you need to update po & mo files" +msgstr "Коли ви змінюєте код свого бота, вам потрібно оновити файли .po і .mo" + +#: ../../utils/i18n.rst:217 +msgid "Step 5.1: regenerate pot file: command from step 1" +msgstr "Крок 5.1: відновлення файлу .pot: команда з кроку 1" + +#: ../../utils/i18n.rst:221 +msgid "Step 5.2: update po files" +msgstr "Крок 5.2: оновлення .po файлів" + +#: ../../utils/i18n.rst:223 +msgid "" +"Step 5.3: update your translations: location and tools you know from step" +" 3" +msgstr "" +"Крок 5.3: оновлення Ваших перекладів: розміщення та інструменти Ви знаєте" +" з кроку 3." + +#: ../../utils/i18n.rst:224 +msgid "Step 5.4: compile mo files: command from step 4" +msgstr "Крок 5.4: компіляція .mo файлів : команда з кроку 4" + +#~ msgid "Extract texts with pluralization support :code:`-k __:1,2`" +#~ msgstr "Витягувати тексти з підтримкою множини :code:`-k __:1,2`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/utils/index.po b/docs/locale/uk_UA/LC_MESSAGES/utils/index.po new file mode 100644 index 00000000..67fcd7dd --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/index.po @@ -0,0 +1,22 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\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" + +#: ../../utils/index.rst:3 +msgid "Utils" +msgstr "Утиліти" diff --git a/docs/locale/uk_UA/LC_MESSAGES/utils/keyboard.po b/docs/locale/uk_UA/LC_MESSAGES/utils/keyboard.po new file mode 100644 index 00000000..71ae13f3 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/keyboard.po @@ -0,0 +1,179 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: aiogram\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-08-06 16:52+0300\n" +"PO-Revision-Date: 2022-10-13 21:54+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.12.1\n" + +#: ../../utils/keyboard.rst:4 +msgid "Keyboard builder" +msgstr "Конструктор клавіатури" + +#: ../../utils/keyboard.rst:6 +msgid "Keyboard builder helps to dynamically generate markup." +msgstr "Конструктор клавіатури допомагає динамічно генерувати розмітку" + +#: ../../utils/keyboard.rst:10 +msgid "" +"Note that if you have static markup, it's best to define it explicitly " +"rather than using builder, but if you have dynamic markup configuration, " +"feel free to use builder as you wish." +msgstr "" +"Зауважте, що якщо у вас є статична розмітка, найкраще визначити її явно, " +"а не використовувати конструктор, але якщо у вас є конфігурація " +"динамічної розмітки, сміливо використовуйте конструктор на свій розсуд." + +#: ../../utils/keyboard.rst:15 +msgid "Usage example" +msgstr "Приклад використання" + +#: ../../utils/keyboard.rst:17 +msgid "For example you want to generate inline keyboard with 10 buttons" +msgstr "" + +#: ../../utils/keyboard.rst:27 +msgid "" +"then adjust this buttons to some grid, for example first line will have 3" +" buttons, the next lines will have 2 buttons" +msgstr "" + +#: ../../utils/keyboard.rst:33 +msgid "also you can attach another builder to this one" +msgstr "" + +#: ../../utils/keyboard.rst:40 +msgid "or you can attach some already generated markup" +msgstr "" + +#: ../../utils/keyboard.rst:47 +msgid "and finally you can export this markup to use it in your message" +msgstr "" + +#: ../../utils/keyboard.rst:53 +#, fuzzy +msgid "Reply keyboard builder has the same interface" +msgstr "Конструктор клавіатури допомагає динамічно генерувати розмітку" + +#: ../../utils/keyboard.rst:57 +msgid "" +"Note that you can't attach reply keyboard builder to inline keyboard " +"builder and vice versa" +msgstr "" + +#: ../../utils/keyboard.rst:61 +msgid "Inline Keyboard" +msgstr "Клавіатура під повідомленням(Inline Keyboard)" + +#: aiogram.utils.keyboard.InlineKeyboardBuilder:1 of +msgid "Inline keyboard builder inherits all methods from generic builder" +msgstr "" +"Конструктор клавіатури під повідомленням успадковує всі методи від " +"універсального конструктора" + +#: ../../utils/keyboard.rst:69 +msgid "Add new inline button to markup" +msgstr "Додавання нової кнопки до розмітки" + +#: ../../utils/keyboard.rst:74 +msgid "Construct an InlineKeyboardMarkup" +msgstr "Створення InlineKeyboardMarkup" + +#: aiogram.utils.keyboard.KeyboardBuilder.add:1 of +msgid "Add one or many buttons to markup." +msgstr "Додавання однієї або кількох кнопок до розмітки." + +#: aiogram.utils.keyboard.InlineKeyboardBuilder.from_markup +#: aiogram.utils.keyboard.KeyboardBuilder.add +#: aiogram.utils.keyboard.KeyboardBuilder.adjust +#: aiogram.utils.keyboard.KeyboardBuilder.row +#: aiogram.utils.keyboard.ReplyKeyboardBuilder.from_markup of +msgid "Parameters" +msgstr "Параметри" + +#: aiogram.utils.keyboard.InlineKeyboardBuilder.buttons +#: aiogram.utils.keyboard.InlineKeyboardBuilder.copy +#: aiogram.utils.keyboard.InlineKeyboardBuilder.from_markup +#: aiogram.utils.keyboard.KeyboardBuilder.add +#: aiogram.utils.keyboard.KeyboardBuilder.adjust +#: aiogram.utils.keyboard.KeyboardBuilder.export +#: aiogram.utils.keyboard.KeyboardBuilder.row +#: aiogram.utils.keyboard.ReplyKeyboardBuilder.buttons +#: aiogram.utils.keyboard.ReplyKeyboardBuilder.copy +#: aiogram.utils.keyboard.ReplyKeyboardBuilder.from_markup of +msgid "Returns" +msgstr "Повертає" + +#: aiogram.utils.keyboard.KeyboardBuilder.adjust:1 of +msgid "Adjust previously added buttons to specific row sizes." +msgstr "Налаштування раніше доданих кнопок до певних розмірів рядків." + +#: aiogram.utils.keyboard.KeyboardBuilder.adjust:3 of +#, fuzzy +msgid "" +"By default, when the sum of passed sizes is lower than buttons count the " +"last one size will be used for tail of the markup. If repeat=True is " +"passed - all sizes will be cycled when available more buttons count than " +"all sizes" +msgstr "" +"За замовчуванням, коли сума переданих розмірів менша за кількість кнопок," +" для хвоста розмітки буде використано останній переданий розмір. Якщо " +"передано параметр repeat=True, усі розміри будуть повторюватися, поки є " +"доступні кнопки" + +#: aiogram.utils.keyboard.InlineKeyboardBuilder.buttons:1 +#: aiogram.utils.keyboard.ReplyKeyboardBuilder.buttons:1 of +msgid "Get flatten set of all buttons" +msgstr "Отримання плоского списку усіх кнопок" + +#: aiogram.utils.keyboard.InlineKeyboardBuilder.copy:1 +#: aiogram.utils.keyboard.ReplyKeyboardBuilder.copy:1 of +msgid "Make full copy of current builder with markup" +msgstr "Робить повну копію поточного конструктора з розміткою" + +#: aiogram.utils.keyboard.KeyboardBuilder.export:1 of +msgid "Export configured markup as list of lists of buttons" +msgstr "Експортує налаштовану розмітку як список списків кнопок" + +#: aiogram.utils.keyboard.InlineKeyboardBuilder.from_markup:1 +#: aiogram.utils.keyboard.ReplyKeyboardBuilder.from_markup:1 of +msgid "Create builder from existing markup" +msgstr "" + +#: aiogram.utils.keyboard.KeyboardBuilder.row:1 of +msgid "Add row to markup" +msgstr "Додає рядок у розмітку" + +#: aiogram.utils.keyboard.KeyboardBuilder.row:3 of +msgid "When too much buttons is passed it will be separated to many rows" +msgstr "" +"Коли передано занадто багато кнопок, вони будуть розділені на багато " +"рядків" + +#: ../../utils/keyboard.rst:77 +msgid "Reply Keyboard" +msgstr "Клавіатура відповідей" + +#: aiogram.utils.keyboard.ReplyKeyboardBuilder:1 of +msgid "Reply keyboard builder inherits all methods from generic builder" +msgstr "" +"Конструктор клавіатури відповідей успадковує всі методи від " +"універсального конструктора" + +#: ../../utils/keyboard.rst:85 +msgid "Add new button to markup" +msgstr "Додавання нової кнопки до розмітки" + +#: ../../utils/keyboard.rst:90 +msgid "Construct an ReplyKeyboardMarkup" +msgstr "Створення ReplyKeyboardMarkup" diff --git a/docs/locale/uk_UA/LC_MESSAGES/utils/media_group.po b/docs/locale/uk_UA/LC_MESSAGES/utils/media_group.po new file mode 100644 index 00000000..5abe1dd6 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/media_group.po @@ -0,0 +1,290 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-09-14 17:21+0300\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" + +#: ../../utils/media_group.rst:3 +msgid "Media group builder" +msgstr "" + +#: ../../utils/media_group.rst:5 +msgid "" +"This module provides a builder for media groups, it can be used to build " +"media groups for " +":class:`aiogram.types.input_media_photo.InputMediaPhoto`, " +":class:`aiogram.types.input_media_video.InputMediaVideo`, " +":class:`aiogram.types.input_media_document.InputMediaDocument` and " +":class:`aiogram.types.input_media_audio.InputMediaAudio`." +msgstr "" + +#: ../../utils/media_group.rst:11 +msgid "" +":class:`aiogram.types.input_media_animation.InputMediaAnimation` is not " +"supported yet in the Bot API to send as media group." +msgstr "" + +#: ../../utils/media_group.rst:16 +msgid "Usage" +msgstr "" + +#: ../../utils/media_group.rst:30 +msgid "" +"To send media group use " +":meth:`aiogram.methods.send_media_group.SendMediaGroup` method, but when " +"you use :class:`aiogram.utils.media_group.MediaGroupBuilder` you should " +"pass ``media`` argument as ``media_group.build()``." +msgstr "" + +#: ../../utils/media_group.rst:34 +msgid "" +"If you specify ``caption`` in " +":class:`aiogram.utils.media_group.MediaGroupBuilder` it will be used as " +"``caption`` for first media in group." +msgstr "" + +#: ../../utils/media_group.rst:43 +msgid "References" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add:1 of +msgid "Add a media object to the media group." +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add +#: aiogram.utils.media_group.MediaGroupBuilder.add_audio +#: aiogram.utils.media_group.MediaGroupBuilder.add_document +#: aiogram.utils.media_group.MediaGroupBuilder.add_photo +#: aiogram.utils.media_group.MediaGroupBuilder.add_video of +msgid "Parameters" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add:3 of +msgid "" +"Keyword arguments for the media object. The available keyword arguments " +"depend on the media type." +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add +#: aiogram.utils.media_group.MediaGroupBuilder.add_audio +#: aiogram.utils.media_group.MediaGroupBuilder.add_document +#: aiogram.utils.media_group.MediaGroupBuilder.add_photo +#: aiogram.utils.media_group.MediaGroupBuilder.add_video +#: aiogram.utils.media_group.MediaGroupBuilder.build of +msgid "Returns" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add:5 +#: aiogram.utils.media_group.MediaGroupBuilder.add_audio:22 +#: aiogram.utils.media_group.MediaGroupBuilder.add_document:27 +#: aiogram.utils.media_group.MediaGroupBuilder.add_photo:17 +#: aiogram.utils.media_group.MediaGroupBuilder.add_video:30 of +msgid "None" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_audio:1 of +msgid "Add an audio file to the media group." +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_audio:3 +#: aiogram.utils.media_group.MediaGroupBuilder.add_photo:3 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 "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_audio:3 +#: aiogram.utils.media_group.MediaGroupBuilder.add_photo:3 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." +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_audio:7 +#: aiogram.utils.media_group.MediaGroupBuilder.add_photo:7 of +msgid ":ref:`More information on Sending Files » `" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_audio:8 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." +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_audio:12 of +msgid "" +"*Optional*. Caption of the audio to be sent, 0-1024 characters after " +"entities parsing" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_audio:14 of +msgid "" +"*Optional*. Mode for parsing entities in the audio caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_audio:17 +#: aiogram.utils.media_group.MediaGroupBuilder.add_document:22 +#: aiogram.utils.media_group.MediaGroupBuilder.add_photo:13 +#: aiogram.utils.media_group.MediaGroupBuilder.add_video:21 of +msgid "" +"*Optional*. List of special entities that appear in the caption, which " +"can be specified instead of *parse_mode*" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_audio:19 of +msgid "*Optional*. Duration of the audio in seconds" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_audio:20 of +msgid "*Optional*. Performer of the audio" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_audio:21 of +msgid "*Optional*. Title of the audio" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_document:1 of +msgid "Add a document to the media group." +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_document:3 +#: aiogram.utils.media_group.MediaGroupBuilder.add_video:3 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 "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_document:8 +#: aiogram.utils.media_group.MediaGroupBuilder.add_video:8 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 "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_document:17 of +msgid "" +"*Optional*. Caption of the document to be sent, 0-1024 characters after " +"entities parsing" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_document:19 of +msgid "" +"*Optional*. Mode for parsing entities in the document caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_document:24 of +msgid "" +"*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." +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_photo:1 of +msgid "Add a photo to the media group." +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_photo:8 of +msgid "" +"*Optional*. Caption of the photo to be sent, 0-1024 characters after " +"entities parsing" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_photo:10 of +msgid "" +"*Optional*. Mode for parsing entities in the photo caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_photo:15 of +msgid "" +"*Optional*. Pass :code:`True` if the photo needs to be covered with a " +"spoiler animation" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_video:1 of +msgid "Add a video to the media group." +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_video:16 of +msgid "" +"*Optional*. Caption of the video to be sent, 0-1024 characters after " +"entities parsing" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_video:18 of +msgid "" +"*Optional*. Mode for parsing entities in the video caption. See " +"`formatting options `_ for more details." +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_video:23 of +msgid "*Optional*. Video width" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_video:24 of +msgid "*Optional*. Video height" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_video:25 of +msgid "*Optional*. Video duration in seconds" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_video:26 of +msgid "" +"*Optional*. Pass :code:`True` if the uploaded video is suitable for " +"streaming" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.add_video:28 of +msgid "" +"*Optional*. Pass :code:`True` if the video needs to be covered with a " +"spoiler animation" +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.build:1 of +msgid "Builds a list of media objects for a media group." +msgstr "" + +#: aiogram.utils.media_group.MediaGroupBuilder.build:3 of +msgid "Adds the caption to the first media object if it is present." +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 new file mode 100644 index 00000000..37ade259 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/web_app.po @@ -0,0 +1,369 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +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: 2024-03-04 17:30+0200\n" +"Last-Translator: Leroy-Bit\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" + +#: ../../utils/web_app.rst:3 +msgid "WebApp" +msgstr "Веб Застосунок (WebApp)" + +#: ../../utils/web_app.rst:5 +msgid "" +"Telegram Bot API 6.0 announces a revolution in the development of " +"chatbots using WebApp feature." +msgstr "" +"Telegram Bot API 6.0 зробив революцію у розробці чат-ботів, " +"використовуючи особливості Веб Застосунків." + +#: ../../utils/web_app.rst:7 +msgid "" +"You can read more details on it in the official `blog " +"`_ and " +"`documentation `_." +msgstr "" +"Ви можете прочитати більше про це в офіційному `блозі " +"`_ та " +"`документації `_." + +#: ../../utils/web_app.rst:10 +msgid "" +"`aiogram` implements simple utils to remove headache with the data " +"validation from Telegram WebApp on the backend side." +msgstr "" +"`aiogram` реалізує прості утиліти для усунення головного болю, надаючи " +"готові інструменти перевірки даних із Веб Застосунку Telegram на " +"серверній стороні." + +#: ../../utils/web_app.rst:13 +msgid "Usage" +msgstr "Використання" + +#: ../../utils/web_app.rst:15 +msgid "" +"For example from frontend you will pass :code:`application/x-www-form-" +"urlencoded` POST request with :code:`_auth` field in body and wants to " +"return User info inside response as :code:`application/json`" +msgstr "" +"Наприклад, із фронтенду ви передасте :code:`application/x-www-form-" +"urlencoded` в POST запиті із полем :code:`_auth` у тілі та хочете " +"повернути інформацію про користувача у відповідь як " +":code:`application/json`" + +#: ../../utils/web_app.rst:35 +msgid "Functions" +msgstr "Функції" + +#: aiogram.utils.web_app.check_webapp_signature:1 of +msgid "Check incoming WebApp init data signature" +msgstr "Перевірка вхідного підпису даних ініціалізації Веб Застосунку" + +#: aiogram.utils.web_app.check_webapp_signature:3 of +msgid "" +"Source: https://core.telegram.org/bots/webapps#validating-data-received-" +"via-the-web-app" +msgstr "" +"Джерело: https://core.telegram.org/bots/webapps#validating-data-received-" +"via-the-web-app" + +#: ../../utils/web_app.rst +msgid "Parameters" +msgstr "Параметри" + +#: aiogram.utils.web_app.check_webapp_signature:5 of +msgid "bot Token" +msgstr "Токен бота" + +#: aiogram.utils.web_app.check_webapp_signature:6 of +msgid "data from frontend to be validated" +msgstr "дані з фронтенду, що підлягають перевірці" + +#: ../../utils/web_app.rst +msgid "Returns" +msgstr "Повертає" + +#: aiogram.utils.web_app.parse_webapp_init_data:1 of +msgid "Parse WebApp init data and return it as WebAppInitData object" +msgstr "" +"Аналіз данихі ініціалізації Веб Застосунку і повернення їх як об’єкту " +"WebAppInitData" + +#: aiogram.utils.web_app.parse_webapp_init_data:3 of +msgid "" +"This method doesn't make any security check, so you shall not trust to " +"this data, use :code:`safe_parse_webapp_init_data` instead." +msgstr "" +"Цей метод не забезпечує безпеку, тому вам не варто довіряти цим даним, " +"замість цього використовуйте :code:`safe_parse_webapp_init_data`." + +#: aiogram.utils.web_app.parse_webapp_init_data:6 of +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" +msgstr "" +"Перевірка необроблених даних ініціалізації Веб Застосунку і повернення їх" +" як об’єкту WebAppInitData" + +#: aiogram.utils.web_app.safe_parse_webapp_init_data:3 of +msgid "Raise :obj:`ValueError` when data is invalid" +msgstr "Видає :obj:`ValueError`, коли дані недійсні" + +#: aiogram.utils.web_app.safe_parse_webapp_init_data:5 of +msgid "bot token" +msgstr "токен бота" + +#: aiogram.utils.web_app.safe_parse_webapp_init_data:6 of +msgid "data from frontend to be parsed and validated" +msgstr "дані з фронтенду для аналізу і перевірки" + +#: ../../utils/web_app.rst:45 +msgid "Types" +msgstr "Типи" + +#: aiogram.utils.web_app.WebAppInitData:1 of +msgid "" +"This object contains data that is transferred to the Web App when it is " +"opened. It is empty if the Web App was launched from a keyboard button." +msgstr "" +"Об’єкт, що містить дані які передаються у Веб Застосунок під час його " +"відкриття. Він порожній, якщо Веб Застосунок було запущено за допомогою " +"кнопки клавіатури." + +#: aiogram.utils.web_app.WebAppInitData:4 of +msgid "Source: https://core.telegram.org/bots/webapps#webappinitdata" +msgstr "Джерело: https://core.telegram.org/bots/webapps#webappinitdata" + +#: ../../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." + +#: ../../docstring aiogram.utils.web_app.WebAppInitData.user:1 of +msgid "An object containing data about the current user." +msgstr "Об'єкт, що містить дані про поточного користувача." + +#: ../../docstring aiogram.utils.web_app.WebAppInitData.receiver:1 of +msgid "" +"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." +msgstr "" +"Об'єкт, що містить дані про співрозмовника поточного користувача в чаті, " +"де бот був запущений через меню вкладення. Повертається тільки для " +"веб-додатків, запущених через меню вкладень." + +#: ../../docstring aiogram.utils.web_app.WebAppInitData.chat:1 of +msgid "" +"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." +msgstr "" +"Об'єкт, що містить дані про чат, в якому бот був запущений через меню " +"вкладень. Повертається для супергруп, каналів і групових чатів - тільки " +"для веб-додатків, запущених через меню вкладень." + +#: ../../docstring aiogram.utils.web_app.WebAppInitData.chat_type:1 of +msgid "" +"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." +msgstr "" +"Тип чату, з якого було відкрито веб-додаток. Може бути як \"sender\" для " +"приватного чату з користувачем, який відкрив посилання, так і " +"\"private\", \"group\", \"supergroup\" або \"channel\". Повертається " +"тільки для веб-програм, запущених за прямим посиланням." + +#: ../../docstring aiogram.utils.web_app.WebAppInitData.chat_instance:1 of +msgid "" +"Global identifier, uniquely corresponding to the chat from which the Web " +"App was opened. Returned only for Web Apps launched from a direct link." +msgstr "" +"Глобальний ідентифікатор, що унікальний для чату, з якого було відкрито " +"веб-програму. Повертається тільки для веб-додатків, запущених за прямим " +"посиланням." + +#: ../../docstring aiogram.utils.web_app.WebAppInitData.start_param:1 of +msgid "" +"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." +msgstr "" +"Значення параметра startattach, передане через посилання. Повертається " +"лише для Веб Застосунків, коли їх запускають із меню вкладень за " +"посиланням. Значення параметра start_param також буде передано в " +"GET-параметр tgWebAppStartParam, тому Веб Застосунок може відразу " +"завантажити правильний інтерфейс." + +#: ../../docstring aiogram.utils.web_app.WebAppInitData.can_send_after:1 of +msgid "" +"Time in seconds, after which a message can be sent via the " +"answerWebAppQuery method." +msgstr "" +"Час в секундах після якого повідомлення може бути відправлене за " +"допомогою метода answerWebAppQuery." + +#: ../../docstring aiogram.utils.web_app.WebAppInitData.auth_date:1 of +msgid "Unix time when the form was opened." +msgstr "Unix час відкриття форми." + +#: ../../docstring aiogram.utils.web_app.WebAppInitData.hash:1 of +msgid "" +"A hash of all passed parameters, which the bot server can use to check " +"their validity." +msgstr "" +"Хеш усіх переданих параметрів, за допомогою якого бот-сервер може " +"перевірити їх дійсність." + +#: aiogram.utils.web_app.WebAppUser:1 of +msgid "This object contains the data of the Web App user." +msgstr "Об'єкт що містить дані користувача Веб Застосунку." + +#: aiogram.utils.web_app.WebAppUser:3 of +msgid "Source: https://core.telegram.org/bots/webapps#webappuser" +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." +msgstr "" +"Унікальний ідентифікатор користувача або бота. Це число може мати більше " +"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." +msgstr "" +"True, якщо цей користувач бот. Повертаєтся лише в полі " +"отримувача(receiver)." + +#: ../../docstring aiogram.utils.web_app.WebAppUser.first_name:1 of +msgid "First name of the user or bot." +msgstr "Ім'я користувача або бота." + +#: ../../docstring aiogram.utils.web_app.WebAppUser.last_name:1 of +msgid "Last name of the user or bot." +msgstr "Прізвище користувача або бота." + +#: ../../docstring aiogram.utils.web_app.WebAppUser.username:1 of +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." +msgstr "" +"Мовний тег IETF мови користувача. Повертаєтся лише в полі " +"користувача(user)." + +#: ../../docstring aiogram.utils.web_app.WebAppUser.is_premium:1 of +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 +msgid "True, if this user added the bot to the attachment menu." +msgstr "True, якщо цей користувач додав бота до меню вкладень." + +#: ../../docstring aiogram.utils.web_app.WebAppUser.allows_write_to_pm:1 of +msgid "True, if this user allowed the bot to message them." +msgstr "True, якщо цей користувач дозволив надсилати йому повідомлення." + +#: ../../docstring aiogram.utils.web_app.WebAppUser.photo_url:1 of +msgid "" +"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." +msgstr "" +"URL-адреса фотографії профілю користувача. Фотографія може бути у " +"форматах .jpeg або .svg. Повертається лише для Веб Застосунків, запущених" +" із меню вкладень." + +#: aiogram.utils.web_app.WebAppChat:1 of +msgid "This object represents a chat." +msgstr "Об'єкт чату." + +#: aiogram.utils.web_app.WebAppChat:3 of +msgid "Source: https://core.telegram.org/bots/webapps#webappchat" +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." +msgstr "" +"Унікальний ідентифікатор цього чату. Це число може мати більше 32 " +"значущих бітів, і деякі мови програмування можуть мати труднощі в його " +"інтерпретації. Він має щонайбільше 52 значущі біти, тому 64-бітне ціле " +"число або тип з плаваючою точкою подвійної точності є безпечним для " +"зберігання цього ідентифікатора." + +#: ../../docstring aiogram.utils.web_app.WebAppChat.type:1 of +msgid "Type of chat, can be either “group”, “supergroup” or “channel”" +msgstr "Тип чату, може бути \"group\", \"supergroup\" або \"channel\"" + +#: ../../docstring aiogram.utils.web_app.WebAppChat.title:1 of +msgid "Title of the chat" +msgstr "Назва чату" + +#: ../../docstring aiogram.utils.web_app.WebAppChat.username:1 of +msgid "Username of the chat" +msgstr "Нік користувача або бота" + +#: ../../docstring aiogram.utils.web_app.WebAppChat.photo_url:1 of +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. Повертається лише для Веб Застосунків, запущених із меню вкладень." + +#~ 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 new file mode 100644 index 00000000..7f17682a --- /dev/null +++ b/docs/migration_2_to_3.rst @@ -0,0 +1,348 @@ +.. |Bot| replace:: :class:`~aiogram.client.bot.Bot` +.. |Dispatcher| replace:: :class:`~aiogram.dispatcher.dispatcher.Dispatcher` +.. |Router| replace:: :class:`~aiogram.dispatcher.router.Router` + +========================== +Migration FAQ (2.x -> 3.0) +========================== + +.. danger:: + + This guide is still in progress. + +This version introduces numerous breaking changes and architectural improvements. +It helps reduce the count of global variables in your code, provides useful mechanisms +to modularize your code, and enables the creation of shareable modules via packages on PyPI. +It also makes middlewares and filters more controllable, among other improvements. + + +On this page, you can read about the changes made in relation to the last stable 2.x version. + +.. note:: + + This page more closely resembles a detailed changelog than a migration guide, + but it will be updated in the future. + + Feel free to contribute to this page, if you find something that is not mentioned here. + +Dependencies +============ + +- 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: + + :code:`pip install aiogram[i18n]` + + +Dispatcher +========== + +- 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"). +- |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 » `.) +- Removed the **_handler** suffix from all event handler decorators and registering methods. + (:ref:`Read more » `) +- The :class:`Executor` has been entirely removed; you can now use the |Dispatcher| directly to start poll the API or handle webhooks from it. +- The throttling method has been completely removed; you can now use middlewares to control + the execution context and implement any throttling mechanism you desire. +- 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"]`. +- To skip pending updates, you should now call the :class:`~aiogram.methods.delete_webhook.DeleteWebhook` method directly, rather than passing :code:`skip_updates=True` to the start polling method. +- 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 » `) + + +Filtering events +================ + +- Keyword filters can no longer be used; use filters explicitly. (`Read more » `_) +- Due to the removal of keyword filters, all previously enabled-by-default filters + (such as state and content_type) are now disabled. + You must specify them explicitly if you wish to use them. + For example instead of using :code:`@dp.message_handler(content_types=ContentType.PHOTO)` + you should use :code:`@router.message(F.photo)` +- Most common filters have been replaced with the "magic filter." (:ref:`Read more » `) +- By default, the message handler now receives any content type. + If you want a specific one, simply add the appropriate filters (Magic or any other). +- 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 v3. + Conversely, if the state was not specified in v2, you will now need to specify it in v3. +- Added the possibility to register global filters for each router, which helps to reduce code + repetition and provides an easier way to control the purpose of each router. + + + +Bot API +======= + +- All API methods are now classes with validation, implemented via + `pydantic `. + These API calls are also available as methods in the Bot class. +- More pre-defined Enums have been added and moved to the `aiogram.enums` sub-package. + For example, the chat type enum is now :class:`aiogram.enums.ChatType` instead of :class:`aiogram.types.chat.ChatType`. +- The HTTP client session has been separated into a container that can be reused + across different Bot instances within the application. +- API Exceptions are no longer classified by specific messages, + as Telegram has no documented error codes. + 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. 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 +=========== + +- Middlewares can now control an execution context, e.g., using context managers. + (:ref:`Read more » `) +- All contextual data is now shared end-to-end between middlewares, filters, and handlers. + For example now you can easily pass some data into context inside middleware and + get it in the filters layer as the same way as in the handlers via keyword arguments. +- Added a mechanism named **flags** that helps customize handler behavior + in conjunction with middlewares. (:ref:`Read more » `) + + +Keyboard Markup +=============== + +- Now :class:`aiogram.types.inline_keyboard_markup.InlineKeyboardMarkup` + and :class:`aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup` no longer have methods for extension, + instead you have to use markup builders :class:`aiogram.utils.keyboard.ReplyKeyboardBuilder` + and :class:`aiogram.utils.keyboard.KeyboardBuilder` respectively + (:ref:`Read more » `) + + +Callbacks data +============== + +- The callback data factory is now strictly typed using `pydantic `_ models. + (:ref:`Read more » `) + + +Finite State machine +==================== + +- State filters will no longer be automatically added to all handlers; + you will need to specify the state if you want to use it. +- 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|. +- Now :class:`aiogram.fsm.state.State` and :class:`aiogram.fsm.state.StateGroup` don't have helper + methods like :code:`.set()`, :code:`.next()`, etc. + Instead, you should set states by passing them directly to + :class:`aiogram.fsm.context.FSMContext` (:ref:`Read more » `) +- The state proxy is deprecated; you should update the state data by calling + :code:`state.set_data(...)` and :code:`state.get_data()` respectively. + + +Sending Files +============= + +- 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. (:ref:`Read more » `) + + +Webhook +======= + +- The aiohttp web app configuration has been simplified. +- By default, the ability to upload files has been added when you `make requests in response to updates `_ (available for webhook only). + + +Telegram API Server +=================== + +- The :obj:`server` parameter has been moved from the |Bot| instance to :obj:`api` parameter of the :class:`~aiogram.client.session.base.BaseSession`. +- The constant :obj:`aiogram.bot.api.TELEGRAM_PRODUCTION` has been moved to :obj:`aiogram.client.telegram.PRODUCTION`. + + +Telegram objects transformation (to dict, to json, from json) +============================================================= + +- Methods :code:`TelegramObject.to_object()`, :code:`TelegramObject.to_json()` and :code:`TelegramObject.to_python()` + have been removed due to the use of `pydantic `_ models. +- :code:`TelegramObject.to_object()` should be replaced by :code:`TelegramObject.model_validate()` + (`Read more `_) +- :code:`TelegramObject.as_json()` should be replaced by :func:`aiogram.utils.serialization.deserialize_telegram_object_to_python` +- :code:`.to_python()` should be replaced by :code:`json.dumps(deserialize_telegram_object_to_python())` + +Here are some usage examples: + +- Creating an object from a dictionary representation of an object + + .. code-block:: + + # Version 2.x + message_dict = {"id": 42, ...} + message_obj = Message.to_object(message_dict) + print(message_obj) + # id=42 name='n' ... + print(type(message_obj)) + # + + .. code-block:: + + # Version 3.x + message_dict = {"id": 42, ...} + message_obj = Message.model_validate(message_dict) + print(message_obj) + # id=42 name='n' ... + print(type(message_obj)) + # + +- Creating a json representation of an object + + .. code-block:: + + # Version 2.x + async def handler(message: Message) -> None: + message_json = message.as_json() + print(message_json) + # {"id": 42, ...} + print(type(message_json)) + # + + .. code-block:: + + # Version 3.x + async def handler(message: Message) -> None: + message_json = json.dumps(deserialize_telegram_object_to_python(message)) + print(message_json) + # {"id": 42, ...} + print(type(message_json)) + # + +- Creating a dictionary representation of an object + + .. code-block:: + + async def handler(message: Message) -> None: + # Version 2.x + message_dict = message.to_python() + print(message_dict) + # {"id": 42, ...} + print(type(message_dict)) + # + + .. code-block:: + + async def handler(message: Message) -> None: + # Version 3.x + message_dict = deserialize_telegram_object_to_python(message) + print(message_dict) + # {"id": 42, ...} + print(type(message_dict)) + # + + +ChatMember tools +================ + +- Now :class:`aiogram.types.chat_member.ChatMember` no longer contains tools to resolve an object with the appropriate status. + + .. code-block:: + + # Version 2.x + from aiogram.types import ChatMember + + chat_member = ChatMember.resolve(**dict_data) + + .. code-block:: + + # Version 3.x + from aiogram.utils.chat_member import ChatMemberAdapter + + chat_member = ChatMemberAdapter.validate_python(dict_data) + + +- 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 + + .. code-block:: + + # Version 2.x + + if chat_member.is_chat_admin(): + print("ChatMember is chat admin") + + if chat_member.is_chat_member(): + print("ChatMember is in the chat") + + .. code-block:: + + # Version 3.x + + from aiogram.utils.chat_member import ADMINS, MEMBERS + + if isinstance(chat_member, ADMINS): + print("ChatMember is chat admin") + + if isinstance(chat_member, MEMBERS): + print("ChatMember is in the chat") + + .. note:: + You also can independently create group similar to ADMINS that fits the logic of your application. + + E.g., you can create a PUNISHED group and include banned and restricted members there! diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 9003de3f..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -sphinx-intl -typing-extensions -Sphinx-Substitution-Extensions diff --git a/docs/utils/callback_answer.rst b/docs/utils/callback_answer.rst new file mode 100644 index 00000000..f7fc4715 --- /dev/null +++ b/docs/utils/callback_answer.rst @@ -0,0 +1,106 @@ +.. _callback-answer-util: +=============== +Callback answer +=============== + +Helper for callback query handlers, can be useful in bots with a lot of callback +handlers to automatically take answer to all requests. + +Simple usage +============ + +For use, it is enough to register the inner middleware :class:`aiogram.utils.callback_answer.CallbackAnswerMiddleware` in dispatcher or specific router: + +.. code-block:: python + + dispatcher.callback_query.middleware(CallbackAnswerMiddleware()) + +After that all handled callback queries will be answered automatically after processing the handler. + +Advanced usage +============== + +In some cases you need to have some non-standard response parameters, this can be done in several ways: + +Global defaults +--------------- + +Change default parameters while initializing middleware, for example change answer to `pre` mode and text "OK": + +.. code-block:: python + + dispatcher.callback_query.middleware(CallbackAnswerMiddleware(pre=True, text="OK")) + + +Look at :class:`aiogram.utils.callback_answer.CallbackAnswerMiddleware` to get all available parameters + + +Handler specific +---------------- + +By using :ref:`flags ` you can change the behavior for specific handler + +.. code-block:: python + + @router.callback_query() + @flags.callback_answer(text="Thanks", cache_time=30) + async def my_handler(query: CallbackQuery): + ... + +Flag arguments is the same as in :class:`aiogram.utils.callback_answer.CallbackAnswerMiddleware` +with additional one :code:`disabled` to disable answer. + +A special case +-------------- + +It is not always correct to answer the same in every case, +so there is an option to change the answer inside the handler. You can get an instance of :class:`aiogram.utils.callback_answer.CallbackAnswer` object inside handler and change whatever you want. + +.. danger:: + + Note that is impossible to change callback answer attributes when you use :code:`pre=True` mode. + +.. code-block:: python + + @router.callback_query() + async def my_handler(query: CallbackQuery, callback_answer: CallbackAnswer): + ... + if : + callback_answer.text = "All is ok" + else: + callback_answer.text = "Something wrong" + callback_answer.cache_time = 10 + + +Combine that all at once +------------------------ + +For example you want to answer in most of cases before handler with text "🤔" but at some cases need to answer after the handler with custom text, +so you can do it: + +.. code-block:: python + + dispatcher.callback_query.middleware(CallbackAnswerMiddleware(pre=True, text="🤔")) + + @router.callback_query() + @flags.callback_answer(pre=False, cache_time=30) + async def my_handler(query: CallbackQuery): + ... + if : + callback_answer.text = "All is ok" + + +Description of objects +====================== + +.. autoclass:: aiogram.utils.callback_answer.CallbackAnswerMiddleware + :show-inheritance: + :member-order: bysource + :special-members: __init__ + :members: + +.. autoclass:: aiogram.utils.callback_answer.CallbackAnswer + :show-inheritance: + :member-order: bysource + :special-members: __init__ + :members: diff --git a/docs/utils/deep_linking.rst b/docs/utils/deep_linking.rst new file mode 100644 index 00000000..a7f4e3b5 --- /dev/null +++ b/docs/utils/deep_linking.rst @@ -0,0 +1,64 @@ +============ +Deep Linking +============ + +Telegram bots have a deep linking mechanism, that allows for passing +additional parameters to the bot on startup. It could be a command that +launches the bot — or an auth token to connect the user's Telegram +account to their account on some external service. + +You can read detailed description in the source: +https://core.telegram.org/bots/features#deep-linking + +We have added some utils to get deep links more handy. + +Examples +======== + +Basic link example +------------------ + +.. code-block:: python + + from aiogram.utils.deep_linking import create_start_link + + link = await create_start_link(bot, 'foo') + + # result: 'https://t.me/MyBot?start=foo' + +Encoded link +------------ + +.. code-block:: python + + from aiogram.utils.deep_linking import create_start_link + + link = await create_start_link(bot, 'foo', encode=True) + # result: 'https://t.me/MyBot?start=Zm9v' + +Decode it back +-------------- + +.. code-block:: python + + from aiogram.utils.deep_linking import decode_payload + from aiogram.filters import CommandStart, CommandObject + from aiogram.types import Message + + @router.message(CommandStart(deep_link=True)) + async def handler(message: Message, command: CommandObject): + args = command.args + payload = decode_payload(args) + await message.answer(f"Your payload: {payload}") + + +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 new file mode 100644 index 00000000..6c70d23b --- /dev/null +++ b/docs/utils/formatting.rst @@ -0,0 +1,205 @@ +.. _formatting-tool: + +========== +Formatting +========== + +Make your message formatting flexible and simple + +This instrument works on top of Message entities instead of using HTML or Markdown markups, +you can easily construct your message and sent it to the Telegram without the need to +remember tag parity (opening and closing) or escaping user input. + +Usage +===== + +Basic scenario +-------------- + +Construct your message and send it to the Telegram. + +.. code-block:: python + + content = Text("Hello, ", Bold(message.from_user.full_name), "!") + await message.answer(**content.as_kwargs()) + +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)}!", + parse_mode=ParseMode.HTML + ) + +Literally when you execute :code:`as_kwargs` method the Text object is converted +into text :code:`Hello, Alex!` with entities list :code:`[MessageEntity(type='bold', offset=7, length=4)]` +and passed into dict which can be used as :code:`**kwargs` in API call. + +The complete list of elements is listed `on this page below <#available-elements>`_. + +Advanced scenario +----------------- + +On top of base elements can be implemented content rendering structures, +so, out of the box aiogram has a few already implemented functions that helps you to format +your messages: + +.. autofunction:: aiogram.utils.formatting.as_line + +.. autofunction:: aiogram.utils.formatting.as_list + +.. autofunction:: aiogram.utils.formatting.as_marked_list + +.. autofunction:: aiogram.utils.formatting.as_numbered_list + +.. autofunction:: aiogram.utils.formatting.as_section + +.. autofunction:: aiogram.utils.formatting.as_marked_section + +.. autofunction:: aiogram.utils.formatting.as_numbered_section + +.. autofunction:: aiogram.utils.formatting.as_key_value + +and lets complete them all: + +.. code-block:: python + + content = as_list( + as_marked_section( + Bold("Success:"), + "Test 1", + "Test 3", + "Test 4", + marker="✅ ", + ), + as_marked_section( + Bold("Failed:"), + "Test 2", + marker="❌ ", + ), + as_marked_section( + Bold("Summary:"), + as_key_value("Total", 4), + as_key_value("Success", 3), + as_key_value("Failed", 1), + marker=" ", + ), + HashTag("#test"), + sep="\n\n", + ) + +Will be rendered into: + + **Success:** + + ✅ Test 1 + + ✅ Test 3 + + ✅ Test 4 + + **Failed:** + + ❌ Test 2 + + **Summary:** + + **Total**: 4 + + **Success**: 3 + + **Failed**: 1 + + #test + + +Or as HTML: + +.. code-block:: html + + Success: + ✅ Test 1 + ✅ Test 3 + ✅ Test 4 + + Failed: + ❌ Test 2 + + Summary: + Total: 4 + Success: 3 + Failed: 1 + + #test + +Available methods +================= + +.. autoclass:: aiogram.utils.formatting.Text + :members: + :show-inheritance: + :member-order: bysource + :special-members: __init__ + + +Available elements +================== + +.. autoclass:: aiogram.utils.formatting.Text + :show-inheritance: + :noindex: + +.. autoclass:: aiogram.utils.formatting.HashTag + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.CashTag + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.BotCommand + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.Url + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.Email + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.PhoneNumber + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.Bold + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.Italic + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.Underline + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.Strikethrough + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.Spoiler + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.Code + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.Pre + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.TextLink + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.TextMention + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.CustomEmoji + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.BlockQuote + :show-inheritance: + +.. autoclass:: aiogram.utils.formatting.ExpandableBlockQuote + :show-inheritance: diff --git a/docs/utils/i18n.rst b/docs/utils/i18n.rst index fbf6333f..2ea2c2dc 100644 --- a/docs/utils/i18n.rst +++ b/docs/utils/i18n.rst @@ -63,7 +63,7 @@ Also if you want to use translated string in keyword- or magic- filters you will from aiogram import F from aiogram.utils.i18n import lazy_gettext as __ - @router.message(F.text.lower() == __("My menu entry")) + @router.message(F.text == __("My menu entry")) ... @@ -76,12 +76,34 @@ Also if you want to use translated string in keyword- or magic- filters you will Lazy gettext can't be used as value for API methods or any Telegram Object (like :class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton` or etc.) +**Working with plural forms** + +The `gettext` from `aiogram.utils.i18n` is the one alias for two functions _gettext_ and _ngettext_ +of `GNU gettext Python module `_. Therefore, the wrapper for message +strings is the same `_()`. You need to pass three parameters to the function: +a singular string, a plural string, and a value. + +.. code-block:: python + :emphasize-lines: 6, 10 + from aiogram import html + from aiogram.utils.i18n import gettext as _ + + async def my_handler(message: Message) -> None: + try: + n = int(message.text) + except ValueError: + n = 1 + await message.answer( + _("You ordered {n} piece.", "You ordered {n} pieces.",n).format(n) + ) + ) + Configuring engine ================== After you messages is already done to use gettext your bot should know how to detect user language -On top of your application the instance of :class:`aiogram.utils.i18n.code.I18n` should be created +On top of your application the instance of :class:`aiogram.utils.i18n.I18n` should be created .. code-block:: @@ -118,15 +140,15 @@ I18nMiddleware or define you own based on abstract I18nMiddleware middleware: -.. autoclass:: aiogram.utils.i18n.middleware.FSMI18nMiddleware +.. autoclass:: aiogram.utils.i18n.middleware.I18nMiddleware :members: __init__,setup,get_locale Deal with Babel =============== -Step 1: Extract messages ------------------------- +Step 1 Extract messages +~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: bash @@ -136,19 +158,31 @@ Step 1: Extract messages Here is :code:`--input-dirs=.` - path to code and the :code:`locales/messages.pot` is template where messages will be extracted and `messages` is translation domain. +**Working with plural forms** + +Extracting with Pybabel all strings options: + +- :code:`-k _:1,1t -k _:1,2` - for both singular and plural +- :code:`-k __` - for lazy strings + +.. code-block:: bash + + pybabel extract -k _:1,1t -k _:1,2 -k __ --input-dirs=. -o locales/messages.pot + .. note:: Some useful options: - - Extract texts with pluralization support :code:`-k __:1,2` - Add comments for translators, you can use another tag if you want (TR) :code:`--add-comments=NOTE` + - Contact email for bugreport :code:`--msgid-bugs-address=EMAIL` - Disable comments with string location in code :code:`--no-location` + - Copyrights :code:`--copyright-holder=AUTHOR` - Set project name :code:`--project=MySuperBot` - Set version :code:`--version=2.2` Step 2: Init language ---------------------- +~~~~~~~~~~~~~~~~~~~~~ .. code-block:: bash @@ -161,14 +195,14 @@ Step 2: Init language Step 3: Translate texts ------------------------ +~~~~~~~~~~~~~~~~~~~~~~~ To open .po file you can use basic text editor or any PO editor, e.g. `Poedit `_ Just open the file named :code:`locales/{language}/LC_MESSAGES/messages.po` and write translations Step 4: Compile translations ----------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: bash @@ -176,7 +210,7 @@ Step 4: Compile translations Step 5: Updating messages -------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~ When you change the code of your bot you need to update po & mo files diff --git a/docs/utils/index.rst b/docs/utils/index.rst index 9390e8ac..732c37e7 100644 --- a/docs/utils/index.rst +++ b/docs/utils/index.rst @@ -4,6 +4,12 @@ Utils .. toctree:: - i18n keyboard + i18n chat_action + web_app + callback_answer + formatting + media_group + deep_linking + serialization diff --git a/docs/utils/keyboard.rst b/docs/utils/keyboard.rst index e117de4f..6f631ae6 100644 --- a/docs/utils/keyboard.rst +++ b/docs/utils/keyboard.rst @@ -1,18 +1,68 @@ +.. _Keyboard builder: + ================ Keyboard builder ================ -Base builder -============ -.. autoclass:: aiogram.utils.keyboard.ReplyKeyboardBuilder - :members: __init__, buttons, copy, export, add, row, adjust, button, as_markup - :undoc-members: True +Keyboard builder helps to dynamically generate markup. + +.. note:: + + Note that if you have static markup, it's best to define it explicitly rather than using builder, + but if you have dynamic markup configuration, feel free to use builder as you wish. + + +Usage example +============= + +For example you want to generate inline keyboard with 10 buttons + +.. code-block:: python + + builder = InlineKeyboardBuilder() + + for index in range(1, 11): + builder.button(text=f"Set {index}", callback_data=f"set:{index}") + + +then adjust this buttons to some grid, for example first line will have 3 buttons, the next lines will have 2 buttons + +.. code-block:: + + builder.adjust(3, 2) + +also you can attach another builder to this one + +.. code-block:: python + + another_builder = InlineKeyboardBuilder(...)... # Another builder with some buttons + builder.attach(another_builder) + +or you can attach some already generated markup + +.. code-block:: python + + markup = InlineKeyboardMarkup(inline_keyboard=[...]) # Some markup + builder.attach(InlineKeyboardBuilder.from_markup(markup)) + +and finally you can export this markup to use it in your message + +.. code-block:: python + + await message.answer("Some text here", reply_markup=builder.as_markup()) + +Reply keyboard builder has the same interface + +.. warning:: + + Note that you can't attach reply keyboard builder to inline keyboard builder and vice versa + Inline Keyboard =============== .. autoclass:: aiogram.utils.keyboard.InlineKeyboardBuilder - :noindex: + :members: __init__, buttons, copy, export, add, row, adjust, from_markup, attach .. method:: button(text: str, url: Optional[str] = None, login_url: Optional[LoginUrl] = None, callback_data: Optional[Union[str, CallbackData]] = None, switch_inline_query: Optional[str] = None, switch_inline_query_current_chat: Optional[str] = None, callback_game: Optional[CallbackGame] = None, pay: Optional[bool] = None, **kwargs: Any) -> aiogram.utils.keyboard.InlineKeyboardBuilder :noindex: @@ -28,7 +78,7 @@ Reply Keyboard ============== .. autoclass:: aiogram.utils.keyboard.ReplyKeyboardBuilder - :noindex: + :members: __init__, buttons, copy, export, add, row, adjust, from_markup, attach .. method:: button(text: str, request_contact: Optional[bool] = None, request_location: Optional[bool] = None, request_poll: Optional[KeyboardButtonPollType] = None, **kwargs: Any) -> aiogram.utils.keyboard.ReplyKeyboardBuilder :noindex: diff --git a/docs/utils/media_group.rst b/docs/utils/media_group.rst new file mode 100644 index 00000000..c9501a66 --- /dev/null +++ b/docs/utils/media_group.rst @@ -0,0 +1,46 @@ +=================== +Media group builder +=================== + +This module provides a builder for media groups, it can be used to build media groups +for :class:`aiogram.types.input_media_photo.InputMediaPhoto`, :class:`aiogram.types.input_media_video.InputMediaVideo`, +:class:`aiogram.types.input_media_document.InputMediaDocument` and :class:`aiogram.types.input_media_audio.InputMediaAudio`. + +.. warning:: + + :class:`aiogram.types.input_media_animation.InputMediaAnimation` + is not supported yet in the Bot API to send as media group. + + +Usage +===== + +.. code-block:: python + + media_group = MediaGroupBuilder(caption="Media group caption") + + # Add photo + media_group.add_photo(media="https://picsum.photos/200/300") + # Dynamically add photo with known type without using separate method + media_group.add(type="photo", media="https://picsum.photos/200/300") + # ... or video + media_group.add(type="video", media=FSInputFile("media/video.mp4")) + + +To send media group use :meth:`aiogram.methods.send_media_group.SendMediaGroup` method, +but when you use :class:`aiogram.utils.media_group.MediaGroupBuilder` +you should pass ``media`` argument as ``media_group.build()``. + +If you specify ``caption`` in :class:`aiogram.utils.media_group.MediaGroupBuilder` +it will be used as ``caption`` for first media in group. + +.. code-block:: python + + await bot.send_media_group(chat_id=chat_id, media=media_group.build()) + + +References +========== + +.. autoclass:: aiogram.utils.media_group.MediaGroupBuilder + :members: diff --git a/docs/utils/serialization.rst b/docs/utils/serialization.rst new file mode 100644 index 00000000..01b77f4a --- /dev/null +++ b/docs/utils/serialization.rst @@ -0,0 +1,42 @@ +.. _serialization-tool: + +============================= +Telegram object serialization +============================= + +Serialization +============= + +To serialize Python object to Telegram object you can use pydantic serialization methods, for example: + +.. code-block:: python + + message_data = { ... } # Some message data as dict + message = Message.model_validate(message_data) + +If you want to bind serialized object to the Bot instance, you can use context: + +.. code-block:: python + + message_data = { ... } # Some message data as dict + message = Message.model_validate(message_data, context={"bot": bot}) + + +Deserialization +=============== + +In cases when you need to deserialize Telegram object to Python object, you can use this module. + +To convert Telegram object to Python object excluding files you can use +:func:`aiogram.utils.serialization.deserialize_telegram_object_to_python` function. + +.. autofunction:: aiogram.utils.serialization.deserialize_telegram_object_to_python + +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. + +.. autofunction:: aiogram.utils.serialization.deserialize_telegram_object + +.. autoclass:: aiogram.utils.serialization.DeserializedTelegramObject + :members: diff --git a/docs/utils/web_app.rst b/docs/utils/web_app.rst new file mode 100644 index 00000000..101932f9 --- /dev/null +++ b/docs/utils/web_app.rst @@ -0,0 +1,60 @@ +====== +WebApp +====== + +Telegram Bot API 6.0 announces a revolution in the development of chatbots using WebApp feature. + +You can read more details on it in the official `blog `_ +and `documentation `_. + +`aiogram` implements simple utils to remove headache with the data validation from Telegram WebApp on the backend side. + +Usage +===== + +For example from frontend you will pass :code:`application/x-www-form-urlencoded` POST request +with :code:`_auth` field in body and wants to return User info inside response as :code:`application/json` + +.. code-block:: python + + from aiogram.utils.web_app import safe_parse_webapp_init_data + from aiohttp.web_request import Request + from aiohttp.web_response import json_response + + async def check_data_handler(request: Request): + bot: Bot = request.app["bot"] + + data = await request.post() # application/x-www-form-urlencoded + try: + data = safe_parse_webapp_init_data(token=bot.token, init_data=data["_auth"]) + except ValueError: + return json_response({"ok": False, "err": "Unauthorized"}, status=401) + return json_response({"ok": True, "data": data.user.dict()}) + +Functions +========= + +.. autofunction:: aiogram.utils.web_app.check_webapp_signature + +.. autofunction:: aiogram.utils.web_app.parse_webapp_init_data + +.. autofunction:: aiogram.utils.web_app.safe_parse_webapp_init_data + + +Types +===== + +.. autoclass:: aiogram.utils.web_app.WebAppInitData + :members: + :member-order: bysource + :undoc-members: True + +.. autoclass:: aiogram.utils.web_app.WebAppUser + :members: + :member-order: bysource + :undoc-members: True + +.. autoclass:: aiogram.utils.web_app.WebAppChat + :members: + :member-order: bysource + :undoc-members: True diff --git a/examples/context_addition_from_filter.py b/examples/context_addition_from_filter.py new file mode 100644 index 00000000..50eda7d3 --- /dev/null +++ b/examples/context_addition_from_filter.py @@ -0,0 +1,31 @@ +from typing import Any + +from aiogram import Router +from aiogram.filters import Filter +from aiogram.types import Message, User + +router = Router(name=__name__) + + +class HelloFilter(Filter): + def __init__(self, name: str | None = None) -> None: + self.name = name + + async def __call__( + self, + message: Message, + event_from_user: User, + # Filters also can accept keyword parameters like in handlers + ) -> 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)} + return False + + +@router.message(HelloFilter()) +async def my_handler( + message: Message, + name: str, # Now we can accept "name" as named parameter +) -> Any: + return message.answer(f"Hello, {name}!") diff --git a/examples/echo_bot.py b/examples/echo_bot.py index f5689c3d..6a720ddb 100644 --- a/examples/echo_bot.py +++ b/examples/echo_bot.py @@ -1,48 +1,58 @@ +import asyncio import logging -from typing import Any +import sys +from os import getenv -from aiogram import Bot, Dispatcher, types +from aiogram import Bot, Dispatcher, html +from aiogram.client.default import DefaultBotProperties +from aiogram.enums import ParseMode +from aiogram.filters import CommandStart from aiogram.types import Message -TOKEN = "42:TOKEN" +# Bot token can be obtained via https://t.me/BotFather +TOKEN = getenv("BOT_TOKEN") + +# All handlers should be attached to the Router (or Dispatcher) + dp = Dispatcher() -logger = logging.getLogger(__name__) - -@dp.message(commands={"start"}) +@dp.message(CommandStart()) async def command_start_handler(message: Message) -> None: """ - This handler receive messages with `/start` command + This handler receives messages with `/start` command """ - # Most of event objects has an aliases for API methods to be called in event context + # Most event objects have aliases for API methods that can be called in events' context # For example if you want to answer to incoming message you can use `message.answer(...)` alias - # and the target chat will be passed to :ref:`aiogram.methods.send_message.SendMessage` method automatically - # or call API method directly via Bot instance: `bot.send_message(chat_id=message.chat.id, ...)` - await message.answer(f"Hello, {message.from_user.full_name}!") + # and the target chat will be passed to :ref:`aiogram.methods.send_message.SendMessage` + # method automatically or call API method directly via + # Bot instance: `bot.send_message(chat_id=message.chat.id, ...)` + await message.answer(f"Hello, {html.bold(message.from_user.full_name)}!") @dp.message() -async def echo_handler(message: types.Message) -> Any: +async def echo_handler(message: Message) -> None: """ - Handler will forward received message back to the sender + Handler will forward receive a message back to the sender - By default message handler will handle all message types (like text, photo, sticker and etc.) + By default, message handler will handle all message types (like a text, photo, sticker etc.) """ try: - # Send copy of the received message + # Send a copy of the received message await message.send_copy(chat_id=message.chat.id) except TypeError: # But not all the types is supported to be copied so need to handle it await message.answer("Nice try!") -def main() -> None: - # Initialize Bot instance with an default parse mode which will be passed to all API calls - bot = Bot(TOKEN, parse_mode="HTML") +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)) + # And the run events dispatching - dp.run_polling(bot) + await dp.start_polling(bot) if __name__ == "__main__": - main() + logging.basicConfig(level=logging.INFO, stream=sys.stdout) + asyncio.run(main()) diff --git a/examples/echo_bot_webhook.py b/examples/echo_bot_webhook.py new file mode 100644 index 00000000..07a83351 --- /dev/null +++ b/examples/echo_bot_webhook.py @@ -0,0 +1,109 @@ +""" +This example shows how to use webhook on behind of any reverse proxy (nginx, traefik, ingress etc.) +""" + +import logging +import sys +from os import getenv + +from aiohttp import web + +from aiogram import Bot, Dispatcher, Router +from aiogram.client.default import DefaultBotProperties +from aiogram.enums import ParseMode +from aiogram.filters import CommandStart +from aiogram.types import Message +from aiogram.utils.markdown import hbold +from aiogram.webhook.aiohttp_server import SimpleRequestHandler, setup_application + +# Bot token can be obtained via https://t.me/BotFather +TOKEN = getenv("BOT_TOKEN") + +# Webserver settings +# bind localhost only to prevent any external access +WEB_SERVER_HOST = "127.0.0.1" +# Port for incoming request from reverse proxy. Should be any available port +WEB_SERVER_PORT = 8080 + +# Path to webhook route, on which Telegram will send requests +WEBHOOK_PATH = "/webhook" +# Secret key to validate requests from Telegram (optional) +WEBHOOK_SECRET = "my-secret" +# Base URL for webhook will be used to generate webhook URL for Telegram, +# in this example it is used public DNS with HTTPS support +BASE_WEBHOOK_URL = "https://aiogram.dev" + +# All handlers should be attached to the Router (or Dispatcher) +router = Router() + + +@router.message(CommandStart()) +async def command_start_handler(message: Message) -> None: + """ + This handler receives messages with `/start` command + """ + # Most event objects have aliases for API methods that can be called in events' context + # For example if you want to answer to incoming message you can use `message.answer(...)` alias + # and the target chat will be passed to :ref:`aiogram.methods.send_message.SendMessage` + # method automatically or call API method directly via + # Bot instance: `bot.send_message(chat_id=message.chat.id, ...)` + await message.answer(f"Hello, {hbold(message.from_user.full_name)}!") + + +@router.message() +async def echo_handler(message: Message) -> None: + """ + Handler will forward receive a message back to the sender + + By default, message handler will handle all message types (like text, photo, sticker etc.) + """ + try: + # Send a copy of the received message + await message.send_copy(chat_id=message.chat.id) + except TypeError: + # But not all the types is supported to be copied so need to handle it + await message.answer("Nice try!") + + +async def on_startup(bot: Bot) -> None: + # If you have a self-signed SSL certificate, then you will need to send a public + # certificate to Telegram + await bot.set_webhook(f"{BASE_WEBHOOK_URL}{WEBHOOK_PATH}", secret_token=WEBHOOK_SECRET) + + +def main() -> None: + # Dispatcher is a root router + dp = Dispatcher() + # ... and all other routers should be attached to Dispatcher + dp.include_router(router) + + # Register startup hook to initialize webhook + dp.startup.register(on_startup) + + # 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)) + + # Create aiohttp.web.Application instance + app = web.Application() + + # Create an instance of request handler, + # aiogram has few implementations for different cases of usage + # In this example we use SimpleRequestHandler which is designed to handle simple cases + webhook_requests_handler = SimpleRequestHandler( + dispatcher=dp, + bot=bot, + secret_token=WEBHOOK_SECRET, + ) + # Register webhook handler on application + webhook_requests_handler.register(app, path=WEBHOOK_PATH) + + # Mount dispatcher startup and shutdown hooks to aiohttp application + setup_application(app, dp, bot=bot) + + # And finally start webserver + web.run_app(app, host=WEB_SERVER_HOST, port=WEB_SERVER_PORT) + + +if __name__ == "__main__": + logging.basicConfig(level=logging.INFO, stream=sys.stdout) + main() diff --git a/examples/echo_bot_webhook_ssl.py b/examples/echo_bot_webhook_ssl.py new file mode 100644 index 00000000..28c14d1c --- /dev/null +++ b/examples/echo_bot_webhook_ssl.py @@ -0,0 +1,124 @@ +""" +This example shows how to use webhook with SSL certificate. +""" + +import logging +import ssl +import sys +from os import getenv + +from aiohttp import web + +from aiogram import Bot, Dispatcher, Router +from aiogram.client.default import DefaultBotProperties +from aiogram.enums import ParseMode +from aiogram.filters import CommandStart +from aiogram.types import FSInputFile, Message +from aiogram.utils.markdown import hbold +from aiogram.webhook.aiohttp_server import SimpleRequestHandler, setup_application + +# Bot token can be obtained via https://t.me/BotFather +TOKEN = getenv("BOT_TOKEN") + +# Webserver settings +# bind localhost only to prevent any external access +WEB_SERVER_HOST = "127.0.0.1" +# Port for incoming request from reverse proxy. Should be any available port +WEB_SERVER_PORT = 8080 + +# Path to webhook route, on which Telegram will send requests +WEBHOOK_PATH = "/webhook" +# Secret key to validate requests from Telegram (optional) +WEBHOOK_SECRET = "my-secret" +# Base URL for webhook will be used to generate webhook URL for Telegram, +# in this example it is used public address with TLS support +BASE_WEBHOOK_URL = "https://aiogram.dev" + +# Path to SSL certificate and private key for self-signed certificate. +WEBHOOK_SSL_CERT = "/path/to/cert.pem" +WEBHOOK_SSL_PRIV = "/path/to/private.key" + +# All handlers should be attached to the Router (or Dispatcher) +router = Router() + + +@router.message(CommandStart()) +async def command_start_handler(message: Message) -> None: + """ + This handler receives messages with `/start` command + """ + # Most event objects have aliases for API methods that can be called in events' context + # For example if you want to answer to incoming message you can use `message.answer(...)` alias + # and the target chat will be passed to :ref:`aiogram.methods.send_message.SendMessage` + # method automatically or call API method directly via + # Bot instance: `bot.send_message(chat_id=message.chat.id, ...)` + await message.answer(f"Hello, {hbold(message.from_user.full_name)}!") + + +@router.message() +async def echo_handler(message: Message) -> None: + """ + Handler will forward receive a message back to the sender + + By default, message handler will handle all message types (like text, photo, sticker etc.) + """ + try: + # Send a copy of the received message + await message.send_copy(chat_id=message.chat.id) + except TypeError: + # But not all the types is supported to be copied so need to handle it + await message.answer("Nice try!") + + +async def on_startup(bot: Bot) -> None: + # In case when you have a self-signed SSL certificate, you need to send the certificate + # itself to Telegram servers for validation purposes + # (see https://core.telegram.org/bots/self-signed) + # But if you have a valid SSL certificate, you SHOULD NOT send it to Telegram servers. + await bot.set_webhook( + f"{BASE_WEBHOOK_URL}{WEBHOOK_PATH}", + certificate=FSInputFile(WEBHOOK_SSL_CERT), + secret_token=WEBHOOK_SECRET, + ) + + +def main() -> None: + # Dispatcher is a root router + dp = Dispatcher() + # ... and all other routers should be attached to Dispatcher + dp.include_router(router) + + # Register startup hook to initialize webhook + dp.startup.register(on_startup) + + # 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)) + + # Create aiohttp.web.Application instance + app = web.Application() + + # Create an instance of request handler, + # aiogram has few implementations for different cases of usage + # In this example we use SimpleRequestHandler which is designed to handle simple cases + webhook_requests_handler = SimpleRequestHandler( + dispatcher=dp, + bot=bot, + secret_token=WEBHOOK_SECRET, + ) + # Register webhook handler on application + webhook_requests_handler.register(app, path=WEBHOOK_PATH) + + # Mount dispatcher startup and shutdown hooks to aiohttp application + setup_application(app, dp, bot=bot) + + # Generate SSL context + context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2) + context.load_cert_chain(WEBHOOK_SSL_CERT, WEBHOOK_SSL_PRIV) + + # And finally start webserver + web.run_app(app, host=WEB_SERVER_HOST, port=WEB_SERVER_PORT, ssl_context=context) + + +if __name__ == "__main__": + logging.basicConfig(level=logging.INFO, stream=sys.stdout) + main() diff --git a/examples/error_handling.py b/examples/error_handling.py new file mode 100644 index 00000000..ee02fbe1 --- /dev/null +++ b/examples/error_handling.py @@ -0,0 +1,116 @@ +import asyncio +import html +import logging +from os import getenv + +from aiogram import Bot, Dispatcher, types +from aiogram.client.default import DefaultBotProperties +from aiogram.enums import ParseMode +from aiogram.filters import ( + Command, + CommandObject, + ExceptionMessageFilter, + ExceptionTypeFilter, +) +from aiogram.types import ErrorEvent + +TOKEN = getenv("BOT_TOKEN") + +dp = Dispatcher() + +logger = logging.getLogger(__name__) + + +class InvalidAge(Exception): + pass + + +class InvalidName(Exception): + def __init__(self, message: str): + super().__init__(message) + + +@dp.errors(ExceptionTypeFilter(InvalidAge)) +async def handle_invalid_age_exception(event: ErrorEvent, bot: Bot) -> None: + """ + This handler receives only error events with `InvalidAge` exception type. + """ + # To get the original event that caused the exception you can use `event.update` property. + # In this case it will be `Message` object. + # To get the exception itself you can use `event.exception` property. + # In this case we filter errors, so we can be sure `event.exception` is an `InvalidAge` object. + assert isinstance(event.exception, InvalidAge) + logger.error("Error caught: %r while processing %r", event.exception, event.update) + + assert event.update.message is not None + chat_id = event.update.message.chat.id + + # Bot instance is passed to the handler as a keyword argument. + # We can use `bot.send_message` method to send a message to the user, logging the error. + text = f"Error caught: {html.escape(repr(event.exception))}" + await bot.send_message(chat_id=chat_id, text=text) + + +@dp.errors(ExceptionMessageFilter("Invalid")) +async def handle_invalid_exceptions(event: ErrorEvent) -> None: + """ + This handler receives error events with "Invalid" message in them. + """ + # Because we specified `ExceptionTypeFilter` with `InvalidAge` exception type earlier, + # this handler will receive error events with any exception type except `InvalidAge` and + # only if the exception message contains "Invalid" substring. + logger.error("Error `Invalid` caught: %r while processing %r", event.exception, event.update) + + +@dp.message(Command("age")) +async def handle_set_age(message: types.Message, command: CommandObject) -> None: + """ + This handler receives only messages with `/age` command. + + If the user sends a message with `/age` command, but the age is invalid, + the `InvalidAge` exception will be raised and the `handle_invalid_age_exception` + handler will be called. + """ + # To get the command object you can use `command` keyword argument with `CommandObject` type. + # To get the command arguments you can use `command.args` property. + age = command.args + if not age: + 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(): + msg = "Age should be a number" + raise InvalidAge(msg) + + # If the age is valid, send a message to the user. + age = int(age) + await message.reply(text=f"Your age is {age}") + + +@dp.message(Command("name")) +async def handle_set_name(message: types.Message, command: CommandObject) -> None: + """ + This handler receives only messages with `/name` command. + """ + # To get the command object you can use `command` keyword argument with `CommandObject` type. + # To get the command arguments you can use `command.args` property. + name = command.args + if not name: + 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}") + + +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)) + # And the run events dispatching + await dp.start_polling(bot) + + +if __name__ == "__main__": + loop = asyncio.new_event_loop() + loop.run_until_complete(main()) diff --git a/examples/finite_state_machine.py b/examples/finite_state_machine.py index 0a540a0e..27a51989 100644 --- a/examples/finite_state_machine.py +++ b/examples/finite_state_machine.py @@ -2,12 +2,22 @@ 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.dispatcher.fsm.context import FSMContext -from aiogram.dispatcher.fsm.state import State, StatesGroup -from aiogram.types import KeyboardButton, Message, ReplyKeyboardMarkup, ReplyKeyboardRemove +from aiogram.client.default import DefaultBotProperties +from aiogram.enums import ParseMode +from aiogram.filters import Command, CommandStart +from aiogram.fsm.context import FSMContext +from aiogram.fsm.state import State, StatesGroup +from aiogram.types import ( + KeyboardButton, + Message, + ReplyKeyboardMarkup, + ReplyKeyboardRemove, +) + +TOKEN = getenv("BOT_TOKEN") form_router = Router() @@ -18,7 +28,7 @@ class Form(StatesGroup): language = State() -@form_router.message(commands={"start"}) +@form_router.message(CommandStart()) async def command_start(message: Message, state: FSMContext) -> None: await state.set_state(Form.name) await message.answer( @@ -27,7 +37,7 @@ async def command_start(message: Message, state: FSMContext) -> None: ) -@form_router.message(commands={"cancel"}) +@form_router.message(Command("cancel")) @form_router.message(F.text.casefold() == "cancel") async def cancel_handler(message: Message, state: FSMContext) -> None: """ @@ -56,7 +66,7 @@ async def process_name(message: Message, state: FSMContext) -> None: [ KeyboardButton(text="Yes"), KeyboardButton(text="No"), - ] + ], ], resize_keyboard=True, ), @@ -85,7 +95,7 @@ async def process_like_write_bots(message: Message, state: FSMContext) -> None: @form_router.message(Form.like_bots) -async def process_unknown_write_bots(message: Message, state: FSMContext) -> None: +async def process_unknown_write_bots(message: Message) -> None: await message.reply("I don't understand you :(") @@ -93,16 +103,16 @@ async def process_unknown_write_bots(message: Message, state: FSMContext) -> Non async def process_language(message: Message, state: FSMContext) -> None: data = await state.update_data(language=message.text) await state.clear() - text = ( - "Thank for all! Python is in my hearth!\nSee you soon." - if message.text.casefold() == "python" - else "Thank for information!\nSee you soon." - ) - await message.answer(text) + + if message.text.casefold() == "python": + await message.reply( + "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)}, " @@ -114,11 +124,15 @@ async def show_summary(message: Message, data: Dict[str, Any], positive: bool = await message.answer(text=text, reply_markup=ReplyKeyboardRemove()) -async def main(): - bot = Bot(token=getenv("TELEGRAM_TOKEN"), parse_mode="HTML") +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)) + dp = Dispatcher() + dp.include_router(form_router) + # Start event dispatching await dp.start_polling(bot) diff --git a/examples/multi_file_bot/bot.py b/examples/multi_file_bot/bot.py new file mode 100644 index 00000000..709500be --- /dev/null +++ b/examples/multi_file_bot/bot.py @@ -0,0 +1,33 @@ +import asyncio +import logging +from os import getenv + +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") + + +async def main() -> None: + # Dispatcher is a root router + dp = Dispatcher() + # Register all the routers from handlers package + dp.include_routers( + start_router, + echo_router, + ) + + # 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)) + + # And the run events dispatching + await dp.start_polling(bot) + + +if __name__ == "__main__": + logging.basicConfig(level=logging.INFO) + asyncio.run(main()) diff --git a/tests/test_dispatcher/test_filters/__init__.py b/examples/multi_file_bot/handlers/__init__.py similarity index 100% rename from tests/test_dispatcher/test_filters/__init__.py rename to examples/multi_file_bot/handlers/__init__.py diff --git a/examples/multi_file_bot/handlers/echo.py b/examples/multi_file_bot/handlers/echo.py new file mode 100644 index 00000000..4961262c --- /dev/null +++ b/examples/multi_file_bot/handlers/echo.py @@ -0,0 +1,21 @@ +from aiogram import Router +from aiogram.filters import Command +from aiogram.types import Message + +# For each module with handlers we can create a separate router. +echo_router = Router() + + +@echo_router.message() +async def echo_handler(message: Message) -> None: + """ + Handler will forward receive a message back to the sender + + By default, message handler will handle all message types (like a text, photo, sticker etc.) + """ + try: + # Send a copy of the received message + await message.send_copy(chat_id=message.chat.id) + except TypeError: + # But not all the types is supported to be copied so need to handle it + await message.answer("Nice try!") diff --git a/examples/multi_file_bot/handlers/start.py b/examples/multi_file_bot/handlers/start.py new file mode 100644 index 00000000..3e95f2ab --- /dev/null +++ b/examples/multi_file_bot/handlers/start.py @@ -0,0 +1,18 @@ +from aiogram import Router +from aiogram.filters import CommandStart +from aiogram.types import Message + +start_router = Router() + + +@start_router.message(CommandStart()) +async def command_start_handler(message: Message) -> None: + """ + This handler receives messages with `/start` command + """ + # Most event objects have aliases for API methods that can be called in events' context + # For example if you want to answer to incoming message you can use `message.answer(...)` alias + # and the target chat will be passed to :ref:`aiogram.methods.send_message.SendMessage` + # method automatically or call API method directly via + # Bot instance: `bot.send_message(chat_id=message.chat.id, ...)` + await message.answer(f"Hello, {message.from_user.full_name}!") diff --git a/examples/multibot.py b/examples/multibot.py index 82c31715..2dc2de1a 100644 --- a/examples/multibot.py +++ b/examples/multibot.py @@ -1,26 +1,29 @@ +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 -from aiogram.dispatcher.filters import Command, CommandObject -from aiogram.dispatcher.fsm.storage.redis import DefaultKeyBuilder, RedisStorage -from aiogram.dispatcher.webhook.aiohttp_server import ( +from aiogram.enums import ParseMode +from aiogram.exceptions import TelegramUnauthorizedError +from aiogram.filters import Command, CommandObject +from aiogram.fsm.storage.memory import MemoryStorage +from aiogram.types import Message +from aiogram.utils.token import TokenValidationError, validate_token +from aiogram.webhook.aiohttp_server import ( SimpleRequestHandler, TokenBasedRequestHandler, setup_application, ) -from aiogram.exceptions import TelegramUnauthorizedError -from aiogram.types import Message -from aiogram.utils.token import TokenValidationError, validate_token +from finite_state_machine import form_router main_router = Router() BASE_URL = getenv("BASE_URL", "https://example.com") -MAIN_BOT_TOKEN = getenv("TELEGRAM_TOKEN") +MAIN_BOT_TOKEN = getenv("BOT_TOKEN") WEB_SERVER_HOST = "127.0.0.1" WEB_SERVER_PORT = 8080 @@ -31,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: @@ -39,8 +42,8 @@ def is_bot_token(value: str) -> Union[bool, Dict[str, Any]]: return True -@main_router.message(Command(commands=["add"], command_magic=F.args.func(is_bot_token))) -async def command_add_bot(message: Message, command: CommandObject, bot: Bot): +@main_router.message(Command("add", magic=F.args.func(is_bot_token))) +async def command_add_bot(message: Message, command: CommandObject, bot: Bot) -> Any: new_bot = Bot(token=command.args, session=bot.session) try: bot_user = await new_bot.get_me() @@ -48,18 +51,21 @@ async def command_add_bot(message: Message, command: CommandObject, bot: Bot): return message.answer("Invalid token") await new_bot.delete_webhook(drop_pending_updates=True) await new_bot.set_webhook(OTHER_BOTS_URL.format(bot_token=command.args)) - await message.answer(f"Bot @{bot_user.username} successful added") + 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": "HTML"} + bot_settings = {"session": session, "parse_mode": ParseMode.HTML} bot = Bot(token=MAIN_BOT_TOKEN, **bot_settings) - storage = RedisStorage.from_url(REDIS_DSN, key_builder=DefaultKeyBuilder(with_bot_id=True)) + storage = MemoryStorage() + # In order to use RedisStorage you need to use Key Builder with bot ID: + # storage = RedisStorage.from_url(REDIS_DSN, key_builder=DefaultKeyBuilder(with_bot_id=True)) main_dispatcher = Dispatcher(storage=storage) main_dispatcher.include_router(main_router) diff --git a/examples/own_filter.py b/examples/own_filter.py new file mode 100644 index 00000000..df55b154 --- /dev/null +++ b/examples/own_filter.py @@ -0,0 +1,17 @@ +from aiogram import Router +from aiogram.filters import Filter +from aiogram.types import Message + +router = Router() + + +class MyFilter(Filter): + def __init__(self, my_text: str) -> None: + self.my_text = my_text + + async def __call__(self, message: Message) -> bool: + return message.text == self.my_text + + +@router.message(MyFilter("hello")) +async def my_handler(message: Message) -> None: ... diff --git a/examples/quiz_scene.py b/examples/quiz_scene.py new file mode 100644 index 00000000..c3b7c087 --- /dev/null +++ b/examples/quiz_scene.py @@ -0,0 +1,301 @@ +import asyncio +import logging +from dataclasses import dataclass, field +from os import getenv +from typing import Any + +from aiogram import Bot, Dispatcher, F, Router, html +from aiogram.filters import Command +from aiogram.fsm.context import FSMContext +from aiogram.fsm.scene import Scene, SceneRegistry, ScenesManager, on +from aiogram.fsm.storage.memory import SimpleEventIsolation +from aiogram.types import KeyboardButton, Message, ReplyKeyboardRemove +from aiogram.utils.formatting import ( + Bold, + as_key_value, + as_list, + as_numbered_list, + as_section, +) +from aiogram.utils.keyboard import ReplyKeyboardBuilder + +TOKEN = getenv("BOT_TOKEN") + + +@dataclass +class Answer: + """ + Represents an answer to a question. + """ + + text: str + """The answer text""" + is_correct: bool = False + """Indicates if the answer is correct""" + + +@dataclass +class Question: + """ + Class representing a quiz with a question and a list of answers. + """ + + text: str + """The question text""" + answers: list[Answer] + """List of answers""" + + correct_answer: str = field(init=False) + + def __post_init__(self): + self.correct_answer = next(answer.text for answer in self.answers if answer.is_correct) + + +# Fake data, in real application you should use a database or something else +QUESTIONS = [ + Question( + text="What is the capital of France?", + answers=[ + Answer("Paris", is_correct=True), + Answer("London"), + Answer("Berlin"), + Answer("Madrid"), + ], + ), + Question( + text="What is the capital of Spain?", + answers=[ + Answer("Paris"), + Answer("London"), + Answer("Berlin"), + Answer("Madrid", is_correct=True), + ], + ), + Question( + text="What is the capital of Germany?", + answers=[ + Answer("Paris"), + Answer("London"), + Answer("Berlin", is_correct=True), + Answer("Madrid"), + ], + ), + Question( + text="What is the capital of England?", + answers=[ + Answer("Paris"), + Answer("London", is_correct=True), + Answer("Berlin"), + Answer("Madrid"), + ], + ), + Question( + text="What is the capital of Italy?", + answers=[ + Answer("Paris"), + Answer("London"), + Answer("Berlin"), + Answer("Rome", is_correct=True), + ], + ), +] + + +class QuizScene(Scene, state="quiz"): + """ + This class represents a scene for a quiz game. + + It inherits from Scene class and is associated with the state "quiz". + It handles the logic and flow of the quiz game. + """ + + @on.message.enter() + async def on_enter(self, message: Message, state: FSMContext, step: int | None = 0) -> Any: + """ + Method triggered when the user enters the quiz scene. + + It displays the current question and answer options to the user. + + :param message: + :param state: + :param step: Scene argument, can be passed to the scene using the wizard + :return: + """ + if not step: + # This is the first step, so we should greet the user + await message.answer("Welcome to the quiz!") + + try: + quiz = QUESTIONS[step] + except IndexError: + # This error means that the question's list is over + return await self.wizard.exit() + + markup = ReplyKeyboardBuilder() + markup.add(*[KeyboardButton(text=answer.text) for answer in quiz.answers]) + + if step > 0: + markup.button(text="🔙 Back") + markup.button(text="🚫 Exit") + + await state.update_data(step=step) + return await message.answer( + text=QUESTIONS[step].text, + reply_markup=markup.adjust(2).as_markup(resize_keyboard=True), + ) + + @on.message.exit() + async def on_exit(self, message: Message, state: FSMContext) -> None: + """ + Method triggered when the user exits the quiz scene. + + It calculates the user's answers, displays the summary, and clears the stored answers. + + :param message: + :param state: + :return: + """ + data = await state.get_data() + answers = data.get("answers", {}) + + correct = 0 + incorrect = 0 + user_answers = [] + for step, quiz in enumerate(QUESTIONS): + answer = answers.get(step) + is_correct = answer == quiz.correct_answer + if is_correct: + correct += 1 + icon = "✅" + else: + incorrect += 1 + icon = "❌" + if answer is None: + answer = "no answer" + user_answers.append(f"{quiz.text} ({icon} {html.quote(answer)})") + + content = as_list( + as_section( + Bold("Your answers:"), + as_numbered_list(*user_answers), + ), + "", + as_section( + Bold("Summary:"), + as_list( + as_key_value("Correct", correct), + as_key_value("Incorrect", incorrect), + ), + ), + ) + + await message.answer(**content.as_kwargs(), reply_markup=ReplyKeyboardRemove()) + await state.set_data({}) + + @on.message(F.text == "🔙 Back") + async def back(self, message: Message, state: FSMContext) -> None: + """ + Method triggered when the user selects the "Back" button. + + It allows the user to go back to the previous question. + + :param message: + :param state: + :return: + """ + data = await state.get_data() + step = data["step"] + + previous_step = step - 1 + if previous_step < 0: + # In case when the user tries to go back from the first question, + # we just exit the quiz + return await self.wizard.exit() + return await self.wizard.back(step=previous_step) + + @on.message(F.text == "🚫 Exit") + async def exit(self, message: Message) -> None: + """ + Method triggered when the user selects the "Exit" button. + + It exits the quiz. + + :param message: + :return: + """ + await self.wizard.exit() + + @on.message(F.text) + async def answer(self, message: Message, state: FSMContext) -> None: + """ + Method triggered when the user selects an answer. + + It stores the answer and proceeds to the next question. + + :param message: + :param state: + :return: + """ + data = await state.get_data() + step = data["step"] + answers = data.get("answers", {}) + answers[step] = message.text + await state.update_data(answers=answers) + + await self.wizard.retake(step=step + 1) + + @on.message() + async def unknown_message(self, message: Message) -> None: + """ + Method triggered when the user sends a message that is not a command or an answer. + + It asks the user to select an answer. + + :param message: The message received from the user. + :return: None + """ + await message.answer("Please select an answer.") + + +quiz_router = Router(name=__name__) +# Add handler that initializes the scene +quiz_router.message.register(QuizScene.as_handler(), Command("quiz")) + + +@quiz_router.message(Command("start")) +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.", + reply_markup=ReplyKeyboardRemove(), + ) + + +def create_dispatcher() -> Dispatcher: + # Event isolation is needed to correctly handle fast user responses + dispatcher = Dispatcher( + events_isolation=SimpleEventIsolation(), + ) + dispatcher.include_router(quiz_router) + + # To use scenes, you should create a SceneRegistry and register your scenes there + scene_registry = SceneRegistry(dispatcher) + # ... and then register a scene in the registry + # by default, Scene will be mounted to the router that passed to the SceneRegistry, + # but you can specify the router explicitly using the `router` argument + scene_registry.add(QuizScene) + + return dispatcher + + +async def main() -> None: + dp = create_dispatcher() + bot = Bot(token=TOKEN) + await dp.start_polling(bot) + + +if __name__ == "__main__": + # Alternatively, you can use aiogram-cli: + # `aiogram run polling quiz_scene:create_dispatcher --log-level info --token BOT_TOKEN` + logging.basicConfig(level=logging.INFO) + asyncio.run(main()) diff --git a/examples/scene.py b/examples/scene.py new file mode 100644 index 00000000..45d6112c --- /dev/null +++ b/examples/scene.py @@ -0,0 +1,209 @@ +from __future__ import annotations + +from os import getenv +from typing import TypedDict + +from aiogram import Bot, Dispatcher, F, html +from aiogram.filters import Command +from aiogram.fsm.scene import After, Scene, SceneRegistry, on +from aiogram.types import ( + CallbackQuery, + InlineKeyboardButton, + InlineKeyboardMarkup, + KeyboardButton, + Message, + ReplyKeyboardMarkup, + ReplyKeyboardRemove, +) + +TOKEN = getenv("BOT_TOKEN") + +BUTTON_CANCEL = KeyboardButton(text="❌ Cancel") +BUTTON_BACK = KeyboardButton(text="🔙 Back") + + +class FSMData(TypedDict, total=False): + name: str + language: str + + +class CancellableScene(Scene): + """ + This scene is used to handle cancel and back buttons, + can be used as a base class for other scenes that needs to support cancel and back buttons. + """ + + @on.message(F.text.casefold() == BUTTON_CANCEL.text.casefold(), after=After.exit()) + 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) -> None: + await message.answer("Back.") + + +class LanguageScene(CancellableScene, state="language"): + """ + This scene is used to ask user what language he prefers. + """ + + @on.message.enter() + async def on_enter(self, message: Message) -> None: + await message.answer( + "What language do you prefer?", + reply_markup=ReplyKeyboardMarkup( + keyboard=[[BUTTON_BACK, BUTTON_CANCEL]], + resize_keyboard=True, + ), + ) + + @on.message(F.text.casefold() == "python", after=After.exit()) + async def process_python(self, message: Message) -> None: + await message.answer( + "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) -> None: + data: FSMData = await self.wizard.get_data() + await self.show_results(message, language=message.text, **data) + + async def show_results(self, message: Message, name: str, language: str) -> None: + await message.answer( + text=f"I'll keep in mind that, {html.quote(name)}, " + f"you like to write bots with {html.quote(language)}.", + reply_markup=ReplyKeyboardRemove(), + ) + + +class LikeBotsScene(CancellableScene, state="like_bots"): + """ + This scene is used to ask user if he likes to write bots. + """ + + @on.message.enter() + async def on_enter(self, message: Message) -> None: + await message.answer( + "Did you like to write bots?", + reply_markup=ReplyKeyboardMarkup( + keyboard=[ + [KeyboardButton(text="Yes"), KeyboardButton(text="No")], + [BUTTON_BACK, BUTTON_CANCEL], + ], + resize_keyboard=True, + ), + ) + + @on.message(F.text.casefold() == "yes", after=After.goto(LanguageScene)) + 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) -> None: + await message.answer( + "Not bad not terrible.\nSee you soon.", + reply_markup=ReplyKeyboardRemove(), + ) + + @on.message() + async def input_like_bots(self, message: Message) -> None: + await message.answer("I don't understand you :(") + + +class NameScene(CancellableScene, state="name"): + """ + This scene is used to ask user's name. + """ + + @on.message.enter() # Marker for handler that should be called when a user enters the scene. + 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) -> 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) -> 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) -> None: + await self.wizard.update_data(name=message.text) + + +class DefaultScene( + Scene, + reset_data_on_enter=True, # Reset state data + reset_history_on_enter=True, # Reset history + callback_query_without_state=True, # Handle callback queries even if user in any scene +): + """ + Default scene for the bot. + + This scene is used to handle all messages that are not handled by other scenes. + """ + + start_demo = on.message(F.text.casefold() == "demo", after=After.goto(NameScene)) + + @on.message(Command("demo")) + 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")]], + ), + ) + + @on.callback_query(F.data == "start", after=After.goto(NameScene)) + 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) -> None: + await message.answer( + "Start demo?\nYou can also start demo via command /demo", + reply_markup=ReplyKeyboardMarkup( + keyboard=[[KeyboardButton(text="Demo")]], + resize_keyboard=True, + ), + ) + + +def create_dispatcher() -> Dispatcher: + dispatcher = Dispatcher() + + # Scene registry should be the only one instance in your application for proper work. + # It stores all available scenes. + # You can use any router for scenes, not only `Dispatcher`. + registry = SceneRegistry(dispatcher) + # All scenes at register time converts to Routers and includes into specified router. + registry.add( + DefaultScene, + NameScene, + LikeBotsScene, + LanguageScene, + ) + + return dispatcher + + +def main() -> None: + dp = create_dispatcher() + bot = Bot(token=TOKEN) + dp.run_polling(bot) + + +if __name__ == "__main__": + # Recommended to use CLI instead of this snippet. + # `aiogram run polling scene_example:create_dispatcher --token BOT_TOKEN --log-level info` + main() diff --git a/examples/specify_updates.py b/examples/specify_updates.py index 1ad3cd0f..d38ee7d6 100644 --- a/examples/specify_updates.py +++ b/examples/specify_updates.py @@ -1,38 +1,49 @@ +import asyncio import logging +import sys +from os import getenv -from aiogram import Bot, Dispatcher -from aiogram.dispatcher.router import Router -from aiogram.types import CallbackQuery, ChatMemberUpdated, Message -from aiogram.types.inline_keyboard_button import InlineKeyboardButton -from aiogram.types.inline_keyboard_markup import InlineKeyboardMarkup +from aiogram import Bot, Dispatcher, Router +from aiogram.client.default import DefaultBotProperties +from aiogram.enums import ParseMode +from aiogram.filters import LEAVE_TRANSITION, ChatMemberUpdatedFilter, CommandStart +from aiogram.types import ( + CallbackQuery, + ChatMemberUpdated, + InlineKeyboardButton, + InlineKeyboardMarkup, + Message, +) +from aiogram.utils.markdown import hbold, hcode -TOKEN = "6wo" -dp = Dispatcher() +TOKEN = getenv("BOT_TOKEN") logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) +router = Router() -@dp.message(commands={"start"}) + +@router.message(CommandStart()) async def command_start_handler(message: Message) -> None: """ - This handler receive messages with `/start` command + This handler receives messages with `/start` command """ await message.answer( - f"Hello, {message.from_user.full_name}!", + 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="*")]], ), ) -@dp.chat_member() +@router.chat_member() async def chat_member_update(chat_member: ChatMemberUpdated, bot: Bot) -> None: await bot.send_message( chat_member.chat.id, - "Member {chat_member.from_user.id} was changed " - + f"from {chat_member.old_chat_member.status} to {chat_member.new_chat_member.status}", + 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}", ) @@ -42,7 +53,7 @@ sub_router = Router() @sub_router.callback_query() async def callback_tap_me(callback_query: CallbackQuery) -> None: - await callback_query.answer("Yeah good, now i'm fine") + await callback_query.answer("Yeah good, now I'm fine") # this router will use only edited_message updates @@ -51,36 +62,36 @@ sub_sub_router = Router() @sub_sub_router.edited_message() async def edited_message_handler(edited_message: Message) -> None: - await edited_message.reply("Message was edited, big brother watch you") + await edited_message.reply("Message was edited, Big Brother watches you") # this router will use only my_chat_member updates deep_dark_router = Router() -@deep_dark_router.my_chat_member() +@deep_dark_router.my_chat_member(~ChatMemberUpdatedFilter(~LEAVE_TRANSITION)) async def my_chat_member_change(chat_member: ChatMemberUpdated, bot: Bot) -> None: await bot.send_message( chat_member.chat.id, - "Member was changed from " - + f"{chat_member.old_chat_member.status} to {chat_member.new_chat_member.status}", + f"This Bot`s status was changed from {hbold(chat_member.old_chat_member.status)} " + f"to {hbold(chat_member.new_chat_member.status)}", ) -def main() -> None: - # Initialize Bot instance with an default parse mode which will be passed to all API calls - bot = Bot(TOKEN, parse_mode="HTML") +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)) + + dp = Dispatcher() sub_router.include_router(deep_dark_router) + router.include_routers(sub_router, sub_sub_router) + dp.include_router(router) - dp.include_router(sub_router) - dp.include_router(sub_sub_router) - - useful_updates = dp.resolve_used_update_types() - - # And the run events dispatching - dp.run_polling(bot, allowed_updates=useful_updates) + # Start event dispatching + await dp.start_polling(bot) if __name__ == "__main__": - main() + logging.basicConfig(level=logging.INFO, stream=sys.stdout) + asyncio.run(main()) diff --git a/examples/stars_invoice.py b/examples/stars_invoice.py new file mode 100644 index 00000000..917c491a --- /dev/null +++ b/examples/stars_invoice.py @@ -0,0 +1,64 @@ +import asyncio +import logging +from os import getenv + +from aiogram import Bot, Dispatcher, F, Router +from aiogram.filters import Command +from aiogram.types import LabeledPrice, Message, PreCheckoutQuery + +TOKEN = getenv("BOT_TOKEN") + +GOODS = { # Fake storage for goods, in real life it should be a database + "demo": 1, + "another": 0, +} + +logger = logging.getLogger(__name__) +invoices_router = Router(name=__name__) + + +@invoices_router.message(Command("start")) +async def command_start(message: Message) -> None: + # Send demo invoice to user, the payment will be refunded after successful payment + await message.answer_invoice( + title="Demo invoice", + description="Demo invoice description", + prices=[ + LabeledPrice(label="Demo", amount=42), + ], + payload="demo", + currency="XTR", + ) + + +@invoices_router.pre_checkout_query(F.invoice_payload == "demo") +async def pre_checkout_query(query: PreCheckoutQuery) -> None: + # if your product is available for sale, + # confirm that you are ready to accept payment + if GOODS.get(query.invoice_payload) > 0: + await query.answer(ok=True) + else: + await query.answer(ok=False, error_message="The product is out of stock") + + +@invoices_router.message(F.successful_payment) +async def successful_payment(message: Message, bot: Bot) -> None: + await bot.refund_star_payment( + user_id=message.from_user.id, + telegram_payment_charge_id=message.successful_payment.telegram_payment_charge_id, + ) + await message.answer("Thanks. Your payment has been refunded.") + + +async def main() -> None: + bot = Bot(token=TOKEN) + + dispatcher = Dispatcher() + dispatcher.include_router(invoices_router) + + await dispatcher.start_polling(bot) + + +if __name__ == "__main__": + logging.basicConfig(level=logging.INFO) + asyncio.run(main()) diff --git a/examples/web_app/demo.html b/examples/web_app/demo.html new file mode 100644 index 00000000..40726974 --- /dev/null +++ b/examples/web_app/demo.html @@ -0,0 +1,376 @@ + + + + + + + + + + + + + + + + +
+
+ + + + + diff --git a/examples/web_app/handlers.py b/examples/web_app/handlers.py new file mode 100644 index 00000000..428d8376 --- /dev/null +++ b/examples/web_app/handlers.py @@ -0,0 +1,49 @@ +from aiogram import Bot, F, Router +from aiogram.filters import Command, CommandStart +from aiogram.types import ( + InlineKeyboardButton, + InlineKeyboardMarkup, + MenuButtonWebApp, + Message, + WebAppInfo, +) + +my_router = Router() + + +@my_router.message(CommandStart()) +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")), + ) + await message.answer("""Hi!\nSend me any type of message to start.\nOr just send /webview""") + + +@my_router.message(Command("webview")) +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"), + ), + ], + ], + ), + ) + + +@my_router.message(~F.message.via_bot) # Echo to all messages except messages via bot +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"))], + ], + ), + ) diff --git a/examples/web_app/main.py b/examples/web_app/main.py new file mode 100644 index 00000000..1e1938c6 --- /dev/null +++ b/examples/web_app/main.py @@ -0,0 +1,53 @@ +import logging +import sys +from os import getenv + +from aiohttp.web import run_app +from aiohttp.web_app import Application + +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) -> 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")), + ) + + +def main() -> None: + bot = Bot(token=TOKEN, default=DefaultBotProperties(parse_mode=ParseMode.HTML)) + dispatcher = Dispatcher() + dispatcher["base_url"] = APP_BASE_URL + dispatcher.startup.register(on_startup) + + dispatcher.include_router(my_router) + + app = Application() + app["bot"] = bot + + app.router.add_get("/demo", demo_handler) + app.router.add_post("/demo/checkData", check_data_handler) + app.router.add_post("/demo/sendMessage", send_message_handler) + SimpleRequestHandler( + dispatcher=dispatcher, + bot=bot, + ).register(app, path="/webhook") + setup_application(app, dispatcher, bot=bot) + + run_app(app, host="127.0.0.1", port=8081) + + +if __name__ == "__main__": + logging.basicConfig(level=logging.INFO, stream=sys.stdout) + main() diff --git a/examples/web_app/routes.py b/examples/web_app/routes.py new file mode 100644 index 00000000..1537c4eb --- /dev/null +++ b/examples/web_app/routes.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from pathlib import Path +from typing import TYPE_CHECKING + +from aiohttp.web_fileresponse import FileResponse +from aiohttp.web_response import json_response + +from aiogram.types import ( + InlineKeyboardButton, + InlineKeyboardMarkup, + InlineQueryResultArticle, + InputTextMessageContent, + WebAppInfo, +) +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 + + 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) -> Response: + bot: Bot = request.app["bot"] + + data = await request.post() + if check_webapp_signature(bot.token, data["_auth"]): + return json_response({"ok": True}) + return json_response({"ok": False, "err": "Unauthorized"}, status=401) + + +async def send_message_handler(request: Request) -> Response: + bot: Bot = request.app["bot"] + data = await request.post() + try: + web_app_init_data = safe_parse_webapp_init_data(token=bot.token, init_data=data["_auth"]) + except ValueError: + return json_response({"ok": False, "err": "Unauthorized"}, status=401) + + reply_markup = None + if data["with_webview"] == "1": + reply_markup = InlineKeyboardMarkup( + inline_keyboard=[ + [ + InlineKeyboardButton( + text="Open", + 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, + result=InlineQueryResultArticle( + id=web_app_init_data.query_id, + title="Demo", + input_message_content=InputTextMessageContent( + message_text="Hello, World!", + parse_mode=None, + ), + reply_markup=reply_markup, + ), + ) + return json_response({"ok": True}) diff --git a/examples/without_dispatcher.py b/examples/without_dispatcher.py new file mode 100644 index 00000000..a48bb6d3 --- /dev/null +++ b/examples/without_dispatcher.py @@ -0,0 +1,36 @@ +import asyncio +from argparse import ArgumentParser + +from aiogram import Bot +from aiogram.client.default import DefaultBotProperties +from aiogram.enums import ParseMode + + +def create_parser() -> ArgumentParser: + parser = ArgumentParser() + parser.add_argument("--token", help="Telegram Bot API Token") + parser.add_argument("--chat-id", type=int, help="Target chat id") + parser.add_argument("--message", "-m", help="Message text to sent", default="Hello, World!") + + return parser + + +async def main() -> None: + parser = create_parser() + ns = parser.parse_args() + + token = ns.token + chat_id = ns.chat_id + message = ns.message + + async with Bot( + token=token, + default=DefaultBotProperties( + parse_mode=ParseMode.HTML, + ), + ) as bot: + await bot.send_message(chat_id=chat_id, text=message) + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index 2c1b8b31..00000000 --- a/mypy.ini +++ /dev/null @@ -1,37 +0,0 @@ -[mypy] -plugins = pydantic.mypy -python_version = 3.8 -show_error_codes = True -show_error_context = True -pretty = True -ignore_missing_imports = False -warn_unused_configs = True -disallow_subclassing_any = True -disallow_any_generics = True -disallow_untyped_calls = True -disallow_untyped_defs = True -disallow_incomplete_defs = True -check_untyped_defs = True -disallow_untyped_decorators = True -no_implicit_optional = True -warn_redundant_casts = True -warn_unused_ignores = True -warn_return_any = True -follow_imports_for_stubs = True -namespace_packages = True -show_absolute_path = True - -[mypy-aiofiles] -ignore_missing_imports = True - -[mypy-async_lru] -ignore_missing_imports = True - -[mypy-uvloop] -ignore_missing_imports = True - -[mypy-aioredis] -ignore_missing_imports = True - -[mypy-babel.*] -ignore_missing_imports = True diff --git a/poetry.lock b/poetry.lock deleted file mode 100644 index 22656370..00000000 --- a/poetry.lock +++ /dev/null @@ -1,2406 +0,0 @@ -[[package]] -name = "aiofiles" -version = "0.8.0" -description = "File support for asyncio." -category = "main" -optional = false -python-versions = ">=3.6,<4.0" - -[[package]] -name = "aiohttp" -version = "3.8.1" -description = "Async http client/server framework (asyncio)" -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -aiosignal = ">=1.1.2" -async-timeout = ">=4.0.0a3,<5.0" -attrs = ">=17.3.0" -charset-normalizer = ">=2.0,<3.0" -frozenlist = ">=1.1.1" -multidict = ">=4.5,<7.0" -yarl = ">=1.0,<2.0" - -[package.extras] -speedups = ["aiodns", "brotli", "cchardet"] - -[[package]] -name = "aiohttp-socks" -version = "0.7.1" -description = "Proxy connector for aiohttp" -category = "main" -optional = true -python-versions = "*" - -[package.dependencies] -aiohttp = ">=2.3.2" -attrs = ">=19.2.0" -python-socks = {version = ">=2.0.0,<3.0.0", extras = ["asyncio"]} - -[[package]] -name = "aioredis" -version = "2.0.1" -description = "asyncio (PEP 3156) Redis support" -category = "main" -optional = true -python-versions = ">=3.6" - -[package.dependencies] -async-timeout = "*" -typing-extensions = "*" - -[package.extras] -hiredis = ["hiredis (>=1.0)"] - -[[package]] -name = "aiosignal" -version = "1.2.0" -description = "aiosignal: a list of registered asynchronous callbacks" -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -frozenlist = ">=1.1.0" - -[[package]] -name = "alabaster" -version = "0.7.12" -description = "A configurable sidebar-enabled Sphinx theme" -category = "main" -optional = true -python-versions = "*" - -[[package]] -name = "appnope" -version = "0.1.2" -description = "Disable App Nap on macOS >= 10.9" -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "aresponses" -version = "2.1.5" -description = "Asyncio response mocking. Similar to the responses library used for 'requests'" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -aiohttp = ">=3.1.0,<4.0.0" -pytest-asyncio = "*" - -[[package]] -name = "asttokens" -version = "2.0.5" -description = "Annotate AST trees with source code positions" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -six = "*" - -[package.extras] -test = ["astroid", "pytest"] - -[[package]] -name = "async-timeout" -version = "4.0.0" -description = "Timeout context manager for asyncio programs" -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -typing-extensions = ">=3.6.5" - -[[package]] -name = "asynctest" -version = "0.13.0" -description = "Enhance the standard unittest package with features for testing asyncio libraries" -category = "dev" -optional = false -python-versions = ">=3.5" - -[[package]] -name = "atomicwrites" -version = "1.4.0" -description = "Atomic file writes." -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[[package]] -name = "attrs" -version = "21.2.0" -description = "Classes Without Boilerplate" -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - -[package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"] -docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"] - -[[package]] -name = "babel" -version = "2.9.1" -description = "Internationalization utilities" -category = "main" -optional = true -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[package.dependencies] -pytz = ">=2015.7" - -[[package]] -name = "backcall" -version = "0.2.0" -description = "Specifications for callback functions passed in to an API" -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "backports.entry-points-selectable" -version = "1.1.0" -description = "Compatibility shim providing selectable entry points for older implementations" -category = "dev" -optional = false -python-versions = ">=2.7" - -[package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-flake8", "pytest-cov", "pytest-black (>=0.3.7)", "pytest-mypy", "pytest-checkdocs (>=2.4)", "pytest-enabler (>=1.0.1)"] - -[[package]] -name = "beautifulsoup4" -version = "4.10.0" -description = "Screen-scraping library" -category = "main" -optional = true -python-versions = ">3.0.0" - -[package.dependencies] -soupsieve = ">1.2" - -[package.extras] -html5lib = ["html5lib"] -lxml = ["lxml"] - -[[package]] -name = "black" -version = "22.1.0" -description = "The uncompromising code formatter." -category = "dev" -optional = false -python-versions = ">=3.6.2" - -[package.dependencies] -click = ">=8.0.0" -mypy-extensions = ">=0.4.3" -pathspec = ">=0.9.0" -platformdirs = ">=2" -tomli = ">=1.1.0" -typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} - -[package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)"] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -uvloop = ["uvloop (>=0.15.2)"] - -[[package]] -name = "certifi" -version = "2021.10.8" -description = "Python package for providing Mozilla's CA Bundle." -category = "main" -optional = false -python-versions = "*" - -[[package]] -name = "cfgv" -version = "3.3.1" -description = "Validate configuration and produce human readable error messages." -category = "dev" -optional = false -python-versions = ">=3.6.1" - -[[package]] -name = "charset-normalizer" -version = "2.0.7" -description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" -optional = false -python-versions = ">=3.5.0" - -[package.extras] -unicode_backport = ["unicodedata2"] - -[[package]] -name = "click" -version = "8.0.3" -description = "Composable command line interface toolkit" -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - -[[package]] -name = "click-default-group" -version = "1.2.2" -description = "Extends click.Group to invoke a command without explicit subcommand name" -category = "main" -optional = true -python-versions = "*" - -[package.dependencies] -click = "*" - -[[package]] -name = "colorama" -version = "0.4.4" -description = "Cross-platform colored terminal text." -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - -[[package]] -name = "coverage" -version = "6.3.1" -description = "Code coverage measurement for Python" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -tomli = {version = "*", optional = true, markers = "extra == \"toml\""} - -[package.extras] -toml = ["tomli"] - -[[package]] -name = "decorator" -version = "5.1.0" -description = "Decorators for Humans" -category = "dev" -optional = false -python-versions = ">=3.5" - -[[package]] -name = "distlib" -version = "0.3.3" -description = "Distribution utilities" -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "docutils" -version = "0.17.1" -description = "Docutils -- Python Documentation Utilities" -category = "main" -optional = true -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - -[[package]] -name = "executing" -version = "0.8.2" -description = "Get the currently executing AST node of a frame, and other information" -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "filelock" -version = "3.3.2" -description = "A platform independent file lock." -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.extras] -docs = ["furo (>=2021.8.17b43)", "sphinx (>=4.1)", "sphinx-autodoc-typehints (>=1.12)"] -testing = ["covdefaults (>=1.2.0)", "coverage (>=4)", "pytest (>=4)", "pytest-cov", "pytest-timeout (>=1.4.2)"] - -[[package]] -name = "flake8" -version = "4.0.1" -description = "the modular source code checker: pep8 pyflakes and co" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -mccabe = ">=0.6.0,<0.7.0" -pycodestyle = ">=2.8.0,<2.9.0" -pyflakes = ">=2.4.0,<2.5.0" - -[[package]] -name = "flake8-html" -version = "0.4.1" -description = "Generate HTML reports of flake8 violations" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -flake8 = ">=3.3.0" -importlib-metadata = "*" -jinja2 = ">=2.9.0" -pygments = ">=2.2.0" - -[[package]] -name = "frozenlist" -version = "1.2.0" -description = "A list-like structure which implements collections.abc.MutableSequence" -category = "main" -optional = false -python-versions = ">=3.6" - -[[package]] -name = "furo" -version = "2022.2.14.1" -description = "A clean customisable Sphinx documentation theme." -category = "main" -optional = true -python-versions = ">=3.6" - -[package.dependencies] -beautifulsoup4 = "*" -pygments = ">=2.7,<3.0" -sphinx = ">=4.0,<5.0" - -[package.extras] -test = ["pytest", "pytest-cov", "pytest-xdist"] -doc = ["myst-parser", "sphinx-copybutton", "sphinx-design", "sphinx-inline-tabs"] - -[[package]] -name = "identify" -version = "2.3.4" -description = "File identification library for Python" -category = "dev" -optional = false -python-versions = ">=3.6.1" - -[package.extras] -license = ["editdistance-s"] - -[[package]] -name = "idna" -version = "3.3" -description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" -optional = false -python-versions = ">=3.5" - -[[package]] -name = "imagesize" -version = "1.2.0" -description = "Getting image size from png/jpeg/jpeg2000/gif file" -category = "main" -optional = true -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[[package]] -name = "importlib-metadata" -version = "4.8.1" -description = "Read metadata from Python packages" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -zipp = ">=0.5" - -[package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -perf = ["ipython"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] - -[[package]] -name = "incremental" -version = "21.3.0" -description = "A small library that versions your Python projects." -category = "main" -optional = true -python-versions = "*" - -[package.extras] -scripts = ["click (>=6.0)", "twisted (>=16.4.0)"] - -[[package]] -name = "iniconfig" -version = "1.1.1" -description = "iniconfig: brain-dead simple config-ini parsing" -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "ipython" -version = "8.0.1" -description = "IPython: Productive Interactive Computing" -category = "dev" -optional = false -python-versions = ">=3.8" - -[package.dependencies] -appnope = {version = "*", markers = "sys_platform == \"darwin\""} -backcall = "*" -black = "*" -colorama = {version = "*", markers = "sys_platform == \"win32\""} -decorator = "*" -jedi = ">=0.16" -matplotlib-inline = "*" -pexpect = {version = ">4.3", markers = "sys_platform != \"win32\""} -pickleshare = "*" -prompt-toolkit = ">=2.0.0,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.1.0" -pygments = "*" -stack-data = "*" -traitlets = ">=5" - -[package.extras] -all = ["Sphinx (>=1.3)", "curio", "ipykernel", "ipyparallel", "ipywidgets", "matplotlib (!=3.2.0)", "nbconvert", "nbformat", "notebook", "numpy (>=1.19)", "pandas", "pygments", "pytest", "pytest-asyncio", "qtconsole", "testpath", "trio"] -doc = ["Sphinx (>=1.3)"] -kernel = ["ipykernel"] -nbconvert = ["nbconvert"] -nbformat = ["nbformat"] -notebook = ["notebook", "ipywidgets"] -parallel = ["ipyparallel"] -qtconsole = ["qtconsole"] -test = ["pytest", "pytest-asyncio", "testpath", "pygments"] -test_extra = ["pytest", "testpath", "curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.19)", "pandas", "pygments", "trio"] - -[[package]] -name = "isort" -version = "5.10.1" -description = "A Python utility / library to sort Python imports." -category = "dev" -optional = false -python-versions = ">=3.6.1,<4.0" - -[package.extras] -pipfile_deprecated_finder = ["pipreqs", "requirementslib"] -requirements_deprecated_finder = ["pipreqs", "pip-api"] -colors = ["colorama (>=0.4.3,<0.5.0)"] -plugins = ["setuptools"] - -[[package]] -name = "jedi" -version = "0.18.0" -description = "An autocompletion tool for Python that can be used for text editors." -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -parso = ">=0.8.0,<0.9.0" - -[package.extras] -qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] -testing = ["Django (<3.1)", "colorama", "docopt", "pytest (<6.0.0)"] - -[[package]] -name = "jinja2" -version = "3.0.2" -description = "A very fast and expressive template engine." -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -MarkupSafe = ">=2.0" - -[package.extras] -i18n = ["Babel (>=2.7)"] - -[[package]] -name = "livereload" -version = "2.6.3" -description = "Python LiveReload is an awesome tool for web developers" -category = "main" -optional = true -python-versions = "*" - -[package.dependencies] -six = "*" -tornado = {version = "*", markers = "python_version > \"2.7\""} - -[[package]] -name = "magic-filter" -version = "1.0.5" -description = "This package provides magic filter based on dynamic attribute getter" -category = "main" -optional = false -python-versions = ">=3.6.2,<4.0.0" - -[[package]] -name = "markdown" -version = "3.3.4" -description = "Python implementation of Markdown." -category = "main" -optional = true -python-versions = ">=3.6" - -[package.extras] -testing = ["coverage", "pyyaml"] - -[[package]] -name = "markdown-include" -version = "0.6.0" -description = "This is an extension to Python-Markdown which provides an \"include\" function, similar to that found in LaTeX (and also the C pre-processor and Fortran). I originally wrote it for my FORD Fortran auto-documentation generator." -category = "main" -optional = true -python-versions = "*" - -[package.dependencies] -markdown = "*" - -[[package]] -name = "markupsafe" -version = "2.0.1" -description = "Safely add untrusted strings to HTML/XML markup." -category = "main" -optional = false -python-versions = ">=3.6" - -[[package]] -name = "matplotlib-inline" -version = "0.1.3" -description = "Inline Matplotlib backend for Jupyter" -category = "dev" -optional = false -python-versions = ">=3.5" - -[package.dependencies] -traitlets = "*" - -[[package]] -name = "mccabe" -version = "0.6.1" -description = "McCabe checker, plugin for flake8" -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "multidict" -version = "5.2.0" -description = "multidict implementation" -category = "main" -optional = false -python-versions = ">=3.6" - -[[package]] -name = "mypy" -version = "0.931" -description = "Optional static typing for Python" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -mypy-extensions = ">=0.4.3" -tomli = ">=1.1.0" -typing-extensions = ">=3.10" - -[package.extras] -dmypy = ["psutil (>=4.0)"] -python2 = ["typed-ast (>=1.4.0,<2)"] - -[[package]] -name = "mypy-extensions" -version = "0.4.3" -description = "Experimental type system extensions for programs checked with the mypy typechecker." -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "nodeenv" -version = "1.6.0" -description = "Node.js virtual environment builder" -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "packaging" -version = "21.3" -description = "Core utilities for Python packages" -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" - -[[package]] -name = "parso" -version = "0.8.2" -description = "A Python Parser" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.extras] -qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] -testing = ["docopt", "pytest (<6.0.0)"] - -[[package]] -name = "pathspec" -version = "0.9.0" -description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" - -[[package]] -name = "pexpect" -version = "4.8.0" -description = "Pexpect allows easy control of interactive console applications." -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -ptyprocess = ">=0.5" - -[[package]] -name = "pickleshare" -version = "0.7.5" -description = "Tiny 'shelve'-like database with concurrency support" -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "platformdirs" -version = "2.4.0" -description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.extras] -docs = ["Sphinx (>=4)", "furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)"] -test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] - -[[package]] -name = "pluggy" -version = "1.0.0" -description = "plugin and hook calling mechanisms for python" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.extras] -dev = ["pre-commit", "tox"] -testing = ["pytest", "pytest-benchmark"] - -[[package]] -name = "pre-commit" -version = "2.17.0" -description = "A framework for managing and maintaining multi-language pre-commit hooks." -category = "dev" -optional = false -python-versions = ">=3.6.1" - -[package.dependencies] -cfgv = ">=2.0.0" -identify = ">=1.0.0" -nodeenv = ">=0.11.1" -pyyaml = ">=5.1" -toml = "*" -virtualenv = ">=20.0.8" - -[[package]] -name = "prompt-toolkit" -version = "3.0.22" -description = "Library for building powerful interactive command lines in Python" -category = "dev" -optional = false -python-versions = ">=3.6.2" - -[package.dependencies] -wcwidth = "*" - -[[package]] -name = "ptyprocess" -version = "0.7.0" -description = "Run a subprocess in a pseudo terminal" -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "pure-eval" -version = "0.2.2" -description = "Safely evaluate AST nodes without side effects" -category = "dev" -optional = false -python-versions = "*" - -[package.extras] -tests = ["pytest"] - -[[package]] -name = "py" -version = "1.11.0" -description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - -[[package]] -name = "pycodestyle" -version = "2.8.0" -description = "Python style guide checker" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - -[[package]] -name = "pydantic" -version = "1.9.0" -description = "Data validation and settings management using python 3.6 type hinting" -category = "main" -optional = false -python-versions = ">=3.6.1" - -[package.dependencies] -typing-extensions = ">=3.7.4.3" - -[package.extras] -dotenv = ["python-dotenv (>=0.10.4)"] -email = ["email-validator (>=1.0.3)"] - -[[package]] -name = "pyflakes" -version = "2.4.0" -description = "passive checker of Python programs" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[[package]] -name = "pygments" -version = "2.11.2" -description = "Pygments is a syntax highlighting package written in Python." -category = "main" -optional = false -python-versions = ">=3.5" - -[[package]] -name = "pymdown-extensions" -version = "9.2" -description = "Extension pack for Python Markdown." -category = "main" -optional = true -python-versions = ">=3.7" - -[package.dependencies] -Markdown = ">=3.2" - -[[package]] -name = "pyparsing" -version = "3.0.7" -description = "Python parsing module" -category = "main" -optional = false -python-versions = ">=3.6" - -[package.extras] -diagrams = ["jinja2", "railroad-diagrams"] - -[[package]] -name = "pytest" -version = "7.0.1" -description = "pytest: simple powerful testing with Python" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} -attrs = ">=19.2.0" -colorama = {version = "*", markers = "sys_platform == \"win32\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -py = ">=1.8.2" -tomli = ">=1.0.0" - -[package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] - -[[package]] -name = "pytest-aiohttp" -version = "1.0.4" -description = "Pytest plugin for aiohttp support" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -aiohttp = ">=3.8.1" -pytest = ">=6.1.0" -pytest-asyncio = ">=0.17.2" - -[package.extras] -testing = ["coverage (==6.2)", "mypy (==0.931)"] - -[[package]] -name = "pytest-asyncio" -version = "0.18.1" -description = "Pytest support for asyncio" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -pytest = ">=6.1.0" - -[package.extras] -testing = ["coverage (==6.2)", "hypothesis (>=5.7.1)", "flaky (>=3.5.0)", "mypy (==0.931)"] - -[[package]] -name = "pytest-cov" -version = "3.0.0" -description = "Pytest plugin for measuring coverage." -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -coverage = {version = ">=5.2.1", extras = ["toml"]} -pytest = ">=4.6" - -[package.extras] -testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtualenv"] - -[[package]] -name = "pytest-html" -version = "3.1.1" -description = "pytest plugin for generating HTML reports" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -pytest = ">=5.0,<6.0.0 || >6.0.0" -pytest-metadata = "*" - -[[package]] -name = "pytest-lazy-fixture" -version = "0.6.3" -description = "It helps to use fixtures in pytest.mark.parametrize" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -pytest = ">=3.2.5" - -[[package]] -name = "pytest-metadata" -version = "1.11.0" -description = "pytest plugin for test session metadata" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" - -[package.dependencies] -pytest = ">=2.9.0" - -[[package]] -name = "pytest-mock" -version = "3.7.0" -description = "Thin-wrapper around the mock package for easier use with pytest" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -pytest = ">=5.0" - -[package.extras] -dev = ["pre-commit", "tox", "pytest-asyncio"] - -[[package]] -name = "pytest-mypy" -version = "0.9.1" -description = "Mypy static type checker plugin for Pytest" -category = "dev" -optional = false -python-versions = ">=3.5" - -[package.dependencies] -attrs = ">=19.0" -filelock = ">=3.0" -mypy = [ - {version = ">=0.700", markers = "python_version >= \"3.8\" and python_version < \"3.9\""}, - {version = ">=0.780", markers = "python_version >= \"3.9\""}, -] -pytest = [ - {version = ">=6.2", markers = "python_version >= \"3.10\""}, - {version = ">=4.6", markers = "python_version >= \"3.6\" and python_version < \"3.10\""}, -] - -[[package]] -name = "python-socks" -version = "2.0.3" -description = "Core proxy (SOCKS4, SOCKS5, HTTP tunneling) functionality for Python" -category = "main" -optional = true -python-versions = "*" - -[package.dependencies] -async-timeout = {version = ">=3.0.1", optional = true, markers = "extra == \"asyncio\""} - -[package.extras] -anyio = ["anyio (>=3.3.4)"] -asyncio = ["async-timeout (>=3.0.1)"] -curio = ["curio (>=1.4)"] -trio = ["trio (>=0.16.0)"] - -[[package]] -name = "pytz" -version = "2021.3" -description = "World timezone definitions, modern and historical" -category = "main" -optional = true -python-versions = "*" - -[[package]] -name = "pyyaml" -version = "6.0" -description = "YAML parser and emitter for Python" -category = "dev" -optional = false -python-versions = ">=3.6" - -[[package]] -name = "requests" -version = "2.26.0" -description = "Python HTTP for Humans." -category = "main" -optional = true -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" - -[package.dependencies] -certifi = ">=2017.4.17" -charset-normalizer = {version = ">=2.0.0,<2.1.0", markers = "python_version >= \"3\""} -idna = {version = ">=2.5,<4", markers = "python_version >= \"3\""} -urllib3 = ">=1.21.1,<1.27" - -[package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] -use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"] - -[[package]] -name = "sentry-sdk" -version = "1.5.5" -description = "Python client for Sentry (https://sentry.io)" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -certifi = "*" -urllib3 = ">=1.10.0" - -[package.extras] -aiohttp = ["aiohttp (>=3.5)"] -beam = ["apache-beam (>=2.12)"] -bottle = ["bottle (>=0.12.13)"] -celery = ["celery (>=3)"] -chalice = ["chalice (>=1.16.0)"] -django = ["django (>=1.8)"] -falcon = ["falcon (>=1.4)"] -flask = ["flask (>=0.11)", "blinker (>=1.1)"] -httpx = ["httpx (>=0.16.0)"] -pure_eval = ["pure-eval", "executing", "asttokens"] -pyspark = ["pyspark (>=2.4.4)"] -quart = ["quart (>=0.16.1)", "blinker (>=1.1)"] -rq = ["rq (>=0.6)"] -sanic = ["sanic (>=0.8)"] -sqlalchemy = ["sqlalchemy (>=1.2)"] -tornado = ["tornado (>=5)"] - -[[package]] -name = "six" -version = "1.16.0" -description = "Python 2 and 3 compatibility utilities" -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" - -[[package]] -name = "snowballstemmer" -version = "2.1.0" -description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." -category = "main" -optional = true -python-versions = "*" - -[[package]] -name = "soupsieve" -version = "2.3" -description = "A modern CSS selector implementation for Beautiful Soup." -category = "main" -optional = true -python-versions = ">=3.6" - -[[package]] -name = "sphinx" -version = "4.2.0" -description = "Python documentation generator" -category = "main" -optional = true -python-versions = ">=3.6" - -[package.dependencies] -alabaster = ">=0.7,<0.8" -babel = ">=1.3" -colorama = {version = ">=0.3.5", markers = "sys_platform == \"win32\""} -docutils = ">=0.14,<0.18" -imagesize = "*" -Jinja2 = ">=2.3" -packaging = "*" -Pygments = ">=2.0" -requests = ">=2.5.0" -snowballstemmer = ">=1.1" -sphinxcontrib-applehelp = "*" -sphinxcontrib-devhelp = "*" -sphinxcontrib-htmlhelp = ">=2.0.0" -sphinxcontrib-jsmath = "*" -sphinxcontrib-qthelp = "*" -sphinxcontrib-serializinghtml = ">=1.1.5" - -[package.extras] -docs = ["sphinxcontrib-websupport"] -lint = ["flake8 (>=3.5.0)", "isort", "mypy (>=0.900)", "docutils-stubs", "types-typed-ast", "types-pkg-resources", "types-requests"] -test = ["pytest", "pytest-cov", "html5lib", "cython", "typed-ast"] - -[[package]] -name = "sphinx-autobuild" -version = "2021.3.14" -description = "Rebuild Sphinx documentation on changes, with live-reload in the browser." -category = "main" -optional = true -python-versions = ">=3.6" - -[package.dependencies] -colorama = "*" -livereload = "*" -sphinx = "*" - -[package.extras] -test = ["pytest", "pytest-cov"] - -[[package]] -name = "sphinx-copybutton" -version = "0.5.0" -description = "Add a copy button to each of your code cells." -category = "main" -optional = true -python-versions = ">=3.6" - -[package.dependencies] -sphinx = ">=1.8" - -[package.extras] -code_style = ["pre-commit (==2.12.1)"] -rtd = ["sphinx", "ipython", "myst-nb", "sphinx-book-theme"] - -[[package]] -name = "sphinx-intl" -version = "2.0.1" -description = "Sphinx utility that make it easy to translate and to apply translation." -category = "main" -optional = true -python-versions = ">=3.5" - -[package.dependencies] -babel = "*" -click = "*" -sphinx = "*" - -[package.extras] -test = ["pytest", "mock"] -transifex = ["transifex_client (>=0.11)"] - -[[package]] -name = "sphinx-prompt" -version = "1.5.0" -description = "Sphinx directive to add unselectable prompt" -category = "main" -optional = true -python-versions = "*" - -[package.dependencies] -pygments = "*" -Sphinx = "*" - -[[package]] -name = "sphinx-substitution-extensions" -version = "2020.9.30.0" -description = "Extensions for Sphinx which allow for substitutions." -category = "main" -optional = true -python-versions = "*" - -[package.dependencies] -docutils = ">=0.15" -sphinx = ">=2.0.0" -sphinx-prompt = ">=0.1" - -[package.extras] -dev = ["autoflake (==1.4)", "black (==20.8b1)", "check-manifest (==0.43)", "doc8 (==0.8.1)", "flake8-commas (==2.0.0)", "flake8-quotes (==3.2.0)", "flake8 (==3.8.3)", "isort (==5.5.4)", "mypy (==0.782)", "pip-check-reqs (==2.1.1)", "pydocstyle (==5.1.1)", "pyenchant (==3.1.1)", "pygithub (==1.53)", "pylint (==2.6.0)", "pyroma (==2.6)", "pytest-cov (==2.10.1)", "pytest (==6.1.0)", "twine (==3.2.0)", "vulture (==2.1)"] - -[[package]] -name = "sphinxcontrib-applehelp" -version = "1.0.2" -description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" -category = "main" -optional = true -python-versions = ">=3.5" - -[package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] -test = ["pytest"] - -[[package]] -name = "sphinxcontrib-devhelp" -version = "1.0.2" -description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." -category = "main" -optional = true -python-versions = ">=3.5" - -[package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] -test = ["pytest"] - -[[package]] -name = "sphinxcontrib-htmlhelp" -version = "2.0.0" -description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" -category = "main" -optional = true -python-versions = ">=3.6" - -[package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] -test = ["pytest", "html5lib"] - -[[package]] -name = "sphinxcontrib-jsmath" -version = "1.0.1" -description = "A sphinx extension which renders display math in HTML via JavaScript" -category = "main" -optional = true -python-versions = ">=3.5" - -[package.extras] -test = ["pytest", "flake8", "mypy"] - -[[package]] -name = "sphinxcontrib-qthelp" -version = "1.0.3" -description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." -category = "main" -optional = true -python-versions = ">=3.5" - -[package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] -test = ["pytest"] - -[[package]] -name = "sphinxcontrib-serializinghtml" -version = "1.1.5" -description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." -category = "main" -optional = true -python-versions = ">=3.5" - -[package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] -test = ["pytest"] - -[[package]] -name = "stack-data" -version = "0.2.0" -description = "Extract data from python stack frames and tracebacks for informative displays" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -asttokens = "*" -executing = "*" -pure-eval = "*" - -[package.extras] -tests = ["pytest", "typeguard", "pygments", "littleutils", "cython"] - -[[package]] -name = "toml" -version = "0.10.2" -description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" -optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" - -[[package]] -name = "tomli" -version = "1.2.2" -description = "A lil' TOML parser" -category = "main" -optional = false -python-versions = ">=3.6" - -[[package]] -name = "tornado" -version = "6.1" -description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." -category = "main" -optional = true -python-versions = ">= 3.5" - -[[package]] -name = "towncrier" -version = "21.9.0" -description = "Building newsfiles for your project." -category = "main" -optional = true -python-versions = "*" - -[package.dependencies] -click = "*" -click-default-group = "*" -incremental = "*" -jinja2 = "*" -tomli = {version = "*", markers = "python_version >= \"3.6\""} - -[package.extras] -dev = ["packaging"] - -[[package]] -name = "traitlets" -version = "5.1.1" -description = "Traitlets Python configuration system" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.extras] -test = ["pytest"] - -[[package]] -name = "typing-extensions" -version = "4.1.1" -description = "Backported and Experimental Type Hints for Python 3.6+" -category = "main" -optional = false -python-versions = ">=3.6" - -[[package]] -name = "urllib3" -version = "1.26.7" -description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" - -[package.extras] -brotli = ["brotlipy (>=0.6.0)"] -secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] -socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] - -[[package]] -name = "uvloop" -version = "0.16.0" -description = "Fast implementation of asyncio event loop on top of libuv" -category = "main" -optional = true -python-versions = ">=3.7" - -[package.extras] -dev = ["Cython (>=0.29.24,<0.30.0)", "pytest (>=3.6.0)", "Sphinx (>=4.1.2,<4.2.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)", "sphinx-rtd-theme (>=0.5.2,<0.6.0)", "aiohttp", "flake8 (>=3.9.2,<3.10.0)", "psutil", "pycodestyle (>=2.7.0,<2.8.0)", "pyOpenSSL (>=19.0.0,<19.1.0)", "mypy (>=0.800)"] -docs = ["Sphinx (>=4.1.2,<4.2.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)", "sphinx-rtd-theme (>=0.5.2,<0.6.0)"] -test = ["aiohttp", "flake8 (>=3.9.2,<3.10.0)", "psutil", "pycodestyle (>=2.7.0,<2.8.0)", "pyOpenSSL (>=19.0.0,<19.1.0)", "mypy (>=0.800)"] - -[[package]] -name = "virtualenv" -version = "20.10.0" -description = "Virtual Python Environment builder" -category = "dev" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" - -[package.dependencies] -"backports.entry-points-selectable" = ">=1.0.4" -distlib = ">=0.3.1,<1" -filelock = ">=3.2,<4" -platformdirs = ">=2,<3" -six = ">=1.9.0,<2" - -[package.extras] -docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=21.3)"] -testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "packaging (>=20.0)"] - -[[package]] -name = "wcwidth" -version = "0.2.5" -description = "Measures the displayed width of unicode strings in a terminal" -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "yarl" -version = "1.7.2" -description = "Yet another URL library" -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -idna = ">=2.0" -multidict = ">=4.0" - -[[package]] -name = "zipp" -version = "3.6.0" -description = "Backport of pathlib-compatible object wrapper for zip files" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] - -[extras] -docs = ["Sphinx", "sphinx-intl", "sphinx-autobuild", "sphinx-copybutton", "furo", "sphinx-prompt", "Sphinx-Substitution-Extensions", "towncrier", "pygments", "pymdown-extensions", "markdown-include"] -fast = ["uvloop"] -i18n = ["Babel"] -proxy = ["aiohttp-socks"] -redis = ["aioredis"] - -[metadata] -lock-version = "1.1" -python-versions = "^3.8" -content-hash = "1f20a68c7d58bc8113a73a2cef1cf9e0027fc0a69507e3ac0a81d158e33b3acc" - -[metadata.files] -aiofiles = [ - {file = "aiofiles-0.8.0-py3-none-any.whl", hash = "sha256:7a973fc22b29e9962d0897805ace5856e6a566ab1f0c8e5c91ff6c866519c937"}, - {file = "aiofiles-0.8.0.tar.gz", hash = "sha256:8334f23235248a3b2e83b2c3a78a22674f39969b96397126cc93664d9a901e59"}, -] -aiohttp = [ - {file = "aiohttp-3.8.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1ed0b6477896559f17b9eaeb6d38e07f7f9ffe40b9f0f9627ae8b9926ae260a8"}, - {file = "aiohttp-3.8.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7dadf3c307b31e0e61689cbf9e06be7a867c563d5a63ce9dca578f956609abf8"}, - {file = "aiohttp-3.8.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a79004bb58748f31ae1cbe9fa891054baaa46fb106c2dc7af9f8e3304dc30316"}, - {file = "aiohttp-3.8.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:12de6add4038df8f72fac606dff775791a60f113a725c960f2bab01d8b8e6b15"}, - {file = "aiohttp-3.8.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6f0d5f33feb5f69ddd57a4a4bd3d56c719a141080b445cbf18f238973c5c9923"}, - {file = "aiohttp-3.8.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eaba923151d9deea315be1f3e2b31cc39a6d1d2f682f942905951f4e40200922"}, - {file = "aiohttp-3.8.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:099ebd2c37ac74cce10a3527d2b49af80243e2a4fa39e7bce41617fbc35fa3c1"}, - {file = "aiohttp-3.8.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:2e5d962cf7e1d426aa0e528a7e198658cdc8aa4fe87f781d039ad75dcd52c516"}, - {file = "aiohttp-3.8.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:fa0ffcace9b3aa34d205d8130f7873fcfefcb6a4dd3dd705b0dab69af6712642"}, - {file = "aiohttp-3.8.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:61bfc23df345d8c9716d03717c2ed5e27374e0fe6f659ea64edcd27b4b044cf7"}, - {file = "aiohttp-3.8.1-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:31560d268ff62143e92423ef183680b9829b1b482c011713ae941997921eebc8"}, - {file = "aiohttp-3.8.1-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:01d7bdb774a9acc838e6b8f1d114f45303841b89b95984cbb7d80ea41172a9e3"}, - {file = "aiohttp-3.8.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:97ef77eb6b044134c0b3a96e16abcb05ecce892965a2124c566af0fd60f717e2"}, - {file = "aiohttp-3.8.1-cp310-cp310-win32.whl", hash = "sha256:c2aef4703f1f2ddc6df17519885dbfa3514929149d3ff900b73f45998f2532fa"}, - {file = "aiohttp-3.8.1-cp310-cp310-win_amd64.whl", hash = "sha256:713ac174a629d39b7c6a3aa757b337599798da4c1157114a314e4e391cd28e32"}, - {file = "aiohttp-3.8.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:473d93d4450880fe278696549f2e7aed8cd23708c3c1997981464475f32137db"}, - {file = "aiohttp-3.8.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99b5eeae8e019e7aad8af8bb314fb908dd2e028b3cdaad87ec05095394cce632"}, - {file = "aiohttp-3.8.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3af642b43ce56c24d063325dd2cf20ee012d2b9ba4c3c008755a301aaea720ad"}, - {file = "aiohttp-3.8.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3630c3ef435c0a7c549ba170a0633a56e92629aeed0e707fec832dee313fb7a"}, - {file = "aiohttp-3.8.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:4a4a4e30bf1edcad13fb0804300557aedd07a92cabc74382fdd0ba6ca2661091"}, - {file = "aiohttp-3.8.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6f8b01295e26c68b3a1b90efb7a89029110d3a4139270b24fda961893216c440"}, - {file = "aiohttp-3.8.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:a25fa703a527158aaf10dafd956f7d42ac6d30ec80e9a70846253dd13e2f067b"}, - {file = "aiohttp-3.8.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:5bfde62d1d2641a1f5173b8c8c2d96ceb4854f54a44c23102e2ccc7e02f003ec"}, - {file = "aiohttp-3.8.1-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:51467000f3647d519272392f484126aa716f747859794ac9924a7aafa86cd411"}, - {file = "aiohttp-3.8.1-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:03a6d5349c9ee8f79ab3ff3694d6ce1cfc3ced1c9d36200cb8f08ba06bd3b782"}, - {file = "aiohttp-3.8.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:102e487eeb82afac440581e5d7f8f44560b36cf0bdd11abc51a46c1cd88914d4"}, - {file = "aiohttp-3.8.1-cp36-cp36m-win32.whl", hash = "sha256:4aed991a28ea3ce320dc8ce655875e1e00a11bdd29fe9444dd4f88c30d558602"}, - {file = "aiohttp-3.8.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b0e20cddbd676ab8a64c774fefa0ad787cc506afd844de95da56060348021e96"}, - {file = "aiohttp-3.8.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:37951ad2f4a6df6506750a23f7cbabad24c73c65f23f72e95897bb2cecbae676"}, - {file = "aiohttp-3.8.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c23b1ad869653bc818e972b7a3a79852d0e494e9ab7e1a701a3decc49c20d51"}, - {file = "aiohttp-3.8.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:15b09b06dae900777833fe7fc4b4aa426556ce95847a3e8d7548e2d19e34edb8"}, - {file = "aiohttp-3.8.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:477c3ea0ba410b2b56b7efb072c36fa91b1e6fc331761798fa3f28bb224830dd"}, - {file = "aiohttp-3.8.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2f2f69dca064926e79997f45b2f34e202b320fd3782f17a91941f7eb85502ee2"}, - {file = "aiohttp-3.8.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ef9612483cb35171d51d9173647eed5d0069eaa2ee812793a75373447d487aa4"}, - {file = "aiohttp-3.8.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:6d69f36d445c45cda7b3b26afef2fc34ef5ac0cdc75584a87ef307ee3c8c6d00"}, - {file = "aiohttp-3.8.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:55c3d1072704d27401c92339144d199d9de7b52627f724a949fc7d5fc56d8b93"}, - {file = "aiohttp-3.8.1-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:b9d00268fcb9f66fbcc7cd9fe423741d90c75ee029a1d15c09b22d23253c0a44"}, - {file = "aiohttp-3.8.1-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:07b05cd3305e8a73112103c834e91cd27ce5b4bd07850c4b4dbd1877d3f45be7"}, - {file = "aiohttp-3.8.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:c34dc4958b232ef6188c4318cb7b2c2d80521c9a56c52449f8f93ab7bc2a8a1c"}, - {file = "aiohttp-3.8.1-cp37-cp37m-win32.whl", hash = "sha256:d2f9b69293c33aaa53d923032fe227feac867f81682f002ce33ffae978f0a9a9"}, - {file = "aiohttp-3.8.1-cp37-cp37m-win_amd64.whl", hash = "sha256:6ae828d3a003f03ae31915c31fa684b9890ea44c9c989056fea96e3d12a9fa17"}, - {file = "aiohttp-3.8.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:0c7ebbbde809ff4e970824b2b6cb7e4222be6b95a296e46c03cf050878fc1785"}, - {file = "aiohttp-3.8.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8b7ef7cbd4fec9a1e811a5de813311ed4f7ac7d93e0fda233c9b3e1428f7dd7b"}, - {file = "aiohttp-3.8.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c3d6a4d0619e09dcd61021debf7059955c2004fa29f48788a3dfaf9c9901a7cd"}, - {file = "aiohttp-3.8.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:718626a174e7e467f0558954f94af117b7d4695d48eb980146016afa4b580b2e"}, - {file = "aiohttp-3.8.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:589c72667a5febd36f1315aa6e5f56dd4aa4862df295cb51c769d16142ddd7cd"}, - {file = "aiohttp-3.8.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2ed076098b171573161eb146afcb9129b5ff63308960aeca4b676d9d3c35e700"}, - {file = "aiohttp-3.8.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:086f92daf51a032d062ec5f58af5ca6a44d082c35299c96376a41cbb33034675"}, - {file = "aiohttp-3.8.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:11691cf4dc5b94236ccc609b70fec991234e7ef8d4c02dd0c9668d1e486f5abf"}, - {file = "aiohttp-3.8.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:31d1e1c0dbf19ebccbfd62eff461518dcb1e307b195e93bba60c965a4dcf1ba0"}, - {file = "aiohttp-3.8.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:11a67c0d562e07067c4e86bffc1553f2cf5b664d6111c894671b2b8712f3aba5"}, - {file = "aiohttp-3.8.1-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:bb01ba6b0d3f6c68b89fce7305080145d4877ad3acaed424bae4d4ee75faa950"}, - {file = "aiohttp-3.8.1-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:44db35a9e15d6fe5c40d74952e803b1d96e964f683b5a78c3cc64eb177878155"}, - {file = "aiohttp-3.8.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:844a9b460871ee0a0b0b68a64890dae9c415e513db0f4a7e3cab41a0f2fedf33"}, - {file = "aiohttp-3.8.1-cp38-cp38-win32.whl", hash = "sha256:7d08744e9bae2ca9c382581f7dce1273fe3c9bae94ff572c3626e8da5b193c6a"}, - {file = "aiohttp-3.8.1-cp38-cp38-win_amd64.whl", hash = "sha256:04d48b8ce6ab3cf2097b1855e1505181bdd05586ca275f2505514a6e274e8e75"}, - {file = "aiohttp-3.8.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:f5315a2eb0239185af1bddb1abf472d877fede3cc8d143c6cddad37678293237"}, - {file = "aiohttp-3.8.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a996d01ca39b8dfe77440f3cd600825d05841088fd6bc0144cc6c2ec14cc5f74"}, - {file = "aiohttp-3.8.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:13487abd2f761d4be7c8ff9080de2671e53fff69711d46de703c310c4c9317ca"}, - {file = "aiohttp-3.8.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ea302f34477fda3f85560a06d9ebdc7fa41e82420e892fc50b577e35fc6a50b2"}, - {file = "aiohttp-3.8.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a2f635ce61a89c5732537a7896b6319a8fcfa23ba09bec36e1b1ac0ab31270d2"}, - {file = "aiohttp-3.8.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e999f2d0e12eea01caeecb17b653f3713d758f6dcc770417cf29ef08d3931421"}, - {file = "aiohttp-3.8.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0770e2806a30e744b4e21c9d73b7bee18a1cfa3c47991ee2e5a65b887c49d5cf"}, - {file = "aiohttp-3.8.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d15367ce87c8e9e09b0f989bfd72dc641bcd04ba091c68cd305312d00962addd"}, - {file = "aiohttp-3.8.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:6c7cefb4b0640703eb1069835c02486669312bf2f12b48a748e0a7756d0de33d"}, - {file = "aiohttp-3.8.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:71927042ed6365a09a98a6377501af5c9f0a4d38083652bcd2281a06a5976724"}, - {file = "aiohttp-3.8.1-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:28d490af82bc6b7ce53ff31337a18a10498303fe66f701ab65ef27e143c3b0ef"}, - {file = "aiohttp-3.8.1-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:b6613280ccedf24354406caf785db748bebbddcf31408b20c0b48cb86af76866"}, - {file = "aiohttp-3.8.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:81e3d8c34c623ca4e36c46524a3530e99c0bc95ed068fd6e9b55cb721d408fb2"}, - {file = "aiohttp-3.8.1-cp39-cp39-win32.whl", hash = "sha256:7187a76598bdb895af0adbd2fb7474d7f6025d170bc0a1130242da817ce9e7d1"}, - {file = "aiohttp-3.8.1-cp39-cp39-win_amd64.whl", hash = "sha256:1c182cb873bc91b411e184dab7a2b664d4fea2743df0e4d57402f7f3fa644bac"}, - {file = "aiohttp-3.8.1.tar.gz", hash = "sha256:fc5471e1a54de15ef71c1bc6ebe80d4dc681ea600e68bfd1cbce40427f0b7578"}, -] -aiohttp-socks = [ - {file = "aiohttp_socks-0.7.1-py3-none-any.whl", hash = "sha256:94bcff5ef73611c6c6231c2ffc1be4af1599abec90dbd2fdbbd63233ec2fb0ff"}, - {file = "aiohttp_socks-0.7.1.tar.gz", hash = "sha256:2215cac4891ef3fa14b7d600ed343ed0f0a670c23b10e4142aa862b3db20341a"}, -] -aioredis = [ - {file = "aioredis-2.0.1-py3-none-any.whl", hash = "sha256:9ac0d0b3b485d293b8ca1987e6de8658d7dafcca1cddfcd1d506cae8cdebfdd6"}, - {file = "aioredis-2.0.1.tar.gz", hash = "sha256:eaa51aaf993f2d71f54b70527c440437ba65340588afeb786cd87c55c89cd98e"}, -] -aiosignal = [ - {file = "aiosignal-1.2.0-py3-none-any.whl", hash = "sha256:26e62109036cd181df6e6ad646f91f0dcfd05fe16d0cb924138ff2ab75d64e3a"}, - {file = "aiosignal-1.2.0.tar.gz", hash = "sha256:78ed67db6c7b7ced4f98e495e572106d5c432a93e1ddd1bf475e1dc05f5b7df2"}, -] -alabaster = [ - {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"}, - {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, -] -appnope = [ - {file = "appnope-0.1.2-py2.py3-none-any.whl", hash = "sha256:93aa393e9d6c54c5cd570ccadd8edad61ea0c4b9ea7a01409020c9aa019eb442"}, - {file = "appnope-0.1.2.tar.gz", hash = "sha256:dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a"}, -] -aresponses = [ - {file = "aresponses-2.1.5-py3-none-any.whl", hash = "sha256:06161209a39880aaf8ec3c67ab76d677aaea41944672e6a3e23a4464544879b1"}, - {file = "aresponses-2.1.5.tar.gz", hash = "sha256:16535e5d24302eab194e15edd18b9e126e1fb70cd84049e63eb6b15c89e16936"}, -] -asttokens = [ - {file = "asttokens-2.0.5-py2.py3-none-any.whl", hash = "sha256:0844691e88552595a6f4a4281a9f7f79b8dd45ca4ccea82e5e05b4bbdb76705c"}, - {file = "asttokens-2.0.5.tar.gz", hash = "sha256:9a54c114f02c7a9480d56550932546a3f1fe71d8a02f1bc7ccd0ee3ee35cf4d5"}, -] -async-timeout = [ - {file = "async-timeout-4.0.0.tar.gz", hash = "sha256:7d87a4e8adba8ededb52e579ce6bc8276985888913620c935094c2276fd83382"}, - {file = "async_timeout-4.0.0-py3-none-any.whl", hash = "sha256:f3303dddf6cafa748a92747ab6c2ecf60e0aeca769aee4c151adfce243a05d9b"}, -] -asynctest = [ - {file = "asynctest-0.13.0-py3-none-any.whl", hash = "sha256:5da6118a7e6d6b54d83a8f7197769d046922a44d2a99c21382f0a6e4fadae676"}, - {file = "asynctest-0.13.0.tar.gz", hash = "sha256:c27862842d15d83e6a34eb0b2866c323880eb3a75e4485b079ea11748fd77fac"}, -] -atomicwrites = [ - {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, - {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, -] -attrs = [ - {file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"}, - {file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"}, -] -babel = [ - {file = "Babel-2.9.1-py2.py3-none-any.whl", hash = "sha256:ab49e12b91d937cd11f0b67cb259a57ab4ad2b59ac7a3b41d6c06c0ac5b0def9"}, - {file = "Babel-2.9.1.tar.gz", hash = "sha256:bc0c176f9f6a994582230df350aa6e05ba2ebe4b3ac317eab29d9be5d2768da0"}, -] -backcall = [ - {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, - {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, -] -"backports.entry-points-selectable" = [ - {file = "backports.entry_points_selectable-1.1.0-py2.py3-none-any.whl", hash = "sha256:a6d9a871cde5e15b4c4a53e3d43ba890cc6861ec1332c9c2428c92f977192acc"}, - {file = "backports.entry_points_selectable-1.1.0.tar.gz", hash = "sha256:988468260ec1c196dab6ae1149260e2f5472c9110334e5d51adcb77867361f6a"}, -] -beautifulsoup4 = [ - {file = "beautifulsoup4-4.10.0-py3-none-any.whl", hash = "sha256:9a315ce70049920ea4572a4055bc4bd700c940521d36fc858205ad4fcde149bf"}, - {file = "beautifulsoup4-4.10.0.tar.gz", hash = "sha256:c23ad23c521d818955a4151a67d81580319d4bf548d3d49f4223ae041ff98891"}, -] -black = [ - {file = "black-22.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1297c63b9e1b96a3d0da2d85d11cd9bf8664251fd69ddac068b98dc4f34f73b6"}, - {file = "black-22.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2ff96450d3ad9ea499fc4c60e425a1439c2120cbbc1ab959ff20f7c76ec7e866"}, - {file = "black-22.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0e21e1f1efa65a50e3960edd068b6ae6d64ad6235bd8bfea116a03b21836af71"}, - {file = "black-22.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2f69158a7d120fd641d1fa9a921d898e20d52e44a74a6fbbcc570a62a6bc8ab"}, - {file = "black-22.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:228b5ae2c8e3d6227e4bde5920d2fc66cc3400fde7bcc74f480cb07ef0b570d5"}, - {file = "black-22.1.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b1a5ed73ab4c482208d20434f700d514f66ffe2840f63a6252ecc43a9bc77e8a"}, - {file = "black-22.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:35944b7100af4a985abfcaa860b06af15590deb1f392f06c8683b4381e8eeaf0"}, - {file = "black-22.1.0-cp36-cp36m-win_amd64.whl", hash = "sha256:7835fee5238fc0a0baf6c9268fb816b5f5cd9b8793423a75e8cd663c48d073ba"}, - {file = "black-22.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dae63f2dbf82882fa3b2a3c49c32bffe144970a573cd68d247af6560fc493ae1"}, - {file = "black-22.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fa1db02410b1924b6749c245ab38d30621564e658297484952f3d8a39fce7e8"}, - {file = "black-22.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:c8226f50b8c34a14608b848dc23a46e5d08397d009446353dad45e04af0c8e28"}, - {file = "black-22.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2d6f331c02f0f40aa51a22e479c8209d37fcd520c77721c034517d44eecf5912"}, - {file = "black-22.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:742ce9af3086e5bd07e58c8feb09dbb2b047b7f566eb5f5bc63fd455814979f3"}, - {file = "black-22.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:fdb8754b453fb15fad3f72cd9cad3e16776f0964d67cf30ebcbf10327a3777a3"}, - {file = "black-22.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5660feab44c2e3cb24b2419b998846cbb01c23c7fe645fee45087efa3da2d61"}, - {file = "black-22.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:6f2f01381f91c1efb1451998bd65a129b3ed6f64f79663a55fe0e9b74a5f81fd"}, - {file = "black-22.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:efbadd9b52c060a8fc3b9658744091cb33c31f830b3f074422ed27bad2b18e8f"}, - {file = "black-22.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8871fcb4b447206904932b54b567923e5be802b9b19b744fdff092bd2f3118d0"}, - {file = "black-22.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ccad888050f5393f0d6029deea2a33e5ae371fd182a697313bdbd835d3edaf9c"}, - {file = "black-22.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07e5c049442d7ca1a2fc273c79d1aecbbf1bc858f62e8184abe1ad175c4f7cc2"}, - {file = "black-22.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:373922fc66676133ddc3e754e4509196a8c392fec3f5ca4486673e685a421321"}, - {file = "black-22.1.0-py3-none-any.whl", hash = "sha256:3524739d76b6b3ed1132422bf9d82123cd1705086723bc3e235ca39fd21c667d"}, - {file = "black-22.1.0.tar.gz", hash = "sha256:a7c0192d35635f6fc1174be575cb7915e92e5dd629ee79fdaf0dcfa41a80afb5"}, -] -certifi = [ - {file = "certifi-2021.10.8-py2.py3-none-any.whl", hash = "sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569"}, - {file = "certifi-2021.10.8.tar.gz", hash = "sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872"}, -] -cfgv = [ - {file = "cfgv-3.3.1-py2.py3-none-any.whl", hash = "sha256:c6a0883f3917a037485059700b9e75da2464e6c27051014ad85ba6aaa5884426"}, - {file = "cfgv-3.3.1.tar.gz", hash = "sha256:f5a830efb9ce7a445376bb66ec94c638a9787422f96264c98edc6bdeed8ab736"}, -] -charset-normalizer = [ - {file = "charset-normalizer-2.0.7.tar.gz", hash = "sha256:e019de665e2bcf9c2b64e2e5aa025fa991da8720daa3c1138cadd2fd1856aed0"}, - {file = "charset_normalizer-2.0.7-py3-none-any.whl", hash = "sha256:f7af805c321bfa1ce6714c51f254e0d5bb5e5834039bc17db7ebe3a4cec9492b"}, -] -click = [ - {file = "click-8.0.3-py3-none-any.whl", hash = "sha256:353f466495adaeb40b6b5f592f9f91cb22372351c84caeb068132442a4518ef3"}, - {file = "click-8.0.3.tar.gz", hash = "sha256:410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b"}, -] -click-default-group = [ - {file = "click-default-group-1.2.2.tar.gz", hash = "sha256:d9560e8e8dfa44b3562fbc9425042a0fd6d21956fcc2db0077f63f34253ab904"}, -] -colorama = [ - {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, - {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, -] -coverage = [ - {file = "coverage-6.3.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:eeffd96882d8c06d31b65dddcf51db7c612547babc1c4c5db6a011abe9798525"}, - {file = "coverage-6.3.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:621f6ea7260ea2ffdaec64fe5cb521669984f567b66f62f81445221d4754df4c"}, - {file = "coverage-6.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:84f2436d6742c01136dd940ee158bfc7cf5ced3da7e4c949662b8703b5cd8145"}, - {file = "coverage-6.3.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:de73fca6fb403dd72d4da517cfc49fcf791f74eee697d3219f6be29adf5af6ce"}, - {file = "coverage-6.3.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78fbb2be068a13a5d99dce9e1e7d168db880870f7bc73f876152130575bd6167"}, - {file = "coverage-6.3.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:f5a4551dfd09c3bd12fca8144d47fe7745275adf3229b7223c2f9e29a975ebda"}, - {file = "coverage-6.3.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7bff3a98f63b47464480de1b5bdd80c8fade0ba2832c9381253c9b74c4153c27"}, - {file = "coverage-6.3.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a06c358f4aed05fa1099c39decc8022261bb07dfadc127c08cfbd1391b09689e"}, - {file = "coverage-6.3.1-cp310-cp310-win32.whl", hash = "sha256:9fff3ff052922cb99f9e52f63f985d4f7a54f6b94287463bc66b7cdf3eb41217"}, - {file = "coverage-6.3.1-cp310-cp310-win_amd64.whl", hash = "sha256:276b13cc085474e482566c477c25ed66a097b44c6e77132f3304ac0b039f83eb"}, - {file = "coverage-6.3.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:56c4a409381ddd7bbff134e9756077860d4e8a583d310a6f38a2315b9ce301d0"}, - {file = "coverage-6.3.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9eb494070aa060ceba6e4bbf44c1bc5fa97bfb883a0d9b0c9049415f9e944793"}, - {file = "coverage-6.3.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5e15d424b8153756b7c903bde6d4610be0c3daca3986173c18dd5c1a1625e4cd"}, - {file = "coverage-6.3.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61d47a897c1e91f33f177c21de897267b38fbb45f2cd8e22a710bcef1df09ac1"}, - {file = "coverage-6.3.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:25e73d4c81efa8ea3785274a2f7f3bfbbeccb6fcba2a0bdd3be9223371c37554"}, - {file = "coverage-6.3.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:fac0bcc5b7e8169bffa87f0dcc24435446d329cbc2b5486d155c2e0f3b493ae1"}, - {file = "coverage-6.3.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:72128176fea72012063200b7b395ed8a57849282b207321124d7ff14e26988e8"}, - {file = "coverage-6.3.1-cp37-cp37m-win32.whl", hash = "sha256:1bc6d709939ff262fd1432f03f080c5042dc6508b6e0d3d20e61dd045456a1a0"}, - {file = "coverage-6.3.1-cp37-cp37m-win_amd64.whl", hash = "sha256:618eeba986cea7f621d8607ee378ecc8c2504b98b3fdc4952b30fe3578304687"}, - {file = "coverage-6.3.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d5ed164af5c9078596cfc40b078c3b337911190d3faeac830c3f1274f26b8320"}, - {file = "coverage-6.3.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:352c68e233409c31048a3725c446a9e48bbff36e39db92774d4f2380d630d8f8"}, - {file = "coverage-6.3.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:448d7bde7ceb6c69e08474c2ddbc5b4cd13c9e4aa4a717467f716b5fc938a734"}, - {file = "coverage-6.3.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9fde6b90889522c220dd56a670102ceef24955d994ff7af2cb786b4ba8fe11e4"}, - {file = "coverage-6.3.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e647a0be741edbb529a72644e999acb09f2ad60465f80757da183528941ff975"}, - {file = "coverage-6.3.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6a5cdc3adb4f8bb8d8f5e64c2e9e282bc12980ef055ec6da59db562ee9bdfefa"}, - {file = "coverage-6.3.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:2dd70a167843b4b4b2630c0c56f1b586fe965b4f8ac5da05b6690344fd065c6b"}, - {file = "coverage-6.3.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:9ad0a117b8dc2061ce9461ea4c1b4799e55edceb236522c5b8f958ce9ed8fa9a"}, - {file = "coverage-6.3.1-cp38-cp38-win32.whl", hash = "sha256:e92c7a5f7d62edff50f60a045dc9542bf939758c95b2fcd686175dd10ce0ed10"}, - {file = "coverage-6.3.1-cp38-cp38-win_amd64.whl", hash = "sha256:482fb42eea6164894ff82abbcf33d526362de5d1a7ed25af7ecbdddd28fc124f"}, - {file = "coverage-6.3.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c5b81fb37db76ebea79aa963b76d96ff854e7662921ce742293463635a87a78d"}, - {file = "coverage-6.3.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a4f923b9ab265136e57cc14794a15b9dcea07a9c578609cd5dbbfff28a0d15e6"}, - {file = "coverage-6.3.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:56d296cbc8254a7dffdd7bcc2eb70be5a233aae7c01856d2d936f5ac4e8ac1f1"}, - {file = "coverage-6.3.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1245ab82e8554fa88c4b2ab1e098ae051faac5af829efdcf2ce6b34dccd5567c"}, - {file = "coverage-6.3.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3f2b05757c92ad96b33dbf8e8ec8d4ccb9af6ae3c9e9bd141c7cc44d20c6bcba"}, - {file = "coverage-6.3.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9e3dd806f34de38d4c01416344e98eab2437ac450b3ae39c62a0ede2f8b5e4ed"}, - {file = "coverage-6.3.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:d651fde74a4d3122e5562705824507e2f5b2d3d57557f1916c4b27635f8fbe3f"}, - {file = "coverage-6.3.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:704f89b87c4f4737da2860695a18c852b78ec7279b24eedacab10b29067d3a38"}, - {file = "coverage-6.3.1-cp39-cp39-win32.whl", hash = "sha256:2aed4761809640f02e44e16b8b32c1a5dee5e80ea30a0ff0912158bde9c501f2"}, - {file = "coverage-6.3.1-cp39-cp39-win_amd64.whl", hash = "sha256:9976fb0a5709988778ac9bc44f3d50fccd989987876dfd7716dee28beed0a9fa"}, - {file = "coverage-6.3.1-pp36.pp37.pp38-none-any.whl", hash = "sha256:463e52616ea687fd323888e86bf25e864a3cc6335a043fad6bbb037dbf49bbe2"}, - {file = "coverage-6.3.1.tar.gz", hash = "sha256:6c3f6158b02ac403868eea390930ae64e9a9a2a5bbfafefbb920d29258d9f2f8"}, -] -decorator = [ - {file = "decorator-5.1.0-py3-none-any.whl", hash = "sha256:7b12e7c3c6ab203a29e157335e9122cb03de9ab7264b137594103fd4a683b374"}, - {file = "decorator-5.1.0.tar.gz", hash = "sha256:e59913af105b9860aa2c8d3272d9de5a56a4e608db9a2f167a8480b323d529a7"}, -] -distlib = [ - {file = "distlib-0.3.3-py2.py3-none-any.whl", hash = "sha256:c8b54e8454e5bf6237cc84c20e8264c3e991e824ef27e8f1e81049867d861e31"}, - {file = "distlib-0.3.3.zip", hash = "sha256:d982d0751ff6eaaab5e2ec8e691d949ee80eddf01a62eaa96ddb11531fe16b05"}, -] -docutils = [ - {file = "docutils-0.17.1-py2.py3-none-any.whl", hash = "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"}, - {file = "docutils-0.17.1.tar.gz", hash = "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"}, -] -executing = [ - {file = "executing-0.8.2-py2.py3-none-any.whl", hash = "sha256:32fc6077b103bd19e6494a72682d66d5763cf20a106d5aa7c5ccbea4e47b0df7"}, - {file = "executing-0.8.2.tar.gz", hash = "sha256:c23bf42e9a7b9b212f185b1b2c3c91feb895963378887bb10e64a2e612ec0023"}, -] -filelock = [ - {file = "filelock-3.3.2-py3-none-any.whl", hash = "sha256:bb2a1c717df74c48a2d00ed625e5a66f8572a3a30baacb7657add1d7bac4097b"}, - {file = "filelock-3.3.2.tar.gz", hash = "sha256:7afc856f74fa7006a289fd10fa840e1eebd8bbff6bffb69c26c54a0512ea8cf8"}, -] -flake8 = [ - {file = "flake8-4.0.1-py2.py3-none-any.whl", hash = "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d"}, - {file = "flake8-4.0.1.tar.gz", hash = "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d"}, -] -flake8-html = [ - {file = "flake8-html-0.4.1.tar.gz", hash = "sha256:2fb436cbfe1e109275bc8fb7fdd0cb00e67b3b48cfeb397309b6b2c61eeb4cb4"}, - {file = "flake8_html-0.4.1-py2.py3-none-any.whl", hash = "sha256:17324eb947e7006807e4184ee26953e67baf421b3cf9e646a38bfec34eec5a94"}, -] -frozenlist = [ - {file = "frozenlist-1.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:977a1438d0e0d96573fd679d291a1542097ea9f4918a8b6494b06610dfeefbf9"}, - {file = "frozenlist-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a8d86547a5e98d9edd47c432f7a14b0c5592624b496ae9880fb6332f34af1edc"}, - {file = "frozenlist-1.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:181754275d5d32487431a0a29add4f897968b7157204bc1eaaf0a0ce80c5ba7d"}, - {file = "frozenlist-1.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5df31bb2b974f379d230a25943d9bf0d3bc666b4b0807394b131a28fca2b0e5f"}, - {file = "frozenlist-1.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4766632cd8a68e4f10f156a12c9acd7b1609941525569dd3636d859d79279ed3"}, - {file = "frozenlist-1.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:16eef427c51cb1203a7c0ab59d1b8abccaba9a4f58c4bfca6ed278fc896dc193"}, - {file = "frozenlist-1.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:01d79515ed5aa3d699b05f6bdcf1fe9087d61d6b53882aa599a10853f0479c6c"}, - {file = "frozenlist-1.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:28e164722ea0df0cf6d48c4d5bdf3d19e87aaa6dfb39b0ba91153f224b912020"}, - {file = "frozenlist-1.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e63ad0beef6ece06475d29f47d1f2f29727805376e09850ebf64f90777962792"}, - {file = "frozenlist-1.2.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:41de4db9b9501679cf7cddc16d07ac0f10ef7eb58c525a1c8cbff43022bddca4"}, - {file = "frozenlist-1.2.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:c6a9d84ee6427b65a81fc24e6ef589cb794009f5ca4150151251c062773e7ed2"}, - {file = "frozenlist-1.2.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:f5f3b2942c3b8b9bfe76b408bbaba3d3bb305ee3693e8b1d631fe0a0d4f93673"}, - {file = "frozenlist-1.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c98d3c04701773ad60d9545cd96df94d955329efc7743fdb96422c4b669c633b"}, - {file = "frozenlist-1.2.0-cp310-cp310-win32.whl", hash = "sha256:72cfbeab7a920ea9e74b19aa0afe3b4ad9c89471e3badc985d08756efa9b813b"}, - {file = "frozenlist-1.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:11ff401951b5ac8c0701a804f503d72c048173208490c54ebb8d7bb7c07a6d00"}, - {file = "frozenlist-1.2.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b46f997d5ed6d222a863b02cdc9c299101ee27974d9bbb2fd1b3c8441311c408"}, - {file = "frozenlist-1.2.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:351686ca020d1bcd238596b1fa5c8efcbc21bffda9d0efe237aaa60348421e2a"}, - {file = "frozenlist-1.2.0-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bfbaa08cf1452acad9cb1c1d7b89394a41e712f88df522cea1a0f296b57782a0"}, - {file = "frozenlist-1.2.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2ae2f5e9fa10805fb1c9adbfefaaecedd9e31849434be462c3960a0139ed729"}, - {file = "frozenlist-1.2.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:6790b8d96bbb74b7a6f4594b6f131bd23056c25f2aa5d816bd177d95245a30e3"}, - {file = "frozenlist-1.2.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:41f62468af1bd4e4b42b5508a3fe8cc46a693f0cdd0ca2f443f51f207893d837"}, - {file = "frozenlist-1.2.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:ec6cf345771cdb00791d271af9a0a6fbfc2b6dd44cb753f1eeaa256e21622adb"}, - {file = "frozenlist-1.2.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:14a5cef795ae3e28fb504b73e797c1800e9249f950e1c964bb6bdc8d77871161"}, - {file = "frozenlist-1.2.0-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:8b54cdd2fda15467b9b0bfa78cee2ddf6dbb4585ef23a16e14926f4b076dfae4"}, - {file = "frozenlist-1.2.0-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:f025f1d6825725b09c0038775acab9ae94264453a696cc797ce20c0769a7b367"}, - {file = "frozenlist-1.2.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:84e97f59211b5b9083a2e7a45abf91cfb441369e8bb6d1f5287382c1c526def3"}, - {file = "frozenlist-1.2.0-cp36-cp36m-win32.whl", hash = "sha256:c5328ed53fdb0a73c8a50105306a3bc013e5ca36cca714ec4f7bd31d38d8a97f"}, - {file = "frozenlist-1.2.0-cp36-cp36m-win_amd64.whl", hash = "sha256:9ade70aea559ca98f4b1b1e5650c45678052e76a8ab2f76d90f2ac64180215a2"}, - {file = "frozenlist-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a0d3ffa8772464441b52489b985d46001e2853a3b082c655ec5fad9fb6a3d618"}, - {file = "frozenlist-1.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3457f8cf86deb6ce1ba67e120f1b0128fcba1332a180722756597253c465fc1d"}, - {file = "frozenlist-1.2.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5a72eecf37eface331636951249d878750db84034927c997d47f7f78a573b72b"}, - {file = "frozenlist-1.2.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:acc4614e8d1feb9f46dd829a8e771b8f5c4b1051365d02efb27a3229048ade8a"}, - {file = "frozenlist-1.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:87521e32e18a2223311afc2492ef2d99946337da0779ddcda77b82ee7319df59"}, - {file = "frozenlist-1.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8b4c7665a17c3a5430edb663e4ad4e1ad457614d1b2f2b7f87052e2ef4fa45ca"}, - {file = "frozenlist-1.2.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ed58803563a8c87cf4c0771366cf0ad1aa265b6b0ae54cbbb53013480c7ad74d"}, - {file = "frozenlist-1.2.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:aa44c4740b4e23fcfa259e9dd52315d2b1770064cde9507457e4c4a65a04c397"}, - {file = "frozenlist-1.2.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:2de5b931701257d50771a032bba4e448ff958076380b049fd36ed8738fdb375b"}, - {file = "frozenlist-1.2.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:6e105013fa84623c057a4381dc8ea0361f4d682c11f3816cc80f49a1f3bc17c6"}, - {file = "frozenlist-1.2.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:705c184b77565955a99dc360f359e8249580c6b7eaa4dc0227caa861ef46b27a"}, - {file = "frozenlist-1.2.0-cp37-cp37m-win32.whl", hash = "sha256:a37594ad6356e50073fe4f60aa4187b97d15329f2138124d252a5a19c8553ea4"}, - {file = "frozenlist-1.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:25b358aaa7dba5891b05968dd539f5856d69f522b6de0bf34e61f133e077c1a4"}, - {file = "frozenlist-1.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:af2a51c8a381d76eabb76f228f565ed4c3701441ecec101dd18be70ebd483cfd"}, - {file = "frozenlist-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:82d22f6e6f2916e837c91c860140ef9947e31194c82aaeda843d6551cec92f19"}, - {file = "frozenlist-1.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1cfe6fef507f8bac40f009c85c7eddfed88c1c0d38c75e72fe10476cef94e10f"}, - {file = "frozenlist-1.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:26f602e380a5132880fa245c92030abb0fc6ff34e0c5500600366cedc6adb06a"}, - {file = "frozenlist-1.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4ad065b2ebd09f32511ff2be35c5dfafee6192978b5a1e9d279a5c6e121e3b03"}, - {file = "frozenlist-1.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bc93f5f62df3bdc1f677066327fc81f92b83644852a31c6aa9b32c2dde86ea7d"}, - {file = "frozenlist-1.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:89fdfc84c6bf0bff2ff3170bb34ecba8a6911b260d318d377171429c4be18c73"}, - {file = "frozenlist-1.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:47b2848e464883d0bbdcd9493c67443e5e695a84694efff0476f9059b4cb6257"}, - {file = "frozenlist-1.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4f52d0732e56906f8ddea4bd856192984650282424049c956857fed43697ea43"}, - {file = "frozenlist-1.2.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:16ef7dd5b7d17495404a2e7a49bac1bc13d6d20c16d11f4133c757dd94c4144c"}, - {file = "frozenlist-1.2.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:1cf63243bc5f5c19762943b0aa9e0d3fb3723d0c514d820a18a9b9a5ef864315"}, - {file = "frozenlist-1.2.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:54a1e09ab7a69f843cd28fefd2bcaf23edb9e3a8d7680032c8968b8ac934587d"}, - {file = "frozenlist-1.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:954b154a4533ef28bd3e83ffdf4eadf39deeda9e38fb8feaf066d6069885e034"}, - {file = "frozenlist-1.2.0-cp38-cp38-win32.whl", hash = "sha256:cb3957c39668d10e2b486acc85f94153520a23263b6401e8f59422ef65b9520d"}, - {file = "frozenlist-1.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:0a7c7cce70e41bc13d7d50f0e5dd175f14a4f1837a8549b0936ed0cbe6170bf9"}, - {file = "frozenlist-1.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:4c457220468d734e3077580a3642b7f682f5fd9507f17ddf1029452450912cdc"}, - {file = "frozenlist-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e74f8b4d8677ebb4015ac01fcaf05f34e8a1f22775db1f304f497f2f88fdc697"}, - {file = "frozenlist-1.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fbd4844ff111449f3bbe20ba24fbb906b5b1c2384d0f3287c9f7da2354ce6d23"}, - {file = "frozenlist-1.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f0081a623c886197ff8de9e635528fd7e6a387dccef432149e25c13946cb0cd0"}, - {file = "frozenlist-1.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9b6e21e5770df2dea06cb7b6323fbc008b13c4a4e3b52cb54685276479ee7676"}, - {file = "frozenlist-1.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:406aeb340613b4b559db78d86864485f68919b7141dec82aba24d1477fd2976f"}, - {file = "frozenlist-1.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:878ebe074839d649a1cdb03a61077d05760624f36d196884a5cafb12290e187b"}, - {file = "frozenlist-1.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1fef737fd1388f9b93bba8808c5f63058113c10f4e3c0763ced68431773f72f9"}, - {file = "frozenlist-1.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4a495c3d513573b0b3f935bfa887a85d9ae09f0627cf47cad17d0cc9b9ba5c38"}, - {file = "frozenlist-1.2.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:e7d0dd3e727c70c2680f5f09a0775525229809f1a35d8552b92ff10b2b14f2c2"}, - {file = "frozenlist-1.2.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:66a518731a21a55b7d3e087b430f1956a36793acc15912e2878431c7aec54210"}, - {file = "frozenlist-1.2.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:94728f97ddf603d23c8c3dd5cae2644fa12d33116e69f49b1644a71bb77b89ae"}, - {file = "frozenlist-1.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c1e8e9033d34c2c9e186e58279879d78c94dd365068a3607af33f2bc99357a53"}, - {file = "frozenlist-1.2.0-cp39-cp39-win32.whl", hash = "sha256:83334e84a290a158c0c4cc4d22e8c7cfe0bba5b76d37f1c2509dabd22acafe15"}, - {file = "frozenlist-1.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:735f386ec522e384f511614c01d2ef9cf799f051353876b4c6fb93ef67a6d1ee"}, - {file = "frozenlist-1.2.0.tar.gz", hash = "sha256:68201be60ac56aff972dc18085800b6ee07973c49103a8aba669dee3d71079de"}, -] -furo = [ - {file = "furo-2022.2.14.1-py3-none-any.whl", hash = "sha256:d7cb8126034637212332350ec8490cb95732d36506b024318a58cee2e7de0fda"}, - {file = "furo-2022.2.14.1.tar.gz", hash = "sha256:1af3a3053e594666e27eefd347b84beae5d74d6d20f6294cc47777d46f5761a7"}, -] -identify = [ - {file = "identify-2.3.4-py2.py3-none-any.whl", hash = "sha256:4de55a93e0ba72bf917c840b3794eb1055a67272a1732351c557c88ec42011b1"}, - {file = "identify-2.3.4.tar.gz", hash = "sha256:595283a1c3a078ac5774ad4dc4d1bdd0c1602f60bcf11ae673b64cb2b1945762"}, -] -idna = [ - {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, - {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, -] -imagesize = [ - {file = "imagesize-1.2.0-py2.py3-none-any.whl", hash = "sha256:6965f19a6a2039c7d48bca7dba2473069ff854c36ae6f19d2cde309d998228a1"}, - {file = "imagesize-1.2.0.tar.gz", hash = "sha256:b1f6b5a4eab1f73479a50fb79fcf729514a900c341d8503d62a62dbc4127a2b1"}, -] -importlib-metadata = [ - {file = "importlib_metadata-4.8.1-py3-none-any.whl", hash = "sha256:b618b6d2d5ffa2f16add5697cf57a46c76a56229b0ed1c438322e4e95645bd15"}, - {file = "importlib_metadata-4.8.1.tar.gz", hash = "sha256:f284b3e11256ad1e5d03ab86bb2ccd6f5339688ff17a4d797a0fe7df326f23b1"}, -] -incremental = [ - {file = "incremental-21.3.0-py2.py3-none-any.whl", hash = "sha256:92014aebc6a20b78a8084cdd5645eeaa7f74b8933f70fa3ada2cfbd1e3b54321"}, - {file = "incremental-21.3.0.tar.gz", hash = "sha256:02f5de5aff48f6b9f665d99d48bfc7ec03b6e3943210de7cfc88856d755d6f57"}, -] -iniconfig = [ - {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, - {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, -] -ipython = [ - {file = "ipython-8.0.1-py3-none-any.whl", hash = "sha256:c503a0dd6ccac9c8c260b211f2dd4479c042b49636b097cc9a0d55fe62dff64c"}, - {file = "ipython-8.0.1.tar.gz", hash = "sha256:ab564d4521ea8ceaac26c3a2c6e5ddbca15c8848fd5a5cc325f960da88d42974"}, -] -isort = [ - {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"}, - {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"}, -] -jedi = [ - {file = "jedi-0.18.0-py2.py3-none-any.whl", hash = "sha256:18456d83f65f400ab0c2d3319e48520420ef43b23a086fdc05dff34132f0fb93"}, - {file = "jedi-0.18.0.tar.gz", hash = "sha256:92550a404bad8afed881a137ec9a461fed49eca661414be45059329614ed0707"}, -] -jinja2 = [ - {file = "Jinja2-3.0.2-py3-none-any.whl", hash = "sha256:8569982d3f0889eed11dd620c706d39b60c36d6d25843961f33f77fb6bc6b20c"}, - {file = "Jinja2-3.0.2.tar.gz", hash = "sha256:827a0e32839ab1600d4eb1c4c33ec5a8edfbc5cb42dafa13b81f182f97784b45"}, -] -livereload = [ - {file = "livereload-2.6.3.tar.gz", hash = "sha256:776f2f865e59fde56490a56bcc6773b6917366bce0c267c60ee8aaf1a0959869"}, -] -magic-filter = [ - {file = "magic-filter-1.0.5.tar.gz", hash = "sha256:974cf2793bb02a770f202d3179abfb600d1917f4e0c2af1727ef0edbb90cd0c2"}, - {file = "magic_filter-1.0.5-py3-none-any.whl", hash = "sha256:fa0c5f94da30d6cae1f0cec34fa526056db9f2636c099527513d529cb0299787"}, -] -markdown = [ - {file = "Markdown-3.3.4-py3-none-any.whl", hash = "sha256:96c3ba1261de2f7547b46a00ea8463832c921d3f9d6aba3f255a6f71386db20c"}, - {file = "Markdown-3.3.4.tar.gz", hash = "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"}, -] -markdown-include = [ - {file = "markdown-include-0.6.0.tar.gz", hash = "sha256:6f5d680e36f7780c7f0f61dca53ca581bd50d1b56137ddcd6353efafa0c3e4a2"}, -] -markupsafe = [ - {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, - {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, -] -matplotlib-inline = [ - {file = "matplotlib-inline-0.1.3.tar.gz", hash = "sha256:a04bfba22e0d1395479f866853ec1ee28eea1485c1d69a6faf00dc3e24ff34ee"}, - {file = "matplotlib_inline-0.1.3-py3-none-any.whl", hash = "sha256:aed605ba3b72462d64d475a21a9296f400a19c4f74a31b59103d2a99ffd5aa5c"}, -] -mccabe = [ - {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, - {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, -] -multidict = [ - {file = "multidict-5.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3822c5894c72e3b35aae9909bef66ec83e44522faf767c0ad39e0e2de11d3b55"}, - {file = "multidict-5.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:28e6d883acd8674887d7edc896b91751dc2d8e87fbdca8359591a13872799e4e"}, - {file = "multidict-5.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b61f85101ef08cbbc37846ac0e43f027f7844f3fade9b7f6dd087178caedeee7"}, - {file = "multidict-5.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d9b668c065968c5979fe6b6fa6760bb6ab9aeb94b75b73c0a9c1acf6393ac3bf"}, - {file = "multidict-5.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:517d75522b7b18a3385726b54a081afd425d4f41144a5399e5abd97ccafdf36b"}, - {file = "multidict-5.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1b4ac3ba7a97b35a5ccf34f41b5a8642a01d1e55454b699e5e8e7a99b5a3acf5"}, - {file = "multidict-5.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:df23c83398715b26ab09574217ca21e14694917a0c857e356fd39e1c64f8283f"}, - {file = "multidict-5.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e58a9b5cc96e014ddf93c2227cbdeca94b56a7eb77300205d6e4001805391747"}, - {file = "multidict-5.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:f76440e480c3b2ca7f843ff8a48dc82446b86ed4930552d736c0bac507498a52"}, - {file = "multidict-5.2.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:cfde464ca4af42a629648c0b0d79b8f295cf5b695412451716531d6916461628"}, - {file = "multidict-5.2.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:0fed465af2e0eb6357ba95795d003ac0bdb546305cc2366b1fc8f0ad67cc3fda"}, - {file = "multidict-5.2.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:b70913cbf2e14275013be98a06ef4b412329fe7b4f83d64eb70dce8269ed1e1a"}, - {file = "multidict-5.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a5635bcf1b75f0f6ef3c8a1ad07b500104a971e38d3683167b9454cb6465ac86"}, - {file = "multidict-5.2.0-cp310-cp310-win32.whl", hash = "sha256:77f0fb7200cc7dedda7a60912f2059086e29ff67cefbc58d2506638c1a9132d7"}, - {file = "multidict-5.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:9416cf11bcd73c861267e88aea71e9fcc35302b3943e45e1dbb4317f91a4b34f"}, - {file = "multidict-5.2.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:fd77c8f3cba815aa69cb97ee2b2ef385c7c12ada9c734b0f3b32e26bb88bbf1d"}, - {file = "multidict-5.2.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:98ec9aea6223adf46999f22e2c0ab6cf33f5914be604a404f658386a8f1fba37"}, - {file = "multidict-5.2.0-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e5283c0a00f48e8cafcecadebfa0ed1dac8b39e295c7248c44c665c16dc1138b"}, - {file = "multidict-5.2.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5f79c19c6420962eb17c7e48878a03053b7ccd7b69f389d5831c0a4a7f1ac0a1"}, - {file = "multidict-5.2.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:e4a67f1080123de76e4e97a18d10350df6a7182e243312426d508712e99988d4"}, - {file = "multidict-5.2.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:94b117e27efd8e08b4046c57461d5a114d26b40824995a2eb58372b94f9fca02"}, - {file = "multidict-5.2.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:2e77282fd1d677c313ffcaddfec236bf23f273c4fba7cdf198108f5940ae10f5"}, - {file = "multidict-5.2.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:116347c63ba049c1ea56e157fa8aa6edaf5e92925c9b64f3da7769bdfa012858"}, - {file = "multidict-5.2.0-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:dc3a866cf6c13d59a01878cd806f219340f3e82eed514485e094321f24900677"}, - {file = "multidict-5.2.0-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:ac42181292099d91217a82e3fa3ce0e0ddf3a74fd891b7c2b347a7f5aa0edded"}, - {file = "multidict-5.2.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:f0bb0973f42ffcb5e3537548e0767079420aefd94ba990b61cf7bb8d47f4916d"}, - {file = "multidict-5.2.0-cp36-cp36m-win32.whl", hash = "sha256:ea21d4d5104b4f840b91d9dc8cbc832aba9612121eaba503e54eaab1ad140eb9"}, - {file = "multidict-5.2.0-cp36-cp36m-win_amd64.whl", hash = "sha256:e6453f3cbeb78440747096f239d282cc57a2997a16b5197c9bc839099e1633d0"}, - {file = "multidict-5.2.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d3def943bfd5f1c47d51fd324df1e806d8da1f8e105cc7f1c76a1daf0f7e17b0"}, - {file = "multidict-5.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35591729668a303a02b06e8dba0eb8140c4a1bfd4c4b3209a436a02a5ac1de11"}, - {file = "multidict-5.2.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce8cacda0b679ebc25624d5de66c705bc53dcc7c6f02a7fb0f3ca5e227d80422"}, - {file = "multidict-5.2.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:baf1856fab8212bf35230c019cde7c641887e3fc08cadd39d32a421a30151ea3"}, - {file = "multidict-5.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:a43616aec0f0d53c411582c451f5d3e1123a68cc7b3475d6f7d97a626f8ff90d"}, - {file = "multidict-5.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:25cbd39a9029b409167aa0a20d8a17f502d43f2efebfe9e3ac019fe6796c59ac"}, - {file = "multidict-5.2.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:0a2cbcfbea6dc776782a444db819c8b78afe4db597211298dd8b2222f73e9cd0"}, - {file = "multidict-5.2.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:3d2d7d1fff8e09d99354c04c3fd5b560fb04639fd45926b34e27cfdec678a704"}, - {file = "multidict-5.2.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:a37e9a68349f6abe24130846e2f1d2e38f7ddab30b81b754e5a1fde32f782b23"}, - {file = "multidict-5.2.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:637c1896497ff19e1ee27c1c2c2ddaa9f2d134bbb5e0c52254361ea20486418d"}, - {file = "multidict-5.2.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:9815765f9dcda04921ba467957be543423e5ec6a1136135d84f2ae092c50d87b"}, - {file = "multidict-5.2.0-cp37-cp37m-win32.whl", hash = "sha256:8b911d74acdc1fe2941e59b4f1a278a330e9c34c6c8ca1ee21264c51ec9b67ef"}, - {file = "multidict-5.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:380b868f55f63d048a25931a1632818f90e4be71d2081c2338fcf656d299949a"}, - {file = "multidict-5.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e7d81ce5744757d2f05fc41896e3b2ae0458464b14b5a2c1e87a6a9d69aefaa8"}, - {file = "multidict-5.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2d1d55cdf706ddc62822d394d1df53573d32a7a07d4f099470d3cb9323b721b6"}, - {file = "multidict-5.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a4771d0d0ac9d9fe9e24e33bed482a13dfc1256d008d101485fe460359476065"}, - {file = "multidict-5.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da7d57ea65744d249427793c042094c4016789eb2562576fb831870f9c878d9e"}, - {file = "multidict-5.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cdd68778f96216596218b4e8882944d24a634d984ee1a5a049b300377878fa7c"}, - {file = "multidict-5.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ecc99bce8ee42dcad15848c7885197d26841cb24fa2ee6e89d23b8993c871c64"}, - {file = "multidict-5.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:067150fad08e6f2dd91a650c7a49ba65085303fcc3decbd64a57dc13a2733031"}, - {file = "multidict-5.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:78c106b2b506b4d895ddc801ff509f941119394b89c9115580014127414e6c2d"}, - {file = "multidict-5.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:e6c4fa1ec16e01e292315ba76eb1d012c025b99d22896bd14a66628b245e3e01"}, - {file = "multidict-5.2.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:b227345e4186809d31f22087d0265655114af7cda442ecaf72246275865bebe4"}, - {file = "multidict-5.2.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:06560fbdcf22c9387100979e65b26fba0816c162b888cb65b845d3def7a54c9b"}, - {file = "multidict-5.2.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:7878b61c867fb2df7a95e44b316f88d5a3742390c99dfba6c557a21b30180cac"}, - {file = "multidict-5.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:246145bff76cc4b19310f0ad28bd0769b940c2a49fc601b86bfd150cbd72bb22"}, - {file = "multidict-5.2.0-cp38-cp38-win32.whl", hash = "sha256:c30ac9f562106cd9e8071c23949a067b10211917fdcb75b4718cf5775356a940"}, - {file = "multidict-5.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:f19001e790013ed580abfde2a4465388950728861b52f0da73e8e8a9418533c0"}, - {file = "multidict-5.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c1ff762e2ee126e6f1258650ac641e2b8e1f3d927a925aafcfde943b77a36d24"}, - {file = "multidict-5.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bd6c9c50bf2ad3f0448edaa1a3b55b2e6866ef8feca5d8dbec10ec7c94371d21"}, - {file = "multidict-5.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fc66d4016f6e50ed36fb39cd287a3878ffcebfa90008535c62e0e90a7ab713ae"}, - {file = "multidict-5.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a9acb76d5f3dd9421874923da2ed1e76041cb51b9337fd7f507edde1d86535d6"}, - {file = "multidict-5.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dfc924a7e946dd3c6360e50e8f750d51e3ef5395c95dc054bc9eab0f70df4f9c"}, - {file = "multidict-5.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:32fdba7333eb2351fee2596b756d730d62b5827d5e1ab2f84e6cbb287cc67fe0"}, - {file = "multidict-5.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:b9aad49466b8d828b96b9e3630006234879c8d3e2b0a9d99219b3121bc5cdb17"}, - {file = "multidict-5.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:93de39267c4c676c9ebb2057e98a8138bade0d806aad4d864322eee0803140a0"}, - {file = "multidict-5.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f9bef5cff994ca3026fcc90680e326d1a19df9841c5e3d224076407cc21471a1"}, - {file = "multidict-5.2.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:5f841c4f14331fd1e36cbf3336ed7be2cb2a8f110ce40ea253e5573387db7621"}, - {file = "multidict-5.2.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:38ba256ee9b310da6a1a0f013ef4e422fca30a685bcbec86a969bd520504e341"}, - {file = "multidict-5.2.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:3bc3b1621b979621cee9f7b09f024ec76ec03cc365e638126a056317470bde1b"}, - {file = "multidict-5.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6ee908c070020d682e9b42c8f621e8bb10c767d04416e2ebe44e37d0f44d9ad5"}, - {file = "multidict-5.2.0-cp39-cp39-win32.whl", hash = "sha256:1c7976cd1c157fa7ba5456ae5d31ccdf1479680dc9b8d8aa28afabc370df42b8"}, - {file = "multidict-5.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:c9631c642e08b9fff1c6255487e62971d8b8e821808ddd013d8ac058087591ac"}, - {file = "multidict-5.2.0.tar.gz", hash = "sha256:0dd1c93edb444b33ba2274b66f63def8a327d607c6c790772f448a53b6ea59ce"}, -] -mypy = [ - {file = "mypy-0.931-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:3c5b42d0815e15518b1f0990cff7a705805961613e701db60387e6fb663fe78a"}, - {file = "mypy-0.931-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c89702cac5b302f0c5d33b172d2b55b5df2bede3344a2fbed99ff96bddb2cf00"}, - {file = "mypy-0.931-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:300717a07ad09525401a508ef5d105e6b56646f7942eb92715a1c8d610149714"}, - {file = "mypy-0.931-cp310-cp310-win_amd64.whl", hash = "sha256:7b3f6f557ba4afc7f2ce6d3215d5db279bcf120b3cfd0add20a5d4f4abdae5bc"}, - {file = "mypy-0.931-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:1bf752559797c897cdd2c65f7b60c2b6969ffe458417b8d947b8340cc9cec08d"}, - {file = "mypy-0.931-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:4365c60266b95a3f216a3047f1d8e3f895da6c7402e9e1ddfab96393122cc58d"}, - {file = "mypy-0.931-cp36-cp36m-win_amd64.whl", hash = "sha256:1b65714dc296a7991000b6ee59a35b3f550e0073411ac9d3202f6516621ba66c"}, - {file = "mypy-0.931-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e839191b8da5b4e5d805f940537efcaa13ea5dd98418f06dc585d2891d228cf0"}, - {file = "mypy-0.931-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:50c7346a46dc76a4ed88f3277d4959de8a2bd0a0fa47fa87a4cde36fe247ac05"}, - {file = "mypy-0.931-cp37-cp37m-win_amd64.whl", hash = "sha256:d8f1ff62f7a879c9fe5917b3f9eb93a79b78aad47b533911b853a757223f72e7"}, - {file = "mypy-0.931-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f9fe20d0872b26c4bba1c1be02c5340de1019530302cf2dcc85c7f9fc3252ae0"}, - {file = "mypy-0.931-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1b06268df7eb53a8feea99cbfff77a6e2b205e70bf31743e786678ef87ee8069"}, - {file = "mypy-0.931-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8c11003aaeaf7cc2d0f1bc101c1cc9454ec4cc9cb825aef3cafff8a5fdf4c799"}, - {file = "mypy-0.931-cp38-cp38-win_amd64.whl", hash = "sha256:d9d2b84b2007cea426e327d2483238f040c49405a6bf4074f605f0156c91a47a"}, - {file = "mypy-0.931-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ff3bf387c14c805ab1388185dd22d6b210824e164d4bb324b195ff34e322d166"}, - {file = "mypy-0.931-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5b56154f8c09427bae082b32275a21f500b24d93c88d69a5e82f3978018a0266"}, - {file = "mypy-0.931-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8ca7f8c4b1584d63c9a0f827c37ba7a47226c19a23a753d52e5b5eddb201afcd"}, - {file = "mypy-0.931-cp39-cp39-win_amd64.whl", hash = "sha256:74f7eccbfd436abe9c352ad9fb65872cc0f1f0a868e9d9c44db0893440f0c697"}, - {file = "mypy-0.931-py3-none-any.whl", hash = "sha256:1171f2e0859cfff2d366da2c7092b06130f232c636a3f7301e3feb8b41f6377d"}, - {file = "mypy-0.931.tar.gz", hash = "sha256:0038b21890867793581e4cb0d810829f5fd4441aa75796b53033af3aa30430ce"}, -] -mypy-extensions = [ - {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, - {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, -] -nodeenv = [ - {file = "nodeenv-1.6.0-py2.py3-none-any.whl", hash = "sha256:621e6b7076565ddcacd2db0294c0381e01fd28945ab36bcf00f41c5daf63bef7"}, - {file = "nodeenv-1.6.0.tar.gz", hash = "sha256:3ef13ff90291ba2a4a7a4ff9a979b63ffdd00a464dbe04acf0ea6471517a4c2b"}, -] -packaging = [ - {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, - {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, -] -parso = [ - {file = "parso-0.8.2-py2.py3-none-any.whl", hash = "sha256:a8c4922db71e4fdb90e0d0bc6e50f9b273d3397925e5e60a717e719201778d22"}, - {file = "parso-0.8.2.tar.gz", hash = "sha256:12b83492c6239ce32ff5eed6d3639d6a536170723c6f3f1506869f1ace413398"}, -] -pathspec = [ - {file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"}, - {file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"}, -] -pexpect = [ - {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, - {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, -] -pickleshare = [ - {file = "pickleshare-0.7.5-py2.py3-none-any.whl", hash = "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56"}, - {file = "pickleshare-0.7.5.tar.gz", hash = "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca"}, -] -platformdirs = [ - {file = "platformdirs-2.4.0-py3-none-any.whl", hash = "sha256:8868bbe3c3c80d42f20156f22e7131d2fb321f5bc86a2a345375c6481a67021d"}, - {file = "platformdirs-2.4.0.tar.gz", hash = "sha256:367a5e80b3d04d2428ffa76d33f124cf11e8fff2acdaa9b43d545f5c7d661ef2"}, -] -pluggy = [ - {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, - {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, -] -pre-commit = [ - {file = "pre_commit-2.17.0-py2.py3-none-any.whl", hash = "sha256:725fa7459782d7bec5ead072810e47351de01709be838c2ce1726b9591dad616"}, - {file = "pre_commit-2.17.0.tar.gz", hash = "sha256:c1a8040ff15ad3d648c70cc3e55b93e4d2d5b687320955505587fd79bbaed06a"}, -] -prompt-toolkit = [ - {file = "prompt_toolkit-3.0.22-py3-none-any.whl", hash = "sha256:48d85cdca8b6c4f16480c7ce03fd193666b62b0a21667ca56b4bb5ad679d1170"}, - {file = "prompt_toolkit-3.0.22.tar.gz", hash = "sha256:449f333dd120bd01f5d296a8ce1452114ba3a71fae7288d2f0ae2c918764fa72"}, -] -ptyprocess = [ - {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, - {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, -] -pure-eval = [ - {file = "pure_eval-0.2.2-py3-none-any.whl", hash = "sha256:01eaab343580944bc56080ebe0a674b39ec44a945e6d09ba7db3cb8cec289350"}, - {file = "pure_eval-0.2.2.tar.gz", hash = "sha256:2b45320af6dfaa1750f543d714b6d1c520a1688dec6fd24d339063ce0aaa9ac3"}, -] -py = [ - {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, - {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, -] -pycodestyle = [ - {file = "pycodestyle-2.8.0-py2.py3-none-any.whl", hash = "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20"}, - {file = "pycodestyle-2.8.0.tar.gz", hash = "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f"}, -] -pydantic = [ - {file = "pydantic-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:cb23bcc093697cdea2708baae4f9ba0e972960a835af22560f6ae4e7e47d33f5"}, - {file = "pydantic-1.9.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1d5278bd9f0eee04a44c712982343103bba63507480bfd2fc2790fa70cd64cf4"}, - {file = "pydantic-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ab624700dc145aa809e6f3ec93fb8e7d0f99d9023b713f6a953637429b437d37"}, - {file = "pydantic-1.9.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c8d7da6f1c1049eefb718d43d99ad73100c958a5367d30b9321b092771e96c25"}, - {file = "pydantic-1.9.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:3c3b035103bd4e2e4a28da9da7ef2fa47b00ee4a9cf4f1a735214c1bcd05e0f6"}, - {file = "pydantic-1.9.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:3011b975c973819883842c5ab925a4e4298dffccf7782c55ec3580ed17dc464c"}, - {file = "pydantic-1.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:086254884d10d3ba16da0588604ffdc5aab3f7f09557b998373e885c690dd398"}, - {file = "pydantic-1.9.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:0fe476769acaa7fcddd17cadd172b156b53546ec3614a4d880e5d29ea5fbce65"}, - {file = "pydantic-1.9.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c8e9dcf1ac499679aceedac7e7ca6d8641f0193c591a2d090282aaf8e9445a46"}, - {file = "pydantic-1.9.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d1e4c28f30e767fd07f2ddc6f74f41f034d1dd6bc526cd59e63a82fe8bb9ef4c"}, - {file = "pydantic-1.9.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:c86229333cabaaa8c51cf971496f10318c4734cf7b641f08af0a6fbf17ca3054"}, - {file = "pydantic-1.9.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:c0727bda6e38144d464daec31dff936a82917f431d9c39c39c60a26567eae3ed"}, - {file = "pydantic-1.9.0-cp36-cp36m-win_amd64.whl", hash = "sha256:dee5ef83a76ac31ab0c78c10bd7d5437bfdb6358c95b91f1ba7ff7b76f9996a1"}, - {file = "pydantic-1.9.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d9c9bdb3af48e242838f9f6e6127de9be7063aad17b32215ccc36a09c5cf1070"}, - {file = "pydantic-1.9.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ee7e3209db1e468341ef41fe263eb655f67f5c5a76c924044314e139a1103a2"}, - {file = "pydantic-1.9.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0b6037175234850ffd094ca77bf60fb54b08b5b22bc85865331dd3bda7a02fa1"}, - {file = "pydantic-1.9.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b2571db88c636d862b35090ccf92bf24004393f85c8870a37f42d9f23d13e032"}, - {file = "pydantic-1.9.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8b5ac0f1c83d31b324e57a273da59197c83d1bb18171e512908fe5dc7278a1d6"}, - {file = "pydantic-1.9.0-cp37-cp37m-win_amd64.whl", hash = "sha256:bbbc94d0c94dd80b3340fc4f04fd4d701f4b038ebad72c39693c794fd3bc2d9d"}, - {file = "pydantic-1.9.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e0896200b6a40197405af18828da49f067c2fa1f821491bc8f5bde241ef3f7d7"}, - {file = "pydantic-1.9.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7bdfdadb5994b44bd5579cfa7c9b0e1b0e540c952d56f627eb227851cda9db77"}, - {file = "pydantic-1.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:574936363cd4b9eed8acdd6b80d0143162f2eb654d96cb3a8ee91d3e64bf4cf9"}, - {file = "pydantic-1.9.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c556695b699f648c58373b542534308922c46a1cda06ea47bc9ca45ef5b39ae6"}, - {file = "pydantic-1.9.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:f947352c3434e8b937e3aa8f96f47bdfe6d92779e44bb3f41e4c213ba6a32145"}, - {file = "pydantic-1.9.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5e48ef4a8b8c066c4a31409d91d7ca372a774d0212da2787c0d32f8045b1e034"}, - {file = "pydantic-1.9.0-cp38-cp38-win_amd64.whl", hash = "sha256:96f240bce182ca7fe045c76bcebfa0b0534a1bf402ed05914a6f1dadff91877f"}, - {file = "pydantic-1.9.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:815ddebb2792efd4bba5488bc8fde09c29e8ca3227d27cf1c6990fc830fd292b"}, - {file = "pydantic-1.9.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6c5b77947b9e85a54848343928b597b4f74fc364b70926b3c4441ff52620640c"}, - {file = "pydantic-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c68c3bc88dbda2a6805e9a142ce84782d3930f8fdd9655430d8576315ad97ce"}, - {file = "pydantic-1.9.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5a79330f8571faf71bf93667d3ee054609816f10a259a109a0738dac983b23c3"}, - {file = "pydantic-1.9.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f5a64b64ddf4c99fe201ac2724daada8595ada0d102ab96d019c1555c2d6441d"}, - {file = "pydantic-1.9.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a733965f1a2b4090a5238d40d983dcd78f3ecea221c7af1497b845a9709c1721"}, - {file = "pydantic-1.9.0-cp39-cp39-win_amd64.whl", hash = "sha256:2cc6a4cb8a118ffec2ca5fcb47afbacb4f16d0ab8b7350ddea5e8ef7bcc53a16"}, - {file = "pydantic-1.9.0-py3-none-any.whl", hash = "sha256:085ca1de245782e9b46cefcf99deecc67d418737a1fd3f6a4f511344b613a5b3"}, - {file = "pydantic-1.9.0.tar.gz", hash = "sha256:742645059757a56ecd886faf4ed2441b9c0cd406079c2b4bee51bcc3fbcd510a"}, -] -pyflakes = [ - {file = "pyflakes-2.4.0-py2.py3-none-any.whl", hash = "sha256:3bb3a3f256f4b7968c9c788781e4ff07dce46bdf12339dcda61053375426ee2e"}, - {file = "pyflakes-2.4.0.tar.gz", hash = "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c"}, -] -pygments = [ - {file = "Pygments-2.11.2-py3-none-any.whl", hash = "sha256:44238f1b60a76d78fc8ca0528ee429702aae011c265fe6a8dd8b63049ae41c65"}, - {file = "Pygments-2.11.2.tar.gz", hash = "sha256:4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a"}, -] -pymdown-extensions = [ - {file = "pymdown-extensions-9.2.tar.gz", hash = "sha256:ed8f69a18bc158f00cbf03abc536b88b6e541b7e699156501e767c48f81d8850"}, - {file = "pymdown_extensions-9.2-py3-none-any.whl", hash = "sha256:f2fa7d9317c672a419868c893c20a28fb7ed7fc60d4ec4774c35e01398ab330c"}, -] -pyparsing = [ - {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"}, - {file = "pyparsing-3.0.7.tar.gz", hash = "sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea"}, -] -pytest = [ - {file = "pytest-7.0.1-py3-none-any.whl", hash = "sha256:9ce3ff477af913ecf6321fe337b93a2c0dcf2a0a1439c43f5452112c1e4280db"}, - {file = "pytest-7.0.1.tar.gz", hash = "sha256:e30905a0c131d3d94b89624a1cc5afec3e0ba2fbdb151867d8e0ebd49850f171"}, -] -pytest-aiohttp = [ - {file = "pytest-aiohttp-1.0.4.tar.gz", hash = "sha256:39ff3a0d15484c01d1436cbedad575c6eafbf0f57cdf76fb94994c97b5b8c5a4"}, - {file = "pytest_aiohttp-1.0.4-py3-none-any.whl", hash = "sha256:1d2dc3a304c2be1fd496c0c2fb6b31ab60cd9fc33984f761f951f8ea1eb4ca95"}, -] -pytest-asyncio = [ - {file = "pytest-asyncio-0.18.1.tar.gz", hash = "sha256:c43fcdfea2335dd82ffe0f2774e40285ddfea78a8e81e56118d47b6a90fbb09e"}, - {file = "pytest_asyncio-0.18.1-py3-none-any.whl", hash = "sha256:c9ec48e8bbf5cc62755e18c4d8bc6907843ec9c5f4ac8f61464093baeba24a7e"}, -] -pytest-cov = [ - {file = "pytest-cov-3.0.0.tar.gz", hash = "sha256:e7f0f5b1617d2210a2cabc266dfe2f4c75a8d32fb89eafb7ad9d06f6d076d470"}, - {file = "pytest_cov-3.0.0-py3-none-any.whl", hash = "sha256:578d5d15ac4a25e5f961c938b85a05b09fdaae9deef3bb6de9a6e766622ca7a6"}, -] -pytest-html = [ - {file = "pytest-html-3.1.1.tar.gz", hash = "sha256:3ee1cf319c913d19fe53aeb0bc400e7b0bc2dbeb477553733db1dad12eb75ee3"}, - {file = "pytest_html-3.1.1-py3-none-any.whl", hash = "sha256:b7f82f123936a3f4d2950bc993c2c1ca09ce262c9ae12f9ac763a2401380b455"}, -] -pytest-lazy-fixture = [ - {file = "pytest-lazy-fixture-0.6.3.tar.gz", hash = "sha256:0e7d0c7f74ba33e6e80905e9bfd81f9d15ef9a790de97993e34213deb5ad10ac"}, - {file = "pytest_lazy_fixture-0.6.3-py3-none-any.whl", hash = "sha256:e0b379f38299ff27a653f03eaa69b08a6fd4484e46fd1c9907d984b9f9daeda6"}, -] -pytest-metadata = [ - {file = "pytest-metadata-1.11.0.tar.gz", hash = "sha256:71b506d49d34e539cc3cfdb7ce2c5f072bea5c953320002c95968e0238f8ecf1"}, - {file = "pytest_metadata-1.11.0-py2.py3-none-any.whl", hash = "sha256:576055b8336dd4a9006dd2a47615f76f2f8c30ab12b1b1c039d99e834583523f"}, -] -pytest-mock = [ - {file = "pytest-mock-3.7.0.tar.gz", hash = "sha256:5112bd92cc9f186ee96e1a92efc84969ea494939c3aead39c50f421c4cc69534"}, - {file = "pytest_mock-3.7.0-py3-none-any.whl", hash = "sha256:6cff27cec936bf81dc5ee87f07132b807bcda51106b5ec4b90a04331cba76231"}, -] -pytest-mypy = [ - {file = "pytest-mypy-0.9.1.tar.gz", hash = "sha256:9ffa3bf405c12c5c6be9e92e22bebb6ab2c91b9c32f45b0f0c93af473269ab5c"}, - {file = "pytest_mypy-0.9.1-py3-none-any.whl", hash = "sha256:a2505fcf61f1c0c51f950d4623ea8ca2daf6fb2101a5603554bad2e130202083"}, -] -python-socks = [ - {file = "python-socks-2.0.3.tar.gz", hash = "sha256:e3a9ca8e554733862ce4d8ce1d10efb480fd3a3acdafd03393943ec00c98ba8a"}, - {file = "python_socks-2.0.3-py3-none-any.whl", hash = "sha256:950723f27d2cf401e193a9e0a0d45baab848341298f5b397d27fda0c4635e9a9"}, -] -pytz = [ - {file = "pytz-2021.3-py2.py3-none-any.whl", hash = "sha256:3672058bc3453457b622aab7a1c3bfd5ab0bdae451512f6cf25f64ed37f5b87c"}, - {file = "pytz-2021.3.tar.gz", hash = "sha256:acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326"}, -] -pyyaml = [ - {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, - {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"}, - {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"}, - {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"}, - {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"}, - {file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"}, - {file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"}, - {file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"}, - {file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"}, - {file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"}, - {file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"}, - {file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"}, - {file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"}, - {file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"}, - {file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"}, - {file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"}, - {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, - {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, -] -requests = [ - {file = "requests-2.26.0-py2.py3-none-any.whl", hash = "sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24"}, - {file = "requests-2.26.0.tar.gz", hash = "sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7"}, -] -sentry-sdk = [ - {file = "sentry-sdk-1.5.5.tar.gz", hash = "sha256:98fd155fa5d5fec1dbabed32a1a4ae2705f1edaa5dae4e7f7b62a384ba30e759"}, - {file = "sentry_sdk-1.5.5-py2.py3-none-any.whl", hash = "sha256:3817274fba2498c8ebf6b896ee98ac916c5598706340573268c07bf2bb30d831"}, -] -six = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] -snowballstemmer = [ - {file = "snowballstemmer-2.1.0-py2.py3-none-any.whl", hash = "sha256:b51b447bea85f9968c13b650126a888aabd4cb4463fca868ec596826325dedc2"}, - {file = "snowballstemmer-2.1.0.tar.gz", hash = "sha256:e997baa4f2e9139951b6f4c631bad912dfd3c792467e2f03d7239464af90e914"}, -] -soupsieve = [ - {file = "soupsieve-2.3-py3-none-any.whl", hash = "sha256:617ffc4d0dfd39c66f4d1413a6e165663a34eca86be9b54f97b91756300ff6df"}, - {file = "soupsieve-2.3.tar.gz", hash = "sha256:e4860f889dfa88774c07da0b276b70c073b6470fa1a4a8350800bb7bce3dcc76"}, -] -sphinx = [ - {file = "Sphinx-4.2.0-py3-none-any.whl", hash = "sha256:98a535c62a4fcfcc362528592f69b26f7caec587d32cd55688db580be0287ae0"}, - {file = "Sphinx-4.2.0.tar.gz", hash = "sha256:94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6"}, -] -sphinx-autobuild = [ - {file = "sphinx-autobuild-2021.3.14.tar.gz", hash = "sha256:de1ca3b66e271d2b5b5140c35034c89e47f263f2cd5db302c9217065f7443f05"}, - {file = "sphinx_autobuild-2021.3.14-py3-none-any.whl", hash = "sha256:8fe8cbfdb75db04475232f05187c776f46f6e9e04cacf1e49ce81bdac649ccac"}, -] -sphinx-copybutton = [ - {file = "sphinx-copybutton-0.5.0.tar.gz", hash = "sha256:a0c059daadd03c27ba750da534a92a63e7a36a7736dcf684f26ee346199787f6"}, - {file = "sphinx_copybutton-0.5.0-py3-none-any.whl", hash = "sha256:9684dec7434bd73f0eea58dda93f9bb879d24bff2d8b187b1f2ec08dfe7b5f48"}, -] -sphinx-intl = [ - {file = "sphinx-intl-2.0.1.tar.gz", hash = "sha256:b25a6ec169347909e8d983eefe2d8adecb3edc2f27760db79b965c69950638b4"}, - {file = "sphinx_intl-2.0.1-py3.8.egg", hash = "sha256:2ff97cba0e4e43249e339a3c29dd2f5b63c25ce794050aabca320ad95f5c5b55"}, -] -sphinx-prompt = [ - {file = "sphinx_prompt-1.5.0-py3-none-any.whl", hash = "sha256:fa4e90d8088b5a996c76087d701fc7e31175f8b9dc4aab03a507e45051067162"}, -] -sphinx-substitution-extensions = [ - {file = "Sphinx Substitution Extensions-2020.9.30.0.tar.gz", hash = "sha256:578afc04eb4f701d9a922f8b75f678d3a1a897fa7a172a9226b92f17553f177a"}, - {file = "Sphinx_Substitution_Extensions-2020.9.30.0-py3-none-any.whl", hash = "sha256:02e543fb64c82a168031d6f64af5d11bdf91d3f06480ffe399c11be87453729f"}, -] -sphinxcontrib-applehelp = [ - {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, - {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, -] -sphinxcontrib-devhelp = [ - {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, - {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, -] -sphinxcontrib-htmlhelp = [ - {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, - {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, -] -sphinxcontrib-jsmath = [ - {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, - {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, -] -sphinxcontrib-qthelp = [ - {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, - {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, -] -sphinxcontrib-serializinghtml = [ - {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, - {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, -] -stack-data = [ - {file = "stack_data-0.2.0-py3-none-any.whl", hash = "sha256:999762f9c3132308789affa03e9271bbbe947bf78311851f4d485d8402ed858e"}, - {file = "stack_data-0.2.0.tar.gz", hash = "sha256:45692d41bd633a9503a5195552df22b583caf16f0b27c4e58c98d88c8b648e12"}, -] -toml = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, -] -tomli = [ - {file = "tomli-1.2.2-py3-none-any.whl", hash = "sha256:f04066f68f5554911363063a30b108d2b5a5b1a010aa8b6132af78489fe3aade"}, - {file = "tomli-1.2.2.tar.gz", hash = "sha256:c6ce0015eb38820eaf32b5db832dbc26deb3dd427bd5f6556cf0acac2c214fee"}, -] -tornado = [ - {file = "tornado-6.1-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:d371e811d6b156d82aa5f9a4e08b58debf97c302a35714f6f45e35139c332e32"}, - {file = "tornado-6.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:0d321a39c36e5f2c4ff12b4ed58d41390460f798422c4504e09eb5678e09998c"}, - {file = "tornado-6.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:9de9e5188a782be6b1ce866e8a51bc76a0fbaa0e16613823fc38e4fc2556ad05"}, - {file = "tornado-6.1-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:61b32d06ae8a036a6607805e6720ef00a3c98207038444ba7fd3d169cd998910"}, - {file = "tornado-6.1-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:3e63498f680547ed24d2c71e6497f24bca791aca2fe116dbc2bd0ac7f191691b"}, - {file = "tornado-6.1-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:6c77c9937962577a6a76917845d06af6ab9197702a42e1346d8ae2e76b5e3675"}, - {file = "tornado-6.1-cp35-cp35m-win32.whl", hash = "sha256:6286efab1ed6e74b7028327365cf7346b1d777d63ab30e21a0f4d5b275fc17d5"}, - {file = "tornado-6.1-cp35-cp35m-win_amd64.whl", hash = "sha256:fa2ba70284fa42c2a5ecb35e322e68823288a4251f9ba9cc77be04ae15eada68"}, - {file = "tornado-6.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:0a00ff4561e2929a2c37ce706cb8233b7907e0cdc22eab98888aca5dd3775feb"}, - {file = "tornado-6.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:748290bf9112b581c525e6e6d3820621ff020ed95af6f17fedef416b27ed564c"}, - {file = "tornado-6.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:e385b637ac3acaae8022e7e47dfa7b83d3620e432e3ecb9a3f7f58f150e50921"}, - {file = "tornado-6.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:25ad220258349a12ae87ede08a7b04aca51237721f63b1808d39bdb4b2164558"}, - {file = "tornado-6.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:65d98939f1a2e74b58839f8c4dab3b6b3c1ce84972ae712be02845e65391ac7c"}, - {file = "tornado-6.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:e519d64089b0876c7b467274468709dadf11e41d65f63bba207e04217f47c085"}, - {file = "tornado-6.1-cp36-cp36m-win32.whl", hash = "sha256:b87936fd2c317b6ee08a5741ea06b9d11a6074ef4cc42e031bc6403f82a32575"}, - {file = "tornado-6.1-cp36-cp36m-win_amd64.whl", hash = "sha256:cc0ee35043162abbf717b7df924597ade8e5395e7b66d18270116f8745ceb795"}, - {file = "tornado-6.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7250a3fa399f08ec9cb3f7b1b987955d17e044f1ade821b32e5f435130250d7f"}, - {file = "tornado-6.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:ed3ad863b1b40cd1d4bd21e7498329ccaece75db5a5bf58cd3c9f130843e7102"}, - {file = "tornado-6.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:dcef026f608f678c118779cd6591c8af6e9b4155c44e0d1bc0c87c036fb8c8c4"}, - {file = "tornado-6.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:70dec29e8ac485dbf57481baee40781c63e381bebea080991893cd297742b8fd"}, - {file = "tornado-6.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:d3f7594930c423fd9f5d1a76bee85a2c36fd8b4b16921cae7e965f22575e9c01"}, - {file = "tornado-6.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:3447475585bae2e77ecb832fc0300c3695516a47d46cefa0528181a34c5b9d3d"}, - {file = "tornado-6.1-cp37-cp37m-win32.whl", hash = "sha256:e7229e60ac41a1202444497ddde70a48d33909e484f96eb0da9baf8dc68541df"}, - {file = "tornado-6.1-cp37-cp37m-win_amd64.whl", hash = "sha256:cb5ec8eead331e3bb4ce8066cf06d2dfef1bfb1b2a73082dfe8a161301b76e37"}, - {file = "tornado-6.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:20241b3cb4f425e971cb0a8e4ffc9b0a861530ae3c52f2b0434e6c1b57e9fd95"}, - {file = "tornado-6.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:c77da1263aa361938476f04c4b6c8916001b90b2c2fdd92d8d535e1af48fba5a"}, - {file = "tornado-6.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:fba85b6cd9c39be262fcd23865652920832b61583de2a2ca907dbd8e8a8c81e5"}, - {file = "tornado-6.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:1e8225a1070cd8eec59a996c43229fe8f95689cb16e552d130b9793cb570a288"}, - {file = "tornado-6.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:d14d30e7f46a0476efb0deb5b61343b1526f73ebb5ed84f23dc794bdb88f9d9f"}, - {file = "tornado-6.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8f959b26f2634a091bb42241c3ed8d3cedb506e7c27b8dd5c7b9f745318ddbb6"}, - {file = "tornado-6.1-cp38-cp38-win32.whl", hash = "sha256:34ca2dac9e4d7afb0bed4677512e36a52f09caa6fded70b4e3e1c89dbd92c326"}, - {file = "tornado-6.1-cp38-cp38-win_amd64.whl", hash = "sha256:6196a5c39286cc37c024cd78834fb9345e464525d8991c21e908cc046d1cc02c"}, - {file = "tornado-6.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f0ba29bafd8e7e22920567ce0d232c26d4d47c8b5cf4ed7b562b5db39fa199c5"}, - {file = "tornado-6.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:33892118b165401f291070100d6d09359ca74addda679b60390b09f8ef325ffe"}, - {file = "tornado-6.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:7da13da6f985aab7f6f28debab00c67ff9cbacd588e8477034c0652ac141feea"}, - {file = "tornado-6.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:e0791ac58d91ac58f694d8d2957884df8e4e2f6687cdf367ef7eb7497f79eaa2"}, - {file = "tornado-6.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:66324e4e1beede9ac79e60f88de548da58b1f8ab4b2f1354d8375774f997e6c0"}, - {file = "tornado-6.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:a48900ecea1cbb71b8c71c620dee15b62f85f7c14189bdeee54966fbd9a0c5bd"}, - {file = "tornado-6.1-cp39-cp39-win32.whl", hash = "sha256:d3d20ea5782ba63ed13bc2b8c291a053c8d807a8fa927d941bd718468f7b950c"}, - {file = "tornado-6.1-cp39-cp39-win_amd64.whl", hash = "sha256:548430be2740e327b3fe0201abe471f314741efcb0067ec4f2d7dcfb4825f3e4"}, - {file = "tornado-6.1.tar.gz", hash = "sha256:33c6e81d7bd55b468d2e793517c909b139960b6c790a60b7991b9b6b76fb9791"}, -] -towncrier = [ - {file = "towncrier-21.9.0-py2.py3-none-any.whl", hash = "sha256:fc5a88a2a54988e3a8ed2b60d553599da8330f65722cc607c839614ed87e0f92"}, - {file = "towncrier-21.9.0.tar.gz", hash = "sha256:9cb6f45c16e1a1eec9d0e7651165e7be60cd0ab81d13a5c96ca97a498ae87f48"}, -] -traitlets = [ - {file = "traitlets-5.1.1-py3-none-any.whl", hash = "sha256:2d313cc50a42cd6c277e7d7dc8d4d7fedd06a2c215f78766ae7b1a66277e0033"}, - {file = "traitlets-5.1.1.tar.gz", hash = "sha256:059f456c5a7c1c82b98c2e8c799f39c9b8128f6d0d46941ee118daace9eb70c7"}, -] -typing-extensions = [ - {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"}, - {file = "typing_extensions-4.1.1.tar.gz", hash = "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42"}, -] -urllib3 = [ - {file = "urllib3-1.26.7-py2.py3-none-any.whl", hash = "sha256:c4fdf4019605b6e5423637e01bc9fe4daef873709a7973e195ceba0a62bbc844"}, - {file = "urllib3-1.26.7.tar.gz", hash = "sha256:4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece"}, -] -uvloop = [ - {file = "uvloop-0.16.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:6224f1401025b748ffecb7a6e2652b17768f30b1a6a3f7b44660e5b5b690b12d"}, - {file = "uvloop-0.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:30ba9dcbd0965f5c812b7c2112a1ddf60cf904c1c160f398e7eed3a6b82dcd9c"}, - {file = "uvloop-0.16.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:bd53f7f5db562f37cd64a3af5012df8cac2c464c97e732ed556800129505bd64"}, - {file = "uvloop-0.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:772206116b9b57cd625c8a88f2413df2fcfd0b496eb188b82a43bed7af2c2ec9"}, - {file = "uvloop-0.16.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b572256409f194521a9895aef274cea88731d14732343da3ecdb175228881638"}, - {file = "uvloop-0.16.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:04ff57aa137230d8cc968f03481176041ae789308b4d5079118331ab01112450"}, - {file = "uvloop-0.16.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a19828c4f15687675ea912cc28bbcb48e9bb907c801873bd1519b96b04fb805"}, - {file = "uvloop-0.16.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e814ac2c6f9daf4c36eb8e85266859f42174a4ff0d71b99405ed559257750382"}, - {file = "uvloop-0.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:bd8f42ea1ea8f4e84d265769089964ddda95eb2bb38b5cbe26712b0616c3edee"}, - {file = "uvloop-0.16.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:647e481940379eebd314c00440314c81ea547aa636056f554d491e40503c8464"}, - {file = "uvloop-0.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e0d26fa5875d43ddbb0d9d79a447d2ace4180d9e3239788208527c4784f7cab"}, - {file = "uvloop-0.16.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6ccd57ae8db17d677e9e06192e9c9ec4bd2066b77790f9aa7dede2cc4008ee8f"}, - {file = "uvloop-0.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:089b4834fd299d82d83a25e3335372f12117a7d38525217c2258e9b9f4578897"}, - {file = "uvloop-0.16.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98d117332cc9e5ea8dfdc2b28b0a23f60370d02e1395f88f40d1effd2cb86c4f"}, - {file = "uvloop-0.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1e5f2e2ff51aefe6c19ee98af12b4ae61f5be456cd24396953244a30880ad861"}, - {file = "uvloop-0.16.0.tar.gz", hash = "sha256:f74bc20c7b67d1c27c72601c78cf95be99d5c2cdd4514502b4f3eb0933ff1228"}, -] -virtualenv = [ - {file = "virtualenv-20.10.0-py2.py3-none-any.whl", hash = "sha256:4b02e52a624336eece99c96e3ab7111f469c24ba226a53ec474e8e787b365814"}, - {file = "virtualenv-20.10.0.tar.gz", hash = "sha256:576d05b46eace16a9c348085f7d0dc8ef28713a2cabaa1cf0aea41e8f12c9218"}, -] -wcwidth = [ - {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, - {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, -] -yarl = [ - {file = "yarl-1.7.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f2a8508f7350512434e41065684076f640ecce176d262a7d54f0da41d99c5a95"}, - {file = "yarl-1.7.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:da6df107b9ccfe52d3a48165e48d72db0eca3e3029b5b8cb4fe6ee3cb870ba8b"}, - {file = "yarl-1.7.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a1d0894f238763717bdcfea74558c94e3bc34aeacd3351d769460c1a586a8b05"}, - {file = "yarl-1.7.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dfe4b95b7e00c6635a72e2d00b478e8a28bfb122dc76349a06e20792eb53a523"}, - {file = "yarl-1.7.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c145ab54702334c42237a6c6c4cc08703b6aa9b94e2f227ceb3d477d20c36c63"}, - {file = "yarl-1.7.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1ca56f002eaf7998b5fcf73b2421790da9d2586331805f38acd9997743114e98"}, - {file = "yarl-1.7.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1d3d5ad8ea96bd6d643d80c7b8d5977b4e2fb1bab6c9da7322616fd26203d125"}, - {file = "yarl-1.7.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:167ab7f64e409e9bdd99333fe8c67b5574a1f0495dcfd905bc7454e766729b9e"}, - {file = "yarl-1.7.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:95a1873b6c0dd1c437fb3bb4a4aaa699a48c218ac7ca1e74b0bee0ab16c7d60d"}, - {file = "yarl-1.7.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6152224d0a1eb254f97df3997d79dadd8bb2c1a02ef283dbb34b97d4f8492d23"}, - {file = "yarl-1.7.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:5bb7d54b8f61ba6eee541fba4b83d22b8a046b4ef4d8eb7f15a7e35db2e1e245"}, - {file = "yarl-1.7.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:9c1f083e7e71b2dd01f7cd7434a5f88c15213194df38bc29b388ccdf1492b739"}, - {file = "yarl-1.7.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f44477ae29025d8ea87ec308539f95963ffdc31a82f42ca9deecf2d505242e72"}, - {file = "yarl-1.7.2-cp310-cp310-win32.whl", hash = "sha256:cff3ba513db55cc6a35076f32c4cdc27032bd075c9faef31fec749e64b45d26c"}, - {file = "yarl-1.7.2-cp310-cp310-win_amd64.whl", hash = "sha256:c9c6d927e098c2d360695f2e9d38870b2e92e0919be07dbe339aefa32a090265"}, - {file = "yarl-1.7.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:9b4c77d92d56a4c5027572752aa35082e40c561eec776048330d2907aead891d"}, - {file = "yarl-1.7.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c01a89a44bb672c38f42b49cdb0ad667b116d731b3f4c896f72302ff77d71656"}, - {file = "yarl-1.7.2-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c19324a1c5399b602f3b6e7db9478e5b1adf5cf58901996fc973fe4fccd73eed"}, - {file = "yarl-1.7.2-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3abddf0b8e41445426d29f955b24aeecc83fa1072be1be4e0d194134a7d9baee"}, - {file = "yarl-1.7.2-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:6a1a9fe17621af43e9b9fcea8bd088ba682c8192d744b386ee3c47b56eaabb2c"}, - {file = "yarl-1.7.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8b0915ee85150963a9504c10de4e4729ae700af11df0dc5550e6587ed7891e92"}, - {file = "yarl-1.7.2-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:29e0656d5497733dcddc21797da5a2ab990c0cb9719f1f969e58a4abac66234d"}, - {file = "yarl-1.7.2-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:bf19725fec28452474d9887a128e98dd67eee7b7d52e932e6949c532d820dc3b"}, - {file = "yarl-1.7.2-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:d6f3d62e16c10e88d2168ba2d065aa374e3c538998ed04996cd373ff2036d64c"}, - {file = "yarl-1.7.2-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:ac10bbac36cd89eac19f4e51c032ba6b412b3892b685076f4acd2de18ca990aa"}, - {file = "yarl-1.7.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:aa32aaa97d8b2ed4e54dc65d241a0da1c627454950f7d7b1f95b13985afd6c5d"}, - {file = "yarl-1.7.2-cp36-cp36m-win32.whl", hash = "sha256:87f6e082bce21464857ba58b569370e7b547d239ca22248be68ea5d6b51464a1"}, - {file = "yarl-1.7.2-cp36-cp36m-win_amd64.whl", hash = "sha256:ac35ccde589ab6a1870a484ed136d49a26bcd06b6a1c6397b1967ca13ceb3913"}, - {file = "yarl-1.7.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a467a431a0817a292121c13cbe637348b546e6ef47ca14a790aa2fa8cc93df63"}, - {file = "yarl-1.7.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ab0c3274d0a846840bf6c27d2c60ba771a12e4d7586bf550eefc2df0b56b3b4"}, - {file = "yarl-1.7.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d260d4dc495c05d6600264a197d9d6f7fc9347f21d2594926202fd08cf89a8ba"}, - {file = "yarl-1.7.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fc4dd8b01a8112809e6b636b00f487846956402834a7fd59d46d4f4267181c41"}, - {file = "yarl-1.7.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:c1164a2eac148d85bbdd23e07dfcc930f2e633220f3eb3c3e2a25f6148c2819e"}, - {file = "yarl-1.7.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:67e94028817defe5e705079b10a8438b8cb56e7115fa01640e9c0bb3edf67332"}, - {file = "yarl-1.7.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:89ccbf58e6a0ab89d487c92a490cb5660d06c3a47ca08872859672f9c511fc52"}, - {file = "yarl-1.7.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:8cce6f9fa3df25f55521fbb5c7e4a736683148bcc0c75b21863789e5185f9185"}, - {file = "yarl-1.7.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:211fcd65c58bf250fb994b53bc45a442ddc9f441f6fec53e65de8cba48ded986"}, - {file = "yarl-1.7.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c10ea1e80a697cf7d80d1ed414b5cb8f1eec07d618f54637067ae3c0334133c4"}, - {file = "yarl-1.7.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:52690eb521d690ab041c3919666bea13ab9fbff80d615ec16fa81a297131276b"}, - {file = "yarl-1.7.2-cp37-cp37m-win32.whl", hash = "sha256:695ba021a9e04418507fa930d5f0704edbce47076bdcfeeaba1c83683e5649d1"}, - {file = "yarl-1.7.2-cp37-cp37m-win_amd64.whl", hash = "sha256:c17965ff3706beedafd458c452bf15bac693ecd146a60a06a214614dc097a271"}, - {file = "yarl-1.7.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:fce78593346c014d0d986b7ebc80d782b7f5e19843ca798ed62f8e3ba8728576"}, - {file = "yarl-1.7.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c2a1ac41a6aa980db03d098a5531f13985edcb451bcd9d00670b03129922cd0d"}, - {file = "yarl-1.7.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:39d5493c5ecd75c8093fa7700a2fb5c94fe28c839c8e40144b7ab7ccba6938c8"}, - {file = "yarl-1.7.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1eb6480ef366d75b54c68164094a6a560c247370a68c02dddb11f20c4c6d3c9d"}, - {file = "yarl-1.7.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ba63585a89c9885f18331a55d25fe81dc2d82b71311ff8bd378fc8004202ff6"}, - {file = "yarl-1.7.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e39378894ee6ae9f555ae2de332d513a5763276a9265f8e7cbaeb1b1ee74623a"}, - {file = "yarl-1.7.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:c0910c6b6c31359d2f6184828888c983d54d09d581a4a23547a35f1d0b9484b1"}, - {file = "yarl-1.7.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6feca8b6bfb9eef6ee057628e71e1734caf520a907b6ec0d62839e8293e945c0"}, - {file = "yarl-1.7.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8300401dc88cad23f5b4e4c1226f44a5aa696436a4026e456fe0e5d2f7f486e6"}, - {file = "yarl-1.7.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:788713c2896f426a4e166b11f4ec538b5736294ebf7d5f654ae445fd44270832"}, - {file = "yarl-1.7.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:fd547ec596d90c8676e369dd8a581a21227fe9b4ad37d0dc7feb4ccf544c2d59"}, - {file = "yarl-1.7.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:737e401cd0c493f7e3dd4db72aca11cfe069531c9761b8ea474926936b3c57c8"}, - {file = "yarl-1.7.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:baf81561f2972fb895e7844882898bda1eef4b07b5b385bcd308d2098f1a767b"}, - {file = "yarl-1.7.2-cp38-cp38-win32.whl", hash = "sha256:ede3b46cdb719c794427dcce9d8beb4abe8b9aa1e97526cc20de9bd6583ad1ef"}, - {file = "yarl-1.7.2-cp38-cp38-win_amd64.whl", hash = "sha256:cc8b7a7254c0fc3187d43d6cb54b5032d2365efd1df0cd1749c0c4df5f0ad45f"}, - {file = "yarl-1.7.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:580c1f15500e137a8c37053e4cbf6058944d4c114701fa59944607505c2fe3a0"}, - {file = "yarl-1.7.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3ec1d9a0d7780416e657f1e405ba35ec1ba453a4f1511eb8b9fbab81cb8b3ce1"}, - {file = "yarl-1.7.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3bf8cfe8856708ede6a73907bf0501f2dc4e104085e070a41f5d88e7faf237f3"}, - {file = "yarl-1.7.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1be4bbb3d27a4e9aa5f3df2ab61e3701ce8fcbd3e9846dbce7c033a7e8136746"}, - {file = "yarl-1.7.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:534b047277a9a19d858cde163aba93f3e1677d5acd92f7d10ace419d478540de"}, - {file = "yarl-1.7.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6ddcd80d79c96eb19c354d9dca95291589c5954099836b7c8d29278a7ec0bda"}, - {file = "yarl-1.7.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:9bfcd43c65fbb339dc7086b5315750efa42a34eefad0256ba114cd8ad3896f4b"}, - {file = "yarl-1.7.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f64394bd7ceef1237cc604b5a89bf748c95982a84bcd3c4bbeb40f685c810794"}, - {file = "yarl-1.7.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:044daf3012e43d4b3538562da94a88fb12a6490652dbc29fb19adfa02cf72eac"}, - {file = "yarl-1.7.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:368bcf400247318382cc150aaa632582d0780b28ee6053cd80268c7e72796dec"}, - {file = "yarl-1.7.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:bab827163113177aee910adb1f48ff7af31ee0289f434f7e22d10baf624a6dfe"}, - {file = "yarl-1.7.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:0cba38120db72123db7c58322fa69e3c0efa933040ffb586c3a87c063ec7cae8"}, - {file = "yarl-1.7.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:59218fef177296451b23214c91ea3aba7858b4ae3306dde120224cfe0f7a6ee8"}, - {file = "yarl-1.7.2-cp39-cp39-win32.whl", hash = "sha256:1edc172dcca3f11b38a9d5c7505c83c1913c0addc99cd28e993efeaafdfaa18d"}, - {file = "yarl-1.7.2-cp39-cp39-win_amd64.whl", hash = "sha256:797c2c412b04403d2da075fb93c123df35239cd7b4cc4e0cd9e5839b73f52c58"}, - {file = "yarl-1.7.2.tar.gz", hash = "sha256:45399b46d60c253327a460e99856752009fcee5f5d3c80b2f7c0cae1c38d56dd"}, -] -zipp = [ - {file = "zipp-3.6.0-py3-none-any.whl", hash = "sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc"}, - {file = "zipp-3.6.0.tar.gz", hash = "sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832"}, -] diff --git a/pyproject.toml b/pyproject.toml index 160f5380..ca0c8c4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,18 +1,19 @@ -[tool.poetry] +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] name = "aiogram" -version = "3.0.0-beta.2" -description = "Modern and fully asynchronous framework for Telegram Bot API" +description = 'Modern and fully asynchronous framework for Telegram Bot API' +readme = "README.rst" +requires-python = ">=3.10,<3.15" +license = "MIT" authors = [ - "Alex Root Junior ", + { name = "Alex Root Junior", email = "jroot.junior@gmail.com" }, ] maintainers = [ - "Alex Root Junior ", + { name = "Alex Root Junior", email = "jroot.junior@gmail.com" }, ] -license = "MIT" -readme = "README.rst" -homepage = "https://aiogram.dev/" -documentation = "https://docs.aiogram.dev/" -repository = "https://github.com/aiogram/aiogram/" keywords = [ "telegram", "bot", @@ -23,129 +24,264 @@ keywords = [ ] classifiers = [ "License :: OSI Approved :: MIT License", - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", "Environment :: Console", "Framework :: AsyncIO", "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", + "Topic :: Communications :: Chat", ] +dependencies = [ + "magic-filter>=1.0.12,<1.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", +] +dynamic = ["version"] -[tool.poetry.dependencies] -python = "^3.8" -magic-filter = "^1.0.5" -aiohttp = "^3.8.1" -pydantic = "^1.9.0" -aiofiles = "^0.8.0" -# Fast -uvloop = { version = "^0.16.0", markers = "sys_platform == 'darwin' or sys_platform == 'linux'", optional = true } -# i18n -Babel = { version = "^2.9.1", optional = true } -# Proxy -aiohttp-socks = {version = "^0.7.1", optional = true} -# Redis -aioredis = {version = "^2.0.1", optional = true} -# Docs -Sphinx = { version = "^4.2.0", optional = true } -sphinx-intl = { version = "^2.0.1", optional = true } -sphinx-autobuild = { version = "^2021.3.14", optional = true } -sphinx-copybutton = {version = "^0.5.0", optional = true} -furo = {version = "^2022.2.14", optional = true} -sphinx-prompt = { version = "^1.5.0", optional = true } -Sphinx-Substitution-Extensions = { version = "^2020.9.30", optional = true } -towncrier = {version = "^21.9.0", optional = true} -pygments = { version = "^2.4", optional = true } -pymdown-extensions = {version = "^9.2", optional = true} -markdown-include = { version = "^0.6", optional = true } -Pygments = {version = "^2.11.2", optional = true} +[tool.hatch.version] +path = "aiogram/__meta__.py" -[tool.poetry.dev-dependencies] -ipython = "^8.0.1" -black = "^22.1.0" -isort = "^5.10.1" -flake8 = "^4.0.1" -flake8-html = "^0.4.1" -mypy = "^0.931" -pytest = "^7.0.1" -pytest-html = "^3.1.1" -pytest-asyncio = "^0.18.1" -pytest-lazy-fixture = "^0.6.3" -pytest-mock = "^3.7.0" -pytest-mypy = "^0.9.1" -pytest-cov = "^3.0.0" -pytest-aiohttp = "^1.0.4" -aresponses = "^2.1.5" -asynctest = "^0.13.0" -toml = "^0.10.2" - -pre-commit = "^2.17.0" -packaging = "^21.3" -typing-extensions = "^4.1.1" -sentry-sdk = "^1.5.5" - - -[tool.poetry.extras] -fast = ["uvloop"] -redis = ["aioredis"] -proxy = ["aiohttp-socks"] -i18n = ["Babel"] +[project.optional-dependencies] +fast = [ + "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]>=6.2.0,<8", +] +mongo = [ + "motor>=3.3.2,<3.8", + "pymongo>4.5,<4.16", +] +proxy = [ + "aiohttp-socks~=0.10.1", +] +i18n = [ + "Babel>=2.13.0,<3", +] +cli = [ + "aiogram-cli>=1.1.0,<2.0.0", +] +signature = [ + "cryptography>=46.0.0", +] docs = [ - "sphinx", - "sphinx-intl", - "sphinx-autobuild", - "sphinx-copybutton", - "furo", - "black", - "sphinx-prompt", - "Sphinx-Substitution-Extensions", - "towncrier", - "pygments", - "pymdown-extensions", - "markdown-include", + "Sphinx~=8.0.2", + "sphinx-intl~=2.2.0", + "sphinx-autobuild~=2024.9.3", + "sphinx-copybutton~=0.5.2", + "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", + "sphinxcontrib-towncrier~=0.4.0a0", ] -[tool.black] +[dependency-groups] +dev = [ + "ruff~=0.14", + "mypy==1.10.1", + "toml~=0.10.2", + "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] +Homepage = "https://aiogram.dev/" +Documentation = "https://docs.aiogram.dev/" +Repository = "https://github.com/aiogram/aiogram/" + +[tool.ruff] line-length = 99 -target-version = ['py37', 'py38'] -exclude = ''' -( - \.eggs - | \.git - | \.tox - | build - | dist - | venv - | docs -) -''' - -[tool.isort] -multi_line_output = 3 -include_trailing_comma = true -force_grid_wrap = 0 -use_parentheses = true -line_length = 99 -known_third_party = [ - "aiofiles", - "aiohttp", - "aiohttp_socks", - "aresponses", - "packaging", - "pkg_resources", - "pydantic", - "pytest" +src = ["aiogram", "tests"] +exclude = [ + ".git", + "build", + "dist", + "venv", + ".venv", + "docs", + "tests", + "dev", + "scripts", + "*.egg-info", ] +[tool.ruff.lint] +select = [ + # "C", # TODO: mccabe - code complecity + "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", # 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] +known-first-party = [ + "aiogram", + "finite_state_machine", + "handlers", + "routes", +] + +[tool.ruff.lint.per-file-ignores] +"aiogram/client/bot.py" = ["E501"] +"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] +asyncio_mode = "auto" +testpaths = [ + "tests", +] +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/__meta__.py", + "aiogram/dispatcher/middlewares/data.py" +] + +[tool.coverage.report] +exclude_lines = [ + "if __name__ == .__main__.:", + "pragma: no cover", + "if TYPE_CHECKING:", + "@abstractmethod", + "@overload", + "if sys.version_info", + "except ImportError:" +] + +[tool.mypy] +plugins = "pydantic.mypy" +python_version = "3.10" +show_error_codes = true +show_error_context = true +pretty = true +ignore_missing_imports = false +warn_unused_configs = true +disallow_subclassing_any = true +disallow_any_generics = true +disallow_untyped_calls = true +disallow_untyped_defs = true +disallow_incomplete_defs = true +check_untyped_defs = true +disallow_untyped_decorators = true +no_implicit_optional = true +warn_redundant_casts = true +warn_unused_ignores = true +warn_return_any = true +follow_imports_for_stubs = true +namespace_packages = true +show_absolute_path = true + +[[tool.mypy.overrides]] +module = [ + "aiofiles", + "async_lru", + "uvloop", + "redis.*", + "babel.*", + "aiohttp_socks.*", +] +ignore_missing_imports = true +disallow_untyped_defs = true + +[tool.ruff.format] +quote-style = "double" +indent-style = "space" +line-ending = "auto" + [tool.towncrier] package = "aiogram" filename = "CHANGES.rst" directory = "CHANGES/" template = "CHANGES/.template.rst.jinja2" issue_format = "`#{issue} `_" +ignore = [ + ".template.rst.jinja2", +] [[tool.towncrier.section]] path = "" @@ -174,7 +310,3 @@ showcontent = true directory = "misc" name = "Misc" showcontent = true - -[build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" 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 5995dae9..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,53 +36,52 @@ 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(package_version: str, api_version: str) -> None: - path = Path.cwd() / "aiogram" / "__init__.py" +def write_package_meta(api_version: str) -> None: + path = Path.cwd() / "aiogram" / "__meta__.py" content = path.read_text() - content = replace_line(content, PACKAGE_VERSION, package_version) content = replace_line(content, API_VERSION, api_version) - print(f"Write {path}") + print(f"Write {path}") # noqa: T201 path.write_text(content) -def write_readme(package_version: str, api_version: str) -> None: +def write_readme(api_version: str) -> None: path = Path.cwd() / "README.rst" 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) -def write_docs_index(package_version: str, api_version: str) -> None: +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(): - package_version = get_package_version() api_version = get_telegram_api_version() - print(f"Package version: {package_version}") - print(f"Telegram Bot API version: {api_version}") - write_package_meta(package_version=package_version, api_version=api_version) - write_readme(package_version=package_version, api_version=api_version) - write_docs_index(package_version=package_version, 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) if __name__ == "__main__": diff --git a/tests/conftest.py b/tests/conftest.py index 698ee5cf..9632a5c1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,59 +1,70 @@ +import asyncio +import sys from pathlib import Path import pytest from _pytest.config import UsageError -from aioredis.connection import parse_url as parse_redis_url +from pymongo.errors import InvalidURI, PyMongoError +from pymongo.uri_parser import parse_uri as parse_mongo_url +from redis.asyncio.connection import parse_url as parse_redis_url +from redis.exceptions import ConnectionError -from aiogram import Bot, Dispatcher -from aiogram.dispatcher.fsm.storage.memory import ( +from aiogram import Dispatcher +from aiogram.fsm.storage.base import StorageKey +from aiogram.fsm.storage.memory import ( DisabledEventIsolation, MemoryStorage, SimpleEventIsolation, ) -from aiogram.dispatcher.fsm.storage.redis import RedisEventIsolation, RedisStorage +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 DATA_DIR = Path(__file__).parent / "data" +CHAT_ID = -42 +USER_ID = 42 + +SKIP_MESSAGE_PATTERN = 'Need "--{db}" option with {db} URI to run' +INVALID_URI_PATTERN = "Invalid {db} URI {uri!r}: {err}" + def pytest_addoption(parser): parser.addoption("--redis", default=None, help="run tests which require redis connection") + parser.addoption("--mongo", default=None, help="run tests which require mongo connection") 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") - -def pytest_collection_modifyitems(config, items): - redis_uri = config.getoption("--redis") - if redis_uri is None: - skip_redis = pytest.mark.skip(reason="need --redis option with redis URI to run") - for item in items: - if "redis" in item.keywords: - item.add_marker(skip_redis) - return - try: - parse_redis_url(redis_uri) - except ValueError as e: - raise UsageError(f"Invalid redis URI {redis_uri!r}: {e}") - - -@pytest.fixture(scope="session") -def redis_server(request): - redis_uri = request.config.getoption("--redis") - return redis_uri + 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): + redis_uri = request.config.getoption("--redis") + if redis_uri is None: + pytest.skip(SKIP_MESSAGE_PATTERN.format(db="redis")) + else: + return redis_uri @pytest.fixture() -@pytest.mark.redis async def redis_storage(redis_server): - if not redis_server: - pytest.skip("Redis is not available here") + try: + parse_redis_url(redis_server) + except ValueError as e: + raise UsageError(INVALID_URI_PATTERN.format(db="redis", uri=redis_server, err=e)) storage = RedisStorage.from_url(redis_server) try: await storage.redis.info() except ConnectionError as e: - pytest.skip(str(e)) + pytest.fail(str(e)) try: yield storage finally: @@ -62,6 +73,66 @@ async def redis_storage(redis_server): await storage.close() +@pytest.fixture() +def mongo_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 mongo_storage(mongo_server): + try: + parse_mongo_url(mongo_server) + except InvalidURI as e: + raise UsageError(INVALID_URI_PATTERN.format(db="mongo", uri=mongo_server, err=e)) + storage = MongoStorage.from_url( + url=mongo_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() +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() @@ -72,21 +143,8 @@ async def memory_storage(): @pytest.fixture() -@pytest.mark.redis -async def redis_isolation(redis_server): - if not redis_server: - pytest.skip("Redis is not available here") - isolation = RedisEventIsolation.from_url(redis_server) - try: - await isolation.redis.info() - except ConnectionError as e: - pytest.skip(str(e)) - try: - yield isolation - finally: - conn = await isolation.redis - await conn.flushdb() - await isolation.close() +async def redis_isolation(redis_storage): + return redis_storage.create_isolation() @pytest.fixture() @@ -109,12 +167,12 @@ async def disabled_isolation(): @pytest.fixture() def bot(): - bot = MockedBot() - token = Bot.set_current(bot) - try: - yield bot - finally: - Bot.reset_current(token) + return MockedBot() + + +@pytest.fixture(name="storage_key") +def create_storage_key(bot: MockedBot): + return StorageKey(chat_id=CHAT_ID, user_id=USER_ID, bot_id=bot.id) @pytest.fixture() @@ -125,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 453f5e5a..fbefdaba 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -1,7 +1,13 @@ -version: "3.9" - services: redis: - image: redis:6-alpine + image: redis:8-alpine ports: - "${REDIS_PORT-6379}:6379" + + mongo: + image: mongo:8.0.14 + environment: + MONGO_INITDB_ROOT_USERNAME: mongo + MONGO_INITDB_ROOT_PASSWORD: mongo + ports: + - "${MONGODB_PORT-27017}:27017" diff --git a/tests/mocked_bot.py b/tests/mocked_bot.py index 1783eb86..b7007029 100644 --- a/tests/mocked_bot.py +++ b/tests/mocked_bot.py @@ -1,43 +1,55 @@ from collections import deque -from typing import TYPE_CHECKING, AsyncGenerator, Deque, Optional, Type +from collections.abc import AsyncGenerator +from typing import TYPE_CHECKING, Any from aiogram import Bot from aiogram.client.session.base import BaseSession from aiogram.methods import TelegramMethod -from aiogram.methods.base import Request, Response, TelegramType -from aiogram.types import UNSET, ResponseParameters, User +from aiogram.methods.base import Response, TelegramType +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[Request] = 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]: self.responses.append(response) return response - def get_request(self) -> Request: + def get_request(self) -> TelegramMethod[TelegramType]: return self.requests.pop() async def close(self): self.closed = True async def make_request( - self, bot: Bot, method: TelegramMethod[TelegramType], timeout: Optional[int] = UNSET + self, + bot: Bot, + method: TelegramMethod[TelegramType], + timeout: int | None = UNSET_PARSE_MODE, ) -> TelegramType: self.closed = False - self.requests.append(method.build_request(bot)) + self.requests.append(method) response: Response[TelegramType] = self.responses.pop() self.check_response( - method=method, status_code=response.error_code, content=response.json() + bot=bot, + method=method, + status_code=response.error_code, + content=response.model_dump_json(), ) return response.result # type: ignore async def stream_content( - self, url: str, timeout: int, chunk_size: int + self, + url: str, + headers: dict[str, Any] | None = None, + timeout: int = 30, + chunk_size: int = 65536, + raise_for_status: bool = True, ) -> AsyncGenerator[bytes, None]: # pragma: no cover yield b"" @@ -47,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, @@ -61,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, @@ -82,5 +92,5 @@ class MockedBot(Bot): self.session.add_result(response) return response - def get_request(self) -> Request: + def get_request(self) -> TelegramMethod[TelegramType]: return self.session.get_request() 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 d2c9d56a..11a11c34 100644 --- a/tests/test_api/test_client/test_bot.py +++ b/tests/test_api/test_client/test_bot.py @@ -1,6 +1,8 @@ import io import os +from pathlib import Path from tempfile import mkstemp +from unittest.mock import AsyncMock, MagicMock, patch import aiofiles import pytest @@ -12,14 +14,27 @@ from aiogram.client.telegram import TelegramAPIServer from aiogram.methods import GetFile, GetMe from aiogram.types import File, PhotoSize from tests.mocked_bot import MockedBot +from tests.test_api.test_client.test_session.test_base_session import CustomSession -try: - from asynctest import CoroutineMock, patch -except ImportError: - from unittest.mock import AsyncMock as CoroutineMock # type: ignore - from unittest.mock import patch -pytestmark = pytest.mark.asyncio +@pytest.fixture() +async def bot(): + """Override mocked bot fixture with real bot.""" + async with Bot("42:TEST").context() as bot: + yield bot + + +@pytest.fixture() +def mocked_bot(): + """Mocked bot fixture.""" + return MockedBot() + + +@pytest.fixture() +async def session(): + """Override session fixture.""" + async with AiohttpSession() as session: + yield session class TestBot: @@ -28,6 +43,31 @@ class TestBot: assert isinstance(bot.session, AiohttpSession) assert bot.id == 42 + async def test_bot_context_manager_over_session(self): + session = CustomSession() + with patch( + "tests.test_api.test_client.test_session.test_base_session.CustomSession.close", + new_callable=AsyncMock, + ) as mocked_close: + async with Bot(token="42:TEST", session=session) as bot: + assert bot.id == 42 + assert bot.session is session + + mocked_close.assert_awaited_once() + + @pytest.mark.parametrize( + "kwargs", + [ + {"parse_mode": "HTML"}, + {"disable_web_page_preview": True}, + {"protect_content": True}, + {"parse_mode": True, "disable_web_page_preview": True}, + ], + ) + def test_init_default(self, kwargs): + with pytest.raises(TypeError): + Bot(token="42:Test", **kwargs) + def test_hashable(self): bot = Bot("42:TEST") assert hash(bot) == hash("42:TEST") @@ -37,25 +77,22 @@ class TestBot: assert bot == Bot("42:TEST") assert bot != "42:TEST" - async def test_emit(self): - bot = Bot("42:TEST") - + async def test_emit(self, bot: Bot): method = GetMe() with patch( "aiogram.client.session.aiohttp.AiohttpSession.make_request", - new_callable=CoroutineMock, + new_callable=AsyncMock, ) as mocked_make_request: await bot(method) mocked_make_request.assert_awaited_with(bot, method, timeout=None) - async def test_close(self): - session = AiohttpSession() + async def test_close(self, session: AiohttpSession): bot = Bot("42:TEST", session=session) await session.create_session() with patch( - "aiogram.client.session.aiohttp.AiohttpSession.close", new_callable=CoroutineMock + "aiogram.client.session.aiohttp.AiohttpSession.close", new_callable=AsyncMock ) as mocked_close: await bot.session.close() mocked_close.assert_awaited() @@ -63,51 +100,61 @@ class TestBot: @pytest.mark.parametrize("close", [True, False]) async def test_context_manager(self, close: bool): with patch( - "aiogram.client.session.aiohttp.AiohttpSession.close", new_callable=CoroutineMock + target="aiogram.client.session.aiohttp.AiohttpSession.close", + new_callable=AsyncMock, ) as mocked_close: - async with Bot("42:TEST", session=AiohttpSession()).context(auto_close=close) as bot: + session = AiohttpSession() + async with Bot("42:TEST", session=session).context(auto_close=close) as bot: assert isinstance(bot, Bot) + if close: mocked_close.assert_awaited() else: 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( - aresponses.ANY, aresponses.ANY, "get", aresponses.Response(status=200, body=b"\f" * 10) + method_pattern="get", + response=aresponses.Response(status=200, body=b"\f" * 10), ) # https://github.com/Tinche/aiofiles#writing-tests-for-aiofiles - aiofiles.threadpool.wrap.register(CoroutineMock)( - lambda *args, **kwargs: aiofiles.threadpool.AsyncBufferedIOBase(*args, **kwargs) + aiofiles.threadpool.wrap.register(MagicMock)( + lambda *args, **kwargs: aiofiles.threadpool.binary.AsyncBufferedIOBase(*args, **kwargs) ) - mock_file = CoroutineMock() + mock_file = MagicMock() - bot = Bot("42:TEST") - with patch("aiofiles.threadpool.sync_open", return_value=mock_file): - await bot.download_file("TEST", "file.png") - mock_file.write.assert_called_once_with(b"\f" * 10) - - async def test_download_file_default_destination(self, aresponses: ResponsesMockServer): - bot = Bot("42:TEST") + async with Bot("42:TEST").context() as bot: + with patch("aiofiles.threadpool.sync_open", return_value=mock_file): + await bot.download_file("TEST", file_path) + mock_file.write.assert_called_once_with(b"\f" * 10) + async def test_download_file_default_destination( + self, + bot: Bot, + aresponses: ResponsesMockServer, + ): aresponses.add( - aresponses.ANY, aresponses.ANY, "get", aresponses.Response(status=200, body=b"\f" * 10) + method_pattern="get", + response=aresponses.Response(status=200, body=b"\f" * 10), ) - result = await bot.download_file("TEST") assert isinstance(result, io.BytesIO) assert result.read() == b"\f" * 10 - async def test_download_file_custom_destination(self, aresponses: ResponsesMockServer): - bot = Bot("42:TEST") - + async def test_download_file_custom_destination( + self, + bot: Bot, + aresponses: ResponsesMockServer, + ): aresponses.add( - aresponses.ANY, aresponses.ANY, "get", aresponses.Response(status=200, body=b"\f" * 10) + method_pattern="get", + response=aresponses.Response(status=200, body=b"\f" * 10), ) - custom = io.BytesIO() result = await bot.download_file("TEST", custom) @@ -116,19 +163,19 @@ class TestBot: assert result is custom assert result.read() == b"\f" * 10 - async def test_download(self, bot: MockedBot, aresponses: ResponsesMockServer): - bot.add_result_for( + async def test_download(self, mocked_bot: MockedBot): + mocked_bot.add_result_for( GetFile, ok=True, result=File(file_id="file id", file_unique_id="file id") ) - bot.add_result_for( + mocked_bot.add_result_for( GetFile, ok=True, result=File(file_id="file id", file_unique_id="file id") ) - assert await bot.download(File(file_id="file id", file_unique_id="file id")) - assert await bot.download("file id") + assert await mocked_bot.download(File(file_id="file id", file_unique_id="file id")) + assert await mocked_bot.download("file id") with pytest.raises(TypeError): - await bot.download( + await mocked_bot.download( [PhotoSize(file_id="file id", file_unique_id="file id", width=123, height=123)] ) diff --git a/tests/test_api/test_client/test_context_controller.py b/tests/test_api/test_client/test_context_controller.py new file mode 100644 index 00000000..25643b27 --- /dev/null +++ b/tests/test_api/test_client/test_context_controller.py @@ -0,0 +1,36 @@ +from aiogram.client.context_controller import BotContextController +from tests.mocked_bot import MockedBot + + +class MyModel(BotContextController): + id: int + + +class TestBotContextController: + def test_via_model_validate(self, bot: MockedBot): + my_model = MyModel.model_validate({"id": 1}, context={"bot": bot}) + assert my_model.id == 1 + assert my_model._bot == bot + + def test_via_model_validate_none(self): + my_model = MyModel.model_validate({"id": 1}, context={}) + assert my_model.id == 1 + assert my_model._bot is None + + def test_as(self, bot: MockedBot): + my_model = MyModel(id=1).as_(bot) + assert my_model.id == 1 + assert my_model._bot == bot + + def test_as_none(self): + my_model = MyModel(id=1).as_(None) + assert my_model.id == 1 + assert my_model._bot is None + + def test_replacement(self, bot: MockedBot): + my_model = MyModel(id=1).as_(bot) + assert my_model.id == 1 + assert my_model._bot == bot + my_model = my_model.as_(None) + assert my_model.id == 1 + assert my_model._bot is None diff --git a/tests/test_api/test_client/test_default.py b/tests/test_api/test_client/test_default.py new file mode 100644 index 00000000..7e354c89 --- /dev/null +++ b/tests/test_api/test_client/test_default.py @@ -0,0 +1,77 @@ +import sys + +import pytest + +from aiogram.client.default import Default, DefaultBotProperties +from aiogram.enums import ParseMode +from aiogram.types import LinkPreviewOptions + + +class TestDefault: + def test_init(self): + default = Default("test") + assert default._name == "test" + + def test_name_property(self): + default = Default("test") + assert default.name == "test" + + def test_str(self): + default = Default("test") + assert str(default) == "Default('test')" + + def test_repr(self): + 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): + default_bot_properties = DefaultBotProperties() + + assert default_bot_properties.link_preview is None + + def test_post_init_auto_fill_link_preview(self): + default_bot_properties = DefaultBotProperties( + link_preview_is_disabled=True, + link_preview_prefer_small_media=True, + link_preview_prefer_large_media=True, + link_preview_show_above_text=True, + ) + + assert default_bot_properties.link_preview == LinkPreviewOptions( + is_disabled=True, + prefer_small_media=True, + prefer_large_media=True, + show_above_text=True, + ) + + def test_getitem(self): + default_bot_properties = DefaultBotProperties( + parse_mode=ParseMode.HTML, + link_preview_is_disabled=True, + link_preview_prefer_small_media=True, + link_preview_prefer_large_media=True, + link_preview_show_above_text=True, + ) + + assert default_bot_properties["parse_mode"] == ParseMode.HTML + assert default_bot_properties["link_preview_is_disabled"] is True + assert default_bot_properties["link_preview_prefer_small_media"] is True + assert default_bot_properties["link_preview_prefer_large_media"] is True + assert default_bot_properties["link_preview_show_above_text"] is True + + @pytest.mark.skipif(sys.version_info < (3, 12), reason="requires python3.11 or higher") + def test_dataclass_creation_3_10_plus(self): + params = DefaultBotProperties.__dataclass_params__ + assert params.slots is True + assert params.kw_only is True 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 291991be..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,5 +1,10 @@ import asyncio -from typing import AsyncContextManager, AsyncGenerator +from collections.abc import AsyncGenerator, AsyncIterable +from typing import ( + Any, + AsyncContextManager, +) +from unittest.mock import AsyncMock, patch import aiohttp_socks import pytest @@ -7,21 +12,14 @@ from aiohttp import ClientError from aresponses import ResponsesMockServer from aiogram import Bot +from aiogram.client.default import Default from aiogram.client.session import aiohttp from aiogram.client.session.aiohttp import AiohttpSession from aiogram.exceptions import TelegramNetworkError -from aiogram.methods import Request, TelegramMethod -from aiogram.types import UNSET, InputFile +from aiogram.methods import TelegramMethod +from aiogram.types import InputFile from tests.mocked_bot import MockedBot -try: - from asynctest import CoroutineMock, patch -except ImportError: - from unittest.mock import AsyncMock as CoroutineMock # type: ignore - from unittest.mock import patch - -pytestmark = pytest.mark.asyncio - class BareInputFile(InputFile): async def read(self, chunk_size: int): @@ -31,61 +29,53 @@ class BareInputFile(InputFile): class TestAiohttpSession: async def test_create_session(self): session = AiohttpSession() - assert session._session is None aiohttp_session = await session.create_session() assert session._session is not None assert isinstance(aiohttp_session, aiohttp.ClientSession) + await session.close() async def test_create_proxy_session(self): - session = AiohttpSession( - proxy=("socks5://proxy.url/", aiohttp.BasicAuth("login", "password", "encoding")) - ) + auth = aiohttp.BasicAuth("login", "password", "encoding") + async with AiohttpSession(proxy=("socks5://proxy.url:1080/", auth)) as session: + assert session._connector_type == aiohttp_socks.ProxyConnector - assert session._connector_type == aiohttp_socks.ProxyConnector + assert isinstance(session._connector_init, dict) + assert session._connector_init["proxy_type"] is aiohttp_socks.ProxyType.SOCKS5 - assert isinstance(session._connector_init, dict) - assert session._connector_init["proxy_type"] is aiohttp_socks.ProxyType.SOCKS5 - - aiohttp_session = await session.create_session() - assert isinstance(aiohttp_session.connector, aiohttp_socks.ProxyConnector) + aiohttp_session = await session.create_session() + assert isinstance(aiohttp_session.connector, aiohttp_socks.ProxyConnector) async def test_create_proxy_session_proxy_url(self): - session = AiohttpSession(proxy="socks4://proxy.url/") + async with AiohttpSession(proxy="socks4://proxy.url:1080/") as session: + assert isinstance(session.proxy, str) - assert isinstance(session.proxy, str) + assert isinstance(session._connector_init, dict) + assert session._connector_init["proxy_type"] is aiohttp_socks.ProxyType.SOCKS4 - assert isinstance(session._connector_init, dict) - assert session._connector_init["proxy_type"] is aiohttp_socks.ProxyType.SOCKS4 - - aiohttp_session = await session.create_session() - assert isinstance(aiohttp_session.connector, aiohttp_socks.ProxyConnector) + aiohttp_session = await session.create_session() + assert isinstance(aiohttp_session.connector, aiohttp_socks.ProxyConnector) async def test_create_proxy_session_chained_proxies(self): - session = AiohttpSession( - proxy=[ - "socks4://proxy.url/", - "socks5://proxy.url/", - "http://user:password@127.0.0.1:3128", - ] - ) + proxy_chain = [ + "socks4://proxy.url:1080/", + "socks5://proxy.url:1080/", + "http://user:password@127.0.0.1:3128", + ] + async with AiohttpSession(proxy=proxy_chain) as session: + assert isinstance(session.proxy, list) - assert isinstance(session.proxy, list) + assert isinstance(session._connector_init, dict) - assert isinstance(session._connector_init, dict) - assert isinstance(session._connector_init["proxy_infos"], list) - assert isinstance(session._connector_init["proxy_infos"][0], aiohttp_socks.ProxyInfo) + proxy_infos = session._connector_init["proxy_infos"] + assert isinstance(proxy_infos, list) + assert isinstance(proxy_infos[0], aiohttp_socks.ProxyInfo) + assert proxy_infos[0].proxy_type is aiohttp_socks.ProxyType.SOCKS4 + assert proxy_infos[1].proxy_type is aiohttp_socks.ProxyType.SOCKS5 + assert proxy_infos[2].proxy_type is aiohttp_socks.ProxyType.HTTP - assert ( - session._connector_init["proxy_infos"][0].proxy_type is aiohttp_socks.ProxyType.SOCKS4 - ) - assert ( - session._connector_init["proxy_infos"][1].proxy_type is aiohttp_socks.ProxyType.SOCKS5 - ) - assert session._connector_init["proxy_infos"][2].proxy_type is aiohttp_socks.ProxyType.HTTP - - aiohttp_session = await session.create_session() - assert isinstance(aiohttp_session.connector, aiohttp_socks.ChainProxyConnector) + aiohttp_session = await session.create_session() + assert isinstance(aiohttp_session.connector, aiohttp_socks.ChainProxyConnector) async def test_reset_connector(self): session = AiohttpSession() @@ -96,58 +86,77 @@ 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 + await session.close() async def test_close_session(self): session = AiohttpSession() await session.create_session() - with patch("aiohttp.ClientSession.close", new=CoroutineMock()) as mocked_close: + with patch("aiohttp.ClientSession.close", new=AsyncMock()) as mocked_close: await session.close() mocked_close.assert_called_once() - def test_build_form_data_with_data_only(self): - request = Request( - method="method", - data={ - "str": "value", - "int": 42, - "bool": True, - "unset": UNSET, - "null": None, - "list": ["foo"], - "dict": {"bar": "baz"}, - }, - ) + await session.close() + + def test_build_form_data_with_data_only(self, bot: MockedBot): + class TestMethod(TelegramMethod[bool]): + __api_method__ = "test" + __returning__ = bool + + str_: str + int_: int + bool_: bool + unset_: str | Default = Default("parse_mode") + null_: None + list_: list[str] + dict_: dict[str, Any] session = AiohttpSession() - form = session.build_form_data(request) + form = session.build_form_data( + bot, + TestMethod( + str_="value", + int_=42, + bool_=True, + unset_=Default("parse_mode"), + null_=None, + list_=["foo"], + dict_={"bar": "baz"}, + ), + ) fields = form._fields assert len(fields) == 5 assert all(isinstance(field[2], str) for field in fields) - assert "null" not in [item[0]["name"] for item in fields] + assert "null_" not in [item[0]["name"] for item in fields] - def test_build_form_data_with_files(self): - request = Request( - method="method", - data={"key": "value"}, - files={"document": BareInputFile(filename="file.txt")}, - ) + def test_build_form_data_with_files(self, bot: Bot): + class TestMethod(TelegramMethod[bool]): + __api_method__ = "test" + __returning__ = bool + + key: str + document: InputFile session = AiohttpSession() - form = session.build_form_data(request) + form = session.build_form_data( + bot, + TestMethod(key="value", document=BareInputFile(filename="file.txt")), + ) fields = form._fields - assert len(fields) == 2 + assert len(fields) == 3 assert fields[1][0]["name"] == "document" - assert fields[1][0]["filename"] == "file.txt" - assert isinstance(fields[1][2], BareInputFile) + assert fields[1][2].startswith("attach://") + assert fields[2][0]["name"] == fields[1][2][9:] + assert fields[2][0]["filename"] == "file.txt" + assert isinstance(fields[2][2], AsyncIterable) async def test_make_request(self, bot: MockedBot, aresponses: ResponsesMockServer): aresponses.add( @@ -161,65 +170,91 @@ class TestAiohttpSession: ), ) - session = AiohttpSession() + async with AiohttpSession() as session: - class TestMethod(TelegramMethod[int]): - __returning__ = int + class TestMethod(TelegramMethod[int]): + __returning__ = int + __api_method__ = "method" - def build_request(self, bot: Bot) -> Request: - return Request(method="method", data={}) + call = TestMethod() - call = TestMethod() - - result = await session.make_request(bot, call) - assert isinstance(result, int) - assert result == 42 + result = await session.make_request(bot, call) + assert isinstance(result, int) + assert result == 42 @pytest.mark.parametrize("error", [ClientError("mocked"), asyncio.TimeoutError()]) async def test_make_request_network_error(self, error): - bot = Bot("42:TEST") - async def side_effect(*args, **kwargs): raise error - with patch( - "aiohttp.client.ClientSession._request", - new_callable=CoroutineMock, - side_effect=side_effect, - ): - with pytest.raises(TelegramNetworkError): - await bot.get_me() + async with Bot("42:TEST").context() as bot: + with patch( + "aiohttp.client.ClientSession._request", + new_callable=AsyncMock, + side_effect=side_effect, + ): + with pytest.raises(TelegramNetworkError): + await bot.get_me() async def test_stream_content(self, aresponses: ResponsesMockServer): aresponses.add( aresponses.ANY, aresponses.ANY, "get", aresponses.Response(status=200, body=b"\f" * 10) ) - session = AiohttpSession() - stream = session.stream_content( - "https://www.python.org/static/img/python-logo.png", timeout=5, chunk_size=1 - ) - assert isinstance(stream, AsyncGenerator) + async with AiohttpSession() as session: + stream = session.stream_content( + "https://www.python.org/static/img/python-logo.png", + timeout=5, + chunk_size=1, + raise_for_status=True, + ) + assert isinstance(stream, AsyncGenerator) - size = 0 - async for chunk in stream: - assert isinstance(chunk, bytes) - chunk_size = len(chunk) - assert chunk_size == 1 - size += chunk_size - assert size == 10 + size = 0 + async for chunk in stream: + assert isinstance(chunk, bytes) + chunk_size = len(chunk) + assert chunk_size == 1 + size += chunk_size + assert size == 10 + + async def test_stream_content_404(self, aresponses: ResponsesMockServer): + aresponses.add( + aresponses.ANY, + aresponses.ANY, + "get", + aresponses.Response( + status=404, + body=b"File not found", + ), + ) + async with AiohttpSession() as session: + stream = session.stream_content( + "https://www.python.org/static/img/python-logo.png", + timeout=5, + chunk_size=1, + raise_for_status=True, + ) + + with pytest.raises(ClientError): + async for _ in stream: + ... async def test_context_manager(self): - session = AiohttpSession() - assert isinstance(session, AsyncContextManager) + async with AiohttpSession() as session: + assert isinstance(session, AsyncContextManager) - with patch( - "aiogram.client.session.aiohttp.AiohttpSession.create_session", - new_callable=CoroutineMock, - ) as mocked_create_session, patch( - "aiogram.client.session.aiohttp.AiohttpSession.close", new_callable=CoroutineMock - ) as mocked_close: - async with session as ctx: - assert session == ctx - mocked_close.assert_awaited_once() - mocked_create_session.assert_awaited_once() + 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() + mocked_create_session.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 a6c5f700..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,13 +1,19 @@ import datetime import json -from typing import AsyncContextManager, AsyncGenerator, Optional +from collections.abc import AsyncGenerator +from typing import Any, AsyncContextManager +from unittest.mock import AsyncMock, patch import pytest +from pytz import utc from aiogram import Bot +from aiogram.client.default import Default, DefaultBotProperties from aiogram.client.session.base import BaseSession, TelegramType from aiogram.client.telegram import PRODUCTION, TelegramAPIServer +from aiogram.enums import ChatType, ParseMode, TopicIconColor from aiogram.exceptions import ( + ClientDecodeError, RestartingTelegram, TelegramAPIError, TelegramBadRequest, @@ -21,34 +27,36 @@ from aiogram.exceptions import ( TelegramUnauthorizedError, ) from aiogram.methods import DeleteMessage, GetMe, TelegramMethod -from aiogram.types import UNSET, User +from aiogram.types import UNSET_PARSE_MODE, LinkPreviewOptions, User +from aiogram.types.base import UNSET_DISABLE_WEB_PAGE_PREVIEW, UNSET_PROTECT_CONTENT from tests.mocked_bot import MockedBot -try: - from asynctest import CoroutineMock, patch -except ImportError: - from unittest.mock import AsyncMock as CoroutineMock # type: ignore - from unittest.mock import patch - -pytestmark = pytest.mark.asyncio - class CustomSession(BaseSession): async def close(self): pass async def make_request( - self, token: str, method: TelegramMethod[TelegramType], timeout: Optional[int] = UNSET + self, + token: str, + method: TelegramMethod[TelegramType], + timeout: int | None = UNSET_PARSE_MODE, ) -> None: # type: ignore assert isinstance(token, str) assert isinstance(method, TelegramMethod) async def stream_content( - self, url: str, timeout: int, chunk_size: int + self, + url: str, + headers: dict[str, Any] | None = None, + timeout: int = 30, + chunk_size: int = 65536, + raise_for_status: bool = True, ) -> AsyncGenerator[bytes, None]: # pragma: no cover assert isinstance(url, str) assert isinstance(timeout, int) assert isinstance(chunk_size, int) + assert isinstance(raise_for_status, bool) yield b"\f" * 10 @@ -84,56 +92,63 @@ class TestBaseSession: assert session.api == api assert "example.com" in session.api.base - def test_prepare_value(self): + @pytest.mark.parametrize( + "value,result", + [ + [None, None], + ["text", "text"], + [ChatType.PRIVATE, "private"], + [TopicIconColor.RED, "16478047"], + [42, "42"], + [True, "true"], + [["test"], '["test"]'], + [["test", ["test"]], '["test", ["test"]]'], + [[{"test": "pass", "spam": None}], '[{"test": "pass"}]'], + [{"test": "pass", "number": 42, "spam": None}, '{"test": "pass", "number": 42}'], + [{"foo": {"test": "pass", "spam": None}}, '{"foo": {"test": "pass"}}'], + [ + datetime.datetime( + year=2017, month=5, day=17, hour=4, minute=11, second=42, tzinfo=utc + ), + "1494994302", + ], + [ + {"link_preview": LinkPreviewOptions(is_disabled=True)}, + '{"link_preview": {"is_disabled": true}}', + ], + ], + ) + def test_prepare_value(self, value: Any, result: str, bot: MockedBot): session = CustomSession() - now = datetime.datetime.now() + assert session.prepare_value(value, bot=bot, files={}) == result - assert session.prepare_value("text") == "text" - assert session.prepare_value(["test"]) == '["test"]' - assert session.prepare_value({"test": "ok"}) == '{"test": "ok"}' - assert session.prepare_value(now) == str(round(now.timestamp())) - assert isinstance(session.prepare_value(datetime.timedelta(minutes=2)), str) - assert session.prepare_value(42) == "42" - - def test_clean_json(self): + def test_prepare_value_timedelta(self, bot: MockedBot): session = CustomSession() - cleaned_dict = session.clean_json({"key": "value", "null": None}) - assert "key" in cleaned_dict - assert "null" not in cleaned_dict + value = session.prepare_value(datetime.timedelta(minutes=2), bot=bot, files={}) + assert isinstance(value, str) - cleaned_list = session.clean_json(["kaboom", 42, None]) - assert len(cleaned_list) == 2 - assert 42 in cleaned_list - assert None not in cleaned_list - assert cleaned_list[0] == "kaboom" - - def test_clean_json_with_nested_json(self): - session = CustomSession() - - cleaned = session.clean_json( - { - "key": "value", - "null": None, - "nested_list": ["kaboom", 42, None], - "nested_dict": {"key": "value", "null": None}, - } + def test_prepare_value_defaults_replace(self): + bot = MockedBot( + default=DefaultBotProperties( + parse_mode=ParseMode.HTML, + protect_content=True, + link_preview_is_disabled=True, + ) ) + assert bot.session.prepare_value(Default("parse_mode"), bot=bot, files={}) == "HTML" + assert ( + bot.session.prepare_value(Default("link_preview_is_disabled"), bot=bot, files={}) + == "true" + ) + assert bot.session.prepare_value(Default("protect_content"), bot=bot, files={}) == "true" - assert len(cleaned) == 3 - assert "null" not in cleaned - - assert isinstance(cleaned["nested_list"], list) - assert cleaned["nested_list"] == ["kaboom", 42] - - assert isinstance(cleaned["nested_dict"], dict) - assert cleaned["nested_dict"] == {"key": "value"} - - def test_clean_json_not_json(self): - session = CustomSession() - - assert session.clean_json(42) == 42 + def test_prepare_value_defaults_unset(self): + bot = MockedBot() + assert bot.session.prepare_value(UNSET_PARSE_MODE, bot=bot, files={}) is None + assert bot.session.prepare_value(UNSET_DISABLE_WEB_PAGE_PREVIEW, bot=bot, files={}) is None + assert bot.session.prepare_value(UNSET_PROTECT_CONTENT, bot=bot, files={}) is None @pytest.mark.parametrize( "status_code,content,error", @@ -164,9 +179,11 @@ class TestBaseSession: ) def test_check_response(self, status_code, content, error): session = CustomSession() + bot = MockedBot() method = DeleteMessage(chat_id=42, message_id=42) if error is None: session.check_response( + bot=bot, method=method, status_code=status_code, content=content, @@ -174,6 +191,7 @@ class TestBaseSession: else: with pytest.raises(error) as exc_info: session.check_response( + bot=bot, method=method, status_code=status_code, content=content, @@ -183,6 +201,32 @@ class TestBaseSession: if error.url: assert error.url in string + def test_check_response_json_decode_error(self): + session = CustomSession() + bot = MockedBot() + method = DeleteMessage(chat_id=42, message_id=42) + + with pytest.raises(ClientDecodeError, match="JSONDecodeError"): + session.check_response( + bot=bot, + method=method, + status_code=200, + content="is not a JSON object", + ) + + def test_check_response_validation_error(self): + session = CustomSession() + bot = MockedBot() + method = DeleteMessage(chat_id=42, message_id=42) + + with pytest.raises(ClientDecodeError, match="ValidationError"): + session.check_response( + bot=bot, + method=method, + status_code=200, + content='{"ok": "test"}', + ) + async def test_make_request(self): session = CustomSession() @@ -191,7 +235,11 @@ class TestBaseSession: async def test_stream_content(self): session = CustomSession() stream = session.stream_content( - "https://www.python.org/static/img/python-logo.png", timeout=5, chunk_size=65536 + "https://www.python.org/static/img/python-logo.png", + headers={}, + timeout=5, + chunk_size=65536, + raise_for_status=True, ) assert isinstance(stream, AsyncGenerator) @@ -204,7 +252,7 @@ class TestBaseSession: with patch( "tests.test_api.test_client.test_session.test_base_session.CustomSession.close", - new_callable=CoroutineMock, + new_callable=AsyncMock, ) as mocked_close: async with session as ctx: assert session == ctx @@ -215,11 +263,11 @@ class TestBaseSession: return await make_request(bot, method) session = CustomSession() - assert not session.middlewares + assert not session.middleware._middlewares session.middleware(my_middleware) - assert my_middleware in session.middlewares - assert len(session.middlewares) == 1 + assert my_middleware in session.middleware + assert len(session.middleware) == 1 async def test_use_middleware(self, bot: MockedBot): flag_before = False diff --git a/tests/test_api/test_client/test_session/test_middlewares/test_manager.py b/tests/test_api/test_client/test_session/test_middlewares/test_manager.py new file mode 100644 index 00000000..1bc2a6a3 --- /dev/null +++ b/tests/test_api/test_client/test_session/test_middlewares/test_manager.py @@ -0,0 +1,45 @@ +from aiogram import Bot +from aiogram.client.session.middlewares.base import ( + BaseRequestMiddleware, + NextRequestMiddlewareType, +) +from aiogram.client.session.middlewares.manager import RequestMiddlewareManager +from aiogram.methods import Response, TelegramMethod +from aiogram.types import TelegramObject + + +class TestMiddlewareManager: + async def test_register(self): + manager = RequestMiddlewareManager() + + @manager + async def middleware(handler, event, data): + await handler(event, data) + + assert middleware in manager._middlewares + manager.unregister(middleware) + assert middleware not in manager._middlewares + + async def test_wrap_middlewares(self): + manager = RequestMiddlewareManager() + + class MyMiddleware(BaseRequestMiddleware): + async def __call__( + self, + make_request: NextRequestMiddlewareType, + bot: Bot, + method: TelegramMethod[TelegramObject], + ) -> Response[TelegramObject]: + return await make_request(bot, method) + + manager.register(MyMiddleware()) + + @manager() + @manager + async def middleware(make_request, bot, method): + return await make_request(bot, method) + + async def target_call(bot, method, timeout: int = None): + return timeout + + assert await manager.wrap_middlewares(target_call, timeout=42)(None, None) == 42 diff --git a/tests/test_api/test_client/test_session/test_middlewares/test_request_logging.py b/tests/test_api/test_client/test_session/test_middlewares/test_request_logging.py index 33e40992..9772bf2b 100644 --- a/tests/test_api/test_client/test_session/test_middlewares/test_request_logging.py +++ b/tests/test_api/test_client/test_session/test_middlewares/test_request_logging.py @@ -1,15 +1,11 @@ import datetime import logging -import pytest - from aiogram.client.session.middlewares.request_logging import RequestLogging from aiogram.methods import GetMe, SendMessage from aiogram.types import Chat, Message, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestRequestLogging: async def test_use_middleware(self, bot: MockedBot, caplog): 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 35a08f75..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 @@ -1,28 +1,19 @@ -import pytest - -from aiogram.methods import AddStickerToSet, Request +from aiogram.enums import StickerFormat +from aiogram.methods import AddStickerToSet +from aiogram.types import InputSticker from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAddStickerToSet: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(AddStickerToSet, ok=True, result=True) - - response: bool = await AddStickerToSet( - user_id=42, name="test stickers pack", png_sticker="file id", emojis=":)" - ) - request: Request = bot.get_request() - assert request.method == "addStickerToSet" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(AddStickerToSet, ok=True, result=True) response: bool = await bot.add_sticker_to_set( - user_id=42, name="test stickers pack", png_sticker="file id", emojis=":)" + user_id=42, + name="test stickers pack", + sticker=InputSticker( + sticker="file id", format=StickerFormat.STATIC, emoji_list=[":)"] + ), ) - request: Request = bot.get_request() - assert request.method == "addStickerToSet" + 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 f157e86f..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,24 +1,11 @@ -import pytest - -from aiogram.methods import AnswerCallbackQuery, Request +from aiogram.methods import AnswerCallbackQuery from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAnswerCallbackQuery: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(AnswerCallbackQuery, ok=True, result=True) - - response: bool = await AnswerCallbackQuery(callback_query_id="cq id", text="OK") - request: Request = bot.get_request() - assert request.method == "answerCallbackQuery" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): 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: Request = bot.get_request() - assert request.method == "answerCallbackQuery" + 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 98227b57..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,61 +1,21 @@ -import pytest - -from aiogram import Bot -from aiogram.methods import AnswerInlineQuery, Request -from aiogram.types import InlineQueryResult, InlineQueryResultPhoto, InputTextMessageContent +from aiogram.methods import AnswerInlineQuery +from aiogram.types import InlineQueryResultArticle, InputTextMessageContent from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAnswerInlineQuery: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(AnswerInlineQuery, ok=True, result=True) - - response: bool = await AnswerInlineQuery( - inline_query_id="query id", results=[InlineQueryResult()] - ) - request: Request = bot.get_request() - assert request.method == "answerInlineQuery" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(AnswerInlineQuery, ok=True, result=True) response: bool = await bot.answer_inline_query( - inline_query_id="query id", results=[InlineQueryResult()] - ) - request: Request = bot.get_request() - assert request.method == "answerInlineQuery" - assert response == prepare_result.result - - def test_parse_mode(self, bot: MockedBot): - query = AnswerInlineQuery( - inline_query_id="query id", - results=[InlineQueryResultPhoto(id="result id", photo_url="photo", thumb_url="thumb")], - ) - request = query.build_request(bot) - assert request.data["results"][0]["parse_mode"] is None - - new_bot = Bot(token="42:TEST", parse_mode="HTML") - request = query.build_request(new_bot) - assert request.data["results"][0]["parse_mode"] == "HTML" - - def test_parse_mode_input_message_content(self, bot: MockedBot): - query = AnswerInlineQuery( inline_query_id="query id", results=[ - InlineQueryResultPhoto( - id="result id", - photo_url="photo", - thumb_url="thumb", - input_message_content=InputTextMessageContent(message_text="test"), + InlineQueryResultArticle( + id="1", + title="title", + input_message_content=InputTextMessageContent(message_text="text"), ) ], ) - request = query.build_request(bot) - assert request.data["results"][0]["input_message_content"]["parse_mode"] is None - - new_bot = Bot(token="42:TEST", parse_mode="HTML") - request = query.build_request(new_bot) - assert request.data["results"][0]["input_message_content"]["parse_mode"] == "HTML" + 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 7d0077c7..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,26 +1,13 @@ -import pytest - -from aiogram.methods import AnswerPreCheckoutQuery, Request +from aiogram.methods import AnswerPreCheckoutQuery from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAnswerPreCheckoutQuery: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(AnswerPreCheckoutQuery, ok=True, result=True) - - response: bool = await AnswerPreCheckoutQuery(pre_checkout_query_id="query id", ok=True) - request: Request = bot.get_request() - assert request.method == "answerPreCheckoutQuery" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(AnswerPreCheckoutQuery, ok=True, result=True) response: bool = await bot.answer_pre_checkout_query( pre_checkout_query_id="query id", ok=True ) - request: Request = bot.get_request() - assert request.method == "answerPreCheckoutQuery" + 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 1374543e..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,24 +1,11 @@ -import pytest - -from aiogram.methods import AnswerShippingQuery, Request +from aiogram.methods import AnswerShippingQuery from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAnswerShippingQuery: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(AnswerShippingQuery, ok=True, result=True) - - response: bool = await AnswerShippingQuery(shipping_query_id="query id", ok=True) - request: Request = bot.get_request() - assert request.method == "answerShippingQuery" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): 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: Request = bot.get_request() - assert request.method == "answerShippingQuery" + 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 new file mode 100644 index 00000000..f38d0938 --- /dev/null +++ b/tests/test_api/test_methods/test_answer_web_app_query.py @@ -0,0 +1,19 @@ +from aiogram.methods import AnswerWebAppQuery +from aiogram.types import InlineQueryResultPhoto, SentWebAppMessage +from tests.mocked_bot import MockedBot + + +class TestAnswerWebAppQuery: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(AnswerWebAppQuery, ok=True, result=SentWebAppMessage()) + + response: SentWebAppMessage = await bot.answer_web_app_query( + web_app_query_id="test", + result=InlineQueryResultPhoto( + id="test", + photo_url="test", + thumbnail_url="test", + ), + ) + 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 old mode 100644 new mode 100755 index 52d6554a..cea8c17f --- 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,23 +1,8 @@ -import pytest - -from aiogram.methods import ApproveChatJoinRequest, Request +from aiogram.methods import ApproveChatJoinRequest from tests.mocked_bot import MockedBot class TestApproveChatJoinRequest: - @pytest.mark.asyncio - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(ApproveChatJoinRequest, ok=True, result=True) - - response: bool = await ApproveChatJoinRequest( - chat_id=-42, - user_id=42, - ) - request: Request = bot.get_request() - assert request.method == "approveChatJoinRequest" - assert response == prepare_result.result - - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(ApproveChatJoinRequest, ok=True, result=None) @@ -25,6 +10,5 @@ class TestApproveChatJoinRequest: chat_id=-42, user_id=42, ) - request: Request = bot.get_request() - assert request.method == "approveChatJoinRequest" + 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 73090f40..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,24 +1,11 @@ -import pytest - -from aiogram.methods import BanChatMember, Request +from aiogram.methods import BanChatMember from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestKickChatMember: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(BanChatMember, ok=True, result=True) - - response: bool = await BanChatMember(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "banChatMember" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): 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: Request = bot.get_request() - assert request.method == "banChatMember" + 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 old mode 100644 new mode 100755 index 1d832e87..feefbc8d --- 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,24 +1,8 @@ -import pytest - -from aiogram.methods import BanChatSenderChat, Request +from aiogram.methods import BanChatSenderChat from tests.mocked_bot import MockedBot class TestBanChatSenderChat: - @pytest.mark.asyncio - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(BanChatSenderChat, ok=True, result=True) - - response: bool = await BanChatSenderChat( - chat_id=-42, - sender_chat_id=-1337, - ) - request: Request = bot.get_request() - assert request.method == "banChatSenderChat" - # assert request.data == {} - assert response == prepare_result.result - - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(BanChatSenderChat, ok=True, result=True) @@ -26,7 +10,5 @@ class TestBanChatSenderChat: chat_id=-42, sender_chat_id=-1337, ) - request: Request = bot.get_request() - assert request.method == "banChatSenderChat" - # assert request.data == {} + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_base.py b/tests/test_api/test_methods/test_base.py index 4dc39946..085650f3 100644 --- a/tests/test_api/test_methods/test_base.py +++ b/tests/test_api/test_methods/test_base.py @@ -1,63 +1,40 @@ -from typing import Dict, Optional +from unittest.mock import sentinel import pytest -from aiogram import Bot -from aiogram.methods.base import prepare_parse_mode +from aiogram.methods import GetMe, TelegramMethod +from aiogram.types import TelegramObject, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - -class TestPrepareFile: - # TODO: Add tests - pass - - -class TestPrepareInputMedia: - # TODO: Add tests - pass - - -class TestPrepareMediaFile: - # TODO: Add tests - pass - - -class TestPrepareParseMode: +class TestTelegramMethodRemoveUnset: @pytest.mark.parametrize( - "parse_mode,data,result", + "values,names", [ - [None, {}, None], - ["HTML", {}, "HTML"], - ["Markdown", {}, "Markdown"], - [None, {"parse_mode": "HTML"}, "HTML"], - ["HTML", {"parse_mode": "HTML"}, "HTML"], - ["Markdown", {"parse_mode": "HTML"}, "HTML"], + [{}, set()], + [{"foo": "bar"}, {"foo"}], + [{"foo": "bar", "baz": sentinel.DEFAULT}, {"foo"}], ], ) - async def test_default_parse_mode( - self, bot: MockedBot, parse_mode: str, data: Dict[str, str], result: Optional[str] - ): - async with Bot(token="42:TEST", parse_mode=parse_mode).context() as bot: - assert bot.parse_mode == parse_mode - prepare_parse_mode(bot, data) - assert data.get("parse_mode") == result + @pytest.mark.parametrize("obj", [TelegramMethod, TelegramObject]) + def test_remove_unset(self, values, names, obj): + validated = obj.remove_unset(values) + assert set(validated.keys()) == names - async def test_list(self): - data = [{}] * 2 - data.append({"parse_mode": "HTML"}) - bot = Bot(token="42:TEST", parse_mode="Markdown") - prepare_parse_mode(bot, data) + @pytest.mark.parametrize("obj", [TelegramMethod, TelegramObject]) + def test_remove_unset_non_dict(self, obj): + assert obj.remove_unset("") == "" - assert isinstance(data, list) - assert len(data) == 3 - assert all("parse_mode" in item for item in data) - assert data[0]["parse_mode"] == "Markdown" - assert data[1]["parse_mode"] == "Markdown" - assert data[2]["parse_mode"] == "HTML" - def test_bot_not_in_context(self, bot: MockedBot): - data = {} - prepare_parse_mode(bot, data) - assert data["parse_mode"] is None +class TestTelegramMethodCall: + async def test_async_emit_unsuccessful(self, bot: MockedBot): + with pytest.raises( + RuntimeError, + match="This method is not mounted to a any bot instance.+", + ): + await GetMe() + + async def test_async_emit(self, bot: MockedBot): + bot.add_result_for(GetMe, ok=True, result=User(id=42, is_bot=True, first_name="Test")) + method = GetMe().as_(bot) + assert isinstance(await method, User) diff --git a/tests/test_api/test_methods/test_close.py b/tests/test_api/test_methods/test_close.py index c6a84e31..fe2602e2 100644 --- a/tests/test_api/test_methods/test_close.py +++ b/tests/test_api/test_methods/test_close.py @@ -1,26 +1,11 @@ -import pytest - -from aiogram.methods import Close, Request +from aiogram.methods import Close from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestClose: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(Close, ok=True, result=True) - - response: bool = await Close() - request: Request = bot.get_request() - assert request.method == "close" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(Close, ok=True, result=True) response: bool = await bot.close() - request: Request = bot.get_request() - assert request.method == "close" - # assert request.data == {} + 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 new file mode 100644 index 00000000..527ed511 --- /dev/null +++ b/tests/test_api/test_methods/test_close_forum_topic.py @@ -0,0 +1,14 @@ +from aiogram.methods import CloseForumTopic +from tests.mocked_bot import MockedBot + + +class TestCloseForumTopic: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(CloseForumTopic, ok=True, result=True) + + response: bool = await bot.close_forum_topic( + chat_id=42, + message_thread_id=42, + ) + 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 new file mode 100644 index 00000000..45133499 --- /dev/null +++ b/tests/test_api/test_methods/test_close_general_forum_topic.py @@ -0,0 +1,11 @@ +from aiogram.methods import CloseGeneralForumTopic +from tests.mocked_bot import MockedBot + + +class TestCloseGeneralForumTopic: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(CloseGeneralForumTopic, ok=True, result=True) + + response: bool = await bot.close_general_forum_topic(chat_id=42) + 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 e844cede..f9425998 100644 --- a/tests/test_api/test_methods/test_copy_message.py +++ b/tests/test_api/test_methods/test_copy_message.py @@ -1,26 +1,9 @@ -import pytest - -from aiogram.methods import CopyMessage, Request +from aiogram.methods import CopyMessage from aiogram.types import MessageId from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestCopyMessage: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(CopyMessage, ok=True, result=MessageId(message_id=42)) - - response: MessageId = await CopyMessage( - chat_id=42, - from_chat_id=42, - message_id=42, - ) - request: Request = bot.get_request() - assert request.method == "copyMessage" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(CopyMessage, ok=True, result=MessageId(message_id=42)) @@ -29,7 +12,5 @@ class TestCopyMessage: from_chat_id=42, message_id=42, ) - request: Request = bot.get_request() - assert request.method == "copyMessage" - # assert request.data == {} + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_copy_messages.py b/tests/test_api/test_methods/test_copy_messages.py new file mode 100644 index 00000000..f24b95fb --- /dev/null +++ b/tests/test_api/test_methods/test_copy_messages.py @@ -0,0 +1,29 @@ +from random import randint + +from aiogram.methods import CopyMessages +from aiogram.types import MessageId +from tests.mocked_bot import MockedBot + + +class TestCopyMessages: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + CopyMessages, + ok=True, + result=[ + MessageId(message_id=randint(100, 200)), + MessageId(message_id=randint(300, 400)), + ], + ) + + response: list[MessageId] = await bot.copy_messages( + chat_id=randint(1000, 9999), + from_chat_id=randint(1000, 9999), + message_ids=[ + randint(1000, 4999), + randint(5000, 9999), + ], + ) + request = bot.get_request() + assert 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 c07c55bc..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,34 +1,9 @@ -import pytest - -from aiogram.methods import CreateChatInviteLink, Request +from aiogram.methods import CreateChatInviteLink from aiogram.types import ChatInviteLink, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestCreateChatInviteLink: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - CreateChatInviteLink, - 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 CreateChatInviteLink( - chat_id=-42, - ) - request: Request = bot.get_request() - assert request.method == "createChatInviteLink" - # assert request.data == {"chat_id": -42} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( CreateChatInviteLink, @@ -45,7 +20,5 @@ class TestCreateChatInviteLink: response: ChatInviteLink = await bot.create_chat_invite_link( chat_id=-42, ) - request: Request = bot.get_request() - assert request.method == "createChatInviteLink" - # assert request.data == {"chat_id": -42} + 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 new file mode 100644 index 00000000..23e7ea87 --- /dev/null +++ b/tests/test_api/test_methods/test_create_forum_topic.py @@ -0,0 +1,19 @@ +from aiogram.methods import CreateForumTopic +from aiogram.types import ForumTopic +from tests.mocked_bot import MockedBot + + +class TestCreateForumTopic: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + CreateForumTopic, + ok=True, + result=ForumTopic(message_thread_id=42, name="test", icon_color=0xFFD67E), + ) + + response: ForumTopic = await bot.create_forum_topic( + chat_id=42, + name="test", + ) + 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 new file mode 100644 index 00000000..9de395a4 --- /dev/null +++ b/tests/test_api/test_methods/test_create_invoice_link.py @@ -0,0 +1,21 @@ +from aiogram.methods import CreateInvoiceLink +from aiogram.types import LabeledPrice +from tests.mocked_bot import MockedBot + + +class TestCreateInvoiceLink: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + CreateInvoiceLink, ok=True, result="https://t.me/invoice/example" + ) + + response: str = await bot.create_invoice_link( + title="test", + description="test", + payload="test", + provider_token="test", + currency="BTC", + prices=[LabeledPrice(label="Test", amount=1)], + ) + 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 4c927b77..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,28 +1,24 @@ -import pytest - -from aiogram.methods import CreateNewStickerSet, Request +from aiogram.enums import StickerFormat +from aiogram.methods import CreateNewStickerSet +from aiogram.types import FSInputFile, InputSticker from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestCreateNewStickerSet: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(CreateNewStickerSet, ok=True, result=True) - - response: bool = await CreateNewStickerSet( - user_id=42, name="name", title="title", png_sticker="file id", emojis=":)" - ) - request: Request = bot.get_request() - assert request.method == "createNewStickerSet" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(CreateNewStickerSet, ok=True, result=True) response: bool = await bot.create_new_sticker_set( - user_id=42, name="name", title="title", png_sticker="file id", emojis=":)" + user_id=42, + name="name", + title="title", + stickers=[ + InputSticker(sticker="file id", format=StickerFormat.STATIC, emoji_list=[":)"]), + InputSticker( + sticker=FSInputFile("file.png"), format=StickerFormat.STATIC, emoji_list=["=("] + ), + ], + sticker_format=StickerFormat.STATIC, ) - request: Request = bot.get_request() - assert request.method == "createNewStickerSet" + 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 old mode 100644 new mode 100755 index e6e60ca5..5a5cf4a5 --- 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,23 +1,8 @@ -import pytest - -from aiogram.methods import DeclineChatJoinRequest, Request +from aiogram.methods import DeclineChatJoinRequest from tests.mocked_bot import MockedBot class TestDeclineChatJoinRequest: - @pytest.mark.asyncio - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(DeclineChatJoinRequest, ok=True, result=True) - - response: bool = await DeclineChatJoinRequest( - chat_id=-42, - user_id=42, - ) - request: Request = bot.get_request() - assert request.method == "declineChatJoinRequest" - assert response == prepare_result.result - - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeclineChatJoinRequest, ok=True, result=True) @@ -25,6 +10,5 @@ class TestDeclineChatJoinRequest: chat_id=-42, user_id=42, ) - request: Request = bot.get_request() - assert request.method == "declineChatJoinRequest" + 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 0f528775..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,24 +1,11 @@ -import pytest - -from aiogram.methods import DeleteChatPhoto, Request +from aiogram.methods import DeleteChatPhoto from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteChatPhoto: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(DeleteChatPhoto, ok=True, result=True) - - response: bool = await DeleteChatPhoto(chat_id=42) - request: Request = bot.get_request() - assert request.method == "deleteChatPhoto" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteChatPhoto, ok=True, result=True) response: bool = await bot.delete_chat_photo(chat_id=42) - request: Request = bot.get_request() - assert request.method == "deleteChatPhoto" + 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 8fdb7b84..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,24 +1,11 @@ -import pytest - -from aiogram.methods import DeleteChatStickerSet, Request +from aiogram.methods import DeleteChatStickerSet from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteChatStickerSet: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(DeleteChatStickerSet, ok=True, result=True) - - response: bool = await DeleteChatStickerSet(chat_id=42) - request: Request = bot.get_request() - assert request.method == "deleteChatStickerSet" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteChatStickerSet, ok=True, result=True) response: bool = await bot.delete_chat_sticker_set(chat_id=42) - request: Request = bot.get_request() - assert request.method == "deleteChatStickerSet" + 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 new file mode 100644 index 00000000..9af1b271 --- /dev/null +++ b/tests/test_api/test_methods/test_delete_forum_topic.py @@ -0,0 +1,14 @@ +from aiogram.methods import DeleteForumTopic +from tests.mocked_bot import MockedBot + + +class TestDeleteForumTopic: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(DeleteForumTopic, ok=True, result=True) + + response: bool = await bot.delete_forum_topic( + chat_id=42, + message_thread_id=42, + ) + 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 ecceb6dd..e8531e34 100644 --- a/tests/test_api/test_methods/test_delete_message.py +++ b/tests/test_api/test_methods/test_delete_message.py @@ -1,24 +1,11 @@ -import pytest - -from aiogram.methods import DeleteMessage, Request +from aiogram.methods import DeleteMessage from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteMessage: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(DeleteMessage, ok=True, result=True) - - response: bool = await DeleteMessage(chat_id=42, message_id=42) - request: Request = bot.get_request() - assert request.method == "deleteMessage" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteMessage, ok=True, result=True) response: bool = await bot.delete_message(chat_id=42, message_id=42) - request: Request = bot.get_request() - assert request.method == "deleteMessage" + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_messages.py b/tests/test_api/test_methods/test_delete_messages.py new file mode 100644 index 00000000..fba51ec6 --- /dev/null +++ b/tests/test_api/test_methods/test_delete_messages.py @@ -0,0 +1,19 @@ +from aiogram.methods import DeleteMessages +from tests.mocked_bot import MockedBot + + +class TestDeleteMessages: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + DeleteMessages, + ok=True, + result=True, + ) + + response: bool = await bot.delete_messages( + chat_id=42, + message_ids=[13, 77], + ) + request = bot.get_request() + assert 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 14d36381..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,24 +1,11 @@ -import pytest - -from aiogram.methods import DeleteMyCommands, Request +from aiogram.methods import DeleteMyCommands from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestKickChatMember: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(DeleteMyCommands, ok=True, result=True) - - response: bool = await DeleteMyCommands() - request: Request = bot.get_request() - assert request.method == "deleteMyCommands" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteMyCommands, ok=True, result=True) response: bool = await bot.delete_my_commands() - request: Request = bot.get_request() - assert request.method == "deleteMyCommands" + 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 c17a5493..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,24 +1,11 @@ -import pytest - -from aiogram.methods import DeleteStickerFromSet, Request +from aiogram.methods import DeleteStickerFromSet from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteStickerFromSet: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(DeleteStickerFromSet, ok=True, result=True) - - response: bool = await DeleteStickerFromSet(sticker="sticker id") - request: Request = bot.get_request() - assert request.method == "deleteStickerFromSet" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteStickerFromSet, ok=True, result=True) response: bool = await bot.delete_sticker_from_set(sticker="sticker id") - request: Request = bot.get_request() - assert request.method == "deleteStickerFromSet" + 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 new file mode 100644 index 00000000..2f7fd06d --- /dev/null +++ b/tests/test_api/test_methods/test_delete_sticker_set.py @@ -0,0 +1,11 @@ +from aiogram.methods import DeleteStickerSet +from tests.mocked_bot import MockedBot + + +class TestDeleteStickerSet: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(DeleteStickerSet, ok=True, result=True) + + response: bool = await bot.delete_sticker_set(name="test") + 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 21c0fcf7..713302da 100644 --- a/tests/test_api/test_methods/test_delete_webhook.py +++ b/tests/test_api/test_methods/test_delete_webhook.py @@ -1,24 +1,11 @@ -import pytest - -from aiogram.methods import DeleteWebhook, Request +from aiogram.methods import DeleteWebhook from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteWebhook: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(DeleteWebhook, ok=True, result=True) - - response: bool = await DeleteWebhook() - request: Request = bot.get_request() - assert request.method == "deleteWebhook" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteWebhook, ok=True, result=True) response: bool = await bot.delete_webhook() - request: Request = bot.get_request() - assert request.method == "deleteWebhook" + 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 a1fd6a10..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,33 +1,9 @@ -import pytest - -from aiogram.methods import EditChatInviteLink, Request +from aiogram.methods import EditChatInviteLink from aiogram.types import ChatInviteLink, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditChatInviteLink: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - EditChatInviteLink, - ok=True, - result=ChatInviteLink( - invite_link="https://t.me/username2", - creator=User(id=42, is_bot=False, first_name="User"), - is_primary=False, - is_revoked=False, - creates_join_request=False, - ), - ) - - response: ChatInviteLink = await EditChatInviteLink( - chat_id=-42, invite_link="https://t.me/username", member_limit=1 - ) - request: Request = bot.get_request() - assert request.method == "editChatInviteLink" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( EditChatInviteLink, @@ -44,6 +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: Request = bot.get_request() - assert request.method == "editChatInviteLink" + 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 new file mode 100644 index 00000000..d68945b8 --- /dev/null +++ b/tests/test_api/test_methods/test_edit_forum_topic.py @@ -0,0 +1,16 @@ +from aiogram.methods import EditForumTopic +from tests.mocked_bot import MockedBot + + +class TestEditForumTopic: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(EditForumTopic, ok=True, result=True) + + response: bool = await bot.edit_forum_topic( + chat_id=42, + message_thread_id=42, + name="test", + icon_custom_emoji_id="0", + ) + 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 new file mode 100644 index 00000000..ff4e8493 --- /dev/null +++ b/tests/test_api/test_methods/test_edit_general_forum_topic.py @@ -0,0 +1,11 @@ +from aiogram.methods import EditGeneralForumTopic +from tests.mocked_bot import MockedBot + + +class TestCloseGeneralForumTopic: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(EditGeneralForumTopic, ok=True, result=True) + + response: bool = await bot.edit_general_forum_topic(chat_id=42, name="Test") + 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 a3afef46..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,33 +1,11 @@ import datetime -from typing import Union -import pytest - -from aiogram.methods import EditMessageCaption, Request +from aiogram.methods import EditMessageCaption from aiogram.types import Chat, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageCaption: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - EditMessageCaption, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - text="text", - chat=Chat(id=42, type="private"), - ), - ) - - response: Union[Message, bool] = await EditMessageCaption() - request: Request = bot.get_request() - assert request.method == "editMessageCaption" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( EditMessageCaption, @@ -40,7 +18,6 @@ class TestEditMessageCaption: ), ) - response: Union[Message, bool] = await bot.edit_message_caption() - request: Request = bot.get_request() - assert request.method == "editMessageCaption" + 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 32f19b2f..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,31 +1,14 @@ -from typing import Union - -import pytest - -from aiogram.methods import EditMessageLiveLocation, Request +from aiogram.methods import EditMessageLiveLocation from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageLiveLocation: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(EditMessageLiveLocation, ok=True, result=True) - - response: Union[Message, bool] = await EditMessageLiveLocation( - latitude=3.141592, longitude=3.141592 - ) - request: Request = bot.get_request() - assert request.method == "editMessageLiveLocation" - assert response == prepare_result.result - 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: Request = bot.get_request() - assert request.method == "editMessageLiveLocation" + 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 bc60e4d5..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,31 +1,14 @@ -from typing import Union - -import pytest - -from aiogram.methods import EditMessageMedia, Request +from aiogram.methods import EditMessageMedia from aiogram.types import BufferedInputFile, InputMediaPhoto, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageMedia: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(EditMessageMedia, ok=True, result=True) - - response: Union[Message, bool] = await EditMessageMedia( - media=InputMediaPhoto(media=BufferedInputFile(b"", "photo.png")) - ) - request: Request = bot.get_request() - assert request.method == "editMessageMedia" - assert response == prepare_result.result - 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: Request = bot.get_request() - assert request.method == "editMessageMedia" + 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 71a1f823..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,35 +1,13 @@ -from typing import Union - -import pytest - -from aiogram.methods import EditMessageReplyMarkup, Request +from aiogram.methods import EditMessageReplyMarkup from aiogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageReplyMarkup: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(EditMessageReplyMarkup, ok=True, result=True) - - response: Union[Message, bool] = await EditMessageReplyMarkup( - chat_id=42, - inline_message_id="inline message id", - reply_markup=InlineKeyboardMarkup( - inline_keyboard=[ - [InlineKeyboardButton(text="button", callback_data="placeholder")] - ] - ), - ) - request: Request = bot.get_request() - assert request.method == "editMessageReplyMarkup" - assert response == prepare_result.result - 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( @@ -38,6 +16,5 @@ class TestEditMessageReplyMarkup: ] ), ) - request: Request = bot.get_request() - assert request.method == "editMessageReplyMarkup" + 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 5543f62c..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,31 +1,14 @@ -from typing import Union - -import pytest - -from aiogram.methods import EditMessageText, Request +from aiogram.methods import EditMessageText from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageText: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(EditMessageText, ok=True, result=True) - - response: Union[Message, bool] = await EditMessageText( - chat_id=42, inline_message_id="inline message id", text="text" - ) - request: Request = bot.get_request() - assert request.method == "editMessageText" - assert response == prepare_result.result - 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: Request = bot.get_request() - assert request.method == "editMessageText" + 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 fc8b4f13..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,28 +1,13 @@ -import pytest - -from aiogram.methods import ExportChatInviteLink, Request +from aiogram.methods import ExportChatInviteLink from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestExportChatInviteLink: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - ExportChatInviteLink, ok=True, result="http://example.com" - ) - - response: str = await ExportChatInviteLink(chat_id=42) - request: Request = bot.get_request() - assert request.method == "exportChatInviteLink" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( ExportChatInviteLink, ok=True, result="http://example.com" ) response: str = await bot.export_chat_invite_link(chat_id=42) - request: Request = bot.get_request() - assert request.method == "exportChatInviteLink" + 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 94dfdf60..9b010a42 100644 --- a/tests/test_api/test_methods/test_forward_message.py +++ b/tests/test_api/test_methods/test_forward_message.py @@ -1,33 +1,11 @@ import datetime -import pytest - -from aiogram.methods import ForwardMessage, Request +from aiogram.methods import ForwardMessage from aiogram.types import Chat, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestForwardMessage: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - ForwardMessage, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - chat=Chat(id=42, title="chat", type="private"), - text="text", - ), - ) - - response: Message = await ForwardMessage(chat_id=42, from_chat_id=42, message_id=42) - request: Request = bot.get_request() - assert request.method == "forwardMessage" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( ForwardMessage, @@ -41,7 +19,6 @@ class TestForwardMessage: ) response: Message = await bot.forward_message(chat_id=42, from_chat_id=42, message_id=42) - request: Request = bot.get_request() - assert request.method == "forwardMessage" - # assert request.data == {} + request = bot.get_request() + assert request assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_forward_messages.py b/tests/test_api/test_methods/test_forward_messages.py new file mode 100644 index 00000000..2d431bb3 --- /dev/null +++ b/tests/test_api/test_methods/test_forward_messages.py @@ -0,0 +1,29 @@ +from random import randint + +from aiogram.methods import ForwardMessages +from aiogram.types import MessageId +from tests.mocked_bot import MockedBot + + +class TestForwardMessages: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + ForwardMessages, + ok=True, + result=[ + MessageId(message_id=randint(100, 200)), + MessageId(message_id=randint(200, 300)), + ], + ) + + response: list[MessageId] = await bot.forward_messages( + chat_id=randint(10, 50), + from_chat_id=randint(50, 99), + message_ids=[ + randint(400, 500), + randint(600, 700), + ], + ) + request = bot.get_request() + assert request + assert response == prepare_result.result 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 new file mode 100644 index 00000000..99bf1ba0 --- /dev/null +++ b/tests/test_api/test_methods/test_get_business_connection.py @@ -0,0 +1,24 @@ +from aiogram.methods import GetBusinessConnection +from aiogram.types import BusinessConnection, User +from tests.mocked_bot import MockedBot + + +class TestGetBusinessConnection: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetBusinessConnection, + ok=True, + result=BusinessConnection( + id="test", + user=User(id=42, is_bot=False, first_name="User"), + user_chat_id=42, + date=42, + can_reply=True, + is_enabled=True, + ), + ) + response: BusinessConnection = await bot.get_business_connection( + business_connection_id="test" + ) + 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 f5117d11..f02aa2e0 100644 --- a/tests/test_api/test_methods/test_get_chat.py +++ b/tests/test_api/test_methods/test_get_chat.py @@ -1,29 +1,29 @@ -import pytest - -from aiogram.methods import GetChat, Request -from aiogram.types import Chat +from aiogram.methods import GetChat +from aiogram.types import AcceptedGiftTypes, ChatFullInfo from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetChat: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetChat, ok=True, result=Chat(id=-42, type="channel", title="chat") - ) - - response: Chat = await GetChat(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "getChat" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( - GetChat, ok=True, result=Chat(id=-42, type="channel", title="chat") + GetChat, + ok=True, + result=ChatFullInfo( + id=-42, + type="channel", + 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: Chat = await bot.get_chat(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "getChat" + response: ChatFullInfo = await bot.get_chat(chat_id=-42) + 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 e254d34e..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,31 +1,9 @@ -from typing import List - -import pytest - -from aiogram.methods import GetChatAdministrators, Request +from aiogram.methods import GetChatAdministrators from aiogram.types import ChatMember, ChatMemberOwner, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetChatAdministrators: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetChatAdministrators, - ok=True, - result=[ - ChatMemberOwner( - user=User(id=42, is_bot=False, first_name="User"), is_anonymous=False - ) - ], - ) - - response: List[ChatMember] = await GetChatAdministrators(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "getChatAdministrators" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetChatAdministrators, @@ -36,7 +14,6 @@ class TestGetChatAdministrators: ) ], ) - response: List[ChatMember] = await bot.get_chat_administrators(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "getChatAdministrators" + 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 35dc98bd..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,27 +1,9 @@ -import pytest - -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 -pytestmark = pytest.mark.asyncio - class TestGetChatMember: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetChatMember, - ok=True, - result=ChatMemberOwner( - user=User(id=42, is_bot=False, first_name="User"), is_anonymous=False - ), - ) - - response: ChatMember = await GetChatMember(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "getChatMember" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetChatMember, @@ -30,8 +12,6 @@ class TestGetChatMember: user=User(id=42, is_bot=False, first_name="User"), is_anonymous=False ), ) - - response: ChatMember = await bot.get_chat_member(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "getChatMember" + response = await bot.get_chat_member(chat_id=-42, user_id=42) + 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 e0fd1a4a..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,24 +1,11 @@ -import pytest - -from aiogram.methods import GetChatMemberCount, Request +from aiogram.methods import GetChatMemberCount from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetChatMembersCount: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(GetChatMemberCount, ok=True, result=42) - - response: int = await GetChatMemberCount(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "getChatMemberCount" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetChatMemberCount, ok=True, result=42) response: int = await bot.get_chat_member_count(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "getChatMemberCount" + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_chat_members_count.py b/tests/test_api/test_methods/test_get_chat_members_count.py deleted file mode 100644 index cd44a13a..00000000 --- a/tests/test_api/test_methods/test_get_chat_members_count.py +++ /dev/null @@ -1,24 +0,0 @@ -import pytest - -from aiogram.methods import GetChatMembersCount, Request -from tests.mocked_bot import MockedBot - -pytestmark = pytest.mark.asyncio - - -class TestGetChatMembersCount: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(GetChatMembersCount, ok=True, result=42) - - response: int = await GetChatMembersCount(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "getChatMembersCount" - assert response == prepare_result.result - - async def test_bot_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(GetChatMembersCount, ok=True, result=42) - - response: int = await bot.get_chat_members_count(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "getChatMembersCount" - 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 new file mode 100644 index 00000000..dbfb0285 --- /dev/null +++ b/tests/test_api/test_methods/test_get_chat_menu_button.py @@ -0,0 +1,12 @@ +from aiogram.methods import GetChatMenuButton +from aiogram.types import MenuButton, MenuButtonDefault +from tests.mocked_bot import MockedBot + + +class TestGetChatMenuButton: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(GetChatMenuButton, ok=True, result=MenuButtonDefault()) + + response: MenuButton = await bot.get_chat_menu_button() + 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 new file mode 100644 index 00000000..c29a0852 --- /dev/null +++ b/tests/test_api/test_methods/test_get_custom_emoji_stickers.py @@ -0,0 +1,29 @@ +from aiogram.methods import GetCustomEmojiStickers +from aiogram.types import Sticker +from tests.mocked_bot import MockedBot + + +class TestGetCustomEmojiStickers: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetCustomEmojiStickers, + ok=True, + result=[ + Sticker( + file_id="file id", + width=42, + height=42, + is_animated=False, + is_video=False, + file_unique_id="file id", + custom_emoji_id="1", + type="custom_emoji", + ) + ], + ) + + response: list[Sticker] = await bot.get_custom_emoji_stickers( + custom_emoji_ids=["1", "2"], + ) + 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 38923a6e..71a85e2c 100644 --- a/tests/test_api/test_methods/test_get_file.py +++ b/tests/test_api/test_methods/test_get_file.py @@ -1,29 +1,14 @@ -import pytest - -from aiogram.methods import GetFile, Request +from aiogram.methods import GetFile from aiogram.types import File from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetFile: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetFile, ok=True, result=File(file_id="file id", file_unique_id="file id") - ) - - response: File = await GetFile(file_id="file id") - request: Request = bot.get_request() - assert request.method == "getFile" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetFile, ok=True, result=File(file_id="file id", file_unique_id="file id") ) response: File = await bot.get_file(file_id="file id") - request: Request = bot.get_request() - assert request.method == "getFile" + 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 new file mode 100644 index 00000000..4e798113 --- /dev/null +++ b/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py @@ -0,0 +1,12 @@ +from aiogram.methods import GetForumTopicIconStickers +from aiogram.types import Sticker +from tests.mocked_bot import MockedBot + + +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() + 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 bc2c7116..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,31 +1,9 @@ -from typing import List - -import pytest - -from aiogram.methods import GetGameHighScores, Request +from aiogram.methods import GetGameHighScores from aiogram.types import GameHighScore, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetGameHighScores: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetGameHighScores, - ok=True, - result=[ - GameHighScore( - position=1, user=User(id=42, is_bot=False, first_name="User"), score=42 - ) - ], - ) - - response: List[GameHighScore] = await GetGameHighScores(user_id=42) - request: Request = bot.get_request() - assert request.method == "getGameHighScores" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetGameHighScores, @@ -37,7 +15,6 @@ class TestGetGameHighScores: ], ) - response: List[GameHighScore] = await bot.get_game_high_scores(user_id=42) - request: Request = bot.get_request() - assert request.method == "getGameHighScores" + 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 ba51e6a6..ab86adce 100644 --- a/tests/test_api/test_methods/test_get_me.py +++ b/tests/test_api/test_methods/test_get_me.py @@ -1,32 +1,15 @@ -import pytest - -from aiogram.methods import GetMe, Request +from aiogram.methods import GetMe from aiogram.types import User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetMe: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetMe, ok=True, result=User(id=42, is_bot=False, first_name="User") - ) - - response: User = await GetMe() - request: Request = bot.get_request() - assert request.method == "getMe" - assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetMe, ok=True, result=User(id=42, is_bot=False, first_name="User") ) response: User = await bot.get_me() - request: Request = bot.get_request() - assert request.method == "getMe" - assert request.data == {} + 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 a28ef026..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,27 +1,12 @@ -from typing import List - -import pytest - -from aiogram.methods import GetMyCommands, Request +from aiogram.methods import GetMyCommands from aiogram.types import BotCommand from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetMyCommands: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(GetMyCommands, ok=True, result=None) - - response: List[BotCommand] = await GetMyCommands() - request: Request = bot.get_request() - assert request.method == "getMyCommands" - assert response == prepare_result.result - 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: Request = bot.get_request() - assert request.method == "getMyCommands" + 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 new file mode 100644 index 00000000..75136c05 --- /dev/null +++ b/tests/test_api/test_methods/test_get_my_default_administrator_rights.py @@ -0,0 +1,28 @@ +from aiogram.methods import GetMyDefaultAdministratorRights +from aiogram.types import ChatAdministratorRights +from tests.mocked_bot import MockedBot + + +class TestGetMyDefaultAdministratorRights: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetMyDefaultAdministratorRights, + ok=True, + result=ChatAdministratorRights( + is_anonymous=False, + can_manage_chat=False, + can_delete_messages=False, + can_manage_video_chats=False, + can_restrict_members=False, + can_promote_members=False, + can_change_info=False, + can_invite_users=False, + can_post_stories=False, + can_edit_stories=False, + can_delete_stories=False, + ), + ) + + response: ChatAdministratorRights = await bot.get_my_default_administrator_rights() + 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 new file mode 100644 index 00000000..9c08631a --- /dev/null +++ b/tests/test_api/test_methods/test_get_my_description.py @@ -0,0 +1,14 @@ +from aiogram.methods import GetMyDescription +from aiogram.types import BotDescription +from tests.mocked_bot import MockedBot + + +class TestGetMyDescription: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetMyDescription, ok=True, result=BotDescription(description="Test") + ) + + response: BotDescription = await bot.get_my_description() + 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 new file mode 100644 index 00000000..7ecb8f86 --- /dev/null +++ b/tests/test_api/test_methods/test_get_my_name.py @@ -0,0 +1,11 @@ +from aiogram.methods import GetMyName +from aiogram.types import BotName +from tests.mocked_bot import MockedBot + + +class TestGetMyName: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(GetMyName, ok=True, result=BotName(name="Test")) + + response: BotName = await bot.get_my_name() + assert response == prepare_result.result 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 new file mode 100644 index 00000000..7f155a45 --- /dev/null +++ b/tests/test_api/test_methods/test_get_my_short_description.py @@ -0,0 +1,14 @@ +from aiogram.methods import GetMyShortDescription +from aiogram.types import BotShortDescription +from tests.mocked_bot import MockedBot + + +class TestGetMyShortDescription: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetMyShortDescription, ok=True, result=BotShortDescription(short_description="Test") + ) + + response: BotShortDescription = await bot.get_my_short_description() + 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 new file mode 100644 index 00000000..9429f12f --- /dev/null +++ b/tests/test_api/test_methods/test_get_star_transactions.py @@ -0,0 +1,48 @@ +from datetime import datetime + +from aiogram.enums import TransactionPartnerUserTransactionTypeEnum +from aiogram.methods import GetStarTransactions +from aiogram.types import ( + StarTransaction, + StarTransactions, + TransactionPartnerUser, + User, +) +from tests.mocked_bot import MockedBot + + +class TestGetStarTransactions: + async def test_bot_method(self, bot: MockedBot): + user = User(id=42, is_bot=False, first_name="Test") + prepare_result = bot.add_result_for( + GetStarTransactions, + ok=True, + result=StarTransactions( + transactions=[ + StarTransaction( + id="test1", + user=user, + amount=1, + date=datetime.now(), + source=TransactionPartnerUser( + user=user, + transaction_type=TransactionPartnerUserTransactionTypeEnum.GIFT_PURCHASE, + ), + ), + StarTransaction( + id="test2", + user=user, + amount=1, + date=datetime.now(), + receiver=TransactionPartnerUser( + user=user, + transaction_type=TransactionPartnerUserTransactionTypeEnum.GIFT_PURCHASE, + ), + ), + ] + ), + ) + + 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 baed1d40..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,39 +1,9 @@ -import pytest - -from aiogram.methods import GetStickerSet, Request +from aiogram.methods import GetStickerSet from aiogram.types import Sticker, StickerSet from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetStickerSet: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetStickerSet, - ok=True, - result=StickerSet( - name="test", - title="test", - is_animated=False, - contains_masks=False, - stickers=[ - Sticker( - file_id="file if", - width=42, - height=42, - is_animated=False, - file_unique_id="file id", - ) - ], - ), - ) - - response: StickerSet = await GetStickerSet(name="test") - request: Request = bot.get_request() - assert request.method == "getStickerSet" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetStickerSet, @@ -42,20 +12,22 @@ class TestGetStickerSet: name="test", title="test", is_animated=False, - contains_masks=False, + is_video=False, stickers=[ Sticker( file_id="file if", width=42, height=42, is_animated=False, + is_video=False, file_unique_id="file id", + type="regular", ) ], + sticker_type="regular", ), ) response: StickerSet = await bot.get_sticker_set(name="test") - request: Request = bot.get_request() - assert request.method == "getStickerSet" + 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 8f8dfa87..7033c616 100644 --- a/tests/test_api/test_methods/test_get_updates.py +++ b/tests/test_api/test_methods/test_get_updates.py @@ -1,27 +1,12 @@ -from typing import List - -import pytest - -from aiogram.methods import GetUpdates, Request +from aiogram.methods import GetUpdates from aiogram.types import Update from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetUpdates: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(GetUpdates, ok=True, result=[Update(update_id=42)]) - - response: List[Update] = await GetUpdates() - request: Request = bot.get_request() - assert request.method == "getUpdates" - assert response == prepare_result.result - 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: Request = bot.get_request() - assert request.method == "getUpdates" + 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 76b24200..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,16 +25,15 @@ 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 fake_message = Message( @@ -47,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_chat_boosts.py b/tests/test_api/test_methods/test_get_user_chat_boosts.py new file mode 100644 index 00000000..be261159 --- /dev/null +++ b/tests/test_api/test_methods/test_get_user_chat_boosts.py @@ -0,0 +1,52 @@ +from datetime import datetime, timedelta +from random import randint + +from aiogram.methods import GetUserChatBoosts +from aiogram.types import ( + ChatBoost, + ChatBoostSourceGiveaway, + ChatBoostSourcePremium, + User, + UserChatBoosts, +) +from tests.mocked_bot import MockedBot + + +class TestGetUserChatBoosts: + async def test_bot_method(self, bot: MockedBot): + now = datetime.now() + user = User( + id=randint(200, 500), + is_bot=False, + first_name="name", + ) + prepare_result = bot.add_result_for( + GetUserChatBoosts, + ok=True, + result=UserChatBoosts( + boosts=[ + ChatBoost( + boost_id="eggs", + add_date=now - timedelta(days=7), + expiration_date=now + timedelta(days=14), + source=ChatBoostSourceGiveaway( + giveaway_message_id=randint(100, 300), + ), + ), + ChatBoost( + boost_id="spam", + add_date=now - timedelta(days=3), + expiration_date=now + timedelta(days=21), + source=ChatBoostSourcePremium(user=user), + ), + ] + ), + ) + + response: UserChatBoosts = await bot.get_user_chat_boosts( + chat_id=randint(100, 200), + user_id=user.id, + ) + request = bot.get_request() + assert request + assert response == prepare_result.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 d6094eb9..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,30 +1,9 @@ -import pytest - -from aiogram.methods import GetUserProfilePhotos, Request +from aiogram.methods import GetUserProfilePhotos from aiogram.types import PhotoSize, UserProfilePhotos from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetUserProfilePhotos: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetUserProfilePhotos, - ok=True, - result=UserProfilePhotos( - total_count=1, - photos=[ - [PhotoSize(file_id="file_id", width=42, height=42, file_unique_id="file id")] - ], - ), - ) - - response: UserProfilePhotos = await GetUserProfilePhotos(user_id=42) - request: Request = bot.get_request() - assert request.method == "getUserProfilePhotos" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetUserProfilePhotos, @@ -38,6 +17,5 @@ class TestGetUserProfilePhotos: ) response: UserProfilePhotos = await bot.get_user_profile_photos(user_id=42) - request: Request = bot.get_request() - assert request.method == "getUserProfilePhotos" + 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 f50213cb..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,27 +1,9 @@ -import pytest - -from aiogram.methods import GetWebhookInfo, Request +from aiogram.methods import GetWebhookInfo from aiogram.types import WebhookInfo from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetWebhookInfo: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetWebhookInfo, - ok=True, - result=WebhookInfo( - url="https://example.com", has_custom_certificate=False, pending_update_count=0 - ), - ) - - response: WebhookInfo = await GetWebhookInfo() - request: Request = bot.get_request() - assert request.method == "getWebhookInfo" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetWebhookInfo, @@ -32,6 +14,5 @@ class TestGetWebhookInfo: ) response: WebhookInfo = await bot.get_webhook_info() - request: Request = bot.get_request() - assert request.method == "getWebhookInfo" + 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 new file mode 100644 index 00000000..259fe03b --- /dev/null +++ b/tests/test_api/test_methods/test_hide_general_forum_topic.py @@ -0,0 +1,11 @@ +from aiogram.methods import HideGeneralForumTopic +from tests.mocked_bot import MockedBot + + +class TestHideGeneralForumTopic: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(HideGeneralForumTopic, ok=True, result=True) + + response: bool = await bot.hide_general_forum_topic(chat_id=42) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_kick_chat_member.py b/tests/test_api/test_methods/test_kick_chat_member.py deleted file mode 100644 index 4aaa651b..00000000 --- a/tests/test_api/test_methods/test_kick_chat_member.py +++ /dev/null @@ -1,24 +0,0 @@ -import pytest - -from aiogram.methods import KickChatMember, Request -from tests.mocked_bot import MockedBot - -pytestmark = pytest.mark.asyncio - - -class TestKickChatMember: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(KickChatMember, ok=True, result=True) - - response: bool = await KickChatMember(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "kickChatMember" - assert response == prepare_result.result - - async def test_bot_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(KickChatMember, ok=True, result=True) - - response: bool = await bot.kick_chat_member(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "kickChatMember" - 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 77bf739f..fc4b33d2 100644 --- a/tests/test_api/test_methods/test_leave_chat.py +++ b/tests/test_api/test_methods/test_leave_chat.py @@ -1,24 +1,11 @@ -import pytest - -from aiogram.methods import LeaveChat, Request +from aiogram.methods import LeaveChat from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestLeaveChat: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(LeaveChat, ok=True, result=True) - - response: bool = await LeaveChat(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "leaveChat" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(LeaveChat, ok=True, result=True) response: bool = await bot.leave_chat(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "leaveChat" + 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 b472da50..0f1462e1 100644 --- a/tests/test_api/test_methods/test_log_out.py +++ b/tests/test_api/test_methods/test_log_out.py @@ -1,26 +1,11 @@ -import pytest - -from aiogram.methods import LogOut, Request +from aiogram.methods import LogOut from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestLogOut: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(LogOut, ok=True, result=True) - - response: bool = await LogOut() - request: Request = bot.get_request() - assert request.method == "logOut" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(LogOut, ok=True, result=True) response: bool = await bot.log_out() - request: Request = bot.get_request() - assert request.method == "logOut" - # assert request.data == {} + 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 59a2bf91..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,24 +1,11 @@ -import pytest - -from aiogram.methods import PinChatMessage, Request +from aiogram.methods import PinChatMessage from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestPinChatMessage: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(PinChatMessage, ok=True, result=True) - - response: bool = await PinChatMessage(chat_id=-42, message_id=42) - request: Request = bot.get_request() - assert request.method == "pinChatMessage" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): 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: Request = bot.get_request() - assert request.method == "pinChatMessage" + 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 20c796bd..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,24 +1,16 @@ -import pytest - -from aiogram.methods import PromoteChatMember, Request +from aiogram.methods import PromoteChatMember from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestPromoteChatMember: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(PromoteChatMember, ok=True, result=True) - - response: bool = await PromoteChatMember(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "promoteChatMember" - assert response == prepare_result.result - 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) - request: Request = bot.get_request() - assert request.method == "promoteChatMember" + 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 new file mode 100644 index 00000000..989d1cc4 --- /dev/null +++ b/tests/test_api/test_methods/test_refund_star_payment.py @@ -0,0 +1,14 @@ +from aiogram.methods import RefundStarPayment +from tests.mocked_bot import MockedBot + + +class TestRefundStarPayment: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(RefundStarPayment, ok=True, result=True) + + response: bool = await bot.refund_star_payment( + user_id=42, + telegram_payment_charge_id="12345", + ) + 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 new file mode 100644 index 00000000..b71c5484 --- /dev/null +++ b/tests/test_api/test_methods/test_reopen_forum_topic.py @@ -0,0 +1,14 @@ +from aiogram.methods import ReopenForumTopic +from tests.mocked_bot import MockedBot + + +class TestReopenForumTopic: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(ReopenForumTopic, ok=True, result=None) + + response: bool = await bot.reopen_forum_topic( + chat_id=42, + message_thread_id=42, + ) + 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 new file mode 100644 index 00000000..8e35855f --- /dev/null +++ b/tests/test_api/test_methods/test_reopen_general_forum_topic.py @@ -0,0 +1,11 @@ +from aiogram.methods import ReopenGeneralForumTopic +from tests.mocked_bot import MockedBot + + +class TestReopenGeneralForumTopic: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(ReopenGeneralForumTopic, ok=True, result=True) + + response: bool = await bot.reopen_general_forum_topic(chat_id=42) + 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 new file mode 100644 index 00000000..50e066bc --- /dev/null +++ b/tests/test_api/test_methods/test_replace_sticker_in_set.py @@ -0,0 +1,21 @@ +from aiogram.methods import ReplaceStickerInSet +from aiogram.types import InputSticker +from tests.mocked_bot import MockedBot + + +class TestReplaceStickerInSet: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(ReplaceStickerInSet, ok=True, result=True) + + response: bool = await bot.replace_sticker_in_set( + user_id=42, + name="test", + old_sticker="test", + sticker=InputSticker( + sticker="test", + format="static", + emoji_list=["test"], + ), + ) + 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 715d0c28..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,29 +1,14 @@ -import pytest - -from aiogram.methods import Request, RestrictChatMember +from aiogram.methods import RestrictChatMember from aiogram.types import ChatPermissions from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestRestrictChatMember: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(RestrictChatMember, ok=True, result=True) - - response: bool = await RestrictChatMember( - chat_id=-42, user_id=42, permissions=ChatPermissions() - ) - request: Request = bot.get_request() - assert request.method == "restrictChatMember" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(RestrictChatMember, ok=True, result=True) response: bool = await bot.restrict_chat_member( chat_id=-42, user_id=42, permissions=ChatPermissions() ) - request: Request = bot.get_request() - assert request.method == "restrictChatMember" + 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 b26b5d11..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,34 +1,9 @@ -import pytest - -from aiogram.methods import Request, RevokeChatInviteLink +from aiogram.methods import RevokeChatInviteLink from aiogram.types import ChatInviteLink, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestRevokeChatInviteLink: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - RevokeChatInviteLink, - 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=True, - creates_join_request=False, - ), - ) - - response: ChatInviteLink = await RevokeChatInviteLink( - chat_id=-42, - invite_link="https://t.me/username", - ) - request: Request = bot.get_request() - assert request.method == "revokeChatInviteLink" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( RevokeChatInviteLink, @@ -46,6 +21,5 @@ class TestRevokeChatInviteLink: chat_id=-42, invite_link="https://t.me/username", ) - request: Request = bot.get_request() - assert request.method == "revokeChatInviteLink" + 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 9a123f1a..9f08eb8c 100644 --- a/tests/test_api/test_methods/test_send_animation.py +++ b/tests/test_api/test_methods/test_send_animation.py @@ -1,34 +1,11 @@ import datetime -import pytest - -from aiogram.methods import Request, SendAnimation +from aiogram.methods import SendAnimation from aiogram.types import Animation, Chat, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendAnimation: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendAnimation, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - animation=Animation( - file_id="file id", width=42, height=42, duration=0, file_unique_id="file id" - ), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendAnimation(chat_id=42, animation="file id") - request: Request = bot.get_request() - assert request.method == "sendAnimation" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendAnimation, @@ -44,6 +21,5 @@ class TestSendAnimation: ) response: Message = await bot.send_animation(chat_id=42, animation="file id") - request: Request = bot.get_request() - assert request.method == "sendAnimation" + 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 77ad22f7..8ba52624 100644 --- a/tests/test_api/test_methods/test_send_audio.py +++ b/tests/test_api/test_methods/test_send_audio.py @@ -1,32 +1,11 @@ import datetime -import pytest - -from aiogram.methods import Request, SendAudio +from aiogram.methods import SendAudio from aiogram.types import Audio, Chat, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendAudio: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendAudio, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - audio=Audio(file_id="file id", duration=42, file_unique_id="file id"), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendAudio(chat_id=42, audio="file id") - request: Request = bot.get_request() - assert request.method == "sendAudio" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendAudio, @@ -40,6 +19,5 @@ class TestSendAudio: ) response: Message = await bot.send_audio(chat_id=42, audio="file id") - request: Request = bot.get_request() - assert request.method == "sendAudio" + 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 6b6454ae..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,24 +1,12 @@ -import pytest - -from aiogram.methods import Request, SendChatAction +from aiogram.enums import ChatAction +from aiogram.methods import SendChatAction from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendChatAction: - async def test_method(self, bot: MockedBot): + async def test_chat_action_class(self, bot: MockedBot): prepare_result = bot.add_result_for(SendChatAction, ok=True, result=True) - response: bool = await SendChatAction(chat_id=42, action="typing") - request: Request = bot.get_request() - assert request.method == "sendChatAction" - assert response == prepare_result.result - - async def test_bot_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SendChatAction, ok=True, result=True) - - response: bool = await bot.send_chat_action(chat_id=42, action="typing") - request: Request = bot.get_request() - assert request.method == "sendChatAction" + response: bool = await bot.send_chat_action(chat_id=42, action=ChatAction.TYPING) + 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 adfb697e..8cd1f1fc 100644 --- a/tests/test_api/test_methods/test_send_contact.py +++ b/tests/test_api/test_methods/test_send_contact.py @@ -1,32 +1,11 @@ import datetime -import pytest - -from aiogram.methods import Request, SendContact +from aiogram.methods import SendContact from aiogram.types import Chat, Contact, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendContact: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendContact, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - contact=Contact(phone_number="911", first_name="911"), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendContact(chat_id=42, phone_number="911", first_name="911") - request: Request = bot.get_request() - assert request.method == "sendContact" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendContact, @@ -42,6 +21,5 @@ class TestSendContact: response: Message = await bot.send_contact( chat_id=42, phone_number="911", first_name="911" ) - request: Request = bot.get_request() - assert request.method == "sendContact" + 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 80e618ac..00dcbdb9 100644 --- a/tests/test_api/test_methods/test_send_dice.py +++ b/tests/test_api/test_methods/test_send_dice.py @@ -1,25 +1,12 @@ -import pytest - -from aiogram.methods import Request, SendDice +from aiogram.methods import SendDice from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendDice: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SendDice, ok=True, result=None) - - response: Message = await SendDice(chat_id=42) - request: Request = bot.get_request() - assert request.method == "sendDice" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SendDice, ok=True, result=None) response: Message = await bot.send_dice(chat_id=42) - request: Request = bot.get_request() - assert request.method == "sendDice" + 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 106e1737..17dd9cf1 100644 --- a/tests/test_api/test_methods/test_send_document.py +++ b/tests/test_api/test_methods/test_send_document.py @@ -1,32 +1,11 @@ import datetime -import pytest - -from aiogram.methods import Request, SendDocument +from aiogram.methods import SendDocument from aiogram.types import Chat, Document, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendDocument: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendDocument, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - document=Document(file_id="file id", file_unique_id="file id"), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendDocument(chat_id=42, document="file id") - request: Request = bot.get_request() - assert request.method == "sendDocument" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendDocument, @@ -40,6 +19,5 @@ class TestSendDocument: ) response: Message = await bot.send_document(chat_id=42, document="file id") - request: Request = bot.get_request() - assert request.method == "sendDocument" + 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 fca6753c..dfe8d10f 100644 --- a/tests/test_api/test_methods/test_send_game.py +++ b/tests/test_api/test_methods/test_send_game.py @@ -1,38 +1,11 @@ import datetime -import pytest - -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 -pytestmark = pytest.mark.asyncio - class TestSendGame: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendGame, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - game=Game( - title="title", - description="description", - photo=[ - PhotoSize(file_id="file id", width=42, height=42, file_unique_id="file id") - ], - ), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendGame(chat_id=42, game_short_name="game") - request: Request = bot.get_request() - assert request.method == "sendGame" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendGame, @@ -52,6 +25,5 @@ class TestSendGame: ) response: Message = await bot.send_game(chat_id=42, game_short_name="game") - request: Request = bot.get_request() - assert request.method == "sendGame" + 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 6915fcc5..a079fe14 100644 --- a/tests/test_api/test_methods/test_send_invoice.py +++ b/tests/test_api/test_methods/test_send_invoice.py @@ -1,47 +1,11 @@ import datetime -import pytest - -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 -pytestmark = pytest.mark.asyncio - class TestSendInvoice: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendInvoice, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - invoice=Invoice( - title="test", - description="test", - start_parameter="brilliant", - currency="BTC", - total_amount=1, - ), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendInvoice( - chat_id=42, - title="test", - description="test", - payload="payload", - provider_token="TEST:token", - start_parameter="brilliant", - currency="BTC", - prices=[LabeledPrice(amount=1, label="test")], - ) - request: Request = bot.get_request() - assert request.method == "sendInvoice" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendInvoice, @@ -70,6 +34,5 @@ class TestSendInvoice: currency="BTC", prices=[LabeledPrice(amount=1, label="test")], ) - request: Request = bot.get_request() - assert request.method == "sendInvoice" + 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 0f42cf74..c6db81a5 100644 --- a/tests/test_api/test_methods/test_send_location.py +++ b/tests/test_api/test_methods/test_send_location.py @@ -1,32 +1,11 @@ import datetime -import pytest - -from aiogram.methods import Request, SendLocation +from aiogram.methods import SendLocation from aiogram.types import Chat, Location, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendLocation: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendLocation, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - location=Location(longitude=3.14, latitude=3.14), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendLocation(chat_id=42, latitude=3.14, longitude=3.14) - request: Request = bot.get_request() - assert request.method == "sendLocation" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendLocation, @@ -40,6 +19,5 @@ class TestSendLocation: ) response: Message = await bot.send_location(chat_id=42, latitude=3.14, longitude=3.14) - request: Request = bot.get_request() - assert request.method == "sendLocation" + 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 5b6dc3e1..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,9 +1,6 @@ import datetime -from typing import List -import pytest - -from aiogram.methods import Request, SendMediaGroup +from aiogram.methods import SendMediaGroup from aiogram.types import ( BufferedInputFile, Chat, @@ -15,51 +12,8 @@ from aiogram.types import ( ) from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendMediaGroup: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendMediaGroup, - ok=True, - result=[ - Message( - message_id=42, - date=datetime.datetime.now(), - photo=[ - PhotoSize(file_id="file id", width=42, height=42, file_unique_id="file id") - ], - media_group_id="media group", - chat=Chat(id=42, type="private"), - ), - Message( - message_id=43, - date=datetime.datetime.now(), - video=Video( - file_id="file id", - width=42, - height=42, - duration=0, - file_unique_id="file id", - ), - media_group_id="media group", - chat=Chat(id=42, type="private"), - ), - ], - ) - - response: List[Message] = await SendMediaGroup( - chat_id=42, - media=[ - InputMediaPhoto(media="file id"), - InputMediaVideo(media=BufferedInputFile(b"", "video.mp4")), - ], - ) - request: Request = bot.get_request() - assert request.method == "sendMediaGroup" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendMediaGroup, @@ -90,13 +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: Request = bot.get_request() - assert request.method == "sendMediaGroup" + 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 c2da672e..3a612148 100644 --- a/tests/test_api/test_methods/test_send_message.py +++ b/tests/test_api/test_methods/test_send_message.py @@ -1,32 +1,11 @@ import datetime -import pytest - -from aiogram.methods import Request, SendMessage -from aiogram.types import Chat, Message +from aiogram.methods import SendMessage +from aiogram.types import Chat, ForceReply, Message, ReplyKeyboardRemove from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendMessage: - async def test_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 SendMessage(chat_id=42, text="test") - request: Request = bot.get_request() - assert request.method == "sendMessage" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendMessage, @@ -40,6 +19,15 @@ class TestSendMessage: ) response: Message = await bot.send_message(chat_id=42, text="test") - request: Request = bot.get_request() - assert request.method == "sendMessage" + bot.get_request() assert response == prepare_result.result + + async def test_force_reply(self): + # https://github.com/aiogram/aiogram/issues/901 + method = SendMessage(text="test", chat_id=42, reply_markup=ForceReply()) + assert isinstance(method.reply_markup, ForceReply) + + async def test_reply_keyboard_remove(self): + # https://github.com/aiogram/aiogram/issues/901 + method = SendMessage(text="test", chat_id=42, reply_markup=ReplyKeyboardRemove()) + assert isinstance(method.reply_markup, ReplyKeyboardRemove) 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 new file mode 100755 index 00000000..0039d88a --- /dev/null +++ b/tests/test_api/test_methods/test_send_paid_media.py @@ -0,0 +1,43 @@ +import datetime + +from aiogram.methods import SendPaidMedia +from aiogram.types import ( + Chat, + InputPaidMediaPhoto, + Message, + PaidMediaInfo, + PaidMediaPhoto, + PhotoSize, +) +from tests.mocked_bot import MockedBot + + +class TestSendPaidMedia: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + SendPaidMedia, + ok=True, + result=Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + paid_media=PaidMediaInfo( + paid_media=[ + PaidMediaPhoto( + photo=[ + PhotoSize( + file_id="test", width=42, height=42, file_unique_id="test" + ) + ] + ) + ], + star_count=1, + ), + ), + ) + + response: Message = await bot.send_paid_media( + chat_id=-42, star_count=1, media=[InputPaidMediaPhoto(media="file_id")] + ) + 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 c55565f3..07eb2080 100644 --- a/tests/test_api/test_methods/test_send_photo.py +++ b/tests/test_api/test_methods/test_send_photo.py @@ -1,34 +1,11 @@ import datetime -import pytest - -from aiogram.methods import Request, SendPhoto +from aiogram.methods import SendPhoto from aiogram.types import Chat, Message, PhotoSize from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendPhoto: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendPhoto, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - photo=[ - PhotoSize(file_id="file id", width=42, height=42, file_unique_id="file id") - ], - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendPhoto(chat_id=42, photo="file id") - request: Request = bot.get_request() - assert request.method == "sendPhoto" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendPhoto, @@ -44,6 +21,5 @@ class TestSendPhoto: ) response: Message = await bot.send_photo(chat_id=42, photo="file id") - request: Request = bot.get_request() - assert request.method == "sendPhoto" + 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 5cbb3c75..6e8ce7e9 100644 --- a/tests/test_api/test_methods/test_send_poll.py +++ b/tests/test_api/test_methods/test_send_poll.py @@ -1,47 +1,11 @@ import datetime -import pytest - -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 -pytestmark = pytest.mark.asyncio - class TestSendPoll: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendPoll, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - poll=Poll( - id="QA", - question="Q", - options=[ - PollOption(text="A", voter_count=0), - PollOption(text="B", voter_count=0), - ], - is_closed=False, - is_anonymous=False, - type="quiz", - allows_multiple_answers=False, - total_voter_count=0, - correct_option_id=0, - ), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendPoll( - chat_id=42, question="Q?", options=["A", "B"], correct_option_id=0, type="quiz" - ) - request: Request = bot.get_request() - assert request.method == "sendPoll" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendPoll, @@ -53,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, ), @@ -70,6 +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: Request = bot.get_request() - assert request.method == "sendPoll" + 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 d356e8ae..add81076 100644 --- a/tests/test_api/test_methods/test_send_sticker.py +++ b/tests/test_api/test_methods/test_send_sticker.py @@ -1,38 +1,11 @@ import datetime -import pytest - -from aiogram.methods import Request, SendSticker +from aiogram.methods import SendSticker from aiogram.types import Chat, Message, Sticker from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendSticker: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendSticker, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - sticker=Sticker( - file_id="file id", - width=42, - height=42, - is_animated=False, - file_unique_id="file id", - ), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendSticker(chat_id=42, sticker="file id") - request: Request = bot.get_request() - assert request.method == "sendSticker" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendSticker, @@ -45,13 +18,14 @@ class TestSendSticker: width=42, height=42, is_animated=False, + is_video=False, file_unique_id="file id", + type="regular", ), chat=Chat(id=42, type="private"), ), ) response: Message = await bot.send_sticker(chat_id=42, sticker="file id") - request: Request = bot.get_request() - assert request.method == "sendSticker" + 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 2f046196..8eb733af 100644 --- a/tests/test_api/test_methods/test_send_venue.py +++ b/tests/test_api/test_methods/test_send_venue.py @@ -1,44 +1,11 @@ import datetime -import pytest - -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 -pytestmark = pytest.mark.asyncio - class TestSendVenue: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendVenue, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - venue=Venue( - location=Location(latitude=3.14, longitude=3.14), - title="Cupboard Under the Stairs", - address="Under the stairs, 4 Privet Drive, " - "Little Whinging, Surrey, England, Great Britain", - ), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendVenue( - chat_id=42, - latitude=3.14, - longitude=3.14, - title="Cupboard Under the Stairs", - address="Under the stairs, 4 Privet Drive, " - "Little Whinging, Surrey, England, Great Britain", - ) - request: Request = bot.get_request() - assert request.method == "sendVenue" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendVenue, @@ -64,6 +31,5 @@ class TestSendVenue: address="Under the stairs, 4 Privet Drive, " "Little Whinging, Surrey, England, Great Britain", ) - request: Request = bot.get_request() - assert request.method == "sendVenue" + 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 cb1c1222..3e412084 100644 --- a/tests/test_api/test_methods/test_send_video.py +++ b/tests/test_api/test_methods/test_send_video.py @@ -1,34 +1,11 @@ import datetime -import pytest - -from aiogram.methods import Request, SendVideo +from aiogram.methods import SendVideo from aiogram.types import Chat, Message, Video from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendVideo: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendVideo, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - video=Video( - file_id="file id", width=42, height=42, duration=0, file_unique_id="file id" - ), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendVideo(chat_id=42, video="file id") - request: Request = bot.get_request() - assert request.method == "sendVideo" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendVideo, @@ -44,6 +21,5 @@ class TestSendVideo: ) response: Message = await bot.send_video(chat_id=42, video="file id") - request: Request = bot.get_request() - assert request.method == "sendVideo" + 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 63c5bd84..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,36 +1,11 @@ import datetime -import pytest - -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 -pytestmark = pytest.mark.asyncio - class TestSendVideoNote: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendVideoNote, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - video_note=VideoNote( - file_id="file id", length=0, duration=0, file_unique_id="file id" - ), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendVideoNote( - chat_id=42, video_note="file id", thumb=BufferedInputFile(b"", "file.png") - ) - request: Request = bot.get_request() - assert request.method == "sendVideoNote" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendVideoNote, @@ -46,8 +21,9 @@ class TestSendVideoNote: ) response: Message = await bot.send_video_note( - chat_id=42, video_note="file id", thumb=BufferedInputFile(b"", "file.png") + chat_id=42, + video_note="file id", + thumbnail=BufferedInputFile(b"", "file.png"), ) - request: Request = bot.get_request() - assert request.method == "sendVideoNote" + 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 ee3894cd..40e36df0 100644 --- a/tests/test_api/test_methods/test_send_voice.py +++ b/tests/test_api/test_methods/test_send_voice.py @@ -1,32 +1,11 @@ import datetime -import pytest - -from aiogram.methods import Request, SendVoice +from aiogram.methods import SendVoice from aiogram.types import Chat, Message, Voice from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendVoice: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendVoice, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - voice=Voice(file_id="file id", duration=0, file_unique_id="file id"), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendVoice(chat_id=42, voice="file id") - request: Request = bot.get_request() - assert request.method == "sendVoice" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendVoice, @@ -40,6 +19,5 @@ class TestSendVoice: ) response: Message = await bot.send_voice(chat_id=42, voice="file id") - request: Request = bot.get_request() - assert request.method == "sendVoice" + 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 968c805b..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,28 +1,13 @@ -import pytest - -from aiogram.methods import Request, SetChatAdministratorCustomTitle +from aiogram.methods import SetChatAdministratorCustomTitle from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatTitle: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetChatAdministratorCustomTitle, ok=True, result=True) - - response: bool = await SetChatAdministratorCustomTitle( - chat_id=-42, user_id=42, custom_title="test chat" - ) - request: Request = bot.get_request() - assert request.method == "setChatAdministratorCustomTitle" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetChatAdministratorCustomTitle, ok=True, result=True) response: bool = await bot.set_chat_administrator_custom_title( chat_id=-42, user_id=42, custom_title="test chat" ) - request: Request = bot.get_request() - assert request.method == "setChatAdministratorCustomTitle" + 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 36d05cec..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,24 +1,11 @@ -import pytest - -from aiogram.methods import Request, SetChatDescription +from aiogram.methods import SetChatDescription from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatDescription: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetChatDescription, ok=True, result=True) - - response: bool = await SetChatDescription(chat_id=-42, description="awesome chat") - request: Request = bot.get_request() - assert request.method == "setChatDescription" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): 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: Request = bot.get_request() - assert request.method == "setChatDescription" + 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 new file mode 100644 index 00000000..5ab8c51f --- /dev/null +++ b/tests/test_api/test_methods/test_set_chat_menu_button.py @@ -0,0 +1,11 @@ +from aiogram.methods import SetChatMenuButton +from tests.mocked_bot import MockedBot + + +class TestSetChatMenuButton: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetChatMenuButton, ok=True, result=True) + + response: bool = await bot.set_chat_menu_button() + 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 a0278b80..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,29 +1,14 @@ -import pytest - -from aiogram.methods import Request, SetChatPermissions +from aiogram.methods import SetChatPermissions from aiogram.types import ChatPermissions from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatPermissions: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetChatPermissions, ok=True, result=True) - - response: bool = await SetChatPermissions( - chat_id=-42, permissions=ChatPermissions(can_send_messages=False) - ) - request: Request = bot.get_request() - assert request.method == "setChatPermissions" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetChatPermissions, ok=True, result=True) response: bool = await bot.set_chat_permissions( chat_id=-42, permissions=ChatPermissions(can_send_messages=False) ) - request: Request = bot.get_request() - assert request.method == "setChatPermissions" + 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 268f668b..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,29 +1,14 @@ -import pytest - -from aiogram.methods import Request, SetChatPhoto +from aiogram.methods import SetChatPhoto from aiogram.types import BufferedInputFile from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatPhoto: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetChatPhoto, ok=True, result=True) - - response: bool = await SetChatPhoto( - chat_id=-42, photo=BufferedInputFile(b"", filename="file.png") - ) - request: Request = bot.get_request() - assert request.method == "setChatPhoto" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetChatPhoto, ok=True, result=True) response: bool = await bot.set_chat_photo( chat_id=-42, photo=BufferedInputFile(b"", filename="file.png") ) - request: Request = bot.get_request() - assert request.method == "setChatPhoto" + 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 311b2dd8..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,24 +1,11 @@ -import pytest - -from aiogram.methods import Request, SetChatStickerSet +from aiogram.methods import SetChatStickerSet from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatStickerSet: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetChatStickerSet, ok=True, result=True) - - response: bool = await SetChatStickerSet(chat_id=-42, sticker_set_name="test") - request: Request = bot.get_request() - assert request.method == "setChatStickerSet" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): 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: Request = bot.get_request() - assert request.method == "setChatStickerSet" + 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 01558d84..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,24 +1,11 @@ -import pytest - -from aiogram.methods import Request, SetChatTitle +from aiogram.methods import SetChatTitle from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatTitle: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetChatTitle, ok=True, result=True) - - response: bool = await SetChatTitle(chat_id=-42, title="test chat") - request: Request = bot.get_request() - assert request.method == "setChatTitle" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): 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: Request = bot.get_request() - assert request.method == "setChatTitle" + 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 new file mode 100644 index 00000000..4b92229f --- /dev/null +++ b/tests/test_api/test_methods/test_set_custom_emoji_sticker_set_thumbnail.py @@ -0,0 +1,15 @@ +from aiogram.methods import SetCustomEmojiStickerSetThumbnail +from tests.mocked_bot import MockedBot + + +class TestSetCustomEmojiStickerSetThumbnail: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + SetCustomEmojiStickerSetThumbnail, ok=True, result=True + ) + + response: bool = await bot.set_custom_emoji_sticker_set_thumbnail( + name="test", custom_emoji_id="custom id" + ) + 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 c8177625..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,31 +1,14 @@ -from typing import Union - -import pytest - -from aiogram.methods import Request, SetGameScore +from aiogram.methods import SetGameScore from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetGameScore: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetGameScore, ok=True, result=True) - - response: Union[Message, bool] = await SetGameScore( - user_id=42, score=100500, inline_message_id="inline message" - ) - request: Request = bot.get_request() - assert request.method == "setGameScore" - assert response == prepare_result.result - 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: Request = bot.get_request() - assert request.method == "setGameScore" + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_message_reaction.py b/tests/test_api/test_methods/test_set_message_reaction.py new file mode 100644 index 00000000..5bdb3cf4 --- /dev/null +++ b/tests/test_api/test_methods/test_set_message_reaction.py @@ -0,0 +1,25 @@ +from random import randint + +from aiogram.methods import SetMessageReaction +from aiogram.types import ReactionTypeCustomEmoji +from tests.mocked_bot import MockedBot + + +class TestSetMessageReaction: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + SetMessageReaction, + ok=True, + result=True, + ) + + response: bool = await bot.set_message_reaction( + chat_id=randint(200, 300), + message_id=randint(100, 200), + reaction=[ + ReactionTypeCustomEmoji(custom_emoji_id="qwerty"), + ], + ) + request = bot.get_request() + assert 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 ec08bbc3..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,30 +1,13 @@ -import pytest - -from aiogram.methods import Request, SetMyCommands -from aiogram.types import BotCommand +from aiogram.methods import SetMyCommands from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetMyCommands: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetMyCommands, ok=True, result=None) - - response: bool = await SetMyCommands( - commands=[BotCommand(command="command", description="Bot command")], - ) - request: Request = bot.get_request() - assert request.method == "setMyCommands" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetMyCommands, ok=True, result=None) response: bool = await bot.set_my_commands( commands=[], ) - request: Request = bot.get_request() - assert request.method == "setMyCommands" - # assert request.data == {} + 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 new file mode 100644 index 00000000..3f42071e --- /dev/null +++ b/tests/test_api/test_methods/test_set_my_default_administrator_rights.py @@ -0,0 +1,11 @@ +from aiogram.methods import SetMyDefaultAdministratorRights +from tests.mocked_bot import MockedBot + + +class TestSetMyDefaultAdministratorRights: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetMyDefaultAdministratorRights, ok=True, result=True) + + response: bool = await bot.set_my_default_administrator_rights() + 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 new file mode 100644 index 00000000..a2134cbc --- /dev/null +++ b/tests/test_api/test_methods/test_set_my_description.py @@ -0,0 +1,11 @@ +from aiogram.methods import SetMyDescription +from tests.mocked_bot import MockedBot + + +class TestSetMyDescription: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetMyDescription, ok=True, result=True) + + response: bool = await bot.set_my_description(description="Test") + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_my_name.py b/tests/test_api/test_methods/test_set_my_name.py new file mode 100644 index 00000000..3b511f2f --- /dev/null +++ b/tests/test_api/test_methods/test_set_my_name.py @@ -0,0 +1,10 @@ +from aiogram.methods import SetMyName +from tests.mocked_bot import MockedBot + + +class TestSetMyName: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetMyName, ok=True, result=True) + + response: bool = await bot.set_my_name() + 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 new file mode 100644 index 00000000..729b2670 --- /dev/null +++ b/tests/test_api/test_methods/test_set_my_short_description.py @@ -0,0 +1,11 @@ +from aiogram.methods import SetMyShortDescription +from tests.mocked_bot import MockedBot + + +class TestSetMyShortDescription: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetMyShortDescription, ok=True, result=True) + + response: bool = await bot.set_my_short_description(short_description="Test") + 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 fba464f7..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,27 +1,21 @@ -import pytest - -from aiogram.methods import Request, SetPassportDataErrors -from aiogram.types import PassportElementError +from aiogram.methods import SetPassportDataErrors +from aiogram.types import PassportElementErrorFile from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetPassportDataErrors: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetPassportDataErrors, ok=True, result=True) - - response: bool = await SetPassportDataErrors(user_id=42, errors=[PassportElementError()]) - request: Request = bot.get_request() - assert request.method == "setPassportDataErrors" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetPassportDataErrors, ok=True, result=True) response: bool = await bot.set_passport_data_errors( - user_id=42, errors=[PassportElementError()] + user_id=42, + errors=[ + PassportElementErrorFile( + type="type", + file_hash="hash", + message="message", + ) + ], ) - request: Request = bot.get_request() - assert request.method == "setPassportDataErrors" + 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 new file mode 100644 index 00000000..97266d8e --- /dev/null +++ b/tests/test_api/test_methods/test_set_sticker_emoji_list.py @@ -0,0 +1,11 @@ +from aiogram.methods import SetStickerEmojiList +from tests.mocked_bot import MockedBot + + +class TestSetStickerEmojiList: + async def test_bot_method(self, bot: MockedBot): + 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"]) + 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 new file mode 100644 index 00000000..21f70b2c --- /dev/null +++ b/tests/test_api/test_methods/test_set_sticker_keywords.py @@ -0,0 +1,11 @@ +from aiogram.methods import SetStickerKeywords +from tests.mocked_bot import MockedBot + + +class TestSetStickerKeywords: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetStickerKeywords, ok=True, result=True) + + response: bool = await bot.set_sticker_keywords(sticker="sticker id", keywords=["X"]) + 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 new file mode 100644 index 00000000..3f842ceb --- /dev/null +++ b/tests/test_api/test_methods/test_set_sticker_mask_position.py @@ -0,0 +1,11 @@ +from aiogram.methods import SetStickerMaskPosition +from tests.mocked_bot import MockedBot + + +class TestSetStickerEmojiList: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetStickerMaskPosition, ok=True, result=True) + + response: bool = await bot.set_sticker_mask_position(sticker="sticker id") + 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 4de83feb..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,24 +1,11 @@ -import pytest - -from aiogram.methods import Request, SetStickerPositionInSet +from aiogram.methods import SetStickerPositionInSet from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetStickerPositionInSet: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetStickerPositionInSet, ok=True, result=True) - - response: bool = await SetStickerPositionInSet(sticker="sticker", position=42) - request: Request = bot.get_request() - assert request.method == "setStickerPositionInSet" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): 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: Request = bot.get_request() - assert request.method == "setStickerPositionInSet" + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_set_thumb.py b/tests/test_api/test_methods/test_set_sticker_set_thumb.py deleted file mode 100644 index 2ded22ee..00000000 --- a/tests/test_api/test_methods/test_set_sticker_set_thumb.py +++ /dev/null @@ -1,26 +0,0 @@ -import pytest - -from aiogram.methods import Request, SetStickerSetThumb -from tests.mocked_bot import MockedBot - -pytestmark = pytest.mark.asyncio - - -class TestSetStickerSetThumb: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetStickerSetThumb, ok=True, result=None) - - response: bool = await SetStickerSetThumb(name="test", user_id=42) - request: Request = bot.get_request() - assert request.method == "setStickerSetThumb" - # assert request.data == {} - assert response == prepare_result.result - - async def test_bot_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetStickerSetThumb, ok=True, result=None) - - response: bool = await bot.set_sticker_set_thumb(name="test", user_id=42) - request: Request = bot.get_request() - assert request.method == "setStickerSetThumb" - # assert request.data == {} - 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 new file mode 100644 index 00000000..45dc9700 --- /dev/null +++ b/tests/test_api/test_methods/test_set_sticker_set_thumbnail.py @@ -0,0 +1,14 @@ +from aiogram.enums import StickerFormat +from aiogram.methods import SetStickerSetThumbnail +from tests.mocked_bot import MockedBot + + +class TestSetStickerSetThumbnail: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetStickerSetThumbnail, ok=True, result=None) + + response: bool = await bot.set_sticker_set_thumbnail( + name="test", format=StickerFormat.STATIC, user_id=42 + ) + 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 new file mode 100644 index 00000000..6c0b7d21 --- /dev/null +++ b/tests/test_api/test_methods/test_set_sticker_set_title.py @@ -0,0 +1,11 @@ +from aiogram.methods import SetStickerSetTitle +from tests.mocked_bot import MockedBot + + +class TestSetStickerSetTitle: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetStickerSetTitle, ok=True, result=True) + + response: bool = await bot.set_sticker_set_title(name="test", title="Test") + 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 48a67c73..dd9f6902 100644 --- a/tests/test_api/test_methods/test_set_webhook.py +++ b/tests/test_api/test_methods/test_set_webhook.py @@ -1,24 +1,11 @@ -import pytest - -from aiogram.methods import Request, SetWebhook +from aiogram.methods import SetWebhook from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetWebhook: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetWebhook, ok=True, result=True) - - response: bool = await SetWebhook(url="https://example.com") - request: Request = bot.get_request() - assert request.method == "setWebhook" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetWebhook, ok=True, result=True) response: bool = await bot.set_webhook(url="https://example.com") - request: Request = bot.get_request() - assert request.method == "setWebhook" + 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 4d34795b..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,31 +1,14 @@ -from typing import Union - -import pytest - -from aiogram.methods import Request, StopMessageLiveLocation +from aiogram.methods import StopMessageLiveLocation from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestStopMessageLiveLocation: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(StopMessageLiveLocation, ok=True, result=True) - - response: Union[Message, bool] = await StopMessageLiveLocation( - inline_message_id="inline message id" - ) - request: Request = bot.get_request() - assert request.method == "stopMessageLiveLocation" - assert response == prepare_result.result - 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: Request = bot.get_request() - assert request.method == "stopMessageLiveLocation" + 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 e3b83bc1..93613218 100644 --- a/tests/test_api/test_methods/test_stop_poll.py +++ b/tests/test_api/test_methods/test_stop_poll.py @@ -1,35 +1,9 @@ -import pytest - -from aiogram.methods import Request, StopPoll +from aiogram.methods import StopPoll from aiogram.types import Poll, PollOption from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestStopPoll: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - StopPoll, - ok=True, - result=Poll( - id="QA", - question="Q", - options=[PollOption(text="A", voter_count=0), PollOption(text="B", voter_count=0)], - is_closed=False, - is_anonymous=False, - type="quiz", - allows_multiple_answers=False, - total_voter_count=0, - correct_option_id=0, - ), - ) - - response: Poll = await StopPoll(chat_id=42, message_id=42) - request: Request = bot.get_request() - assert request.method == "stopPoll" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( StopPoll, @@ -37,17 +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: Request = bot.get_request() - assert request.method == "stopPoll" + 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 0139b9de..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,24 +1,11 @@ -import pytest - -from aiogram.methods import Request, UnbanChatMember +from aiogram.methods import UnbanChatMember from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestUnbanChatMember: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(UnbanChatMember, ok=True, result=True) - - response: bool = await UnbanChatMember(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "unbanChatMember" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): 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: Request = bot.get_request() - assert request.method == "unbanChatMember" + 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 old mode 100644 new mode 100755 index 4f80a5e1..0ca89e0a --- 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,24 +1,8 @@ -import pytest - -from aiogram.methods import Request, UnbanChatSenderChat +from aiogram.methods import UnbanChatSenderChat from tests.mocked_bot import MockedBot class TestUnbanChatSenderChat: - @pytest.mark.asyncio - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(UnbanChatSenderChat, ok=True, result=True) - - response: bool = await UnbanChatSenderChat( - chat_id=-42, - sender_chat_id=-1337, - ) - request: Request = bot.get_request() - assert request.method == "unbanChatSenderChat" - # assert request.data == {} - assert response == prepare_result.result - - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnbanChatSenderChat, ok=True, result=True) @@ -26,7 +10,5 @@ class TestUnbanChatSenderChat: chat_id=-42, sender_chat_id=-1337, ) - request: Request = bot.get_request() - assert request.method == "unbanChatSenderChat" - # assert request.data == {} + 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 new file mode 100644 index 00000000..9de88ad6 --- /dev/null +++ b/tests/test_api/test_methods/test_unhide_general_forum_topic.py @@ -0,0 +1,11 @@ +from aiogram.methods import UnhideGeneralForumTopic +from tests.mocked_bot import MockedBot + + +class TestUnhideGeneralForumTopic: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(UnhideGeneralForumTopic, ok=True, result=True) + + response: bool = await bot.unhide_general_forum_topic(chat_id=42) + 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 24d90171..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,30 +1,13 @@ -import pytest - -from aiogram.methods import Request, UnpinAllChatMessages +from aiogram.methods import UnpinAllChatMessages from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestUnpinAllChatMessages: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(UnpinAllChatMessages, ok=True, result=True) - - response: bool = await UnpinAllChatMessages( - chat_id=42, - ) - request: Request = bot.get_request() - assert request.method == "unpinAllChatMessages" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnpinAllChatMessages, ok=True, result=True) response: bool = await bot.unpin_all_chat_messages( chat_id=42, ) - request: Request = bot.get_request() - assert request.method == "unpinAllChatMessages" - # assert request.data == {} + 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 new file mode 100644 index 00000000..74171470 --- /dev/null +++ b/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py @@ -0,0 +1,14 @@ +from aiogram.methods import UnpinAllForumTopicMessages +from tests.mocked_bot import MockedBot + + +class TestUnpinAllForumTopicMessages: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(UnpinAllForumTopicMessages, ok=True, result=True) + + response: bool = await bot.unpin_all_forum_topic_messages( + chat_id=42, + message_thread_id=42, + ) + 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 new file mode 100644 index 00000000..21325a8f --- /dev/null +++ b/tests/test_api/test_methods/test_unpin_all_general_forum_topic_messages.py @@ -0,0 +1,15 @@ +from aiogram.methods import UnpinAllGeneralForumTopicMessages +from tests.mocked_bot import MockedBot + + +class TestUnpinAllForumTopicMessages: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + UnpinAllGeneralForumTopicMessages, ok=True, result=True + ) + + response: bool = await bot.unpin_all_general_forum_topic_messages( + chat_id=42, + ) + 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 7a0bca41..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,24 +1,11 @@ -import pytest - -from aiogram.methods import Request, UnpinChatMessage +from aiogram.methods import UnpinChatMessage from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestUnpinChatMessage: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(UnpinChatMessage, ok=True, result=True) - - response: bool = await UnpinChatMessage(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "unpinChatMessage" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnpinChatMessage, ok=True, result=True) response: bool = await bot.unpin_chat_message(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "unpinChatMessage" + 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 2a7b14ea..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,33 +1,19 @@ -import pytest - -from aiogram.methods import Request, UploadStickerFile +from aiogram.enums import StickerFormat +from aiogram.methods import UploadStickerFile from aiogram.types import BufferedInputFile, File from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestUploadStickerFile: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - UploadStickerFile, ok=True, result=File(file_id="file id", file_unique_id="file id") - ) - - response: File = await UploadStickerFile( - user_id=42, png_sticker=BufferedInputFile(b"", "file.png") - ) - request: Request = bot.get_request() - assert request.method == "uploadStickerFile" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( UploadStickerFile, ok=True, result=File(file_id="file id", file_unique_id="file id") ) response: File = await bot.upload_sticker_file( - user_id=42, png_sticker=BufferedInputFile(b"", "file.png") + user_id=42, + sticker=BufferedInputFile(b"", "file.png"), + sticker_format=StickerFormat.STATIC, ) - request: Request = bot.get_request() - assert request.method == "uploadStickerFile" + 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 3eae5a07..ed45d2b1 100644 --- a/tests/test_api/test_types/test_callback_query.py +++ b/tests/test_api/test_types/test_callback_query.py @@ -1,5 +1,5 @@ from aiogram.methods import AnswerCallbackQuery -from aiogram.types import CallbackQuery, User +from aiogram.types import CallbackQuery, InaccessibleMessage, Message, User class TestCallbackQuery: @@ -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) @@ -17,3 +17,34 @@ class TestCallbackQuery: for key, value in kwargs.items(): assert getattr(api_method, key) == value + + def test_parse_message(self): + data = { + "id": "id", + "from": {"id": 42, "is_bot": False, "first_name": "name"}, + "message": { + "message_id": 123, + "date": 1234567890, + "chat": {"id": 42, "type": "private"}, + }, + "chat_instance": "chat", + "data": "data", + } + callback_query = CallbackQuery.model_validate(data) + assert isinstance(callback_query.message, Message) + + def test_parse_inaccessible_message(self): + data = { + "id": "id", + "from": {"id": 42, "is_bot": False, "first_name": "name"}, + "message": { + "message_id": 123, + "date": 0, + "chat": {"id": 42, "type": "private"}, + }, + "chat_instance": "chat", + "data": "data", + } + callback_query = CallbackQuery.model_validate(data) + + assert isinstance(callback_query.message, InaccessibleMessage) diff --git a/tests/test_api/test_types/test_chat.py b/tests/test_api/test_types/test_chat.py index 5fc9e081..b3e63854 100644 --- a/tests/test_api/test_types/test_chat.py +++ b/tests/test_api/test_types/test_chat.py @@ -1,4 +1,7 @@ -from aiogram.types import Chat +from pytest import mark, param + +from aiogram.enums import ChatAction +from aiogram.types import BufferedInputFile, Chat, ChatPermissions class TestChat: @@ -15,3 +18,204 @@ class TestChat: method = chat.unban_sender_chat(sender_chat_id=-1337) assert method.chat_id == chat.id assert method.sender_chat_id == -1337 + + def test_get_administrators(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.get_administrators() + assert method.chat_id == chat.id + + def test_delete_message(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.delete_message(message_id=1) + assert method.chat_id == chat.id + + def test_revoke_invite_link(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.revoke_invite_link(invite_link="test") + assert method.chat_id == chat.id + + def test_edit_invite_link(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.edit_invite_link(invite_link="test", name="test") + assert method.chat_id == chat.id + + def test_create_invite_link(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.create_invite_link(name="test") + assert method.chat_id == chat.id + + def test_export_invite_link(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.export_invite_link() + assert method.chat_id == chat.id + + def test_do(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.do(ChatAction.TYPING) + assert method.chat_id == chat.id + + def test_delete_sticker_set(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.delete_sticker_set() + assert method.chat_id == chat.id + + def test_set_sticker_set(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.set_sticker_set(sticker_set_name="test") + assert method.chat_id == chat.id + + def test_get_member(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.get_member(user_id=42) + assert method.chat_id == chat.id + + def test_get_member_count(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.get_member_count() + assert method.chat_id == chat.id + + def test_leave(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.leave() + assert method.chat_id == chat.id + + def test_unpin_all_messages(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.unpin_all_messages() + assert method.chat_id == chat.id + + def test_unpin_message(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.unpin_message() + assert method.chat_id == chat.id + + def test_pin_message(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.pin_message(message_id=1) + assert method.chat_id == chat.id + + def test_set_administrator_custom_title(self): + chat = Chat(id=-42, type="supergroup") + + 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") + + method = chat.set_permissions( + permissions=ChatPermissions( + can_send_messages=True, + ) + ) + assert method.chat_id == chat.id + + def test_promote(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.promote( + user_id=42, + can_manage_chat=True, + ) + assert method.chat_id == chat.id + + def test_restrict(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.restrict( + user_id=42, + permissions=ChatPermissions( + can_send_messages=True, + ), + ) + assert method.chat_id == chat.id + + def test_unban(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.unban( + user_id=42, + ) + assert method.chat_id == chat.id + + def test_ban(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.ban( + user_id=42, + ) + assert method.chat_id == chat.id + + def test_set_description(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.set_description(description="test") + assert method.chat_id == chat.id + + def test_set_title(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.set_title(title="test") + assert method.chat_id == chat.id + + def test_delete_photo(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.delete_photo(description="test") + assert method.chat_id == chat.id + + def test_set_photo(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.set_photo(photo=BufferedInputFile(b"PNG", filename="photo.png")) + assert method.chat_id == chat.id + + @mark.parametrize( + "first,last,title,chat_type,result", + [ + param("First", None, None, "private", "First", id="private_first_only"), + param("First", "Last", None, "private", "First Last", id="private_with_last"), + param(None, None, "Title", "group", "Title", id="group_with_title"), + param(None, None, "Title", "supergroup", "Title", id="supergroup_with_title"), + param(None, None, "Title", "channel", "Title", id="channel_with_title"), + ], + ) + def test_full_name( + self, + first: str | None, + last: str | None, + title: str | None, + chat_type: str, + result: str, + ): + chat = Chat(id=42, first_name=first, last_name=last, title=title, type=chat_type) + assert chat.full_name == result + + def test_unpin_all_general_forum_topic_messages(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.unpin_all_general_forum_topic_messages() + assert method.chat_id == chat.id 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 b5d124a3..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,6 +1,29 @@ import datetime +from typing import Any -from aiogram.methods import ApproveChatJoinRequest, DeclineChatJoinRequest +import pytest + +from aiogram.methods import ( + ApproveChatJoinRequest, + DeclineChatJoinRequest, + SendAnimation, + SendAudio, + SendContact, + SendDice, + SendDocument, + SendGame, + SendInvoice, + SendLocation, + SendMediaGroup, + SendMessage, + SendPhoto, + SendPoll, + SendSticker, + SendVenue, + SendVideo, + SendVideoNote, + SendVoice, +) from aiogram.types import Chat, ChatJoinRequest, User @@ -9,6 +32,7 @@ class TestChatJoinRequest: chat_join_request = ChatJoinRequest( chat=Chat(id=-42, type="supergroup"), from_user=User(id=42, is_bot=False, first_name="Test"), + user_chat_id=42, date=datetime.datetime.now(), ) @@ -22,6 +46,7 @@ class TestChatJoinRequest: chat_join_request = ChatJoinRequest( chat=Chat(id=-42, type="supergroup"), from_user=User(id=42, is_bot=False, first_name="Test"), + user_chat_id=42, date=datetime.datetime.now(), ) @@ -30,3 +55,98 @@ class TestChatJoinRequest: assert isinstance(api_method, DeclineChatJoinRequest) assert api_method.chat_id == chat_join_request.chat.id assert api_method.user_id == chat_join_request.from_user.id + + @pytest.mark.parametrize( + "alias_for_method,kwargs,method_class", + [ + ["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", + { + "title": "title", + "description": "description", + "payload": "payload", + "provider_token": "provider_token", + "start_parameter": "start_parameter", + "currency": "currency", + "prices": [], + }, + SendInvoice, + ], + ["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", + { + "latitude": 0.42, + "longitude": 0.42, + "title": "title", + "address": "address", + }, + SendVenue, + ], + ["answer_video", {"video": "video"}, SendVideo], + ["answer_video_note", {"video_note": "video_note"}, SendVideoNote], + ["answer_voice", {"voice": "voice"}, SendVoice], + ], + ) + @pytest.mark.parametrize("suffix", ["", "_pm"]) + def test_answer_aliases( + self, + alias_for_method: str, + suffix: 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 + ], + ): + event = ChatJoinRequest( + chat=Chat(id=-42, type="channel"), + from_user=User(id=42, is_bot=False, first_name="Test"), + user_chat_id=42, + date=datetime.datetime.now(), + ) + + alias = getattr(event, alias_for_method + suffix) + assert callable(alias) + + api_method = alias(**kwargs) + assert isinstance(api_method, method_class) + + if suffix == "_pm": + assert api_method.chat_id == event.user_chat_id + else: + assert api_method.chat_id == event.chat.id + + for key, value in kwargs.items(): + assert getattr(api_method, key) == value 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 new file mode 100644 index 00000000..a48e7a0d --- /dev/null +++ b/tests/test_api/test_types/test_chat_member_updated.py @@ -0,0 +1,125 @@ +import datetime +from typing import Any + +import pytest + +from aiogram.methods import ( + SendAnimation, + SendAudio, + SendContact, + SendDice, + SendDocument, + SendGame, + SendInvoice, + SendLocation, + SendMediaGroup, + SendMessage, + SendPhoto, + SendPoll, + SendSticker, + SendVenue, + SendVideo, + SendVideoNote, + SendVoice, +) +from aiogram.types import ( + Chat, + ChatMemberLeft, + ChatMemberMember, + ChatMemberUpdated, + User, +) + + +class TestChatMemberUpdated: + @pytest.mark.parametrize( + "alias_for_method,kwargs,method_class", + [ + ["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", + { + "title": "title", + "description": "description", + "payload": "payload", + "provider_token": "provider_token", + "start_parameter": "start_parameter", + "currency": "currency", + "prices": [], + }, + SendInvoice, + ], + ["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", + { + "latitude": 0.42, + "longitude": 0.42, + "title": "title", + "address": "address", + }, + SendVenue, + ], + ["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[ + 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") + event = ChatMemberUpdated( + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), + date=datetime.datetime.now(), + old_chat_member=ChatMemberLeft(user=user), + new_chat_member=ChatMemberMember(user=user), + ) + + alias = getattr(event, alias_for_method) + assert callable(alias) + + api_method = alias(**kwargs) + assert isinstance(api_method, method_class) + + assert api_method.chat_id == event.chat.id + + for key, value in kwargs.items(): + assert getattr(api_method, key) == value 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_exception.py b/tests/test_api/test_types/test_exception.py new file mode 100644 index 00000000..93c82ad6 --- /dev/null +++ b/tests/test_api/test_types/test_exception.py @@ -0,0 +1,15 @@ +import pytest + +from aiogram.exceptions import DetailedAiogramError + + +class TestException: + @pytest.mark.parametrize( + "message,result", + [ + ["reason", "DetailedAiogramError('reason')"], + ], + ) + def test_representation(self, message: str, result: str): + exc = DetailedAiogramError(message=message) + assert repr(exc) == 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 9317158e..cd0b94db 100644 --- a/tests/test_api/test_types/test_input_file.py +++ b/tests/test_api/test_types/test_input_file.py @@ -1,12 +1,8 @@ -from typing import AsyncIterable - -import pytest from aresponses import ResponsesMockServer from aiogram import Bot from aiogram.types import BufferedInputFile, FSInputFile, InputFile, URLInputFile - -pytestmark = pytest.mark.asyncio +from tests.mocked_bot import MockedBot class TestInputFile: @@ -14,19 +10,18 @@ class TestInputFile: file = FSInputFile(__file__) assert isinstance(file, InputFile) - assert isinstance(file, AsyncIterable) assert file.filename is not None assert file.filename.startswith("test_") assert file.filename.endswith(".py") assert file.chunk_size > 0 - async def test_fs_input_file_readable(self): + async def test_fs_input_file_readable(self, bot: MockedBot): file = FSInputFile(__file__, chunk_size=1) assert file.chunk_size == 1 size = 0 - async for chunk in file: + async for chunk in file.read(bot): chunk_size = len(chunk) assert chunk_size == 1 size += chunk_size @@ -36,15 +31,14 @@ class TestInputFile: file = BufferedInputFile(b"\f" * 10, filename="file.bin") assert isinstance(file, InputFile) - assert isinstance(file, AsyncIterable) assert file.filename == "file.bin" assert isinstance(file.data, bytes) - async def test_buffered_input_file_readable(self): + async def test_buffered_input_file_readable(self, bot: MockedBot): file = BufferedInputFile(b"\f" * 10, filename="file.bin", chunk_size=1) size = 0 - async for chunk in file: + async for chunk in file.read(bot): chunk_size = len(chunk) assert chunk_size == 1 size += chunk_size @@ -54,36 +48,36 @@ class TestInputFile: file = BufferedInputFile.from_file(__file__, chunk_size=10) assert isinstance(file, InputFile) - assert isinstance(file, AsyncIterable) assert file.filename is not None assert file.filename.startswith("test_") assert file.filename.endswith(".py") assert isinstance(file.data, bytes) assert file.chunk_size == 10 - async def test_buffered_input_file_from_file_readable(self): + async def test_buffered_input_file_from_file_readable(self, bot: MockedBot): file = BufferedInputFile.from_file(__file__, chunk_size=1) size = 0 - async for chunk in file: + async for chunk in file.read(bot): chunk_size = len(chunk) assert chunk_size == 1 size += chunk_size assert size > 0 - async def test_uri_input_file(self, aresponses: ResponsesMockServer): + async def test_url_input_file(self, aresponses: ResponsesMockServer): aresponses.add( - aresponses.ANY, aresponses.ANY, "get", aresponses.Response(status=200, body=b"\f" * 10) + aresponses.ANY, + aresponses.ANY, + "get", + aresponses.Response(status=200, body=b"\f" * 10), ) + async with Bot(token="42:TEST").context() as bot: + file = URLInputFile("https://test.org/", chunk_size=1) - Bot.set_current(Bot("42:TEST")) - - file = URLInputFile("https://test.org/", chunk_size=1) - - size = 0 - async for chunk in file: - assert chunk == b"\f" - chunk_size = len(chunk) - assert chunk_size == 1 - size += chunk_size - assert size == 10 + size = 0 + async for chunk in file.read(bot): + assert chunk == b"\f" + chunk_size = len(chunk) + assert chunk_size == 1 + size += chunk_size + assert size == 10 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 93341eb2..a13d810a 100644 --- a/tests/test_api/test_types/test_message.py +++ b/tests/test_api/test_types/test_message.py @@ -1,14 +1,19 @@ import datetime -from typing import Any, Dict, Optional, Type, Union +from typing import Any import pytest +from aiogram.enums import ParseMode from aiogram.methods import ( CopyMessage, DeleteMessage, EditMessageCaption, + EditMessageLiveLocation, + EditMessageMedia, EditMessageReplyMarkup, EditMessageText, + ForwardMessage, + PinChatMessage, SendAnimation, SendAudio, SendContact, @@ -19,6 +24,7 @@ from aiogram.methods import ( SendLocation, SendMediaGroup, SendMessage, + SendPaidMedia, SendPhoto, SendPoll, SendSticker, @@ -26,37 +32,94 @@ from aiogram.methods import ( SendVideo, SendVideoNote, SendVoice, + SetMessageReaction, + StopMessageLiveLocation, TelegramMethod, + UnpinChatMessage, ) from aiogram.types import ( + UNSET_PARSE_MODE, Animation, Audio, + BackgroundFillSolid, + BackgroundTypeFill, Chat, + ChatBackground, + ChatBoostAdded, + ChatOwnerChanged, + ChatOwnerLeft, + ChatShared, + Checklist, + ChecklistTask, + ChecklistTasksAdded, + ChecklistTasksDone, Contact, Dice, + DirectMessagePriceChanged, Document, EncryptedCredentials, + ForumTopicClosed, + ForumTopicCreated, + ForumTopicEdited, + ForumTopicReopened, Game, + GeneralForumTopicHidden, + GeneralForumTopicUnhidden, + Gift, + GiftInfo, + Giveaway, + GiveawayCompleted, + GiveawayCreated, + GiveawayWinners, InlineKeyboardButton, InlineKeyboardMarkup, + 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, Venue, Video, + VideoChatEnded, + VideoChatParticipantsInvited, + VideoChatScheduled, + VideoChatStarted, VideoNote, Voice, - VoiceChatEnded, - VoiceChatParticipantsInvited, - VoiceChatStarted, + WebAppData, + WriteAccessAllowed, ) from aiogram.types.message import ContentType, Message @@ -122,6 +185,8 @@ TEST_MESSAGE_STICKER = Message( width=42, height=42, is_animated=False, + is_video=False, + type="regular", ), chat=Chat(id=42, type="private"), from_user=User(id=42, is_bot=False, first_name="Test"), @@ -193,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(), @@ -281,6 +371,36 @@ TEST_MESSAGE_GROUP_CHAT_CREATED = Message( chat=Chat(id=42, type="private"), from_user=User(id=42, is_bot=False, first_name="Test"), ) +TEST_MESSAGE_SUPERGROUP_CHAT_CREATED = Message( + message_id=42, + date=datetime.datetime.now(), + supergroup_chat_created=True, + chat=Chat(id=-10042, type="supergroup"), + from_user=User(id=42, is_bot=False, first_name="Test"), +) +TEST_MESSAGE_CHANNEL_CHAT_CREATED = Message( + message_id=42, + date=datetime.datetime.now(), + channel_chat_created=True, + chat=Chat(id=-10042, type="channel"), + from_user=User(id=42, is_bot=False, first_name="Test"), +) +TEST_MESSAGE_PAID_MEDIA = Message( + message_id=42, + date=datetime.datetime.now(), + paid_media=PaidMediaInfo( + star_count=100500, + paid_media=[ + PaidMediaPhoto( + photo=[ + PhotoSize(file_id="file id", file_unique_id="file id", width=42, height=42) + ], + ) + ], + ), + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), +) TEST_MESSAGE_PASSPORT_DATA = Message( message_id=42, date=datetime.datetime.now(), @@ -291,6 +411,17 @@ TEST_MESSAGE_PASSPORT_DATA = Message( chat=Chat(id=42, type="private"), from_user=User(id=42, is_bot=False, first_name="Test"), ) +TEST_MESSAGE_PROXIMITY_ALERT_TRIGGERED = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="supergroup"), + from_user=User(id=42, is_bot=False, first_name="Test"), + proximity_alert_triggered=ProximityAlertTriggered( + traveler=User(id=1, is_bot=False, first_name="Traveler"), + watcher=User(id=2, is_bot=False, first_name="Watcher"), + distance=42, + ), +) TEST_MESSAGE_POLL = Message( message_id=42, date=datetime.datetime.now(), @@ -298,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, ), @@ -318,29 +450,38 @@ TEST_MESSAGE_MESSAGE_AUTO_DELETE_TIMER_CHANGED = Message( message_auto_delete_timer_changed=MessageAutoDeleteTimerChanged(message_auto_delete_time=42), from_user=User(id=42, is_bot=False, first_name="Test"), ) -TEST_MESSAGE_VOICE_CHAT_STARTED = Message( +TEST_MESSAGE_VIDEO_CHAT_STARTED = 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"), - voice_chat_started=VoiceChatStarted(), + video_chat_started=VideoChatStarted(), ) -TEST_MESSAGE_VOICE_CHAT_ENDED = Message( +TEST_MESSAGE_VIDEO_CHAT_ENDED = 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"), - voice_chat_ended=VoiceChatEnded(duration=42), + video_chat_ended=VideoChatEnded(duration=42), ) -TEST_MESSAGE_VOICE_CHAT_PARTICIPANTS_INVITED = Message( +TEST_MESSAGE_VIDEO_CHAT_PARTICIPANTS_INVITED = 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"), - voice_chat_participants_invited=VoiceChatParticipantsInvited( + video_chat_participants_invited=VideoChatParticipantsInvited( users=[User(id=69, is_bot=False, first_name="Test")] ), ) +TEST_MESSAGE_VIDEO_CHAT_SCHEDULED = 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"), + video_chat_scheduled=VideoChatScheduled( + start_date=datetime.datetime.now(), + ), +) TEST_MESSAGE_DICE = Message( message_id=42, date=datetime.datetime.now(), @@ -348,104 +489,666 @@ TEST_MESSAGE_DICE = Message( dice=Dice(value=6, emoji="X"), from_user=User(id=42, is_bot=False, first_name="Test"), ) +TEST_MESSAGE_WEB_APP_DATA = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + web_app_data=WebAppData(data="test", button_text="Test"), + from_user=User(id=42, is_bot=False, first_name="Test"), +) +TEST_FORUM_TOPIC_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"), + forum_topic_created=ForumTopicCreated( + name="test", + icon_color=0xFFD67E, + ), +) +TEST_FORUM_TOPIC_EDITED = 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"), + forum_topic_edited=ForumTopicEdited( + name="test_edited", + icon_color=0xFFD67E, + ), +) +TEST_FORUM_TOPIC_CLOSED = 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"), + forum_topic_closed=ForumTopicClosed(), +) +TEST_FORUM_TOPIC_REOPENED = 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"), + forum_topic_reopened=ForumTopicReopened(), +) +TEST_MESSAGE_USER_SHARED = 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"), + user_shared=UserShared(request_id=42, user_id=42), +) +TEST_MESSAGE_USERS_SHARED = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=None, + users_shared=UsersShared( + request_id=0, + users=[SharedUser(user_id=1), SharedUser(user_id=2)], + ), +) +TEST_CHAT_SHARED = 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"), + chat_shared=ChatShared(request_id=42, chat_id=42), +) +TEST_MESSAGE_STORY = 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"), + story=Story(chat=Chat(id=42, type="private"), id=42), +) + +TEST_MESSAGE_GIVEAWAY = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=None, + giveaway=Giveaway( + chats=[Chat(id=42, type="private")], + winners_selection_date=datetime.datetime.now() + datetime.timedelta(days=7), + winner_count=10, + ), +) +TEST_MESSAGE_GIVEAWAY_CREATED = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=None, + giveaway_created=GiveawayCreated(prize_star_count=42), +) +TEST_MESSAGE_GIVEAWAY_WINNERS = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=None, + giveaway_winners=GiveawayWinners( + chat=Chat(id=77, type="private"), + giveaway_message_id=123, + winners_selection_date=datetime.datetime.now(), + winner_count=1, + winners=[User(id=42, is_bot=False, first_name="Test")], + ), +) +TEST_MESSAGE_GIVEAWAY_COMPLETED = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=None, + giveaway_completed=GiveawayCompleted(winner_count=10), +) +TEST_MESSAGE_GENERAL_FORUM_TOPIC_HIDDEN = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=None, + general_forum_topic_hidden=GeneralForumTopicHidden(), +) +TEST_MESSAGE_GENERAL_FORUM_TOPIC_UNHIDDEN = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=None, + general_forum_topic_unhidden=GeneralForumTopicUnhidden(), +) +TEST_MESSAGE_WRITE_ACCESS_ALLOWED = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + write_access_allowed=WriteAccessAllowed(), +) +TEST_MESSAGE_BOOST_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="User"), + boost_added=ChatBoostAdded(boost_count=1), +) +TEST_CHAT_BACKGROUND_SET = 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"), + chat_background_set=ChatBackground( + type=BackgroundTypeFill( + fill=BackgroundFillSolid(color=0x000000), + dark_theme_dimming=0, + ) + ), +) +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], + [TEST_MESSAGE_AUDIO, ContentType.AUDIO], + [TEST_MESSAGE_ANIMATION, ContentType.ANIMATION], + [TEST_MESSAGE_DOCUMENT, ContentType.DOCUMENT], + [TEST_MESSAGE_GAME, ContentType.GAME], + [TEST_MESSAGE_PHOTO, ContentType.PHOTO], + [TEST_MESSAGE_STICKER, ContentType.STICKER], + [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], + [TEST_MESSAGE_MIGRATE_FROM_CHAT_ID, ContentType.MIGRATE_FROM_CHAT_ID], + [TEST_MESSAGE_MIGRATE_TO_CHAT_ID, ContentType.MIGRATE_TO_CHAT_ID], + [TEST_MESSAGE_PINNED_MESSAGE, ContentType.PINNED_MESSAGE], + [TEST_MESSAGE_NEW_CHAT_TITLE, ContentType.NEW_CHAT_TITLE], + [TEST_MESSAGE_NEW_CHAT_PHOTO, ContentType.NEW_CHAT_PHOTO], + [TEST_MESSAGE_DELETE_CHAT_PHOTO, ContentType.DELETE_CHAT_PHOTO], + [TEST_MESSAGE_GROUP_CHAT_CREATED, ContentType.GROUP_CHAT_CREATED], + [TEST_MESSAGE_SUPERGROUP_CHAT_CREATED, ContentType.SUPERGROUP_CHAT_CREATED], + [TEST_MESSAGE_CHANNEL_CHAT_CREATED, ContentType.CHANNEL_CHAT_CREATED], + [TEST_MESSAGE_PAID_MEDIA, ContentType.PAID_MEDIA], + [TEST_MESSAGE_PASSPORT_DATA, ContentType.PASSPORT_DATA], + [TEST_MESSAGE_PROXIMITY_ALERT_TRIGGERED, ContentType.PROXIMITY_ALERT_TRIGGERED], + [TEST_MESSAGE_POLL, ContentType.POLL], + [ + TEST_MESSAGE_MESSAGE_AUTO_DELETE_TIMER_CHANGED, + ContentType.MESSAGE_AUTO_DELETE_TIMER_CHANGED, + ], + [TEST_MESSAGE_VIDEO_CHAT_SCHEDULED, ContentType.VIDEO_CHAT_SCHEDULED], + [TEST_MESSAGE_VIDEO_CHAT_STARTED, ContentType.VIDEO_CHAT_STARTED], + [TEST_MESSAGE_VIDEO_CHAT_ENDED, ContentType.VIDEO_CHAT_ENDED], + [ + TEST_MESSAGE_VIDEO_CHAT_PARTICIPANTS_INVITED, + ContentType.VIDEO_CHAT_PARTICIPANTS_INVITED, + ], + [TEST_MESSAGE_DICE, ContentType.DICE], + [TEST_MESSAGE_WEB_APP_DATA, ContentType.WEB_APP_DATA], + [TEST_FORUM_TOPIC_CREATED, ContentType.FORUM_TOPIC_CREATED], + [TEST_FORUM_TOPIC_EDITED, ContentType.FORUM_TOPIC_EDITED], + [TEST_FORUM_TOPIC_CLOSED, ContentType.FORUM_TOPIC_CLOSED], + [TEST_FORUM_TOPIC_REOPENED, ContentType.FORUM_TOPIC_REOPENED], + [TEST_MESSAGE_USER_SHARED, ContentType.USER_SHARED], + [TEST_MESSAGE_USERS_SHARED, ContentType.USERS_SHARED], + [TEST_CHAT_SHARED, ContentType.CHAT_SHARED], + [TEST_MESSAGE_STORY, ContentType.STORY], + [TEST_MESSAGE_GIVEAWAY, ContentType.GIVEAWAY], + [TEST_MESSAGE_GIVEAWAY_CREATED, ContentType.GIVEAWAY_CREATED], + [TEST_MESSAGE_GIVEAWAY_WINNERS, ContentType.GIVEAWAY_WINNERS], + [TEST_MESSAGE_GIVEAWAY_COMPLETED, ContentType.GIVEAWAY_COMPLETED], + [TEST_MESSAGE_GENERAL_FORUM_TOPIC_HIDDEN, ContentType.GENERAL_FORUM_TOPIC_HIDDEN], + [TEST_MESSAGE_GENERAL_FORUM_TOPIC_UNHIDDEN, ContentType.GENERAL_FORUM_TOPIC_UNHIDDEN], + [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], +] + + +MESSAGES_AND_COPY_METHODS = [ + [TEST_MESSAGE_TEXT, SendMessage], + [TEST_MESSAGE_AUDIO, SendAudio], + [TEST_MESSAGE_ANIMATION, SendAnimation], + [TEST_MESSAGE_DOCUMENT, SendDocument], + [TEST_MESSAGE_GAME, None], + [TEST_MESSAGE_PHOTO, SendPhoto], + [TEST_MESSAGE_STICKER, SendSticker], + [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], + [TEST_MESSAGE_MIGRATE_FROM_CHAT_ID, None], + [TEST_MESSAGE_MIGRATE_TO_CHAT_ID, None], + [TEST_MESSAGE_PINNED_MESSAGE, None], + [TEST_MESSAGE_NEW_CHAT_TITLE, None], + [TEST_MESSAGE_NEW_CHAT_PHOTO, None], + [TEST_MESSAGE_DELETE_CHAT_PHOTO, None], + [TEST_MESSAGE_GROUP_CHAT_CREATED, None], + [TEST_MESSAGE_SUPERGROUP_CHAT_CREATED, None], + [TEST_MESSAGE_CHANNEL_CHAT_CREATED, None], + [TEST_MESSAGE_PAID_MEDIA, None], + [TEST_MESSAGE_PASSPORT_DATA, None], + [TEST_MESSAGE_PROXIMITY_ALERT_TRIGGERED, None], + [TEST_MESSAGE_POLL, SendPoll], + [TEST_MESSAGE_MESSAGE_AUTO_DELETE_TIMER_CHANGED, None], + [TEST_MESSAGE_VIDEO_CHAT_STARTED, None], + [TEST_MESSAGE_VIDEO_CHAT_ENDED, None], + [TEST_MESSAGE_VIDEO_CHAT_PARTICIPANTS_INVITED, None], + [TEST_MESSAGE_DICE, SendDice], + [TEST_MESSAGE_USER_SHARED, None], + [TEST_CHAT_SHARED, None], + [TEST_MESSAGE_GIVEAWAY_COMPLETED, None], + [TEST_MESSAGE_WEB_APP_DATA, None], + [TEST_FORUM_TOPIC_CREATED, None], + [TEST_FORUM_TOPIC_EDITED, None], + [TEST_FORUM_TOPIC_CLOSED, None], + [TEST_FORUM_TOPIC_REOPENED, None], + [TEST_MESSAGE_GENERAL_FORUM_TOPIC_HIDDEN, None], + [TEST_MESSAGE_GENERAL_FORUM_TOPIC_UNHIDDEN, None], + [TEST_MESSAGE_GIVEAWAY_CREATED, None], + [TEST_MESSAGE_USERS_SHARED, None], + [TEST_MESSAGE_VIDEO_CHAT_SCHEDULED, None], + [TEST_MESSAGE_WRITE_ACCESS_ALLOWED, None], + [TEST_MESSAGE_GIVEAWAY, None], + [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], +] + + +class TestAllMessageTypesTested: + @pytest.fixture(scope="function") + def known_content_types(self): + content_types = set(ContentType) + content_types.remove(ContentType.ANY) + return content_types + + def test_for_content_type_tests(self, known_content_types): + """ + Test if all ContentType options have example messages. + + On new Bot API updates new ContentType entries are created. + TestMessage.test_content_type checks what content type is returned. + Make sure MESSAGES_AND_CONTENT_TYPES has examples + for all the ContentType entries, fail otherwise. + """ + content_types_w_example_messages = {t[1] for t in MESSAGES_AND_CONTENT_TYPES} + assert content_types_w_example_messages == known_content_types + + def test_for_copy_methods(self, known_content_types): + """ + Test if all known message types are checked for copy_message. + + Also relies on the previous test (both should be green) + """ + checked_content_types = {m[0].content_type for m in MESSAGES_AND_COPY_METHODS} + assert checked_content_types == known_content_types class TestMessage: @pytest.mark.parametrize( "message,content_type", - [ - [TEST_MESSAGE_TEXT, ContentType.TEXT], - [TEST_MESSAGE_AUDIO, ContentType.AUDIO], - [TEST_MESSAGE_ANIMATION, ContentType.ANIMATION], - [TEST_MESSAGE_DOCUMENT, ContentType.DOCUMENT], - [TEST_MESSAGE_GAME, ContentType.GAME], - [TEST_MESSAGE_PHOTO, ContentType.PHOTO], - [TEST_MESSAGE_STICKER, ContentType.STICKER], - [TEST_MESSAGE_VIDEO, ContentType.VIDEO], - [TEST_MESSAGE_VIDEO_NOTE, ContentType.VIDEO_NOTE], - [TEST_MESSAGE_VOICE, ContentType.VOICE], - [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_INVOICE, ContentType.INVOICE], - [TEST_MESSAGE_SUCCESSFUL_PAYMENT, ContentType.SUCCESSFUL_PAYMENT], - [TEST_MESSAGE_CONNECTED_WEBSITE, ContentType.CONNECTED_WEBSITE], - [TEST_MESSAGE_MIGRATE_FROM_CHAT_ID, ContentType.MIGRATE_FROM_CHAT_ID], - [TEST_MESSAGE_MIGRATE_TO_CHAT_ID, ContentType.MIGRATE_TO_CHAT_ID], - [TEST_MESSAGE_PINNED_MESSAGE, ContentType.PINNED_MESSAGE], - [TEST_MESSAGE_NEW_CHAT_TITLE, ContentType.NEW_CHAT_TITLE], - [TEST_MESSAGE_NEW_CHAT_PHOTO, ContentType.NEW_CHAT_PHOTO], - [TEST_MESSAGE_DELETE_CHAT_PHOTO, ContentType.DELETE_CHAT_PHOTO], - [TEST_MESSAGE_GROUP_CHAT_CREATED, ContentType.GROUP_CHAT_CREATED], - [TEST_MESSAGE_PASSPORT_DATA, ContentType.PASSPORT_DATA], - [TEST_MESSAGE_POLL, ContentType.POLL], - [ - TEST_MESSAGE_MESSAGE_AUTO_DELETE_TIMER_CHANGED, - ContentType.MESSAGE_AUTO_DELETE_TIMER_CHANGED, - ], - [TEST_MESSAGE_VOICE_CHAT_STARTED, ContentType.VOICE_CHAT_STARTED], - [TEST_MESSAGE_VOICE_CHAT_ENDED, ContentType.VOICE_CHAT_ENDED], - [ - TEST_MESSAGE_VOICE_CHAT_PARTICIPANTS_INVITED, - ContentType.VOICE_CHAT_PARTICIPANTS_INVITED, - ], - [TEST_MESSAGE_DICE, ContentType.DICE], - [TEST_MESSAGE_UNKNOWN, ContentType.UNKNOWN], - ], + MESSAGES_AND_CONTENT_TYPES, ) 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], + ["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"]) @@ -453,27 +1156,26 @@ 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, - ] + 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 = Message( @@ -489,8 +1191,13 @@ class TestMessage: assert api_method.chat_id == message.chat.id if alias_type == "reply": - assert api_method.reply_to_message_id == message.message_id + 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"): assert api_method.reply_to_message_id is None for key, value in kwargs.items(): @@ -506,46 +1213,12 @@ class TestMessage: @pytest.mark.parametrize( "message,expected_method", - [ - [TEST_MESSAGE_TEXT, SendMessage], - [TEST_MESSAGE_AUDIO, SendAudio], - [TEST_MESSAGE_ANIMATION, SendAnimation], - [TEST_MESSAGE_DOCUMENT, SendDocument], - [TEST_MESSAGE_GAME, None], - [TEST_MESSAGE_PHOTO, SendPhoto], - [TEST_MESSAGE_STICKER, SendSticker], - [TEST_MESSAGE_VIDEO, SendVideo], - [TEST_MESSAGE_VIDEO_NOTE, SendVideoNote], - [TEST_MESSAGE_VOICE, SendVoice], - [TEST_MESSAGE_CONTACT, SendContact], - [TEST_MESSAGE_VENUE, SendVenue], - [TEST_MESSAGE_LOCATION, SendLocation], - [TEST_MESSAGE_NEW_CHAT_MEMBERS, None], - [TEST_MESSAGE_LEFT_CHAT_MEMBER, None], - [TEST_MESSAGE_INVOICE, None], - [TEST_MESSAGE_SUCCESSFUL_PAYMENT, None], - [TEST_MESSAGE_CONNECTED_WEBSITE, None], - [TEST_MESSAGE_MIGRATE_FROM_CHAT_ID, None], - [TEST_MESSAGE_MIGRATE_TO_CHAT_ID, None], - [TEST_MESSAGE_PINNED_MESSAGE, None], - [TEST_MESSAGE_NEW_CHAT_TITLE, None], - [TEST_MESSAGE_NEW_CHAT_PHOTO, None], - [TEST_MESSAGE_DELETE_CHAT_PHOTO, None], - [TEST_MESSAGE_GROUP_CHAT_CREATED, None], - [TEST_MESSAGE_PASSPORT_DATA, None], - [TEST_MESSAGE_POLL, SendPoll], - [TEST_MESSAGE_MESSAGE_AUTO_DELETE_TIMER_CHANGED, None], - [TEST_MESSAGE_VOICE_CHAT_STARTED, None], - [TEST_MESSAGE_VOICE_CHAT_ENDED, None], - [TEST_MESSAGE_VOICE_CHAT_PARTICIPANTS_INVITED, None], - [TEST_MESSAGE_DICE, SendDice], - [TEST_MESSAGE_UNKNOWN, None], - ], + MESSAGES_AND_COPY_METHODS, ) 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."): @@ -553,10 +1226,44 @@ class TestMessage: return method = message.send_copy(chat_id=42) - if method: - assert isinstance(method, expected_method) + assert isinstance(method, expected_method) + if hasattr(method, "parse_mode"): + # default parse mode in send_copy + assert method.parse_mode is None # TODO: Check additional fields + @pytest.mark.parametrize( + "custom_parse_mode", + [ + UNSET_PARSE_MODE, + *list(ParseMode), + ], + ) + @pytest.mark.parametrize( + "message,expected_method", + [ + [TEST_MESSAGE_TEXT, SendMessage], + [TEST_MESSAGE_AUDIO, SendAudio], + [TEST_MESSAGE_ANIMATION, SendAnimation], + [TEST_MESSAGE_DOCUMENT, SendDocument], + [TEST_MESSAGE_PHOTO, SendPhoto], + [TEST_MESSAGE_VIDEO, SendVideo], + [TEST_MESSAGE_VOICE, SendVoice], + ], + ) + def test_send_copy_custom_parse_mode( + self, + message: Message, + expected_method: type[TelegramMethod] | None, + custom_parse_mode: str | None, + ): + method = message.send_copy( + chat_id=42, + parse_mode=custom_parse_mode, + ) + assert isinstance(method, expected_method) + assert method.parse_mode == custom_parse_mode + def test_edit_text(self): message = Message( message_id=42, chat=Chat(id=42, type="private"), date=datetime.datetime.now() @@ -565,6 +1272,23 @@ class TestMessage: assert isinstance(method, EditMessageText) assert method.chat_id == message.chat.id + def test_forward(self): + message = Message( + message_id=42, chat=Chat(id=42, type="private"), date=datetime.datetime.now() + ) + method = message.forward(chat_id=69) + assert isinstance(method, ForwardMessage) + assert method.chat_id == 69 + assert method.from_chat_id == message.chat.id + + def test_edit_media(self): + message = Message( + message_id=42, chat=Chat(id=42, type="private"), date=datetime.datetime.now() + ) + method = message.edit_media(media=InputMediaPhoto(media="photo.jpg")) + assert isinstance(method, EditMessageMedia) + assert method.chat_id == message.chat.id + def test_edit_reply_markup(self): reply_markup = InlineKeyboardMarkup( inline_keyboard=[ @@ -623,6 +1347,22 @@ class TestMessage: assert method.reply_markup is None assert method.chat_id == message.chat.id + def test_edit_live_location(self): + message = Message( + message_id=42, chat=Chat(id=42, type="private"), date=datetime.datetime.now() + ) + method = message.edit_live_location(latitude=42, longitude=69) + assert isinstance(method, EditMessageLiveLocation) + assert method.chat_id == message.chat.id + + def test_stop_live_location(self): + message = Message( + message_id=42, chat=Chat(id=42, type="private"), date=datetime.datetime.now() + ) + method = message.stop_live_location() + assert isinstance(method, StopMessageLiveLocation) + assert method.chat_id == message.chat.id + def test_edit_caption(self): message = Message( message_id=42, chat=Chat(id=42, type="private"), date=datetime.datetime.now() @@ -640,14 +1380,47 @@ class TestMessage: assert method.chat_id == message.chat.id assert method.message_id == message.message_id + def test_pin(self): + message = Message( + message_id=42, chat=Chat(id=42, type="private"), date=datetime.datetime.now() + ) + method = message.pin() + assert isinstance(method, PinChatMessage) + assert method.chat_id == message.chat.id + assert method.message_id == message.message_id + + def test_unpin(self): + message = Message( + message_id=42, chat=Chat(id=42, type="private"), date=datetime.datetime.now() + ) + method = message.unpin() + assert isinstance(method, UnpinChatMessage) + assert method.chat_id == message.chat.id + + def test_react(self): + message = Message( + message_id=777, + chat=Chat(id=-42, type="channel"), + date=datetime.datetime.now(), + ) + emoji_reaction = ReactionTypeCustomEmoji(custom_emoji_id="qwerty") + method = message.react( + reaction=[emoji_reaction], + ) + assert isinstance(method, SetMessageReaction) + assert method.chat_id == message.chat.id + assert method.reaction == [emoji_reaction] + @pytest.mark.parametrize( - "text,entities,correct", + "text,entities,mode,expected_value", [ - ["test", [MessageEntity(type="bold", offset=0, length=4)], True], - ["", [], False], + ["test", [MessageEntity(type="bold", offset=0, length=4)], "html", "test"], + ["test", [MessageEntity(type="bold", offset=0, length=4)], "md", "*test*"], + ["", [], "html", ""], + ["", [], "md", ""], ], ) - def test_html_text(self, text, entities, correct): + def test_html_text(self, text, entities, mode, expected_value): message = Message( message_id=42, chat=Chat(id=42, type="private"), @@ -655,11 +1428,4 @@ class TestMessage: text=text, entities=entities, ) - if correct: - assert message.html_text - assert message.md_text - else: - with pytest.raises(TypeError): - assert message.html_text - with pytest.raises(TypeError): - assert message.md_text + assert getattr(message, f"{mode}_text") == expected_value diff --git a/tests/test_api/test_types/test_message_entity.py b/tests/test_api/test_types/test_message_entity.py index 363824a5..429909c9 100644 --- a/tests/test_api/test_types/test_message_entity.py +++ b/tests/test_api/test_types/test_message_entity.py @@ -1,13 +1,7 @@ from aiogram.types import MessageEntity -from tests.deprecated import check_deprecated class TestMessageEntity: - def test_extract(self): + def test_extract_from(self): entity = MessageEntity(type="hashtag", length=4, offset=5) - assert entity.extract("#foo #bar #baz") == "#bar" - - def test_get_text(self): - entity = MessageEntity(type="hashtag", length=4, offset=5) - with check_deprecated("3.2", exception=AttributeError): - assert entity.get_text("#foo #bar #baz") == "#bar" + assert entity.extract_from("#foo #bar #baz") == "#bar" 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 984932a5..1e14fd2c 100644 --- a/tests/test_api/test_types/test_reply_keyboard_remove.py +++ b/tests/test_api/test_types/test_reply_keyboard_remove.py @@ -9,13 +9,13 @@ class TestReplyKeyboardRemove: """ def test_remove_keyboard_default_is_true(self): - assert ( - ReplyKeyboardRemove.__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, expected): + 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 82db8880..aa3537c5 100644 --- a/tests/test_api/test_types/test_shipping_query.py +++ b/tests/test_api/test_types/test_shipping_query.py @@ -1,5 +1,11 @@ from aiogram.methods import AnswerShippingQuery -from aiogram.types import LabeledPrice, ShippingAddress, ShippingOption, ShippingQuery, User +from aiogram.types import ( + LabeledPrice, + ShippingAddress, + ShippingOption, + ShippingQuery, + User, +) class TestInlineQuery: @@ -22,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_sticker.py b/tests/test_api/test_types/test_sticker.py new file mode 100644 index 00000000..6adce4ea --- /dev/null +++ b/tests/test_api/test_types/test_sticker.py @@ -0,0 +1,32 @@ +from aiogram.enums import StickerType +from aiogram.types import Sticker + + +class TestSticker: + def test_get_profile_photos(self): + sticker = Sticker( + file_id="test", + file_unique_id="test", + type=StickerType.REGULAR, + width=100, + height=100, + is_animated=False, + is_video=False, + ) + + method = sticker.set_position_in_set(position=1) + assert method.sticker == sticker.file_id + + def test_delete_from_set(self): + sticker = Sticker( + file_id="test", + file_unique_id="test", + type=StickerType.REGULAR, + width=100, + height=100, + is_animated=False, + is_video=False, + ) + + method = sticker.delete_from_set() + assert method.sticker == sticker.file_id diff --git a/tests/test_api/test_types/test_user.py b/tests/test_api/test_types/test_user.py index bda3f94e..610fcd9c 100644 --- a/tests/test_api/test_types/test_user.py +++ b/tests/test_api/test_types/test_user.py @@ -18,3 +18,47 @@ class TestUser: def test_full_name(self, first: str, last: str, result: bool): user = User(id=42, is_bot=False, first_name=first, last_name=last) assert user.full_name == result + + @pytest.mark.parametrize( + "first,last,name", + [ + ["User", None, "bebra"], + ["", None, "telegram"], + [" ", None, "queue🤬"], + ["User", "Name", "Alex"], + ["User", " ", "aslo "], + [" ", " ", "telebot"], + ], + ) + def test_get_mention_markdown(self, first: str, last: str, name: str): + user = User(id=42, is_bot=False, first_name=first, last_name=last) + assert user.mention_markdown() == f"[{user.full_name}](tg://user?id=42)" + assert user.mention_markdown(name=name) == f"[{name}](tg://user?id=42)" + + @pytest.mark.parametrize( + "first,last,name", + [ + ["User", None, "bebra"], + ["", None, "telegram"], + [" ", None, "queue🤬"], + ["User", "Name", "Alex"], + ["User", " ", "aslo "], + [" ", " ", "telebot"], + ], + ) + def test_get_mention_html(self, first: str, last: str, name: str): + user = User(id=42, is_bot=False, first_name=first, last_name=last) + assert user.mention_html() == f'{user.full_name}' + assert user.mention_html(name=name) == f'{name}' + + def test_get_profile_photos(self): + user = User(id=42, is_bot=False, first_name="Test", last_name="User") + + 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_deprecated.py b/tests/test_dispatcher/test_deprecated.py deleted file mode 100644 index d2609079..00000000 --- a/tests/test_dispatcher/test_deprecated.py +++ /dev/null @@ -1,31 +0,0 @@ -import pytest - -from aiogram.dispatcher.event.telegram import TelegramEventObserver -from aiogram.dispatcher.router import Router -from tests.deprecated import check_deprecated - -OBSERVERS = { - "callback_query", - "channel_post", - "chosen_inline_result", - "edited_channel_post", - "edited_message", - "errors", - "inline_query", - "message", - "poll", - "poll_answer", - "pre_checkout_query", - "shipping_query", -} - -DEPRECATED_OBSERVERS = {observer + "_handler" for observer in OBSERVERS} - - -@pytest.mark.parametrize("observer_name", DEPRECATED_OBSERVERS) -def test_deprecated_handlers_name(observer_name: str): - router = Router() - - with check_deprecated("3.2", exception=AttributeError): - observer = getattr(router, observer_name) - assert isinstance(observer, TelegramEventObserver) diff --git a/tests/test_dispatcher/test_dispatcher.py b/tests/test_dispatcher/test_dispatcher.py index 1150f073..014f44d3 100644 --- a/tests/test_dispatcher/test_dispatcher.py +++ b/tests/test_dispatcher/test_dispatcher.py @@ -1,9 +1,13 @@ import asyncio import datetime +import signal 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 import pytest @@ -11,35 +15,40 @@ from aiogram import Bot from aiogram.dispatcher.dispatcher import Dispatcher from aiogram.dispatcher.event.bases import UNHANDLED, SkipHandler from aiogram.dispatcher.router import Router -from aiogram.methods import GetMe, GetUpdates, SendMessage +from aiogram.methods import GetMe, GetUpdates, SendMessage, TelegramMethod from aiogram.types import ( + BusinessConnection, + BusinessMessagesDeleted, CallbackQuery, Chat, + ChatBoost, + ChatBoostRemoved, + ChatBoostSourceGiveaway, + ChatBoostUpdated, ChatJoinRequest, ChatMemberMember, ChatMemberUpdated, ChosenInlineResult, InlineQuery, + ManagedBotUpdated, Message, + MessageReactionCountUpdated, + MessageReactionUpdated, + PaidMediaPurchased, Poll, PollAnswer, PollOption, PreCheckoutQuery, + ReactionCount, + ReactionTypeCustomEmoji, ShippingAddress, ShippingQuery, Update, User, ) +from aiogram.types.error_event import ErrorEvent from tests.mocked_bot import MockedBot -try: - from asynctest import CoroutineMock, patch -except ImportError: - from unittest.mock import AsyncMock as CoroutineMock # type: ignore - from unittest.mock import patch - -pytestmark = pytest.mark.asyncio - async def simple_message_handler(message: Message): await asyncio.sleep(0.2) @@ -74,7 +83,28 @@ class TestDispatcher: assert dp.update.handlers assert dp.update.handlers[0].callback == dp._listen_update - assert dp.update.outer_middlewares + assert dp.update.outer_middleware + + def test_init_args(self, bot: MockedBot): + with pytest.raises(TypeError): + Dispatcher(bot) + with pytest.raises(TypeError): + Dispatcher(storage=bot) + + def test_data_bind(self): + dp = Dispatcher() + assert dp.get("foo") is None + assert dp.get("foo", 42) == 42 + + dp["foo"] = 1 + assert dp.workflow_data["foo"] == 1 + assert dp["foo"] == 1 + + del dp["foo"] + assert "foo" not in dp.workflow_data + + def test_storage_property(self, dispatcher: Dispatcher): + assert dispatcher.storage is dispatcher.fsm.storage def test_parent_router(self, dispatcher: Dispatcher): with pytest.raises(RuntimeError): @@ -154,7 +184,7 @@ class TestDispatcher: bot.add_result_for(GetUpdates, ok=False, error_code=500, description="restarting") with patch( "aiogram.utils.backoff.Backoff.asleep", - new_callable=CoroutineMock, + new_callable=AsyncMock, ) as mocked_asleep: assert isinstance(await anext(listen), Update) assert mocked_asleep.awaited @@ -170,8 +200,9 @@ class TestDispatcher: async def test_process_update_empty(self, bot: MockedBot): dispatcher = Dispatcher() - result = await dispatcher._process_update(bot=bot, update=Update(update_id=42)) - assert not result + with pytest.warns(RuntimeWarning, match="Detected unknown update type"): + result = await dispatcher._process_update(bot=bot, update=Update(update_id=42)) + assert not result async def test_process_update_handled(self, bot: MockedBot): dispatcher = Dispatcher() @@ -180,7 +211,8 @@ class TestDispatcher: async def update_handler(update: Update): pass - assert await dispatcher._process_update(bot=bot, update=Update(update_id=42)) + with pytest.warns(RuntimeWarning, match="Detected unknown update type"): + assert await dispatcher._process_update(bot=bot, update=Update(update_id=42)) @pytest.mark.parametrize( "event_type,update,has_chat,has_user", @@ -349,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, ), @@ -371,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, @@ -419,14 +453,168 @@ class TestDispatcher: Update( update_id=42, chat_join_request=ChatJoinRequest( - chat=Chat(id=42, type="private"), + chat=Chat(id=-42, type="private"), from_user=User(id=42, is_bot=False, first_name="Test"), + user_chat_id=42, date=datetime.datetime.now(), ), ), True, True, ), + pytest.param( + "message_reaction", + Update( + update_id=42, + message_reaction=MessageReactionUpdated( + chat=Chat(id=-42, type="channel"), + message_id=12345, + user=User(id=42, is_bot=False, first_name="Test"), + date=datetime.datetime.now(), + old_reaction=[], + new_reaction=[ReactionTypeCustomEmoji(custom_emoji_id="qwerty")], + ), + ), + True, + True, + ), + pytest.param( + "message_reaction_count", + Update( + update_id=42, + message_reaction_count=MessageReactionCountUpdated( + chat=Chat(id=-42, type="channel"), + message_id=12345, + date=datetime.datetime.now(), + reactions=[ + ReactionCount( + type=ReactionTypeCustomEmoji(custom_emoji_id="qwerty"), + total_count=123, + ), + ], + ), + ), + True, + False, + ), + pytest.param( + "chat_boost", + Update( + update_id=42, + chat_boost=ChatBoostUpdated( + chat=Chat(id=-42, type="channel"), + boost=ChatBoost( + boost_id="qwerty", + add_date=datetime.datetime.now(), + expiration_date=datetime.datetime.now(), + source=ChatBoostSourceGiveaway( + giveaway_message_id=77, + ), + ), + ), + ), + True, + False, + ), + pytest.param( + "removed_chat_boost", + Update( + update_id=42, + removed_chat_boost=ChatBoostRemoved( + chat=Chat(id=-42, type="channel"), + boost_id="qwerty", + remove_date=datetime.datetime.now(), + source=ChatBoostSourceGiveaway( + giveaway_message_id=77, + ), + ), + ), + True, + False, + ), + pytest.param( + "deleted_business_messages", + Update( + update_id=42, + deleted_business_messages=BusinessMessagesDeleted( + chat=Chat(id=-42, type="private"), + business_connection_id="qwerty", + message_ids=[1, 2, 3], + ), + ), + True, + False, + ), + pytest.param( + "business_connection", + Update( + update_id=42, + business_connection=BusinessConnection( + id="qwerty", + user=User(id=42, is_bot=False, first_name="Test"), + user_chat_id=42, + date=datetime.datetime.now(), + can_reply=True, + is_enabled=True, + ), + ), + False, + True, + ), + pytest.param( + "edited_business_message", + Update( + update_id=42, + edited_business_message=Message( + message_id=42, + date=datetime.datetime.now(), + text="test", + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), + ), + ), + True, + True, + ), + pytest.param( + "business_message", + Update( + update_id=42, + business_message=Message( + message_id=42, + date=datetime.datetime.now(), + text="test", + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), + ), + ), + 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( @@ -442,24 +630,30 @@ class TestDispatcher: @observer() async def my_handler(event: Any, **kwargs: Any): - assert event == getattr(update, event_type) + assert event.model_dump(exclude_defaults=True) == getattr( + update, event_type + ).model_dump(exclude_defaults=True) if has_chat: - assert Chat.get_current(False) + assert kwargs["event_chat"] if has_user: - assert User.get_current(False) + assert kwargs["event_from_user"] return kwargs result = await router.feed_update(bot, update, test="PASS") assert isinstance(result, dict) - assert result["event_update"] == update + assert result["event_update"].model_dump(exclude_defaults=True) == update.model_dump( + exclude_defaults=True + ) assert result["event_router"] == router assert result["test"] == "PASS" async def test_listen_unknown_update(self): dp = Dispatcher() - - with pytest.raises(SkipHandler): + pattern = "Detected unknown update type" + with pytest.raises(SkipHandler), pytest.warns(RuntimeWarning, match=pattern) as record: await dp._listen_update(Update(update_id=42)) + if not record: + pytest.fail("Expected 'Detected unknown update type' warning.") async def test_listen_unhandled_update(self): dp = Dispatcher() @@ -476,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, ), @@ -514,7 +709,9 @@ class TestDispatcher: ) result = await dp.feed_update(bot, update, test="PASS") assert isinstance(result, dict) - assert result["event_update"] == update + assert result["event_update"].model_dump(exclude_defaults=True) == update.model_dump( + exclude_defaults=True + ) assert result["event_router"] == router1 assert result["test"] == "PASS" @@ -572,10 +769,9 @@ class TestDispatcher: with patch( "aiogram.dispatcher.dispatcher.Dispatcher.silent_call_request", - new_callable=CoroutineMock, + new_callable=AsyncMock, ) as mocked_silent_call_request: - result = await dispatcher._process_update(bot=bot, update=Update(update_id=42)) - print(result) + await dispatcher._process_update(bot=bot, update=Update(update_id=42)) mocked_silent_call_request.assert_awaited() async def test_process_update_exception(self, bot: MockedBot, caplog): @@ -585,7 +781,9 @@ class TestDispatcher: async def update_handler(update: Update): raise Exception("Kaboom!") - assert await dispatcher._process_update(bot=bot, update=Update(update_id=42)) + with pytest.warns(RuntimeWarning, match="Detected unknown update type"): + assert await dispatcher._process_update(bot=bot, update=Update(update_id=42)) + log_records = [rec.message for rec in caplog.records] assert len(log_records) == 1 assert "Cause exception while process update" in log_records[0] @@ -597,11 +795,14 @@ class TestDispatcher: async def _mock_updates(*_): yield Update(update_id=42) - with patch( - "aiogram.dispatcher.dispatcher.Dispatcher._process_update", new_callable=CoroutineMock - ) 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: @@ -609,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() @@ -635,15 +993,15 @@ class TestDispatcher: await dp.feed_update(bot, update) @router.errors() - async def error_handler(event: Update, exception: Exception): + async def error_handler(event: ErrorEvent): return "KABOOM" response = await dp.feed_update(bot, update) assert response == "KABOOM" @dp.errors() - async def root_error_handler(event: Update, exception: Exception): - return exception + async def root_error_handler(event: ErrorEvent): + return event.exception response = await dp.feed_update(bot, update) @@ -652,6 +1010,18 @@ class TestDispatcher: async def test_start_polling(self, bot: MockedBot): dispatcher = Dispatcher() + dispatcher.workflow_data["bot"] = 42 + with pytest.raises( + ValueError, match="At least one bot instance is required to start polling" + ): + await dispatcher.start_polling() + with pytest.raises( + ValueError, + match="Keyword argument 'bot' is not acceptable, " + "the bot instance should be passed as positional argument", + ): + await dispatcher.start_polling(bot, bot=bot) + bot.add_result_for( GetMe, ok=True, result=User(id=42, is_bot=True, first_name="The bot", username="tbot") ) @@ -659,38 +1029,132 @@ class TestDispatcher: async def _mock_updates(*_): yield Update(update_id=42) - with patch( - "aiogram.dispatcher.dispatcher.Dispatcher._process_update", new_callable=CoroutineMock - ) as mocked_process_update, patch( - "aiogram.dispatcher.router.Router.emit_startup", new_callable=CoroutineMock - ) as mocked_emit_startup, patch( - "aiogram.dispatcher.router.Router.emit_shutdown", new_callable=CoroutineMock - ) 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) mocked_emit_startup.assert_awaited() mocked_process_update.assert_awaited() mocked_emit_shutdown.assert_awaited() + assert dispatcher.workflow_data["bot"] == 42 + assert mocked_emit_shutdown.call_args.kwargs["bot"] == bot + + async def test_stop_polling(self): + dispatcher = Dispatcher() + with pytest.raises(RuntimeError): + await dispatcher.stop_polling() + + assert not dispatcher._stop_signal + assert not dispatcher._stopped_signal + with patch("asyncio.locks.Event.wait", new_callable=AsyncMock) as mocked_wait: + async with dispatcher._running_lock: + await dispatcher.stop_polling() + assert not dispatcher._stop_signal + + dispatcher._stop_signal = Event() + dispatcher._stopped_signal = Event() + await dispatcher.stop_polling() + assert dispatcher._stop_signal.is_set() + mocked_wait.assert_awaited() + + async def test_signal_stop_polling(self): + dispatcher = Dispatcher() + with patch("asyncio.locks.Event.set") as mocked_set: + dispatcher._signal_stop_polling(signal.SIGINT) + mocked_set.assert_not_called() + + async with dispatcher._running_lock: + dispatcher._signal_stop_polling(signal.SIGINT) + mocked_set.assert_not_called() + + dispatcher._stop_signal = Event() + dispatcher._stopped_signal = Event() + dispatcher._signal_stop_polling(signal.SIGINT) + mocked_set.assert_called() + + async def test_stop_polling_by_method(self, bot: MockedBot): + dispatcher = Dispatcher() + bot.add_result_for( + GetMe, ok=True, result=User(id=42, is_bot=True, first_name="The bot", username="tbot") + ) + running = Event() + + async def _mock_updates(*_): + running.set() + while True: + 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(), + ), + ): + task = asyncio.ensure_future(dispatcher.start_polling(bot)) + await running.wait() + + assert not dispatcher._stop_signal.is_set() + assert not dispatcher._stopped_signal.is_set() + + await dispatcher.stop_polling() + assert dispatcher._stop_signal.is_set() + assert dispatcher._stopped_signal.is_set() + assert not task.exception() + + mocked_process_update.assert_awaited() + + @pytest.mark.skip("Stopping by signal should also be tested as the same as stopping by method") + async def test_stop_polling_by_signal(self, bot: MockedBot): + pass def test_run_polling(self, bot: MockedBot): dispatcher = Dispatcher() + + async def stop(): + await asyncio.sleep(0.5) + await dispatcher.stop_polling() + + start_called = False + + @dispatcher.startup() + async def startup(): + nonlocal start_called + start_called = True + asyncio.create_task(stop()) + + original_start_polling = dispatcher.start_polling with patch( - "aiogram.dispatcher.dispatcher.Dispatcher.start_polling" + "aiogram.dispatcher.dispatcher.Dispatcher.start_polling", + side_effect=original_start_polling, ) as patched_start_polling: dispatcher.run_polling(bot) patched_start_polling.assert_awaited_once() + assert start_called + async def test_feed_webhook_update_fast_process(self, bot: MockedBot): dispatcher = Dispatcher() dispatcher.message.register(simple_message_handler) response = await dispatcher.feed_webhook_update(bot, RAW_UPDATE, _timeout=0.3) - assert isinstance(response, dict) - assert response["method"] == "sendMessage" - assert response["text"] == "ok" + assert isinstance(response, TelegramMethod) async def test_feed_webhook_update_slow_process(self, bot: MockedBot, recwarn): warnings.simplefilter("always") @@ -700,7 +1164,7 @@ class TestDispatcher: with patch( "aiogram.dispatcher.dispatcher.Dispatcher.silent_call_request", - new_callable=CoroutineMock, + new_callable=AsyncMock, ) as mocked_silent_call_request: response = await dispatcher.feed_webhook_update(bot, RAW_UPDATE, _timeout=0.1) assert response is None @@ -713,25 +1177,26 @@ class TestDispatcher: dispatcher = Dispatcher() dispatcher.message.register(invalid_message_handler) - response = await dispatcher.feed_webhook_update(bot, RAW_UPDATE, _timeout=0.1) - assert response is None - await asyncio.sleep(0.5) + pattern = r"Detected slow response into webhook" + with pytest.warns(RuntimeWarning, match=pattern) as record: + response = await dispatcher.feed_webhook_update(bot, RAW_UPDATE, _timeout=0.1) + assert response is None + await asyncio.sleep(0.5) - log_records = [rec.message for rec in caplog.records] - assert "Cause exception while process update" in log_records[0] + log_records = [rec.message for rec in caplog.records] + assert "Cause exception while process update" in log_records[0] + + if not record: + pytest.fail("Expected 'Detected slow response into webhook' warning.") def test_specify_updates_calculation(self): - def simple_msg_handler() -> None: - ... + def simple_msg_handler() -> None: ... - def simple_callback_query_handler() -> None: - ... + def simple_callback_query_handler() -> None: ... - def simple_poll_handler() -> None: - ... + def simple_poll_handler() -> None: ... - def simple_edited_msg_handler() -> None: - ... + def simple_edited_msg_handler() -> None: ... dispatcher = Dispatcher() dispatcher.message.register(simple_msg_handler) diff --git a/tests/test_dispatcher/test_event/test_event.py b/tests/test_dispatcher/test_event/test_event.py index 735c498b..91c5fbec 100644 --- a/tests/test_dispatcher/test_event/test_event.py +++ b/tests/test_dispatcher/test_event/test_event.py @@ -1,19 +1,12 @@ import functools from typing import Any +from unittest.mock import AsyncMock, patch import pytest from aiogram.dispatcher.event.event import EventObserver from aiogram.dispatcher.event.handler import HandlerObject -try: - from asynctest import CoroutineMock, patch -except ImportError: - from unittest.mock import AsyncMock as CoroutineMock # type: ignore - from unittest.mock import patch - -pytestmark = pytest.mark.asyncio - async def my_handler(value: str, index: int = 0) -> Any: return value @@ -53,8 +46,8 @@ class TestEventObserver: assert observer.handlers[2].awaitable with patch( - "aiogram.dispatcher.event.handler.CallableMixin.call", - new_callable=CoroutineMock, + "aiogram.dispatcher.event.handler.CallableObject.call", + new_callable=AsyncMock, ) as mocked_my_handler: results = await observer.trigger("test") assert results is None diff --git a/tests/test_dispatcher/test_event/test_handler.py b/tests/test_dispatcher/test_event/test_handler.py index 7257b47b..5b5bc4c9 100644 --- a/tests/test_dispatcher/test_event/test_handler.py +++ b/tests/test_dispatcher/test_event/test_handler.py @@ -1,15 +1,16 @@ import functools -from typing import Any, Dict, Union +from collections.abc import Callable +from typing import Any import pytest +from magic_filter import F as A from aiogram import F -from aiogram.dispatcher.event.handler import CallableMixin, FilterObject, HandlerObject -from aiogram.dispatcher.filters.base import BaseFilter -from aiogram.dispatcher.handler.base import BaseHandler +from aiogram.dispatcher.event.handler import CallableObject, FilterObject, HandlerObject +from aiogram.filters import Filter +from aiogram.handlers import BaseHandler from aiogram.types import Update - -pytestmark = pytest.mark.asyncio +from aiogram.utils.warnings import Recommendation def callback1(foo: int, bar: int, baz: int): @@ -28,8 +29,8 @@ async def callback4(foo: int, *, bar: int, baz: int): return locals() -class Filter(BaseFilter): - async def __call__(self, foo: int, bar: int, baz: int) -> Union[bool, Dict[str, Any]]: +class TestFilter(Filter): + async def __call__(self, foo: int, bar: int, baz: int) -> bool | dict[str, Any]: return locals() @@ -38,16 +39,16 @@ class SyncCallable: return locals() -class TestCallableMixin: - @pytest.mark.parametrize("callback", [callback2, Filter()]) +class TestCallableObject: + @pytest.mark.parametrize("callback", [callback2, TestFilter()]) def test_init_awaitable(self, callback): - obj = CallableMixin(callback) + obj = CallableObject(callback) assert obj.awaitable assert obj.callback == callback @pytest.mark.parametrize("callback", [callback1, SyncCallable()]) def test_init_not_awaitable(self, callback): - obj = CallableMixin(callback) + obj = CallableObject(callback) assert not obj.awaitable assert obj.callback == callback @@ -57,13 +58,13 @@ class TestCallableMixin: pytest.param(callback1, {"foo", "bar", "baz"}), pytest.param(callback2, {"foo", "bar", "baz"}), pytest.param(callback3, {"foo"}), - pytest.param(Filter(), {"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, args): - obj = CallableMixin(callback) - assert set(obj.spec.args) == args + def test_init_args_spec(self, callback: Callable, args: set[str]): + obj = CallableObject(callback) + assert set(obj.params) == args def test_init_decorated(self): def decorator(func): @@ -82,12 +83,12 @@ class TestCallableMixin: def callback2(foo, bar, baz): pass - obj1 = CallableMixin(callback1) - obj2 = CallableMixin(callback2) + obj1 = CallableObject(callback1) + obj2 = CallableObject(callback2) - assert set(obj1.spec.args) == {"foo", "bar", "baz"} + assert set(obj1.params) == {"foo", "bar", "baz"} assert obj1.callback == callback1 - assert set(obj2.spec.args) == {"foo", "bar", "baz"} + assert set(obj2.params) == {"foo", "bar", "baz"} assert obj2.callback == callback2 @pytest.mark.parametrize( @@ -117,25 +118,27 @@ class TestCallableMixin: {"foo": 42, "baz": "fuz", "bar": "test"}, ), pytest.param( - Filter(), {"foo": 42, "spam": True, "baz": "fuz"}, {"foo": 42, "baz": "fuz"} + TestFilter(), {"foo": 42, "spam": True, "baz": "fuz"}, {"foo": 42, "baz": "fuz"} ), pytest.param( SyncCallable(), {"foo": 42, "spam": True, "baz": "fuz"}, {"foo": 42, "baz": "fuz"} ), ], ) - def test_prepare_kwargs(self, callback, kwargs, result): - obj = CallableMixin(callback) + def test_prepare_kwargs( + self, callback: Callable, kwargs: dict[str, Any], result: dict[str, Any] + ): + obj = CallableObject(callback) assert obj._prepare_kwargs(kwargs) == result async def test_sync_call(self): - obj = CallableMixin(callback1) + obj = CallableObject(callback1) result = await obj.call(foo=42, bar="test", baz="fuz", spam=True) assert result == {"foo": 42, "bar": "test", "baz": "fuz"} async def test_async_call(self): - obj = CallableMixin(callback2) + obj = CallableObject(callback2) result = await obj.call(foo=42, bar="test", baz="fuz", spam=True) assert result == {"foo": 42, "bar": "test", "baz": "fuz"} @@ -145,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 @@ -209,3 +211,7 @@ class TestHandlerObject: assert len(handler.filters) == 1 result = await handler.call(Update(update_id=42)) assert result == 42 + + def test_warn_another_magic(self): + with pytest.warns(Recommendation): + FilterObject(callback=A.test.is_(True)) diff --git a/tests/test_dispatcher/test_event/test_middleware.py b/tests/test_dispatcher/test_event/test_middleware.py new file mode 100644 index 00000000..ffbe634d --- /dev/null +++ b/tests/test_dispatcher/test_event/test_middleware.py @@ -0,0 +1,42 @@ +from functools import partial + +from aiogram.dispatcher.middlewares.manager import MiddlewareManager + + +class TestMiddlewareManager: + async def test_register(self): + manager = MiddlewareManager() + + @manager + async def middleware(handler, event, data): + await handler(event, data) + + assert middleware in manager._middlewares + manager.unregister(middleware) + assert middleware not in manager._middlewares + + async def test_wrap_middlewares(self): + manager = MiddlewareManager() + + async def target(*args, **kwargs): + kwargs["target"] = True + kwargs["stack"].append(-1) + return kwargs + + async def middleware1(handler, event, data): + data["mw1"] = True + data["stack"].append(1) + return await handler(event, data) + + async def middleware2(handler, event, data): + data["mw2"] = True + data["stack"].append(2) + return await handler(event, data) + + wrapped = manager.wrap_middlewares([middleware1, middleware2], target) + + assert isinstance(wrapped, partial) + assert wrapped.func is middleware1 + + result = await wrapped(None, {"stack": []}) + assert result == {"mw1": True, "mw2": True, "target": True, "stack": [1, 2, -1]} diff --git a/tests/test_dispatcher/test_event/test_telegram.py b/tests/test_dispatcher/test_event/test_telegram.py index a30eb3a9..36c13ee4 100644 --- a/tests/test_dispatcher/test_event/test_telegram.py +++ b/tests/test_dispatcher/test_event/test_telegram.py @@ -1,20 +1,18 @@ import datetime import functools -from typing import Any, Awaitable, Callable, Dict, NoReturn, Optional, Union +from typing import Any, NoReturn import pytest +from pydantic import BaseModel -from aiogram.dispatcher.event.bases import REJECTED, SkipHandler +from aiogram.dispatcher.event.bases import UNHANDLED, SkipHandler from aiogram.dispatcher.event.handler import HandlerObject from aiogram.dispatcher.event.telegram import TelegramEventObserver -from aiogram.dispatcher.filters.base import BaseFilter from aiogram.dispatcher.router import Router -from aiogram.exceptions import FiltersResolveError +from aiogram.exceptions import UnsupportedKeywordArgument +from aiogram.filters import Filter from aiogram.types import Chat, Message, User -pytestmark = pytest.mark.asyncio - - # TODO: Test middlewares in routers tree @@ -30,10 +28,10 @@ async def pipe_handler(*args, **kwargs): return args, kwargs -class MyFilter1(BaseFilter): +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 @@ -45,159 +43,24 @@ class MyFilter3(MyFilter1): pass -class OptionalFilter(BaseFilter): - optional: Optional[str] +class OptionalFilter(Filter, BaseModel): + 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(BaseFilter): +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 class TestTelegramEventObserver: - def test_bind_filter(self): - event_observer = TelegramEventObserver(Router(), "test") - with pytest.raises(TypeError): - event_observer.bind_filter(object) # type: ignore - - class MyFilter(BaseFilter): - async def __call__( - self, *args: Any, **kwargs: Any - ) -> Callable[[Any], Awaitable[Union[bool, Dict[str, Any]]]]: - pass - - event_observer.bind_filter(MyFilter) - assert event_observer.filters - assert MyFilter in event_observer.filters - - def test_resolve_filters_chain(self): - router1 = Router(use_builtin_filters=False) - router2 = Router(use_builtin_filters=False) - router3 = Router(use_builtin_filters=False) - router1.include_router(router2) - router2.include_router(router3) - - router1.message.bind_filter(MyFilter1) - router1.message.bind_filter(MyFilter2) - router2.message.bind_filter(MyFilter2) - router3.message.bind_filter(MyFilter3) - - filters_chain1 = list(router1.message._resolve_filters_chain()) - filters_chain2 = list(router2.message._resolve_filters_chain()) - filters_chain3 = list(router3.message._resolve_filters_chain()) - - assert MyFilter1 in filters_chain1 - assert MyFilter1 in filters_chain2 - assert MyFilter1 in filters_chain3 - assert MyFilter2 in filters_chain1 - assert MyFilter2 in filters_chain2 - assert MyFilter2 in filters_chain3 - assert MyFilter3 in filters_chain3 - - assert MyFilter3 not in filters_chain1 - - async def test_resolve_filters_data_from_parent_router(self): - class FilterSet(BaseFilter): - set_filter: bool - - async def __call__(self, message: Message) -> dict: - return {"test": "hello world"} - - class FilterGet(BaseFilter): - get_filter: bool - - async def __call__(self, message: Message, **data) -> bool: - assert "test" in data - return True - - router1 = Router(use_builtin_filters=False) - router2 = Router(use_builtin_filters=False) - router1.include_router(router2) - - router1.message.bind_filter(FilterSet) - router2.message.bind_filter(FilterGet) - - @router2.message(set_filter=True, get_filter=True) - def handler_test(msg: Message, test: str): - assert test == "hello world" - - await router1.propagate_event( - "message", - Message(message_id=1, date=datetime.datetime.now(), chat=Chat(id=1, type="private")), - ) - - def test_resolve_filters(self): - router = Router(use_builtin_filters=False) - observer = router.message - observer.bind_filter(MyFilter1) - - resolved = observer.resolve_filters((), {"test": "PASS"}) - assert isinstance(resolved, list) - assert any(isinstance(item, MyFilter1) for item in resolved) - - # Unknown filter - with pytest.raises(FiltersResolveError, match="Unknown keyword filters: {'@bad'}"): - assert observer.resolve_filters((), {"@bad": "very"}) - - # Unknown filter - with pytest.raises(FiltersResolveError, match="Unknown keyword filters: {'@bad'}"): - assert observer.resolve_filters((), {"test": "ok", "@bad": "very"}) - - # Bad argument type - with pytest.raises(FiltersResolveError, match="Unknown keyword filters: {'test'}"): - assert observer.resolve_filters((), {"test": ...}) - - # Disallow same filter using - with pytest.raises(FiltersResolveError, match="Unknown keyword filters: {'test'}"): - observer.resolve_filters((MyFilter1(test="test"),), {"test": ...}) - - def test_dont_autoresolve_optional_filters_for_router(self): - router = Router(use_builtin_filters=False) - observer = router.message - observer.bind_filter(MyFilter1) - observer.bind_filter(OptionalFilter) - observer.bind_filter(DefaultFilter) - - observer.filter(test="test") - assert len(observer._handler.filters) == 1 - - def test_register_autoresolve_optional_filters(self): - router = Router(use_builtin_filters=False) - observer = router.message - observer.bind_filter(MyFilter1) - observer.bind_filter(OptionalFilter) - observer.bind_filter(DefaultFilter) - - assert observer.register(my_handler) == my_handler - assert isinstance(observer.handlers[0], HandlerObject) - assert isinstance(observer.handlers[0].filters[0].callback, OptionalFilter) - assert len(observer.handlers[0].filters) == 2 - assert isinstance(observer.handlers[0].filters[0].callback, OptionalFilter) - assert isinstance(observer.handlers[0].filters[1].callback, DefaultFilter) - - observer.register(my_handler, test="ok") - assert isinstance(observer.handlers[1], HandlerObject) - assert len(observer.handlers[1].filters) == 3 - assert isinstance(observer.handlers[1].filters[0].callback, MyFilter1) - assert isinstance(observer.handlers[1].filters[1].callback, OptionalFilter) - assert isinstance(observer.handlers[1].filters[2].callback, DefaultFilter) - - observer.register(my_handler, test="ok", optional="ok") - assert isinstance(observer.handlers[2], HandlerObject) - assert len(observer.handlers[2].filters) == 3 - assert isinstance(observer.handlers[2].filters[0].callback, MyFilter1) - assert isinstance(observer.handlers[2].filters[1].callback, OptionalFilter) - assert isinstance(observer.handlers[2].filters[2].callback, DefaultFilter) - def test_register(self): - router = Router(use_builtin_filters=False) + router = Router() observer = router.message - observer.bind_filter(MyFilter1) assert observer.register(my_handler) == my_handler assert isinstance(observer.handlers[0], HandlerObject) @@ -209,19 +72,24 @@ class TestTelegramEventObserver: assert len(observer.handlers[1].filters) == 1 assert observer.handlers[1].filters[0].callback == f - observer.register(my_handler, test="PASS") + observer.register(my_handler, MyFilter1(test="PASS")) assert isinstance(observer.handlers[2], HandlerObject) assert any(isinstance(item.callback, MyFilter1) for item in observer.handlers[2].filters) f2 = MyFilter2(test="ok") - observer.register(my_handler, f2, test="PASS") + observer.register(my_handler, f2, MyFilter1(test="PASS")) assert isinstance(observer.handlers[3], HandlerObject) callbacks = [filter_.callback for filter_ in observer.handlers[3].filters] assert f2 in callbacks assert MyFilter1(test="PASS") in callbacks + def test_keyword_filters_is_not_supported(self): + router = Router() + with pytest.raises(UnsupportedKeywordArgument): + router.message.register(lambda e: True, commands=["test"]) + def test_register_decorator(self): - router = Router(use_builtin_filters=False) + router = Router() observer = router.message @observer() @@ -232,10 +100,9 @@ class TestTelegramEventObserver: assert observer.handlers[0].callback == my_handler async def test_trigger(self): - router = Router(use_builtin_filters=False) + router = Router() observer = router.message - observer.bind_filter(MyFilter1) - observer.register(my_handler, test="ok") + observer.register(my_handler, MyFilter1(test="ok")) message = Message( message_id=42, @@ -257,7 +124,7 @@ class TestTelegramEventObserver: ), ) def test_register_filters_via_decorator(self, count, handler, filters): - router = Router(use_builtin_filters=False) + router = Router() observer = router.message for index in range(count): @@ -271,7 +138,7 @@ class TestTelegramEventObserver: assert len(registered_handler.filters) == len(filters) async def test_trigger_right_context_in_handlers(self): - router = Router(use_builtin_filters=False) + router = Router() observer = router.message async def mix_unnecessary_data(event): @@ -297,10 +164,9 @@ class TestTelegramEventObserver: def test_register_middleware(self, middleware_type): event_observer = TelegramEventObserver(Router(), "test") - middlewares = getattr(event_observer, f"{middleware_type}s") - decorator = getattr(event_observer, middleware_type) + middlewares = getattr(event_observer, middleware_type) - @decorator + @middlewares async def my_middleware1(handler, event, data): pass @@ -308,7 +174,7 @@ class TestTelegramEventObserver: assert my_middleware1.__name__ == "my_middleware1" assert my_middleware1 in middlewares - @decorator() + @middlewares() async def my_middleware2(handler, event, data): pass @@ -319,16 +185,16 @@ class TestTelegramEventObserver: async def my_middleware3(handler, event, data): pass - decorator(my_middleware3) + middlewares(my_middleware3) assert my_middleware3 is not None assert my_middleware3.__name__ == "my_middleware3" assert my_middleware3 in middlewares - assert middlewares == [my_middleware1, my_middleware2, my_middleware3] + assert list(middlewares) == [my_middleware1, my_middleware2, my_middleware3] def test_register_global_filters(self): - router = Router(use_builtin_filters=False) + router = Router() assert isinstance(router.message._handler.filters, list) assert not router.message._handler.filters @@ -354,8 +220,8 @@ class TestTelegramEventObserver: r1.message.register(handler) r2.message.register(handler) - assert await r1.message.trigger(None) is REJECTED - assert await r2.message.trigger(None) is None + assert await r1.propagate_event("message", None) is UNHANDLED + assert await r2.propagate_event("message", None) is None async def test_global_filter_in_nested_router(self): r1 = Router() @@ -368,4 +234,4 @@ class TestTelegramEventObserver: r1.message.filter(lambda evt: False) r2.message.register(handler) - assert await r1.message.trigger(None) is REJECTED + assert await r1.message.trigger(None) is UNHANDLED diff --git a/tests/test_dispatcher/test_filters/test_base.py b/tests/test_dispatcher/test_filters/test_base.py deleted file mode 100644 index 3e1e9a3e..00000000 --- a/tests/test_dispatcher/test_filters/test_base.py +++ /dev/null @@ -1,35 +0,0 @@ -from typing import Awaitable - -import pytest - -from aiogram.dispatcher.filters.base import BaseFilter - -try: - from asynctest import CoroutineMock, patch -except ImportError: - from unittest.mock import AsyncMock as CoroutineMock # type: ignore - from unittest.mock import patch - -pytestmark = pytest.mark.asyncio - - -class MyFilter(BaseFilter): - foo: str - - async def __call__(self, event: str): - return - - -class TestBaseFilter: - async def test_awaitable(self): - my_filter = MyFilter(foo="bar") - - assert isinstance(my_filter, Awaitable) - - with patch( - "tests.test_dispatcher.test_filters.test_base.MyFilter.__call__", - new_callable=CoroutineMock, - ) as mocked_call: - call = my_filter(event="test") - await call - mocked_call.assert_awaited_with(event="test") diff --git a/tests/test_dispatcher/test_filters/test_command.py b/tests/test_dispatcher/test_filters/test_command.py deleted file mode 100644 index d7a0ef55..00000000 --- a/tests/test_dispatcher/test_filters/test_command.py +++ /dev/null @@ -1,141 +0,0 @@ -import datetime -import re - -import pytest - -from aiogram import F -from aiogram.dispatcher.filters import Command, CommandObject -from aiogram.dispatcher.filters.command import CommandStart -from aiogram.types import Chat, Message, User -from tests.mocked_bot import MockedBot - -pytestmark = pytest.mark.asyncio - - -class TestCommandFilter: - def test_convert_to_list(self): - cmd = Command(commands="start") - assert cmd.commands - assert isinstance(cmd.commands, list) - assert cmd.commands[0] == "start" - assert cmd == Command(commands=["start"]) - - @pytest.mark.parametrize( - "text,command,result", - [ - ["/test@tbot", Command(commands=["test"], commands_prefix="/"), True], - ["!test", Command(commands=["test"], commands_prefix="/"), False], - ["/test@mention", Command(commands=["test"], commands_prefix="/"), False], - ["/tests", Command(commands=["test"], commands_prefix="/"), False], - ["/", Command(commands=["test"], commands_prefix="/"), False], - ["/ test", Command(commands=["test"], commands_prefix="/"), False], - ["", Command(commands=["test"], commands_prefix="/"), False], - [" ", Command(commands=["test"], commands_prefix="/"), False], - ["test", Command(commands=["test"], commands_prefix="/"), False], - [" test", Command(commands=["test"], commands_prefix="/"), False], - ["a", Command(commands=["test"], commands_prefix="/"), False], - ["/test@tbot some args", Command(commands=["test"]), True], - ["/test42@tbot some args", Command(commands=[re.compile(r"test(\d+)")]), True], - [ - "/test42@tbot some args", - Command(commands=[re.compile(r"test(\d+)")], command_magic=F.args == "some args"), - True, - ], - [ - "/test42@tbot some args", - Command(commands=[re.compile(r"test(\d+)")], command_magic=F.args == "test"), - False, - ], - ["/start test", CommandStart(), True], - ["/start", CommandStart(deep_link=True), False], - ["/start test", CommandStart(deep_link=True), True], - ["/start test", CommandStart(deep_link=True, deep_link_encoded=True), False], - ["/start dGVzdA", CommandStart(deep_link=True, deep_link_encoded=True), True], - ], - ) - async def test_parse_command(self, bot: MockedBot, text: str, result: bool, command: Command): - # TODO: test ignore case - # TODO: test ignore mention - - message = Message( - message_id=0, text=text, chat=Chat(id=42, type="private"), date=datetime.datetime.now() - ) - - response = await command(message, bot) - assert bool(response) is result - - @pytest.mark.parametrize( - "message,result", - [ - [ - 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"), - ), - False, - ], - [ - Message( - message_id=42, - date=datetime.datetime.now(), - text="/test", - chat=Chat(id=42, type="private"), - from_user=User(id=42, is_bot=False, first_name="Test"), - ), - True, - ], - ], - ) - async def test_call(self, message: Message, result: bool, bot: MockedBot): - command = Command(commands=["test"]) - assert bool(await command(message=message, bot=bot)) is result - - -class TestCommandObject: - @pytest.mark.parametrize( - "obj,result", - [ - [CommandObject(prefix="/", command="command", mention="mention", args="args"), True], - [CommandObject(prefix="/", command="command", args="args"), False], - ], - ) - def test_mentioned(self, obj: CommandObject, result: bool): - assert isinstance(obj.mentioned, bool) - assert obj.mentioned is result - - @pytest.mark.parametrize( - "obj,result", - [ - [ - CommandObject(prefix="/", command="command", mention="mention", args="args"), - "/command@mention args", - ], - [ - CommandObject(prefix="/", command="command", mention="mention", args=None), - "/command@mention", - ], - [ - CommandObject(prefix="/", command="command", mention=None, args="args"), - "/command args", - ], - [CommandObject(prefix="/", command="command", mention=None, args=None), "/command"], - [CommandObject(prefix="!", command="command", mention=None, args=None), "!command"], - ], - ) - def test_text(self, obj: CommandObject, result: str): - assert obj.text == result - - def test_update_handler_flags(self): - cmd = Command(commands=["start"]) - flags = {} - cmd.update_handler_flags(flags) - - assert "commands" in flags - assert isinstance(flags["commands"], list) - assert len(flags["commands"]) == 1 - assert flags["commands"][0] is cmd - - cmd.update_handler_flags(flags) - assert len(flags["commands"]) == 2 diff --git a/tests/test_dispatcher/test_filters/test_content_types.py b/tests/test_dispatcher/test_filters/test_content_types.py deleted file mode 100644 index 046073c4..00000000 --- a/tests/test_dispatcher/test_filters/test_content_types.py +++ /dev/null @@ -1,52 +0,0 @@ -from dataclasses import dataclass -from typing import cast - -import pytest -from pydantic import ValidationError - -from aiogram.dispatcher.filters import ContentTypesFilter -from aiogram.types import ContentType, Message - -pytestmark = pytest.mark.asyncio - - -@dataclass -class MinimalMessage: - content_type: str - - -class TestContentTypesFilter: - def test_validator_empty_list(self): - filter_ = ContentTypesFilter(content_types=[]) - assert filter_.content_types == [] - - def test_convert_to_list(self): - filter_ = ContentTypesFilter(content_types="text") - assert filter_.content_types - assert isinstance(filter_.content_types, list) - assert filter_.content_types[0] == "text" - assert filter_ == ContentTypesFilter(content_types=["text"]) - - @pytest.mark.parametrize("values", [["text", "photo"], ["sticker"]]) - def test_validator_with_values(self, values): - filter_ = ContentTypesFilter(content_types=values) - assert filter_.content_types == values - - @pytest.mark.parametrize("values", [["test"], ["text", "test"], ["TEXT"]]) - def test_validator_with_bad_values(self, values): - with pytest.raises(ValidationError): - ContentTypesFilter(content_types=values) - - @pytest.mark.parametrize( - "values,content_type,result", - [ - [[ContentType.TEXT], ContentType.TEXT, True], - [[ContentType.PHOTO], ContentType.TEXT, False], - [[ContentType.ANY], ContentType.TEXT, True], - [[ContentType.TEXT, ContentType.PHOTO, ContentType.DOCUMENT], ContentType.TEXT, True], - [[ContentType.ANY, ContentType.PHOTO, ContentType.DOCUMENT], ContentType.TEXT, True], - ], - ) - async def test_call(self, values, content_type, result): - filter_ = ContentTypesFilter(content_types=values) - assert await filter_(cast(Message, MinimalMessage(content_type=content_type))) == result diff --git a/tests/test_dispatcher/test_filters/test_state.py b/tests/test_dispatcher/test_filters/test_state.py deleted file mode 100644 index 2d8acda0..00000000 --- a/tests/test_dispatcher/test_filters/test_state.py +++ /dev/null @@ -1,52 +0,0 @@ -from inspect import isclass - -import pytest - -from aiogram.dispatcher.filters import StateFilter -from aiogram.dispatcher.fsm.state import State, StatesGroup -from aiogram.types import Update - -pytestmark = pytest.mark.asyncio - - -class MyGroup(StatesGroup): - state = State() - - -class TestStateFilter: - @pytest.mark.parametrize( - "state", [None, State("test"), MyGroup, MyGroup(), "state", ["state"]] - ) - def test_validator(self, state): - f = StateFilter(state=state) - assert isinstance(f.state, list) - value = f.state[0] - assert ( - isinstance(value, (State, str, MyGroup)) - or (isclass(value) and issubclass(value, StatesGroup)) - or value is None - ) - - @pytest.mark.parametrize( - "state,current_state,result", - [ - [State("state"), "@:state", True], - [[State("state")], "@:state", True], - [MyGroup, "MyGroup:state", True], - [[MyGroup], "MyGroup:state", True], - [MyGroup(), "MyGroup:state", True], - [[MyGroup()], "MyGroup:state", True], - ["*", "state", True], - [None, None, True], - [[None], None, True], - [None, "state", False], - [[], "state", False], - [[State("state"), "state"], "state", True], - [[MyGroup(), State("state")], "@:state", True], - [[MyGroup, State("state")], "state", False], - ], - ) - @pytestmark - async def test_filter(self, state, current_state, result): - f = StateFilter(state=state) - assert bool(await f(obj=Update(update_id=42), raw_state=current_state)) is result diff --git a/tests/test_dispatcher/test_filters/test_text.py b/tests/test_dispatcher/test_filters/test_text.py deleted file mode 100644 index ac3178de..00000000 --- a/tests/test_dispatcher/test_filters/test_text.py +++ /dev/null @@ -1,247 +0,0 @@ -import datetime -from itertools import permutations -from typing import Sequence, Type - -import pytest -from pydantic import ValidationError - -from aiogram.dispatcher.filters import BUILTIN_FILTERS -from aiogram.dispatcher.filters.text import Text -from aiogram.types import CallbackQuery, Chat, InlineQuery, Message, Poll, PollOption, User - -pytestmark = pytest.mark.asyncio - - -class TestText: - def test_default_for_observer(self): - registered_for = { - update_type for update_type, filters in BUILTIN_FILTERS.items() if Text in filters - } - assert registered_for == { - "message", - "edited_message", - "channel_post", - "edited_channel_post", - "inline_query", - "callback_query", - } - - def test_validator_not_enough_arguments(self): - with pytest.raises(ValidationError): - Text() - with pytest.raises(ValidationError): - Text(text_ignore_case=True) - - @pytest.mark.parametrize( - "first,last", - permutations(["text", "text_contains", "text_startswith", "text_endswith"], 2), - ) - @pytest.mark.parametrize("ignore_case", [True, False]) - def test_validator_too_few_arguments(self, first, last, ignore_case): - kwargs = {first: "test", last: "test"} - if ignore_case: - kwargs["text_ignore_case"] = True - - with pytest.raises(ValidationError): - Text(**kwargs) - - @pytest.mark.parametrize( - "argument", ["text", "text_contains", "text_startswith", "text_endswith"] - ) - @pytest.mark.parametrize("input_type", [str, list, tuple]) - def test_validator_convert_to_list(self, argument: str, input_type: Type): - text = Text(**{argument: input_type("test")}) - assert hasattr(text, argument) - assert isinstance(getattr(text, argument), Sequence) - - @pytest.mark.parametrize( - "argument,ignore_case,input_value,update_type,result", - [ - [ - "text", - False, - "test", - 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"), - ), - False, - ], - [ - "text", - False, - "test", - Message( - message_id=42, - date=datetime.datetime.now(), - caption="test", - chat=Chat(id=42, type="private"), - from_user=User(id=42, is_bot=False, first_name="Test"), - ), - True, - ], - [ - "text", - False, - "test", - Message( - message_id=42, - date=datetime.datetime.now(), - text="test", - chat=Chat(id=42, type="private"), - from_user=User(id=42, is_bot=False, first_name="Test"), - ), - True, - ], - [ - "text", - True, - "TEst", - Message( - message_id=42, - date=datetime.datetime.now(), - text="tesT", - chat=Chat(id=42, type="private"), - from_user=User(id=42, is_bot=False, first_name="Test"), - ), - True, - ], - [ - "text", - False, - "TEst", - Message( - message_id=42, - date=datetime.datetime.now(), - text="tesT", - chat=Chat(id=42, type="private"), - from_user=User(id=42, is_bot=False, first_name="Test"), - ), - False, - ], - [ - "text_startswith", - False, - "test", - Message( - message_id=42, - date=datetime.datetime.now(), - text="test case", - chat=Chat(id=42, type="private"), - from_user=User(id=42, is_bot=False, first_name="Test"), - ), - True, - ], - [ - "text_endswith", - False, - "case", - Message( - message_id=42, - date=datetime.datetime.now(), - text="test case", - chat=Chat(id=42, type="private"), - from_user=User(id=42, is_bot=False, first_name="Test"), - ), - True, - ], - [ - "text_contains", - False, - " ", - Message( - message_id=42, - date=datetime.datetime.now(), - text="test case", - chat=Chat(id=42, type="private"), - from_user=User(id=42, is_bot=False, first_name="Test"), - ), - True, - ], - [ - "text_startswith", - True, - "question", - Message( - message_id=42, - date=datetime.datetime.now(), - poll=Poll( - id="poll id", - question="Question?", - options=[PollOption(text="A", voter_count=0)], - is_closed=False, - is_anonymous=False, - type="regular", - allows_multiple_answers=False, - total_voter_count=0, - ), - chat=Chat(id=42, type="private"), - from_user=User(id=42, is_bot=False, first_name="Test"), - ), - True, - ], - [ - "text_startswith", - True, - "callback:", - CallbackQuery( - id="query id", - from_user=User(id=42, is_bot=False, first_name="Test"), - chat_instance="instance", - data="callback:data", - ), - True, - ], - [ - "text_startswith", - True, - "query", - InlineQuery( - id="query id", - from_user=User(id=42, is_bot=False, first_name="Test"), - query="query line", - offset="offset", - ), - True, - ], - [ - "text", - True, - "question", - Poll( - id="poll id", - question="Question", - options=[PollOption(text="A", voter_count=0)], - is_closed=False, - is_anonymous=False, - type="regular", - allows_multiple_answers=False, - total_voter_count=0, - ), - True, - ], - [ - "text", - True, - ["question", "another question"], - Poll( - id="poll id", - question="Another question", - options=[PollOption(text="A", voter_count=0)], - is_closed=False, - is_anonymous=False, - type="quiz", - allows_multiple_answers=False, - total_voter_count=0, - correct_option_id=0, - ), - True, - ], - ["text", True, ["question", "another question"], object(), False], - ], - ) - async def test_check_text(self, argument, ignore_case, input_value, result, update_type): - text = Text(**{argument: input_value}, text_ignore_case=ignore_case) - assert await text(obj=update_type) is result diff --git a/tests/test_dispatcher/test_fsm/storage/test_isolation.py b/tests/test_dispatcher/test_fsm/storage/test_isolation.py deleted file mode 100644 index 8b582f45..00000000 --- a/tests/test_dispatcher/test_fsm/storage/test_isolation.py +++ /dev/null @@ -1,30 +0,0 @@ -import pytest - -from aiogram.dispatcher.fsm.storage.base import BaseEventIsolation, StorageKey -from tests.mocked_bot import MockedBot - -pytestmark = pytest.mark.asyncio - - -@pytest.fixture(name="storage_key") -def create_storate_key(bot: MockedBot): - return StorageKey(chat_id=-42, user_id=42, bot_id=bot.id) - - -@pytest.mark.parametrize( - "isolation", - [ - pytest.lazy_fixture("redis_isolation"), - pytest.lazy_fixture("lock_isolation"), - pytest.lazy_fixture("disabled_isolation"), - ], -) -class TestIsolations: - async def test_lock( - self, - bot: MockedBot, - isolation: BaseEventIsolation, - storage_key: StorageKey, - ): - async with isolation.lock(bot=bot, key=storage_key): - assert True, "You are kidding me?" diff --git a/tests/test_dispatcher/test_fsm/storage/test_redis.py b/tests/test_dispatcher/test_fsm/storage/test_redis.py deleted file mode 100644 index 5bf3170e..00000000 --- a/tests/test_dispatcher/test_fsm/storage/test_redis.py +++ /dev/null @@ -1,57 +0,0 @@ -import pytest - -from aiogram.dispatcher.fsm.storage.base import DEFAULT_DESTINY, StorageKey -from aiogram.dispatcher.fsm.storage.redis import ( - DefaultKeyBuilder, - RedisEventIsolation, - RedisStorage, -) - -pytestmark = pytest.mark.asyncio - -PREFIX = "test" -BOT_ID = 42 -CHAT_ID = -1 -USER_ID = 2 -FIELD = "data" - - -class TestRedisDefaultKeyBuilder: - @pytest.mark.parametrize( - "with_bot_id,with_destiny,result", - [ - [False, False, f"{PREFIX}:{CHAT_ID}:{USER_ID}:{FIELD}"], - [True, False, f"{PREFIX}:{BOT_ID}:{CHAT_ID}:{USER_ID}:{FIELD}"], - [True, True, f"{PREFIX}:{BOT_ID}:{CHAT_ID}:{USER_ID}:{DEFAULT_DESTINY}:{FIELD}"], - [False, True, f"{PREFIX}:{CHAT_ID}:{USER_ID}:{DEFAULT_DESTINY}:{FIELD}"], - ], - ) - async def test_generate_key(self, with_bot_id: bool, with_destiny: bool, result: str): - key_builder = DefaultKeyBuilder( - prefix=PREFIX, - with_bot_id=with_bot_id, - with_destiny=with_destiny, - ) - key = StorageKey(chat_id=CHAT_ID, user_id=USER_ID, bot_id=BOT_ID, destiny=DEFAULT_DESTINY) - assert key_builder.build(key, FIELD) == result - - async def test_destiny_check(self): - key_builder = DefaultKeyBuilder( - with_destiny=False, - ) - key = StorageKey(chat_id=CHAT_ID, user_id=USER_ID, bot_id=BOT_ID) - assert key_builder.build(key, FIELD) - - key = StorageKey( - chat_id=CHAT_ID, user_id=USER_ID, bot_id=BOT_ID, destiny="CUSTOM_TEST_DESTINY" - ) - with pytest.raises(ValueError): - key_builder.build(key, FIELD) - - def test_create_isolation(self): - fake_redis = object() - storage = RedisStorage(redis=fake_redis) - isolation = storage.create_isolation() - assert isinstance(isolation, RedisEventIsolation) - assert isolation.redis is fake_redis - assert isolation.key_builder is storage.key_builder diff --git a/tests/test_dispatcher/test_fsm/storage/test_storages.py b/tests/test_dispatcher/test_fsm/storage/test_storages.py deleted file mode 100644 index 803e3059..00000000 --- a/tests/test_dispatcher/test_fsm/storage/test_storages.py +++ /dev/null @@ -1,49 +0,0 @@ -import pytest - -from aiogram.dispatcher.fsm.storage.base import BaseStorage, StorageKey -from tests.mocked_bot import MockedBot - -pytestmark = pytest.mark.asyncio - - -@pytest.fixture(name="storage_key") -def create_storate_key(bot: MockedBot): - return StorageKey(chat_id=-42, user_id=42, bot_id=bot.id) - - -@pytest.mark.parametrize( - "storage", - [pytest.lazy_fixture("redis_storage"), pytest.lazy_fixture("memory_storage")], -) -class TestStorages: - async def test_set_state(self, bot: MockedBot, storage: BaseStorage, storage_key: StorageKey): - assert await storage.get_state(bot=bot, key=storage_key) is None - - await storage.set_state(bot=bot, key=storage_key, state="state") - assert await storage.get_state(bot=bot, key=storage_key) == "state" - await storage.set_state(bot=bot, key=storage_key, state=None) - assert await storage.get_state(bot=bot, key=storage_key) is None - - async def test_set_data(self, bot: MockedBot, storage: BaseStorage, storage_key: StorageKey): - assert await storage.get_data(bot=bot, key=storage_key) == {} - - await storage.set_data(bot=bot, key=storage_key, data={"foo": "bar"}) - assert await storage.get_data(bot=bot, key=storage_key) == {"foo": "bar"} - await storage.set_data(bot=bot, key=storage_key, data={}) - assert await storage.get_data(bot=bot, key=storage_key) == {} - - async def test_update_data( - self, bot: MockedBot, storage: BaseStorage, storage_key: StorageKey - ): - assert await storage.get_data(bot=bot, key=storage_key) == {} - assert await storage.update_data(bot=bot, key=storage_key, data={"foo": "bar"}) == { - "foo": "bar" - } - assert await storage.update_data(bot=bot, key=storage_key, data={"baz": "spam"}) == { - "foo": "bar", - "baz": "spam", - } - assert await storage.get_data(bot=bot, key=storage_key) == { - "foo": "bar", - "baz": "spam", - } diff --git a/tests/test_dispatcher/test_fsm/test_strategy.py b/tests/test_dispatcher/test_fsm/test_strategy.py deleted file mode 100644 index 5a297679..00000000 --- a/tests/test_dispatcher/test_fsm/test_strategy.py +++ /dev/null @@ -1,20 +0,0 @@ -import pytest - -from aiogram.dispatcher.fsm.strategy import FSMStrategy, apply_strategy - - -class TestStrategy: - @pytest.mark.parametrize( - "strategy,case,expected", - [ - [FSMStrategy.USER_IN_CHAT, (-42, 42), (-42, 42)], - [FSMStrategy.CHAT, (-42, 42), (-42, -42)], - [FSMStrategy.GLOBAL_USER, (-42, 42), (42, 42)], - [FSMStrategy.USER_IN_CHAT, (42, 42), (42, 42)], - [FSMStrategy.CHAT, (42, 42), (42, 42)], - [FSMStrategy.GLOBAL_USER, (42, 42), (42, 42)], - ], - ) - def test_strategy(self, strategy, case, expected): - chat_id, user_id = case - assert apply_strategy(chat_id=chat_id, user_id=user_id, strategy=strategy) == expected diff --git a/tests/test_dispatcher/test_middlewares/test_user_context.py b/tests/test_dispatcher/test_middlewares/test_user_context.py index 8d289c2b..124bee61 100644 --- a/tests/test_dispatcher/test_middlewares/test_user_context.py +++ b/tests/test_dispatcher/test_middlewares/test_user_context.py @@ -1,6 +1,22 @@ +from datetime import datetime +from unittest.mock import patch + import pytest -from aiogram.dispatcher.middlewares.user_context import UserContextMiddleware +from aiogram.dispatcher.middlewares.user_context import ( + EventContext, + UserContextMiddleware, +) +from aiogram.types import ( + Chat, + ChatBoost, + ChatBoostSourceGiftCode, + ChatBoostSourceGiveaway, + ChatBoostSourcePremium, + ChatBoostUpdated, + Update, + User, +) async def next_handler(*args, **kwargs): @@ -8,7 +24,65 @@ async def next_handler(*args, **kwargs): class TestUserContextMiddleware: - @pytest.mark.asyncio async def test_unexpected_event_type(self): with pytest.raises(RuntimeError): await UserContextMiddleware()(next_handler, object(), {}) + + async def test_call(self): + middleware = UserContextMiddleware() + data = {} + + chat = Chat(id=1, type="private", title="Test") + user = User(id=2, first_name="Test", is_bot=False) + thread_id = 3 + + with patch.object( + UserContextMiddleware, + "resolve_event_context", + return_value=EventContext(user=user, chat=chat, thread_id=3), + ): + await middleware(next_handler, Update(update_id=42), data) + + event_context = data["event_context"] + assert isinstance(event_context, EventContext) + assert event_context.chat is chat + assert event_context.user is user + assert event_context.thread_id == thread_id + 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 56821f46..2c9f7820 100644 --- a/tests/test_dispatcher/test_router.py +++ b/tests/test_dispatcher/test_router.py @@ -1,11 +1,8 @@ import pytest from aiogram.dispatcher.event.bases import UNHANDLED, SkipHandler, skip +from aiogram.dispatcher.event.telegram import TelegramEventObserver from aiogram.dispatcher.router import Router -from aiogram.utils.warnings import CodeHasNoEffect - -pytestmark = pytest.mark.asyncio -importable_router = Router() class TestRouter: @@ -37,23 +34,26 @@ class TestRouter: assert router3.parent_router is router2 assert router3.sub_routers == [] - def test_include_router_code_has_no_effect(self): - router1 = Router() - router2 = Router(use_builtin_filters=False) - - assert router1.use_builtin_filters - assert not router2.use_builtin_filters - with pytest.warns(CodeHasNoEffect): - assert router1.include_router(router2) - - def test_include_router_by_string(self): + def test_including_many_routers(self): router = Router() - router.include_router("tests.test_dispatcher.test_router:importable_router") + router1 = Router() + router2 = Router() + + router.include_routers(router1, router2) + + assert router.sub_routers == [router1, router2] + + def test_including_many_routers_bad_type(self): + router = Router() + with pytest.raises(ValueError, match="At least one router must be provided"): + router.include_routers() def test_include_router_by_string_bad_type(self): router = Router() - with pytest.raises(ValueError, match=r"router should be instance of Router"): - router.include_router("tests.test_dispatcher.test_router:TestRouter") + 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): router = Router() @@ -73,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() @@ -164,3 +165,20 @@ class TestRouter: assert tuple(r2_1.chain_head) == (r2_1, r1) assert tuple(r2_2.chain_head) == (r2_2, r1) assert tuple(r3.chain_head) == (r3, r2_1, r1) + + async def test_custom_evenv_nested_router(self): + r1 = Router() + r2 = Router() + r3 = Router() + r3.observers["custom-event"] = TelegramEventObserver(r3, event_name="custom-event") + + async def handler(evt): + return evt + + r1.include_router(r2) + r1.include_router(r3) + r3.observers["custom-event"].register(handler) + + assert await r1.propagate_event(update_type="custom-event", event=None) is None + assert await r2.propagate_event(update_type="custom-event", event=None) is UNHANDLED + assert await r3.propagate_event(update_type="custom-event", event=None) is None diff --git a/tests/test_dispatcher/test_flags/__init__.py b/tests/test_filters/__init__.py similarity index 100% rename from tests/test_dispatcher/test_flags/__init__.py rename to tests/test_filters/__init__.py diff --git a/tests/test_filters/test_base.py b/tests/test_filters/test_base.py new file mode 100644 index 00000000..131cf1b0 --- /dev/null +++ b/tests/test_filters/test_base.py @@ -0,0 +1,24 @@ +from collections.abc import Awaitable +from unittest.mock import AsyncMock, patch + +from aiogram.filters import Filter + + +class MyFilter(Filter): + async def __call__(self, event: str): + return + + +class TestBaseFilter: + async def test_awaitable(self): + my_filter = MyFilter() + + assert isinstance(my_filter, Awaitable) + + with patch( + "tests.test_filters.test_base.MyFilter.__call__", + new_callable=AsyncMock, + ) as mocked_call: + call = my_filter(event="test") + await call + mocked_call.assert_awaited_with(event="test") diff --git a/tests/test_dispatcher/test_filters/test_callback_data.py b/tests/test_filters/test_callback_data.py similarity index 60% rename from tests/test_dispatcher/test_filters/test_callback_data.py rename to tests/test_filters/test_callback_data.py index cd7bc53e..79ca5929 100644 --- a/tests/test_dispatcher/test_filters/test_callback_data.py +++ b/tests/test_filters/test_callback_data.py @@ -1,7 +1,8 @@ +import sys from decimal import Decimal from enum import Enum, auto from fractions import Fraction -from typing import Optional +from typing import Optional, Union from uuid import UUID import pytest @@ -9,11 +10,9 @@ from magic_filter import MagicFilter from pydantic import ValidationError from aiogram import F -from aiogram.dispatcher.filters.callback_data import CallbackData +from aiogram.filters.callback_data import CallbackData from aiogram.types import CallbackQuery, User -pytestmark = pytest.mark.asyncio - class MyIntEnum(Enum): FOO = auto() @@ -30,7 +29,7 @@ class MyCallback(CallbackData, prefix="test"): class TestCallbackData: def test_init_subclass_prefix_required(self): - assert MyCallback.prefix == "test" + assert MyCallback.__prefix__ == "test" with pytest.raises(ValueError, match="prefix required.+"): @@ -38,12 +37,12 @@ class TestCallbackData: pass def test_init_subclass_sep_validation(self): - assert MyCallback.sep == ":" + assert MyCallback.__separator__ == ":" class MyCallback2(CallbackData, prefix="test2", sep="@"): pass - assert MyCallback2.sep == "@" + assert MyCallback2.__separator__ == "@" with pytest.raises(ValueError, match="Separator symbol '@' .+ 'sp@m'"): @@ -51,34 +50,38 @@ class TestCallbackData: pass @pytest.mark.parametrize( - "value,success,expected", + "value,expected", [ - [None, True, ""], - [42, True, "42"], - ["test", True, "test"], - [9.99, True, "9.99"], - [Decimal("9.99"), True, "9.99"], - [Fraction("3/2"), True, "3/2"], - [ - UUID("123e4567-e89b-12d3-a456-426655440000"), - True, - "123e4567-e89b-12d3-a456-426655440000", - ], - [MyIntEnum.FOO, True, "1"], - [MyStringEnum.FOO, True, "FOO"], - [..., False, "..."], - [object, False, "..."], - [object(), False, "..."], - [User(id=42, is_bot=False, first_name="test"), False, "..."], + [None, ""], + [True, "1"], + [False, "0"], + [42, "42"], + ["test", "test"], + [9.99, "9.99"], + [Decimal("9.99"), "9.99"], + [Fraction("3/2"), "3/2"], + [UUID("123e4567-e89b-12d3-a456-426655440000"), "123e4567e89b12d3a456426655440000"], + [MyIntEnum.FOO, "1"], + [MyStringEnum.FOO, "FOO"], ], ) - def test_encode_value(self, value, success, expected): + def test_encode_value_positive(self, value, expected): callback = MyCallback(foo="test", bar=42) - if success: - assert callback._encode_value("test", value) == expected - else: - with pytest.raises(ValueError): - assert callback._encode_value("test", value) == expected + assert callback._encode_value("test", value) == expected + + @pytest.mark.parametrize( + "value", + [ + ..., + object, + object(), + User(id=42, is_bot=False, first_name="test"), + ], + ) + def test_encode_value_negative(self, value): + callback = MyCallback(foo="test", bar=42) + with pytest.raises(ValueError): + callback._encode_value("test", value) def test_pack(self): with pytest.raises(ValueError, match="Separator symbol .+"): @@ -89,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" @@ -126,25 +141,58 @@ 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", + [ + Union[int, None], + Optional[int], + ], + ) + def test_unpack_optional_wo_default(self, hint): + """Test CallbackData without default optional.""" + + class TgData(CallbackData, prefix="tg"): + chat_id: int + thread_id: hint + + assert TgData.unpack("tg:123:") == TgData(chat_id=123, thread_id=None) + + @pytest.mark.skipif(sys.version_info < (3, 10), reason="UnionType is added in Python 3.10") + def test_unpack_optional_wo_default_union_type(self): + """Test CallbackData without default optional.""" + + class TgData(CallbackData, prefix="tg"): + chat_id: int + thread_id: int | None + + assert TgData.unpack("tg:123:") == TgData(chat_id=123, thread_id=None) + def test_build_filter(self): filter_object = MyCallback.filter(F.foo == "test") assert isinstance(filter_object.rule, MagicFilter) @@ -179,3 +227,7 @@ class TestCallbackDataFilter: async def test_invalid_call(self): filter_object = MyCallback.filter(F.test) assert not await filter_object(User(id=42, is_bot=False, first_name="test")) + + def test_str(self): + filter_object = MyCallback.filter(F.test) + assert str(filter_object).startswith("CallbackQueryFilter(callback_data=") diff --git a/tests/test_dispatcher/test_filters/test_chat_member_updated.py b/tests/test_filters/test_chat_member_updated.py similarity index 69% rename from tests/test_dispatcher/test_filters/test_chat_member_updated.py rename to tests/test_filters/test_chat_member_updated.py index 63ee1245..4582f052 100644 --- a/tests/test_dispatcher/test_filters/test_chat_member_updated.py +++ b/tests/test_filters/test_chat_member_updated.py @@ -2,7 +2,7 @@ from datetime import datetime import pytest -from aiogram.dispatcher.filters.chat_member_updated import ( +from aiogram.filters.chat_member_updated import ( ADMINISTRATOR, IS_MEMBER, JOIN_TRANSITION, @@ -12,7 +12,21 @@ from aiogram.dispatcher.filters.chat_member_updated import ( _MemberStatusMarker, _MemberStatusTransition, ) -from aiogram.types import Chat, ChatMember, ChatMemberUpdated, User +from aiogram.types import ( + Chat, + ChatMember, + ChatMemberAdministrator, + ChatMemberLeft, + ChatMemberMember, + ChatMemberRestricted, + ChatMemberUpdated, + User, +) + + +class ChatMemberCustom(ChatMember): + status: str + is_member: bool | None = None class TestMemberStatusMarker: @@ -104,11 +118,11 @@ class TestMemberStatusMarker: @pytest.mark.parametrize( "name,is_member,member,result", [ - ["test", None, ChatMember(status="member"), False], - ["test", None, ChatMember(status="test"), True], - ["test", True, ChatMember(status="test"), False], - ["test", True, ChatMember(status="test", is_member=True), True], - ["test", True, ChatMember(status="test", is_member=False), False], + ["test", None, ChatMemberCustom(status="member"), False], + ["test", None, ChatMemberCustom(status="test"), True], + ["test", True, ChatMemberCustom(status="test"), False], + ["test", True, ChatMemberCustom(status="test", is_member=True), True], + ["test", True, ChatMemberCustom(status="test", is_member=False), False], ], ) def test_check(self, name, is_member, member, result): @@ -235,29 +249,34 @@ class TestMemberStatusTransition: @pytest.mark.parametrize( "transition,old,new,result", [ - [JOIN_TRANSITION, ChatMember(status="left"), ChatMember(status="member"), True], [ JOIN_TRANSITION, - ChatMember(status="restricted", is_member=True), - ChatMember(status="member"), - False, - ], - [ - JOIN_TRANSITION, - ChatMember(status="restricted", is_member=False), - ChatMember(status="member"), + ChatMemberCustom(status="left"), + ChatMemberCustom(status="member"), True, ], [ JOIN_TRANSITION, - ChatMember(status="member"), - ChatMember(status="restricted", is_member=False), + ChatMemberCustom(status="restricted", is_member=True), + ChatMemberCustom(status="member"), + False, + ], + [ + JOIN_TRANSITION, + ChatMemberCustom(status="restricted", is_member=False), + ChatMemberCustom(status="member"), + True, + ], + [ + JOIN_TRANSITION, + ChatMemberCustom(status="member"), + ChatMemberCustom(status="restricted", is_member=False), False, ], [ LEAVE_TRANSITION, - ChatMember(status="member"), - ChatMember(status="restricted", is_member=False), + ChatMemberCustom(status="member"), + ChatMemberCustom(status="restricted", is_member=False), True, ], ], @@ -267,79 +286,100 @@ class TestMemberStatusTransition: class TestChatMemberUpdatedStatusFilter: - @pytest.mark.asyncio + USER = User(id=42, first_name="Test", is_bot=False) + PARAMS = { + "user": USER, + "until_date": datetime.now(), + "is_anonymous": True, + "custom_title": "title", + "can_be_edited": True, + "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_messages": True, + "can_edit_messages": True, + "can_pin_messages": True, + "can_manage_topics": 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_post_stories": True, + "can_edit_stories": True, + "can_delete_stories": True, + } + @pytest.mark.parametrize( "transition,old,new,result", [ - [JOIN_TRANSITION, ChatMember(status="left"), ChatMember(status="member"), True], [ JOIN_TRANSITION, - ChatMember(status="restricted", is_member=True), - ChatMember(status="member"), - False, - ], - [ - JOIN_TRANSITION, - ChatMember(status="restricted", is_member=False), - ChatMember(status="member"), + ChatMemberLeft(status="left", **PARAMS), + ChatMemberMember(status="member", **PARAMS), True, ], [ JOIN_TRANSITION, - ChatMember(status="member"), - ChatMember(status="restricted", is_member=False), + ChatMemberRestricted(status="restricted", is_member=True, **PARAMS), + ChatMemberMember(status="member", **PARAMS), + False, + ], + [ + JOIN_TRANSITION, + ChatMemberRestricted(status="restricted", is_member=False, **PARAMS), + ChatMemberMember(status="member", **PARAMS), + True, + ], + [ + JOIN_TRANSITION, + ChatMemberMember(status="member", **PARAMS), + ChatMemberRestricted(status="restricted", is_member=False, **PARAMS), False, ], [ LEAVE_TRANSITION, - ChatMember(status="member"), - ChatMember(status="restricted", is_member=False), + ChatMemberMember(status="member", **PARAMS), + ChatMemberRestricted(status="restricted", is_member=False, **PARAMS), True, ], [ ADMINISTRATOR, - ChatMember(status="member"), - ChatMember(status="administrator"), + ChatMemberMember(status="member", **PARAMS), + ChatMemberAdministrator(status="administrator", **PARAMS), True, ], [ IS_MEMBER, - ChatMember(status="restricted", is_member=False), - ChatMember(status="member"), + ChatMemberRestricted(status="restricted", is_member=False, **PARAMS), + ChatMemberMember(status="member", **PARAMS), True, ], ], ) async def test_call(self, transition, old, new, result): updated_filter = ChatMemberUpdatedFilter(member_status_changed=transition) - user = User(id=42, first_name="Test", is_bot=False) - update = { - "user": user, - "until_date": datetime.now(), - "is_anonymous": False, - "can_be_edited": True, - "can_manage_chat": True, - "can_delete_messages": True, - "can_manage_voice_chats": True, - "can_restrict_members": True, - "can_promote_members": True, - "can_change_info": True, - "can_invite_users": True, - "can_post_messages": True, - "can_edit_messages": True, - "can_pin_messages": True, - "can_send_messages": True, - "can_send_media_messages": True, - "can_send_polls": True, - "can_send_other_messages": True, - "can_add_web_page_previews": True, - } + event = ChatMemberUpdated( chat=Chat(id=42, type="test"), - from_user=user, - old_chat_member=old.copy(update=update), - new_chat_member=new.copy(update=update), + from_user=self.USER, + old_chat_member=old, + new_chat_member=new, date=datetime.now(), ) assert await updated_filter(event) is result + + def test_str(self): + updated_filter = ChatMemberUpdatedFilter(member_status_changed=JOIN_TRANSITION) + assert str(updated_filter).startswith("ChatMemberUpdatedFilter(member_status_changed=") diff --git a/tests/test_filters/test_command.py b/tests/test_filters/test_command.py new file mode 100644 index 00000000..2c01e151 --- /dev/null +++ b/tests/test_filters/test_command.py @@ -0,0 +1,230 @@ +import datetime +import re + +import pytest + +from aiogram import F +from aiogram.filters import Command, CommandObject +from aiogram.filters.command import CommandStart +from aiogram.types import BotCommand, Chat, Message, User +from tests.mocked_bot import MockedBot + + +class TestCommandFilter: + def test_commands_not_iterable(self): + with pytest.raises(ValueError): + Command(commands=1) + + def test_bad_type(self): + with pytest.raises(ValueError): + Command(1) + + def test_without_args(self): + with pytest.raises(ValueError): + Command() + + def test_resolve_bot_command(self): + command = Command(BotCommand(command="test", description="Test")) + assert isinstance(command.commands[0], str) + assert command.commands[0] == "test" + + def test_convert_to_list(self): + cmd = Command(commands="start") + assert cmd.commands + assert isinstance(cmd.commands, tuple) + assert cmd.commands[0] == "start" + # assert cmd == Command(commands=["start"]) + + @pytest.mark.parametrize( + "commands,checklist", + [ + [("Test1", "tEst2", "teSt3"), ("test1", "test2", "test3")], + [("12TeSt", "3t4Est", "5TE6sT"), ("12test", "3t4est", "5te6st")], + [[BotCommand(command="Test", description="Test1")], ("test",)], + [[BotCommand(command="tEsT", description="Test2")], ("test",)], + [(re.compile(r"test(\d+)"), "TeSt"), (re.compile(r"test(\d+)"), "test")], + ], + ) + def test_init_casefold(self, commands, checklist): + command = Command(*commands, ignore_case=True) + assert command.commands == checklist + + command = Command(*commands, ignore_case=False) + assert command.commands != checklist + + @pytest.mark.parametrize( + "text,command,result", + [ + ["/test@tbot", Command(commands=["test"], prefix="/"), True], + ["/test@tbot", Command("test", prefix="/"), True], + [ + "/test@tbot", + Command(BotCommand(command="test", description="description"), prefix="/"), + True, + ], + ["!test", Command(commands=["test"], prefix="/"), False], + ["/test@mention", Command(commands=["test"], prefix="/"), False], + ["/tests", Command(commands=["test"], prefix="/"), False], + ["/", Command(commands=["test"], prefix="/"), False], + ["/ test", Command(commands=["test"], prefix="/"), False], + ["", Command(commands=["test"], prefix="/"), False], + [" ", Command(commands=["test"], prefix="/"), False], + ["test", Command(commands=["test"], prefix="/"), False], + [" test", Command(commands=["test"], prefix="/"), False], + ["a", Command(commands=["test"], prefix="/"), False], + ["/test@tbot some args", Command(commands=["test"]), True], + ["/test42@tbot some args", Command(commands=[re.compile(r"test(\d+)")]), True], + [ + "/test42@tbot some args", + Command(commands=[re.compile(r"test(\d+)")], magic=F.args == "some args"), + True, + ], + [ + "/test42@tbot some args", + Command(commands=[re.compile(r"test(\d+)")], magic=F.args == "test"), + 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], + ["/start dGVzdA", CommandStart(deep_link=True, deep_link_encoded=True), True], + ["/TeSt", Command("test", ignore_case=True), True], + ["/TeSt", Command("TeSt", ignore_case=True), True], + ["/test", Command("TeSt", ignore_case=True), True], + ["/TeSt", Command("test", ignore_case=False), False], + ["/test", Command("TeSt", ignore_case=False), False], + ["/TeSt", Command("TeSt", ignore_case=False), True], + ], + ) + async def test_parse_command(self, bot: MockedBot, text: str, result: bool, command: Command): + # TODO: test ignore mention + + message = Message( + message_id=0, text=text, chat=Chat(id=42, type="private"), date=datetime.datetime.now() + ) + + response = await command(message, bot) + assert bool(response) is result + + @pytest.mark.parametrize( + "message,result", + [ + [ + 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"), + ), + False, + ], + [ + Message( + message_id=42, + date=datetime.datetime.now(), + text="/test", + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), + ), + True, + ], + [None, False], + ], + ) + async def test_call(self, message: Message, result: bool, bot: MockedBot): + command = Command(commands=["test"]) + assert bool(await command(message=message, bot=bot)) is result + + async def test_command_magic_result(self, bot: MockedBot): + message = Message( + message_id=0, + text="/test 42", + chat=Chat(id=42, type="private"), + date=datetime.datetime.now(), + ) + command = Command(commands=["test"], magic=(F.args.as_("args"))) + result = await command(message=message, bot=bot) + assert "args" in result + assert result["args"] == "42" + + async def test_empty_mention_is_none(self, bot: MockedBot): + # Fixed https://github.com/aiogram/aiogram/issues/1013: + # Empty mention should be None instead of empty string. + + message = Message( + message_id=0, + text="/test", + chat=Chat(id=42, type="private"), + date=datetime.datetime.now(), + ) + command = Command("test") + result = await command(message=message, bot=bot) + + assert "command" in result + command_obj: CommandObject = result["command"] + assert command_obj.mention is None + + def test_str(self): + cmd = Command(commands=["start"]) + assert str(cmd) == "Command('start', prefix='/', ignore_case=False, ignore_mention=False)" + + +class TestCommandStart: + def test_str(self): + cmd = CommandStart() + assert ( + str(cmd) + == "CommandStart(ignore_case=False, ignore_mention=False, deep_link_encoded=False)" + ) + + +class TestCommandObject: + @pytest.mark.parametrize( + "obj,result", + [ + [CommandObject(prefix="/", command="command", mention="mention", args="args"), True], + [CommandObject(prefix="/", command="command", args="args"), False], + ], + ) + def test_mentioned(self, obj: CommandObject, result: bool): + assert isinstance(obj.mentioned, bool) + assert obj.mentioned is result + + @pytest.mark.parametrize( + "obj,result", + [ + [ + CommandObject(prefix="/", command="command", mention="mention", args="args"), + "/command@mention args", + ], + [ + CommandObject(prefix="/", command="command", mention="mention", args=None), + "/command@mention", + ], + [ + CommandObject(prefix="/", command="command", mention=None, args="args"), + "/command args", + ], + [CommandObject(prefix="/", command="command", mention=None, args=None), "/command"], + [CommandObject(prefix="!", command="command", mention=None, args=None), "!command"], + ], + ) + def test_text(self, obj: CommandObject, result: str): + assert obj.text == result + + def test_update_handler_flags(self): + cmd = Command(commands=["start"]) + flags = {} + cmd.update_handler_flags(flags) + + assert "commands" in flags + assert isinstance(flags["commands"], list) + assert len(flags["commands"]) == 1 + assert flags["commands"][0] is cmd + + cmd.update_handler_flags(flags) + assert len(flags["commands"]) == 2 diff --git a/tests/test_dispatcher/test_filters/test_exception.py b/tests/test_filters/test_exception.py similarity index 57% rename from tests/test_dispatcher/test_filters/test_exception.py rename to tests/test_filters/test_exception.py index c1ffb6d8..dfc7fa80 100644 --- a/tests/test_dispatcher/test_filters/test_exception.py +++ b/tests/test_filters/test_exception.py @@ -2,11 +2,10 @@ import re import pytest -from aiogram import Dispatcher, F -from aiogram.dispatcher.filters import ExceptionMessageFilter, ExceptionTypeFilter +from aiogram import Dispatcher +from aiogram.filters import ExceptionMessageFilter, ExceptionTypeFilter from aiogram.types import Update - -pytestmark = pytest.mark.asyncio +from aiogram.types.error_event import ErrorEvent class TestExceptionMessageFilter: @@ -18,13 +17,17 @@ class TestExceptionMessageFilter: async def test_match(self): obj = ExceptionMessageFilter(pattern="KABOOM") - result = await obj(Update(update_id=0), exception=Exception()) + result = await obj(ErrorEvent(update=Update(update_id=0), exception=Exception())) assert not result - result = await obj(Update(update_id=0), exception=Exception("KABOOM")) + result = await obj(ErrorEvent(update=Update(update_id=0), exception=Exception("KABOOM"))) assert isinstance(result, dict) assert "match_exception" in result + async def test_str(self): + obj = ExceptionMessageFilter(pattern="KABOOM") + assert str(obj) == "ExceptionMessageFilter(pattern=re.compile('KABOOM'))" + class MyException(Exception): pass @@ -46,12 +49,16 @@ class TestExceptionTypeFilter: ], ) async def test_check(self, exception: Exception, value: bool): - obj = ExceptionTypeFilter(exception=MyException) + obj = ExceptionTypeFilter(MyException) - result = await obj(Update(update_id=0), exception=exception) + result = await obj(ErrorEvent(update=Update(update_id=0), exception=exception)) assert result == value + def test_without_arguments(self): + with pytest.raises(ValueError): + ExceptionTypeFilter() + class TestDispatchException: async def test_handle_exception(self, bot): @@ -62,7 +69,8 @@ class TestDispatchException: raise ValueError("KABOOM") @dp.errors(ExceptionMessageFilter(pattern="KABOOM")) - async def handler0(update, exception): + async def handler0(event): return "Handled" - assert await dp.feed_update(bot, Update(update_id=0)) == "Handled" + with pytest.warns(RuntimeWarning, match="Detected unknown update type"): + assert await dp.feed_update(bot, Update(update_id=0)) == "Handled" diff --git a/tests/test_filters/test_logic.py b/tests/test_filters/test_logic.py new file mode 100644 index 00000000..b1382766 --- /dev/null +++ b/tests/test_filters/test_logic.py @@ -0,0 +1,38 @@ +import pytest + +from aiogram.filters import Command, and_f, invert_f, or_f +from aiogram.filters.logic import _AndFilter, _InvertFilter, _OrFilter + + +class TestLogic: + @pytest.mark.parametrize( + "obj,case,result", + [ + [True, and_f(lambda t: t is True, lambda t: t is True), True], + [True, and_f(lambda t: t is True, lambda t: t is False), False], + [True, and_f(lambda t: t is False, lambda t: t is False), False], + [True, and_f(lambda t: {"t": t}, lambda t: t is False), False], + [True, and_f(lambda t: {"t": t}, lambda t: t is True), {"t": True}], + [True, or_f(lambda t: t is True, lambda t: t is True), True], + [True, or_f(lambda t: t is True, lambda t: t is False), True], + [True, or_f(lambda t: t is False, lambda t: t is False), False], + [True, or_f(lambda t: t is False, lambda t: t is True), True], + [True, or_f(lambda t: t is False, lambda t: {"t": t}), {"t": True}], + [True, or_f(lambda t: {"t": t}, lambda t: {"a": 42}), {"t": True}], + [True, invert_f(lambda t: t is False), True], + ], + ) + async def test_logic(self, obj, case, result): + assert await case(obj) == result + + @pytest.mark.parametrize( + "case,type_", + [ + [or_f(Command("test"), Command("test")), _OrFilter], + [and_f(Command("test"), Command("test")), _AndFilter], + [invert_f(Command("test")), _InvertFilter], + [~Command("test"), _InvertFilter], + ], + ) + def test_dunder_methods(self, case, type_): + assert isinstance(case, type_) diff --git a/tests/test_dispatcher/test_filters/test_magic_data.py b/tests/test_filters/test_magic_data.py similarity index 65% rename from tests/test_dispatcher/test_filters/test_magic_data.py rename to tests/test_filters/test_magic_data.py index 4a23f99a..efc12a5f 100644 --- a/tests/test_dispatcher/test_filters/test_magic_data.py +++ b/tests/test_filters/test_magic_data.py @@ -1,13 +1,11 @@ -import pytest from magic_filter import AttrDict from aiogram import F -from aiogram.dispatcher.filters import MagicData +from aiogram.filters import MagicData from aiogram.types import Update class TestMagicDataFilter: - @pytest.mark.asyncio async def test_call(self): called = False @@ -22,9 +20,13 @@ class TestMagicDataFilter: assert value.spam is True return value - f = MagicData(magic_data=F.func(check)) + f = MagicData(magic_data=F.func(check).as_("test")) result = await f(Update(update_id=123), "foo", "bar", spam=True) assert called - assert isinstance(result, bool) - assert result + assert isinstance(result, dict) + assert result["test"] + + def test_str(self): + f = MagicData(magic_data=F.event.text == "test") + assert str(f).startswith("MagicData(magic_data=") diff --git a/tests/test_filters/test_state.py b/tests/test_filters/test_state.py new file mode 100644 index 00000000..de7ad72d --- /dev/null +++ b/tests/test_filters/test_state.py @@ -0,0 +1,69 @@ +from copy import copy +from inspect import isclass + +import pytest + +from aiogram.dispatcher.event.handler import FilterObject +from aiogram.filters import StateFilter +from aiogram.fsm.state import State, StatesGroup +from aiogram.types import Update + + +class MyGroup(StatesGroup): + state = State() + + +class TestStateFilter: + @pytest.mark.parametrize("state", [None, State("test"), MyGroup, MyGroup(), "state"]) + def test_validator(self, state): + f = StateFilter(state) + assert isinstance(f.states, tuple) + value = f.states[0] + assert ( + isinstance(value, (State, str, MyGroup)) + or (isclass(value) and issubclass(value, StatesGroup)) + or value is None + ) + + @pytest.mark.parametrize( + "state,current_state,result", + [ + [[State("state")], "@:state", True], + [[MyGroup], "MyGroup:state", True], + [[MyGroup()], "MyGroup:state", True], + [["*"], "state", True], + [[None], None, True], + [[State("state"), "state"], "state", True], + [[MyGroup(), State("state")], "@:state", True], + [[MyGroup, State("state")], "state", False], + ], + ) + async def test_filter(self, state, current_state, result): + f = StateFilter(*state) + assert bool(await f(obj=Update(update_id=42), raw_state=current_state)) is result + + def test_empty_filter(self): + with pytest.raises(ValueError): + StateFilter() + + async def test_create_filter_from_state(self): + FilterObject(callback=State(state="state")) + + async def test_state_copy(self): + class SG(StatesGroup): + state = State() + + assert SG.state == copy(SG.state) + + assert SG.state == "SG:state" + assert SG.state == "SG:state" + + assert State() == State() + assert SG.state != 1 + + states = {SG.state: "OK"} + assert states.get(copy(SG.state)) == "OK" + + def test_str(self): + f = StateFilter("test") + assert str(f) == "StateFilter('test')" diff --git a/tests/test_dispatcher/test_fsm/__init__.py b/tests/test_flags/__init__.py similarity index 100% rename from tests/test_dispatcher/test_fsm/__init__.py rename to tests/test_flags/__init__.py diff --git a/tests/test_dispatcher/test_flags/test_decorator.py b/tests/test_flags/test_decorator.py similarity index 96% rename from tests/test_dispatcher/test_flags/test_decorator.py rename to tests/test_flags/test_decorator.py index 6c4e40df..c3213a24 100644 --- a/tests/test_dispatcher/test_flags/test_decorator.py +++ b/tests/test_flags/test_decorator.py @@ -1,6 +1,6 @@ import pytest -from aiogram.dispatcher.flags.flag import Flag, FlagDecorator, FlagGenerator +from aiogram.dispatcher.flags import Flag, FlagDecorator, FlagGenerator @pytest.fixture(name="flag") diff --git a/tests/test_dispatcher/test_flags/test_getter.py b/tests/test_flags/test_getter.py similarity index 93% rename from tests/test_dispatcher/test_flags/test_getter.py rename to tests/test_flags/test_getter.py index afe7891c..a21e3ea4 100644 --- a/tests/test_dispatcher/test_flags/test_getter.py +++ b/tests/test_flags/test_getter.py @@ -4,7 +4,7 @@ import pytest from aiogram import F from aiogram.dispatcher.event.handler import HandlerObject -from aiogram.dispatcher.flags.getter import ( +from aiogram.dispatcher.flags import ( check_flags, extract_flags, extract_flags_from_object, @@ -60,5 +60,5 @@ class TestGetters: ], ) def test_check_flag(self, flags, magic, result): - with patch("aiogram.dispatcher.flags.getter.extract_flags", return_value=flags): + with patch("aiogram.dispatcher.flags.extract_flags", return_value=flags): assert check_flags(object(), magic) == result diff --git a/tests/test_dispatcher/test_fsm/storage/__init__.py b/tests/test_fsm/__init__.py similarity index 100% rename from tests/test_dispatcher/test_fsm/storage/__init__.py rename to tests/test_fsm/__init__.py diff --git a/tests/test_dispatcher/test_handler/__init__.py b/tests/test_fsm/storage/__init__.py similarity index 100% rename from tests/test_dispatcher/test_handler/__init__.py rename to tests/test_fsm/storage/__init__.py diff --git a/tests/test_fsm/storage/test_isolation.py b/tests/test_fsm/storage/test_isolation.py new file mode 100644 index 00000000..2624ad26 --- /dev/null +++ b/tests/test_fsm/storage/test_isolation.py @@ -0,0 +1,61 @@ +from unittest.mock import AsyncMock, patch + +import pytest + +from aiogram.fsm.storage.base import BaseEventIsolation, StorageKey +from aiogram.fsm.storage.redis import RedisEventIsolation, RedisStorage + + +@pytest.mark.parametrize( + "isolation", + ["redis_isolation", "lock_isolation", "disabled_isolation"], + indirect=True, +) +class TestIsolations: + async def test_lock( + self, + isolation: BaseEventIsolation, + storage_key: StorageKey, + ): + async with isolation.lock(key=storage_key): + assert True, "Are you kidding me?" + + +class TestRedisEventIsolation: + def test_create_isolation(self): + fake_redis = object() + storage = RedisStorage(redis=fake_redis) + isolation = storage.create_isolation() + assert isinstance(isolation, RedisEventIsolation) + assert isolation.redis is fake_redis + assert isolation.key_builder is storage.key_builder + + def test_init_without_key_builder(self): + redis = AsyncMock() + isolation = RedisEventIsolation(redis=redis) + assert isolation.redis is redis + + assert isolation.key_builder is not None + + def test_init_with_key_builder(self): + redis = AsyncMock() + key_builder = AsyncMock() + isolation = RedisEventIsolation(redis=redis, key_builder=key_builder) + assert isolation.redis is redis + assert isolation.key_builder is key_builder + + def test_create_from_url(self): + with patch("redis.asyncio.connection.ConnectionPool.from_url") as pool: + isolation = RedisEventIsolation.from_url("redis://localhost:6379/0") + assert isinstance(isolation, RedisEventIsolation) + assert isolation.redis is not None + assert isolation.key_builder is not None + + pool.assert_called_once_with("redis://localhost:6379/0") + + async def test_close(self): + isolation = RedisEventIsolation(redis=AsyncMock()) + await isolation.close() + + # close is not called because connection should be closed from the storage + # assert isolation.redis.close.called_once() diff --git a/tests/test_fsm/storage/test_key_builder.py b/tests/test_fsm/storage/test_key_builder.py new file mode 100644 index 00000000..43df2a0e --- /dev/null +++ b/tests/test_fsm/storage/test_key_builder.py @@ -0,0 +1,106 @@ +from typing import Literal + +import pytest + +from aiogram.fsm.storage.base import DEFAULT_DESTINY, DefaultKeyBuilder, StorageKey + +PREFIX = "test" +BOT_ID = 42 +CHAT_ID = -1 +USER_ID = 2 +THREAD_ID = 3 +BUSINESS_CONNECTION_ID = "4" +FIELD = "data" + + +class TestDefaultKeyBuilder: + @pytest.mark.parametrize( + "key_builder,field,result", + [ + [ + DefaultKeyBuilder( + prefix=PREFIX, + with_bot_id=True, + with_destiny=True, + with_business_connection_id=True, + ), + FIELD, + f"{PREFIX}:{BOT_ID}:{BUSINESS_CONNECTION_ID}:{CHAT_ID}:{USER_ID}:{DEFAULT_DESTINY}:{FIELD}", + ], + [ + DefaultKeyBuilder(prefix=PREFIX, with_bot_id=True, with_destiny=True), + None, + f"{PREFIX}:{BOT_ID}:{CHAT_ID}:{USER_ID}:{DEFAULT_DESTINY}", + ], + [ + DefaultKeyBuilder( + prefix=PREFIX, with_bot_id=True, with_business_connection_id=True + ), + FIELD, + f"{PREFIX}:{BOT_ID}:{BUSINESS_CONNECTION_ID}:{CHAT_ID}:{USER_ID}:{FIELD}", + ], + [ + DefaultKeyBuilder(prefix=PREFIX, with_bot_id=True), + None, + f"{PREFIX}:{BOT_ID}:{CHAT_ID}:{USER_ID}", + ], + [ + DefaultKeyBuilder( + prefix=PREFIX, with_destiny=True, with_business_connection_id=True + ), + FIELD, + f"{PREFIX}:{BUSINESS_CONNECTION_ID}:{CHAT_ID}:{USER_ID}:{DEFAULT_DESTINY}:{FIELD}", + ], + [ + DefaultKeyBuilder(prefix=PREFIX, with_destiny=True), + None, + f"{PREFIX}:{CHAT_ID}:{USER_ID}:{DEFAULT_DESTINY}", + ], + [ + DefaultKeyBuilder(prefix=PREFIX, with_business_connection_id=True), + FIELD, + f"{PREFIX}:{BUSINESS_CONNECTION_ID}:{CHAT_ID}:{USER_ID}:{FIELD}", + ], + [DefaultKeyBuilder(prefix=PREFIX), None, f"{PREFIX}:{CHAT_ID}:{USER_ID}"], + ], + ) + async def test_generate_key( + self, + key_builder: DefaultKeyBuilder, + field: Literal["data", "state", "lock"] | None, + result: str, + ): + key = StorageKey( + chat_id=CHAT_ID, + user_id=USER_ID, + bot_id=BOT_ID, + business_connection_id=BUSINESS_CONNECTION_ID, + destiny=DEFAULT_DESTINY, + ) + assert key_builder.build(key, field) == result + + async def test_destiny_check(self): + key_builder = DefaultKeyBuilder( + with_destiny=False, + ) + key = StorageKey(chat_id=CHAT_ID, user_id=USER_ID, bot_id=BOT_ID) + assert key_builder.build(key, FIELD) + + key = StorageKey( + chat_id=CHAT_ID, user_id=USER_ID, bot_id=BOT_ID, destiny="CUSTOM_TEST_DESTINY" + ) + with pytest.raises(ValueError): + key_builder.build(key, FIELD) + + def test_thread_id(self): + key_builder = DefaultKeyBuilder( + prefix=PREFIX, + ) + key = StorageKey( + chat_id=CHAT_ID, + user_id=USER_ID, + bot_id=BOT_ID, + thread_id=THREAD_ID, + destiny=DEFAULT_DESTINY, + ) + assert key_builder.build(key, FIELD) == f"{PREFIX}:{CHAT_ID}:{THREAD_ID}:{USER_ID}:{FIELD}" diff --git a/tests/test_fsm/storage/test_mongo.py b/tests/test_fsm/storage/test_mongo.py new file mode 100644 index 00000000..95a476d6 --- /dev/null +++ b/tests/test_fsm/storage/test_mongo.py @@ -0,0 +1,166 @@ +import pytest +from pymongo.errors import PyMongoError + +from aiogram.fsm.state import State +from aiogram.fsm.storage.mongo import MongoStorage, StorageKey +from tests.conftest import CHAT_ID, USER_ID + +PREFIX = "fsm" + + +async def test_get_storage_passing_only_url(mongo_server): + storage = MongoStorage.from_url(url=mongo_server) + try: + await storage._client.server_info() + except PyMongoError as e: + pytest.fail(str(e)) + + +async def test_update_not_existing_data_with_empty_dictionary( + mongo_storage: MongoStorage, + storage_key: StorageKey, +): + assert await mongo_storage._collection.find_one({}) is None + assert await mongo_storage.get_data(key=storage_key) == {} + assert await mongo_storage.update_data(key=storage_key, data={}) == {} + assert await mongo_storage._collection.find_one({}) is None + + +async def test_document_life_cycle( + mongo_storage: MongoStorage, + storage_key: StorageKey, +): + assert await mongo_storage._collection.find_one({}) is None + await mongo_storage.set_state(storage_key, "test") + await mongo_storage.set_data(storage_key, {"key": "value"}) + assert await mongo_storage._collection.find_one({}) == { + "_id": f"{PREFIX}:{CHAT_ID}:{USER_ID}", + "state": "test", + "data": {"key": "value"}, + } + await mongo_storage.set_state(storage_key, None) + assert await mongo_storage._collection.find_one({}) == { + "_id": f"{PREFIX}:{CHAT_ID}:{USER_ID}", + "data": {"key": "value"}, + } + await mongo_storage.set_data(storage_key, {}) + assert await mongo_storage._collection.find_one({}) is None + + +class TestStateAndDataDoNotAffectEachOther: + async def test_state_and_data_do_not_affect_each_other_while_getting( + self, + mongo_storage: MongoStorage, + storage_key: StorageKey, + ): + assert await mongo_storage._collection.find_one({}) is None + await mongo_storage.set_state(storage_key, "test") + await mongo_storage.set_data(storage_key, {"key": "value"}) + assert await mongo_storage.get_state(storage_key) == "test" + assert await mongo_storage.get_data(storage_key) == {"key": "value"} + + async def test_data_do_not_affect_to_deleted_state_getting( + self, + mongo_storage: MongoStorage, + storage_key: StorageKey, + ): + await mongo_storage.set_state(storage_key, "test") + await mongo_storage.set_data(storage_key, {"key": "value"}) + await mongo_storage.set_state(storage_key, None) + assert await mongo_storage.get_state(storage_key) is None + + async def test_state_do_not_affect_to_deleted_data_getting( + self, + mongo_storage: MongoStorage, + storage_key: StorageKey, + ): + await mongo_storage.set_state(storage_key, "test") + await mongo_storage.set_data(storage_key, {"key": "value"}) + await mongo_storage.set_data(storage_key, {}) + assert await mongo_storage.get_data(storage_key) == {} + + async def test_state_do_not_affect_to_updating_not_existing_data_with_empty_dictionary( + self, + mongo_storage: MongoStorage, + storage_key: StorageKey, + ): + await mongo_storage.set_state(storage_key, "test") + assert await mongo_storage._collection.find_one({}, projection={"_id": 0}) == { + "state": "test" + } + assert await mongo_storage.update_data(key=storage_key, data={}) == {} + assert await mongo_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, + mongo_storage: MongoStorage, + storage_key: StorageKey, + ): + await mongo_storage.set_state(storage_key, "test") + assert await mongo_storage._collection.find_one({}, projection={"_id": 0}) == { + "state": "test" + } + assert await mongo_storage.update_data( + key=storage_key, + data={"key": "value"}, + ) == {"key": "value"} + assert await mongo_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, + mongo_storage: MongoStorage, + storage_key: StorageKey, + ): + await mongo_storage.set_state(storage_key, "test") + await mongo_storage.set_data(storage_key, {"key": "value"}) + assert await mongo_storage._collection.find_one({}, projection={"_id": 0}) == { + "state": "test", + "data": {"key": "value"}, + } + assert await mongo_storage.update_data(key=storage_key, data={}) == {"key": "value"} + assert await mongo_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, + mongo_storage: MongoStorage, + storage_key: StorageKey, + ): + await mongo_storage.set_state(storage_key, "test") + await mongo_storage.set_data(storage_key, {"key": "value"}) + assert await mongo_storage._collection.find_one({}, projection={"_id": 0}) == { + "state": "test", + "data": {"key": "value"}, + } + assert await mongo_storage.update_data( + key=storage_key, + data={"key": "VALUE", "key_2": "value_2"}, + ) == {"key": "VALUE", "key_2": "value_2"} + assert await mongo_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, mongo_storage: MongoStorage): + assert mongo_storage.resolve_state(value) == result 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 new file mode 100644 index 00000000..e374448b --- /dev/null +++ b/tests/test_fsm/storage/test_storages.py @@ -0,0 +1,82 @@ +from typing import TypedDict + +import pytest + +from aiogram.exceptions import DataNotDictLikeError +from aiogram.fsm.storage.base import BaseStorage, StorageKey + + +@pytest.mark.parametrize( + "storage", + ["memory_storage", "redis_storage", "mongo_storage", "pymongo_storage"], + indirect=True, +) +class TestStorages: + async def test_set_state(self, storage: BaseStorage, storage_key: StorageKey): + assert await storage.get_state(key=storage_key) is None + + await storage.set_state(key=storage_key, state="state") + assert await storage.get_state(key=storage_key) == "state" + await storage.set_state(key=storage_key, state=None) + assert await storage.get_state(key=storage_key) is None + + 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) == {} + assert await storage.update_data(key=storage_key, data={"foo": "bar"}) == {"foo": "bar"} + assert await storage.update_data(key=storage_key, data={}) == {"foo": "bar"} + assert await storage.get_data(key=storage_key) == {"foo": "bar"} + assert await storage.update_data(key=storage_key, data={"baz": "spam"}) == { + "foo": "bar", + "baz": "spam", + } + assert await storage.get_data(key=storage_key) == { + "foo": "bar", + "baz": "spam", + } + assert await storage.update_data(key=storage_key, data={"baz": "test"}) == { + "foo": "bar", + "baz": "test", + } + assert await storage.get_data(key=storage_key) == { + "foo": "bar", + "baz": "test", + } diff --git a/tests/test_dispatcher/test_fsm/test_context.py b/tests/test_fsm/test_context.py similarity index 67% rename from tests/test_dispatcher/test_fsm/test_context.py rename to tests/test_fsm/test_context.py index aced7116..76126d31 100644 --- a/tests/test_dispatcher/test_fsm/test_context.py +++ b/tests/test_fsm/test_context.py @@ -1,12 +1,10 @@ import pytest -from aiogram.dispatcher.fsm.context import FSMContext -from aiogram.dispatcher.fsm.storage.base import StorageKey -from aiogram.dispatcher.fsm.storage.memory import MemoryStorage +from aiogram.fsm.context import FSMContext +from aiogram.fsm.storage.base import StorageKey +from aiogram.fsm.storage.memory import MemoryStorage from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - @pytest.fixture() def state(bot: MockedBot): @@ -15,7 +13,7 @@ def state(bot: MockedBot): ctx = storage.storage[key] ctx.state = "test" ctx.data = {"foo": "bar"} - return FSMContext(bot=bot, storage=storage, key=key) + return FSMContext(storage=storage, key=key) class TestFSMContext: @@ -24,15 +22,9 @@ class TestFSMContext: ctx = storage.storage[StorageKey(chat_id=-42, user_id=42, bot_id=bot.id)] ctx.state = "test" ctx.data = {"foo": "bar"} - state = FSMContext( - bot=bot, storage=storage, key=StorageKey(chat_id=-42, user_id=42, bot_id=bot.id) - ) - state2 = FSMContext( - bot=bot, storage=storage, key=StorageKey(chat_id=42, user_id=42, bot_id=bot.id) - ) - state3 = FSMContext( - bot=bot, storage=storage, key=StorageKey(chat_id=69, user_id=69, bot_id=bot.id) - ) + state = FSMContext(storage=storage, key=StorageKey(chat_id=-42, user_id=42, bot_id=bot.id)) + state2 = FSMContext(storage=storage, key=StorageKey(chat_id=42, user_id=42, bot_id=bot.id)) + state3 = FSMContext(storage=storage, key=StorageKey(chat_id=69, user_id=69, bot_id=bot.id)) assert await state.get_state() == "test" assert await state2.get_state() is None @@ -42,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 new file mode 100644 index 00000000..ba601325 --- /dev/null +++ b/tests/test_fsm/test_scene.py @@ -0,0 +1,1861 @@ +import inspect +from datetime import datetime +from unittest.mock import ANY, AsyncMock, patch + +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 Command, StateFilter +from aiogram.fsm.context import FSMContext +from aiogram.fsm.scene import ( + ActionContainer, + After, + HandlerContainer, + HistoryManager, + ObserverDecorator, + ObserverMarker, + Scene, + SceneAction, + SceneConfig, + SceneHandlerWrapper, + SceneRegistry, + ScenesManager, + SceneWizard, + _empty_handler, + on, +) +from aiogram.fsm.state import State, StatesGroup +from aiogram.fsm.storage.base import StorageKey +from aiogram.fsm.storage.memory import MemoryStorage, MemoryStorageRecord +from aiogram.types import Chat, Message, Update +from tests.mocked_bot import MockedBot + + +class TestOnMarker: + @pytest.mark.parametrize( + "marker_name", + [ + "message", + "edited_message", + "channel_post", + "edited_channel_post", + "inline_query", + "chosen_inline_result", + "callback_query", + "shipping_query", + "pre_checkout_query", + "poll", + "poll_answer", + "my_chat_member", + "chat_member", + "chat_join_request", + ], + ) + def test_marker_name(self, marker_name: str): + attr = getattr(on, marker_name) + assert isinstance(attr, ObserverMarker) + assert attr.name == marker_name + + +async def test_empty_handler(): + result = await _empty_handler() + assert result is None + + +class TestAfter: + def test_exit(self): + after = After.exit() + assert after is not None + assert after.action == SceneAction.exit + assert after.scene is None + + def test_back(self): + after = After.back() + assert after is not None + assert after.action == SceneAction.back + assert after.scene is None + + def test_goto(self): + after = After.goto("test") + assert after is not None + assert after.action == SceneAction.enter + assert after.scene == "test" + + +class TestObserverMarker: + def test_decorator(self): + marker = ObserverMarker("test") + decorator = marker(F.test, after=After.back()) + assert isinstance(decorator, ObserverDecorator) + assert decorator.name == "test" + assert len(decorator.filters) == 1 + assert decorator.action is None + assert decorator.after is not None + + def test_enter(self): + marker = ObserverMarker("test") + decorator = marker.enter(F.test) + assert isinstance(decorator, ObserverDecorator) + assert decorator.name == "test" + assert len(decorator.filters) == 1 + assert decorator.action == SceneAction.enter + assert decorator.after is None + + def test_leave(self): + marker = ObserverMarker("test") + decorator = marker.leave() + assert isinstance(decorator, ObserverDecorator) + assert decorator.name == "test" + assert len(decorator.filters) == 0 + assert decorator.action == SceneAction.leave + assert decorator.after is None + + def test_exit(self): + marker = ObserverMarker("test") + decorator = marker.exit() + assert isinstance(decorator, ObserverDecorator) + assert decorator.name == "test" + assert len(decorator.filters) == 0 + assert decorator.action == SceneAction.exit + assert decorator.after is None + + def test_back(self): + marker = ObserverMarker("test") + decorator = marker.back() + assert isinstance(decorator, ObserverDecorator) + assert decorator.name == "test" + assert len(decorator.filters) == 0 + assert decorator.action == SceneAction.back + assert decorator.after is None + + +class TestObserverDecorator: + def test_wrap_something(self): + decorator = ObserverDecorator("test", F.test) + + with pytest.raises(TypeError): + decorator("test") + + def test_wrap_handler(self): + decorator = ObserverDecorator("test", F.test) + + def handler(): + pass + + wrapped = decorator(handler) + + assert wrapped is not None + assert hasattr(wrapped, "__aiogram_handler__") + assert isinstance(wrapped.__aiogram_handler__, list) + assert len(wrapped.__aiogram_handler__) == 1 + + wrapped2 = decorator(handler) + + assert len(wrapped2.__aiogram_handler__) == 2 + + def test_wrap_action(self): + decorator = ObserverDecorator("test", F.test, action=SceneAction.enter) + + def handler(): + pass + + wrapped = decorator(handler) + assert wrapped is not None + assert not hasattr(wrapped, "__aiogram_handler__") + assert hasattr(wrapped, "__aiogram_action__") + + assert isinstance(wrapped.__aiogram_action__, dict) + assert len(wrapped.__aiogram_action__) == 1 + assert SceneAction.enter in wrapped.__aiogram_action__ + assert "test" in wrapped.__aiogram_action__[SceneAction.enter] + + def test_observer_decorator_leave(self): + observer_decorator = ObserverDecorator("Test Name", (F.text,)) + action_container = observer_decorator.leave() + assert isinstance(action_container, ActionContainer) + assert action_container.name == "Test Name" + assert action_container.filters == (F.text,) + assert action_container.action == SceneAction.leave + + def test_observer_decorator_enter(self): + observer_decorator = ObserverDecorator("test", (F.text,)) + target = "mock_target" + action_container = observer_decorator.enter(target) + assert isinstance(action_container, ActionContainer) + assert action_container.name == "test" + assert action_container.filters == (F.text,) + assert action_container.action == SceneAction.enter + assert action_container.target == target + + def test_observer_decorator_exit(self): + observer_decorator = ObserverDecorator("test", (F.text,)) + action_container = observer_decorator.exit() + assert isinstance(action_container, ActionContainer) + assert action_container.name == "test" + assert action_container.filters == (F.text,) + assert action_container.action == SceneAction.exit + + def test_observer_decorator_back(self): + observer_decorator = ObserverDecorator("test", (F.text,)) + action_container = observer_decorator.back() + assert isinstance(action_container, ActionContainer) + assert action_container.name == "test" + assert action_container.filters == (F.text,) + assert action_container.action == SceneAction.back + + +class TestActionContainer: + async def test_action_container_execute_enter(self): + wizard_mock = AsyncMock(spec=SceneWizard) + + action_container = ActionContainer( + "Test Name", (F.text,), SceneAction.enter, "Test Target" + ) + await action_container.execute(wizard_mock) + + wizard_mock.goto.assert_called_once_with("Test Target") + + async def test_action_container_execute_leave(self): + wizard_mock = AsyncMock(spec=SceneWizard) + + action_container = ActionContainer("Test Name", (F.text,), SceneAction.leave) + await action_container.execute(wizard_mock) + + wizard_mock.leave.assert_called_once() + + async def test_action_container_execute_exit(self): + wizard_mock = AsyncMock(spec=SceneWizard) + + action_container = ActionContainer("Test Name", (F.text,), SceneAction.exit) + await action_container.execute(wizard_mock) + + wizard_mock.exit.assert_called_once() + + async def test_action_container_execute_back(self): + wizard_mock = AsyncMock(spec=SceneWizard) + + action_container = ActionContainer("Test Name", (F.text,), SceneAction.back) + await action_container.execute(wizard_mock) + + wizard_mock.back.assert_called_once() + + +class TestSceneHandlerWrapper: + async def test_scene_handler_wrapper_call(self): + class MyScene(Scene): + pass + + async def handler_mock(*args, **kwargs): + return 42 + + state_mock = AsyncMock(spec=FSMContext) + scenes_mock = AsyncMock(spec=ScenesManager) + scenes_mock.data = {} + event_update_mock = Update( + update_id=42, + message=Message( + message_id=42, + text="test", + date=datetime.now(), + chat=Chat( + type="private", + id=42, + ), + ), + ) + kwargs = {"state": state_mock, "scenes": scenes_mock, "event_update": event_update_mock} + + scene_handler_wrapper = SceneHandlerWrapper(MyScene, handler_mock) + result = await scene_handler_wrapper(event_update_mock, **kwargs) + + # Check whether result is correct + assert result == 42 + + async def test_scene_handler_wrapper_call_with_after(self): + class MyScene(Scene): + pass + + async def handler_mock(*args, **kwargs): + return 42 + + state_mock = AsyncMock(spec=FSMContext) + scenes_mock = AsyncMock(spec=ScenesManager) + scenes_mock.data = {} + event_update_mock = Update( + update_id=42, + message=Message( + message_id=42, + text="test", + date=datetime.now(), + chat=Chat( + type="private", + id=42, + ), + ), + ) + kwargs = {"state": state_mock, "scenes": scenes_mock, "event_update": event_update_mock} + + scene_handler_wrapper = SceneHandlerWrapper(MyScene, handler_mock, after=After.exit()) + + with patch( + "aiogram.fsm.scene.ActionContainer.execute", new_callable=AsyncMock + ) as after_mock: + result = await scene_handler_wrapper(event_update_mock, **kwargs) + + # Check whether after_mock is called + after_mock.assert_called_once_with(ANY) + + # 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 + + async def handler_mock(*args, **kwargs): + pass + + after = After.back() + + scene_handler_wrapper = SceneHandlerWrapper(MyScene, handler_mock, after=after) + result = str(scene_handler_wrapper) + + assert result == f"SceneHandlerWrapper({MyScene}, {handler_mock}, after={after})" + + def test_await(self): + class MyScene(Scene): + pass + + async def handler_mock(*args, **kwargs): + pass + + scene_handler_wrapper = SceneHandlerWrapper(MyScene, handler_mock) + + assert inspect.isawaitable(scene_handler_wrapper) + + assert hasattr(scene_handler_wrapper, "__await__") + assert scene_handler_wrapper.__await__() is scene_handler_wrapper + + +class TestHistoryManager: + async def test_history_manager_push(self): + state = FSMContext( + storage=MemoryStorage(), key=StorageKey(bot_id=42, chat_id=-42, user_id=42) + ) + history_manager = HistoryManager(state=state) + + data = {"test_data": "test_data"} + await history_manager.push("test_state", data) + + history_data = await history_manager._history_state.get_data() + assert history_data.get("history") == [{"state": "test_state", "data": data}] + + async def test_history_manager_push_if_history_overflow(self): + state = FSMContext( + storage=MemoryStorage(), key=StorageKey(bot_id=42, chat_id=-42, user_id=42) + ) + history_manager = HistoryManager(state=state, size=2) + + states = ["test_state", "test_state2", "test_state3", "test_state4"] + data = {"test_data": "test_data"} + for state in states: + await history_manager.push(state, data) + + history_data = await history_manager._history_state.get_data() + assert history_data.get("history") == [ + {"state": "test_state3", "data": data}, + {"state": "test_state4", "data": data}, + ] + + async def test_history_manager_pop(self): + state = FSMContext( + storage=MemoryStorage(), key=StorageKey(bot_id=42, chat_id=-42, user_id=42) + ) + history_manager = HistoryManager(state=state) + + data = {"test_data": "test_data"} + await history_manager.push("test_state", data) + await history_manager.push("test_state2", data) + + record = await history_manager.pop() + history_data = await history_manager._history_state.get_data() + + assert isinstance(record, MemoryStorageRecord) + assert record == MemoryStorageRecord(state="test_state2", data=data) + assert history_data.get("history") == [{"state": "test_state", "data": data}] + + async def test_history_manager_pop_if_history_empty(self): + state = FSMContext( + storage=MemoryStorage(), key=StorageKey(bot_id=42, chat_id=-42, user_id=42) + ) + history_manager = HistoryManager(state=state) + + record = await history_manager.pop() + assert record is None + + async def test_history_manager_pop_if_history_become_empty_after_pop(self): + state = FSMContext( + storage=MemoryStorage(), key=StorageKey(bot_id=42, chat_id=-42, user_id=42) + ) + history_manager = HistoryManager(state=state) + + data = {"test_data": "test_data"} + await history_manager.push("test_state", data) + + await history_manager.pop() + + assert await history_manager._history_state.get_data() == {} + + async def test_history_manager_get(self): + state = FSMContext( + storage=MemoryStorage(), key=StorageKey(bot_id=42, chat_id=-42, user_id=42) + ) + history_manager = HistoryManager(state=state) + + data = {"test_data": "test_data"} + await history_manager.push("test_state", data) + + record = await history_manager.get() + + assert isinstance(record, MemoryStorageRecord) + assert record == MemoryStorageRecord(state="test_state", data=data) + + async def test_history_manager_get_if_history_empty(self): + state = FSMContext( + storage=MemoryStorage(), key=StorageKey(bot_id=42, chat_id=-42, user_id=42) + ) + history_manager = HistoryManager(state=state) + + record = await history_manager.get() + assert record is None + + async def test_history_manager_all(self): + state = FSMContext( + storage=MemoryStorage(), key=StorageKey(bot_id=42, chat_id=-42, user_id=42) + ) + history_manager_size = 10 + history_manager = HistoryManager(state=state, size=history_manager_size) + + data = {"test_data": "test_data"} + for i in range(history_manager_size): + await history_manager.push(f"test_state{i}", data) + + records = await history_manager.all() + + assert isinstance(records, list) + assert len(records) == history_manager_size + assert all(isinstance(record, MemoryStorageRecord) for record in records) + + async def test_history_manager_all_if_history_empty(self): + state = FSMContext( + storage=MemoryStorage(), key=StorageKey(bot_id=42, chat_id=-42, user_id=42) + ) + history_manager = HistoryManager(state=state) + + records = await history_manager.all() + assert records == [] + + async def test_history_manager_clear(self): + state = FSMContext( + storage=MemoryStorage(), key=StorageKey(bot_id=42, chat_id=-42, user_id=42) + ) + + history_manager = HistoryManager(state=state) + data = {"test_data": "test_data"} + await history_manager.push("test_state", data) + + await history_manager.clear() + + assert await history_manager._history_state.get_data() == {} + + async def test_history_manager_snapshot(self): + state = FSMContext( + storage=MemoryStorage(), key=StorageKey(bot_id=42, chat_id=-42, user_id=42) + ) + + history_manager = HistoryManager(state=state) + data = {"test_data": "test_data"} + await history_manager.push("test_state", data) + + await history_manager.snapshot() + + assert await history_manager._history_state.get_data() == { + "history": [ + {"state": "test_state", "data": data}, + { + "state": await history_manager._state.get_state(), + "data": await history_manager._state.get_data(), + }, + ] + } + + async def test_history_manager_set_state(self): + state_mock = AsyncMock(spec=FSMContext) + state_mock.storage = MemoryStorage() + state_mock.key = StorageKey(bot_id=42, chat_id=-42, user_id=42) + state_mock.set_state = AsyncMock() + state_mock.set_data = AsyncMock() + + history_manager = HistoryManager(state=state_mock) + history_manager._state = state_mock + + state = "test_state" + data = {"test_data": "test_data"} + await history_manager._set_state(state, data) + + state_mock.set_state.assert_called_once_with(state) + state_mock.set_data.assert_called_once_with(data) + + async def test_history_manager_rollback(self): + history_manager = HistoryManager( + state=FSMContext( + storage=MemoryStorage(), key=StorageKey(bot_id=42, chat_id=-42, user_id=42) + ) + ) + + data = {"test_data": "test_data"} + await history_manager.push("test_state", data) + await history_manager.push("test_state2", data) + + record = await history_manager.get() + assert record == MemoryStorageRecord(state="test_state2", data=data) + + await history_manager.rollback() + + record = await history_manager.get() + assert record == MemoryStorageRecord(state="test_state", data=data) + + async def test_history_manager_rollback_if_not_previous_state(self): + history_manager = HistoryManager( + state=FSMContext( + storage=MemoryStorage(), key=StorageKey(bot_id=42, chat_id=-42, user_id=42) + ) + ) + + data = {"test_data": "test_data"} + await history_manager.push("test_state", data) + + state = await history_manager.rollback() + assert state == "test_state" + + state = await history_manager.rollback() + assert state is None + + +class TestScene: + def test_scene_subclass_initialisation(self): + class ParentScene(Scene): + @on.message(F.text) + def parent_handler(self, *args, **kwargs): + pass + + @on.message.enter(F.text) + def parent_action(self, *args, **kwargs): + pass + + class SubScene( + ParentScene, + state="sub_state", + reset_data_on_enter=True, + reset_history_on_enter=True, + callback_query_without_state=True, + ): + general_handler = on.message( + F.text.casefold() == "test", after=After.goto("sub_state") + ) + + @on.message(F.text) + def sub_handler(self, *args, **kwargs): + pass + + @on.message.exit() + def sub_action(self, *args, **kwargs): + pass + + # Assert __scene_config__ attributes are correctly set for SubScene + assert isinstance(SubScene.__scene_config__, SceneConfig) + assert SubScene.__scene_config__.state == "sub_state" + assert SubScene.__scene_config__.reset_data_on_enter is True + assert SubScene.__scene_config__.reset_history_on_enter is True + assert SubScene.__scene_config__.callback_query_without_state is True + + # Assert handlers are correctly set + assert len(SubScene.__scene_config__.handlers) == 3 + + for handler in SubScene.__scene_config__.handlers: + assert isinstance(handler, HandlerContainer) + assert handler.name == "message" + assert handler.handler in ( + ParentScene.parent_handler, + SubScene.sub_handler, + _empty_handler, + ) + assert handler.filters == (F.text,) + + # Assert actions are correctly set + assert len(SubScene.__scene_config__.actions) == 2 + + enter_action = SubScene.__scene_config__.actions[SceneAction.enter] + assert isinstance(enter_action, dict) + assert "message" in enter_action + assert enter_action["message"].callback == ParentScene.parent_action + + exit_action = SubScene.__scene_config__.actions[SceneAction.exit] + assert isinstance(exit_action, dict) + assert "message" in exit_action + assert exit_action["message"].callback == SubScene.sub_action + + def test_scene_subclass_initialisation_bases_is_scene_subclass(self): + class NotAScene: + pass + + class MyScene(Scene, NotAScene): + pass + + class TestClass(MyScene, NotAScene): + pass + + assert MyScene in TestClass.__bases__ + assert NotAScene in TestClass.__bases__ + bases = [base for base in TestClass.__bases__ if not issubclass(base, Scene)] + assert Scene not in bases + assert NotAScene in bases + + def test_scene_add_to_router(self): + class MyScene(Scene): + @on.message(F.text) + def test_handler(self, *args, **kwargs): + pass + + router = Router() + MyScene.add_to_router(router) + + assert len(router.observers["message"].handlers) == 1 + + def test_scene_add_to_router_scene_with_callback_query_without_state(self): + class MyScene(Scene, callback_query_without_state=True): + @on.callback_query(F.data) + def test_handler(self, *args, **kwargs): + pass + + router = Router() + MyScene.add_to_router(router) + + assert len(router.observers["callback_query"].handlers) == 1 + assert ( + StateFilter(MyScene.__scene_config__.state) + not in router.observers["callback_query"].handlers[0].filters + ) + + def test_scene_as_handler(self): + class MyScene(Scene): + @on.message(F.text) + def test_handler(self, *args, **kwargs): + pass + + handler = MyScene.as_handler() + + router = Router() + router.message.register(handler) + assert router.observers["message"].handlers[0].callback == handler + + async def test_scene_as_handler_enter(self): + class MyScene(Scene): + @on.message.enter(F.text) + 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 = {"test_kwargs": "test_kwargs"} + handler = MyScene.as_handler(**kwargs) + await handler(event, scenes) + + 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): + class MyScene(Scene, reset_data_on_enter=True): + pass + + scene_config_mock = AsyncMock() + scene_config_mock.state = "test_state" + + state_mock = AsyncMock(spec=FSMContext) + state_mock.set_state = AsyncMock() + + wizard = SceneWizard( + scene_config=MyScene.__scene_config__, + manager=AsyncMock(spec=ScenesManager), + state=state_mock, + update_type="message", + event=AsyncMock(), + data={}, + ) + kwargs = {"test_kwargs": "test_kwargs"} + wizard._on_action = AsyncMock() + + await wizard.enter(**kwargs) + + state_mock.set_data.assert_called_once_with({}) + state_mock.set_state.assert_called_once_with(MyScene.__scene_config__.state) + wizard._on_action.assert_called_once_with(SceneAction.enter, **kwargs) + + async def test_scene_wizard_enter_with_reset_history_on_enter(self): + class MyScene(Scene, reset_history_on_enter=True): + pass + + state_mock = AsyncMock(spec=FSMContext) + state_mock.set_state = AsyncMock() + + manager = AsyncMock(spec=ScenesManager) + manager.history = AsyncMock(spec=HistoryManager) + manager.history.clear = AsyncMock() + + wizard = SceneWizard( + scene_config=MyScene.__scene_config__, + manager=manager, + state=state_mock, + update_type="message", + event=AsyncMock(), + data={}, + ) + kwargs = {"test_kwargs": "test_kwargs"} + wizard._on_action = AsyncMock() + + await wizard.enter(**kwargs) + + manager.history.clear.assert_called_once() + state_mock.set_state.assert_called_once_with(MyScene.__scene_config__.state) + wizard._on_action.assert_called_once_with(SceneAction.enter, **kwargs) + + async def test_scene_wizard_leave_with_history(self): + scene_config_mock = AsyncMock() + scene_config_mock.state = "test_state" + + manager = AsyncMock(spec=ScenesManager) + manager.history = AsyncMock(spec=HistoryManager) + manager.history.snapshot = AsyncMock() + + wizard = SceneWizard( + scene_config=scene_config_mock, + manager=manager, + state=AsyncMock(spec=FSMContext), + update_type="message", + event=AsyncMock(), + data={}, + ) + wizard._on_action = AsyncMock() + + kwargs = {"test_kwargs": "test_kwargs"} + await wizard.leave(_with_history=False, **kwargs) + + manager.history.snapshot.assert_not_called() + wizard._on_action.assert_called_once_with(SceneAction.leave, **kwargs) + + async def test_scene_wizard_leave_without_history(self): + scene_config_mock = AsyncMock() + scene_config_mock.state = "test_state" + + manager = AsyncMock(spec=ScenesManager) + manager.history = AsyncMock(spec=HistoryManager) + manager.history.snapshot = AsyncMock() + + wizard = SceneWizard( + scene_config=scene_config_mock, + manager=manager, + state=AsyncMock(spec=FSMContext), + update_type="message", + event=AsyncMock(), + data={}, + ) + wizard._on_action = AsyncMock() + + kwargs = {"test_kwargs": "test_kwargs"} + await wizard.leave(**kwargs) + + manager.history.snapshot.assert_called_once() + wizard._on_action.assert_called_once_with(SceneAction.leave, **kwargs) + + async def test_scene_wizard_back(self): + current_scene_config_mock = AsyncMock() + current_scene_config_mock.state = "test_state" + + previous_scene_config_mock = AsyncMock() + previous_scene_config_mock.state = "previous_test_state" + + previous_scene_mock = AsyncMock() + previous_scene_mock.__scene_config__ = previous_scene_config_mock + + manager = AsyncMock(spec=ScenesManager) + manager.history = AsyncMock(spec=HistoryManager) + manager.history.rollback = AsyncMock(return_value=previous_scene_mock) + manager.enter = AsyncMock() + + wizard = SceneWizard( + scene_config=current_scene_config_mock, + manager=manager, + state=AsyncMock(spec=FSMContext), + update_type="message", + event=AsyncMock(), + data={}, + ) + wizard.leave = AsyncMock() + + kwargs = {"test_kwargs": "test_kwargs"} + await wizard.back(**kwargs) + + wizard.leave.assert_called_once_with(_with_history=False, **kwargs) + manager.history.rollback.assert_called_once() + manager.enter.assert_called_once_with(previous_scene_mock, _check_active=False, **kwargs) + + async def test_scene_wizard_retake(self): + scene_config_mock = AsyncMock() + scene_config_mock.state = "test_state" + + wizard = SceneWizard( + scene_config=scene_config_mock, + manager=AsyncMock(spec=ScenesManager), + state=AsyncMock(spec=FSMContext), + update_type="message", + event=AsyncMock(), + data={}, + ) + wizard.goto = AsyncMock() + + kwargs = {"test_kwargs": "test_kwargs"} + await wizard.retake(**kwargs) + + wizard.goto.assert_called_once_with(scene_config_mock.state, **kwargs) + + async def test_scene_wizard_retake_exception(self): + scene_config_mock = AsyncMock() + scene_config_mock.state = None + + wizard = SceneWizard( + scene_config=scene_config_mock, + manager=AsyncMock(spec=ScenesManager), + state=AsyncMock(spec=FSMContext), + update_type="message", + event=AsyncMock(), + data={}, + ) + + kwargs = {"test_kwargs": "test_kwargs"} + + with pytest.raises(AssertionError, match="Scene state is not specified"): + await wizard.retake(**kwargs) + + async def test_scene_wizard_goto(self): + scene_config_mock = AsyncMock() + scene_config_mock.state = "test_state" + + scene_mock = AsyncMock() + scene_mock.__scene_config__ = scene_config_mock + + wizard = SceneWizard( + scene_config=scene_config_mock, + manager=AsyncMock(spec=ScenesManager), + state=AsyncMock(spec=FSMContext), + update_type="message", + event=AsyncMock(), + data={}, + ) + wizard.leave = AsyncMock() + wizard.manager.enter = AsyncMock() + + kwargs = {"test_kwargs": "test_kwargs"} + await wizard.goto(scene_mock, **kwargs) + + wizard.leave.assert_called_once_with(**kwargs) + wizard.manager.enter.assert_called_once_with(scene_mock, _check_active=False, **kwargs) + + async def test_scene_wizard_on_action(self): + scene_config_mock = AsyncMock() + scene_config_mock.actions = {SceneAction.enter: {"message": AsyncMock()}} + scene_config_mock.state = "test_state" + + scene_mock = AsyncMock() + + event_mock = AsyncMock() + event_mock.type = "message" + + data = {"test_data": "test_data"} + wizard = SceneWizard( + scene_config=scene_config_mock, + manager=AsyncMock(), + state=AsyncMock(), + update_type="message", + event=event_mock, + data=data, + ) + wizard.scene = scene_mock + + kwargs = {"test_kwargs": "test_kwargs"} + result = await wizard._on_action(SceneAction.enter, **kwargs) + + scene_config_mock.actions[SceneAction.enter]["message"].call.assert_called_once_with( + scene_mock, event_mock, **{**data, **kwargs} + ) + assert result is True + + async def test_scene_wizard_on_action_no_scene(self): + wizard = SceneWizard( + scene_config=AsyncMock(), + manager=AsyncMock(), + state=AsyncMock(), + update_type="message", + event=AsyncMock(), + data={}, + ) + + with pytest.raises(SceneException, match="Scene is not initialized"): + await wizard._on_action(SceneAction.enter) + + async def test_scene_wizard_on_action_no_action_config(self): + scene_config_mock = AsyncMock() + scene_config_mock.actions = {} + scene_config_mock.state = "test_state" + + scene_mock = AsyncMock() + + event_mock = AsyncMock() + event_mock.type = "message" + + wizard = SceneWizard( + scene_config=scene_config_mock, + manager=AsyncMock(), + state=AsyncMock(), + update_type="message", + event=event_mock, + data={}, + ) + wizard.scene = scene_mock + + kwargs = {"test_kwargs": "test_kwargs"} + result = await wizard._on_action(SceneAction.enter, **kwargs) + + assert result is False + + async def test_scene_wizard_on_action_event_type_not_in_action_config(self): + scene_config_mock = AsyncMock() + scene_config_mock.actions = {SceneAction.enter: {"test_update_type": AsyncMock()}} + scene_config_mock.state = "test_state" + + event_mock = AsyncMock() + event_mock.type = "message" + + wizard = SceneWizard( + scene_config=scene_config_mock, + manager=AsyncMock(), + state=AsyncMock(), + update_type="message", + event=event_mock, + data={}, + ) + wizard.scene = AsyncMock() + + kwargs = {"test_kwargs": "test_kwargs"} + result = await wizard._on_action(SceneAction.enter, **kwargs) + + assert result is False + + async def test_scene_wizard_set_data(self): + wizard = SceneWizard( + scene_config=AsyncMock(), + manager=AsyncMock(), + state=AsyncMock(), + update_type="message", + event=AsyncMock(), + data={}, + ) + wizard.state.set_data = AsyncMock() + + data = {"test_key": "test_value"} + await wizard.set_data(data) + + wizard.state.set_data.assert_called_once_with(data=data) + + async def test_scene_wizard_get_data(self): + wizard = SceneWizard( + scene_config=AsyncMock(), + manager=AsyncMock(), + state=AsyncMock(), + update_type="message", + event=AsyncMock(), + data={}, + ) + wizard.state.get_data = AsyncMock() + + await wizard.get_data() + + 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(), + manager=AsyncMock(), + state=AsyncMock(), + update_type="message", + event=AsyncMock(), + data={}, + ) + data = {"test_key": "test_value"} + kwargs = {"test_kwargs": "test_kwargs"} + + wizard.state.update_data = AsyncMock(return_value={**data, **kwargs}) + result = await wizard.update_data(data=data, **kwargs) + + wizard.state.update_data.assert_called_once_with(data={**data, **kwargs}) + assert result == {**data, **kwargs} + + async def test_scene_wizard_update_data_if_no_data(self): + wizard = SceneWizard( + scene_config=AsyncMock(), + manager=AsyncMock(), + state=AsyncMock(), + update_type="message", + event=AsyncMock(), + data={}, + ) + data = None + kwargs = {"test_kwargs": "test_kwargs"} + + wizard.state.update_data = AsyncMock(return_value={**kwargs}) + result = await wizard.update_data(data=data, **kwargs) + + wizard.state.update_data.assert_called_once_with(data=kwargs) + assert result == {**kwargs} + + async def test_scene_wizard_clear_data(self): + wizard = SceneWizard( + scene_config=AsyncMock(), + manager=AsyncMock(), + state=AsyncMock(), + update_type="message", + event=AsyncMock(), + data={}, + ) + wizard.set_data = AsyncMock() + + await wizard.clear_data() + + wizard.set_data.assert_called_once_with({}) + + +class TestScenesManager: + async def test_scenes_manager_get_scene(self, bot: MockedBot): + class MyScene(Scene): + pass + + router = Router() + + registry = SceneRegistry(router) + registry.add(MyScene) + + scenes_manager = ScenesManager( + registry=registry, + update_type="message", + event=Update( + update_id=42, + message=Message( + message_id=42, + text="test", + date=datetime.now(), + chat=Chat( + type="private", + id=42, + ), + ), + ), + state=FSMContext( + storage=MemoryStorage(), key=StorageKey(chat_id=-42, user_id=42, bot_id=bot.id) + ), + data={}, + ) + + scene = await scenes_manager._get_scene(MyScene) + assert isinstance(scene, MyScene) + assert isinstance(scene.wizard, SceneWizard) + assert scene.wizard.scene_config == MyScene.__scene_config__ + assert scene.wizard.manager == scenes_manager + assert scene.wizard.update_type == "message" + assert scene.wizard.data == {} + + async def test_scenes_manager_get_active_scene(self, bot: MockedBot): + class TestScene(Scene): + pass + + class TestScene2(Scene, state="test_state2"): + pass + + registry = SceneRegistry(Router()) + registry.add(TestScene, TestScene2) + + manager = ScenesManager( + registry, + update_type="message", + event=Update( + update_id=42, + message=Message( + message_id=42, + text="test", + date=datetime.now(), + chat=Chat( + type="private", + id=42, + ), + ), + ), + state=FSMContext( + storage=MemoryStorage(), key=StorageKey(chat_id=-42, user_id=42, bot_id=bot.id) + ), + data={}, + ) + + scene = await manager._get_active_scene() + assert isinstance(scene, TestScene) + + await manager.enter(TestScene2) + scene = await manager._get_active_scene() + assert isinstance(scene, TestScene2) + + async def test_scenes_manager_get_active_scene_with_scene_exception(self, bot: MockedBot): + registry = SceneRegistry(Router()) + + manager = ScenesManager( + registry, + update_type="message", + event=Update( + update_id=42, + message=Message( + message_id=42, + text="test", + date=datetime.now(), + chat=Chat( + type="private", + id=42, + ), + ), + ), + state=FSMContext( + storage=MemoryStorage(), key=StorageKey(chat_id=-42, user_id=42, bot_id=bot.id) + ), + data={}, + ) + + scene = await manager._get_active_scene() + + assert scene is None + + async def test_scenes_manager_enter_with_scene_type_none(self, bot: MockedBot): + registry = SceneRegistry(Router()) + + manager = ScenesManager( + registry, + update_type="message", + event=Update( + update_id=42, + message=Message( + message_id=42, + text="test", + date=datetime.now(), + chat=Chat( + type="private", + id=42, + ), + ), + ), + state=FSMContext( + storage=MemoryStorage(), key=StorageKey(chat_id=-42, user_id=42, bot_id=bot.id) + ), + data={}, + ) + + assert await manager.enter(None) is None + + async def test_scenes_manager_enter_with_scene_exception(self, bot: MockedBot): + registry = SceneRegistry(Router()) + + manager = ScenesManager( + registry, + update_type="message", + event=Update( + update_id=42, + message=Message( + message_id=42, + text="test", + date=datetime.now(), + chat=Chat( + type="private", + id=42, + ), + ), + ), + state=FSMContext( + storage=MemoryStorage(), key=StorageKey(chat_id=-42, user_id=42, bot_id=bot.id) + ), + data={}, + ) + + scene = "invalid_scene" + with pytest.raises(SceneException, match=f"Scene {scene!r} is not registered"): + await manager.enter(scene) + + async def test_scenes_manager_close_if_active_scene(self, bot: MockedBot): + class TestScene(Scene): + pass + + registry = SceneRegistry(Router()) + registry.add(TestScene) + + manager = ScenesManager( + registry, + update_type="message", + event=Update( + update_id=42, + message=Message( + message_id=42, + text="test", + date=datetime.now(), + chat=Chat( + type="private", + id=42, + ), + ), + ), + state=FSMContext( + storage=MemoryStorage(), key=StorageKey(chat_id=-42, user_id=42, bot_id=bot.id) + ), + data={}, + ) + + manager._get_active_scene = AsyncMock( + return_value=TestScene( + SceneWizard( + scene_config=TestScene.__scene_config__, + manager=manager, + state=manager.state, + update_type="message", + event=manager.event, + data={}, + ) + ) + ) + manager._get_active_scene.return_value.wizard.exit = AsyncMock() + + await manager.close() + + manager._get_active_scene.assert_called_once() + manager._get_active_scene.return_value.wizard.exit.assert_called_once() + + async def test_scenes_manager_close_if_no_active_scene(self, bot: MockedBot): + registry = SceneRegistry(Router()) + + manager = ScenesManager( + registry, + update_type="message", + event=Update( + update_id=42, + message=Message( + message_id=42, + text="test", + date=datetime.now(), + chat=Chat( + type="private", + id=42, + ), + ), + ), + state=FSMContext( + storage=MemoryStorage(), key=StorageKey(chat_id=-42, user_id=42, bot_id=bot.id) + ), + data={}, + ) + + manager._get_active_scene = AsyncMock(return_value=None) + + result = await manager.close() + + manager._get_active_scene.assert_called_once() + + assert result is None + + +class TestSceneRegistry: + def test_scene_registry_initialization(self): + router = Router() + register_on_add = True + + registry = SceneRegistry(router, register_on_add) + + assert registry.router == router + assert registry.register_on_add == register_on_add + assert registry._scenes == {} + + def test_scene_registry_add_scene(self): + class MyScene(Scene): + pass + + router = Router() + register_on_add = True + MyScene.__scene_config__.state = "test_scene" + + registry = SceneRegistry(router, register_on_add) + registry.add(MyScene) + + assert len(registry._scenes) == 1 + assert registry._scenes["test_scene"] == MyScene + + def test_scene_registry_add_scene_pass_router(self): + class MyScene(Scene): + pass + + router = Router() + MyScene.__scene_config__.state = "test_scene" + + registry = SceneRegistry(router) + registry.add(MyScene, router=router) + + assert len(registry._scenes) == 1 + assert registry._scenes["test_scene"] == MyScene + + def test_scene_registry_add_scene_already_exists(self): + class MyScene(Scene): + pass + + router = Router() + register_on_add = True + MyScene.__scene_config__.state = "test_scene" + + registry = SceneRegistry(router, register_on_add) + registry.add(MyScene) + + with pytest.raises(SceneException): + registry.add(MyScene) + + def test_scene_registry_add_scene_no_scenes(self): + class MyScene(Scene): + pass + + router = Router() + register_on_add = True + MyScene.__scene_config__.state = "test_scene" + + registry = SceneRegistry(router, register_on_add) + registry._scenes = {} + + with pytest.raises(ValueError, match="At least one scene must be specified"): + registry.add() + + def test_scene_registry_register(self): + class MyScene(Scene): + pass + + router = Router() + register_on_add = True + MyScene.__scene_config__.state = "test_scene" + + registry = SceneRegistry(router, register_on_add) + registry.register(MyScene) + + assert len(registry._scenes) == 1 + assert registry._scenes["test_scene"] == MyScene + + def test_scene_registry_get_scene_if_scene_type_is_str(self): + class MyScene(Scene): + pass + + router = Router() + register_on_add = True + MyScene.__scene_config__.state = "test_scene" + + registry = SceneRegistry(router, register_on_add) + registry.add(MyScene) + + retrieved_scene = registry.get("test_scene") + + assert retrieved_scene == MyScene + + def test_scene_registry_get_scene_if_scene_type_is_scene(self): + class MyScene(Scene): + pass + + router = Router() + register_on_add = True + MyScene.__scene_config__.state = "test_scene" + + registry = SceneRegistry(router, register_on_add) + registry.add(MyScene) + + retrieved_scene = registry.get(MyScene) + + assert retrieved_scene == MyScene + + def test_scene_registry_get_scene_if_scene_state_is_state(self): + class MyStates(StatesGroup): + test_state = State() + + class MyScene(Scene): + pass + + router = Router() + register_on_add = True + MyScene.__scene_config__.state = MyStates.test_state + + registry = SceneRegistry(router, register_on_add) + registry.add(MyScene) + + retrieved_scene = registry.get(MyScene) + + assert retrieved_scene == MyScene + + def test_scene_registry_get_scene_if_scene_state_is_not_str(self): + class MyScene(Scene): + pass + + router = Router() + register_on_add = True + MyScene.__scene_config__.state = 42 + + registry = SceneRegistry(router, register_on_add) + registry.add(MyScene) + + 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): + router = Router() + register_on_add = True + + registry = SceneRegistry(router, register_on_add) + + with pytest.raises(SceneException): + registry.get("test_scene") + + def test_scene_registry_setup_middleware_with_dispatcher(self): + router = Router() + + registry = SceneRegistry(router) + + dispatcher = Dispatcher() + registry._setup_middleware(dispatcher) + + assert registry._update_middleware in dispatcher.update.outer_middleware + + for name, observer in dispatcher.observers.items(): + if name == "update": + continue + assert registry._update_middleware not in observer.outer_middleware + + def test_scene_registry_setup_middleware_with_router(self): + inner_router = Router() + + registry = SceneRegistry(inner_router) + + outer_router = Router() + registry._setup_middleware(outer_router) + + for name, observer in outer_router.observers.items(): + if name in ("update", "error"): + continue + assert registry._middleware in observer.outer_middleware + + async def test_scene_registry_update_middleware(self, bot: MockedBot): + 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 = { + "state": FSMContext( + storage=MemoryStorage(), key=StorageKey(chat_id=-42, user_id=42, bot_id=bot.id) + ) + } + + result = await registry._update_middleware(handler, event, data) + + assert "scenes" in data + assert isinstance(data["scenes"], ScenesManager) + 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) + handler = AsyncMock(spec=NextMiddlewareType) + event = Message( + message_id=42, + text="test", + date=datetime.now(), + chat=Chat(id=42, type="private"), + ) + data = { + "state": FSMContext( + storage=MemoryStorage(), key=StorageKey(chat_id=-42, user_id=42, bot_id=bot.id) + ) + } + + with pytest.raises(AssertionError, match="Event must be an Update instance"): + await registry._update_middleware(handler, event, data) + + async def test_scene_registry_middleware(self, bot: MockedBot): + 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 = { + "state": FSMContext( + storage=MemoryStorage(), key=StorageKey(chat_id=-42, user_id=42, bot_id=bot.id) + ), + "event_update": event, + } + + result = await registry._middleware(handler, event, data) + + assert "scenes" in data + 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_dispatcher/test_fsm/test_state.py b/tests/test_fsm/test_state.py similarity index 90% rename from tests/test_dispatcher/test_fsm/test_state.py rename to tests/test_fsm/test_state.py index 3d41e1fa..e1986079 100644 --- a/tests/test_dispatcher/test_fsm/test_state.py +++ b/tests/test_fsm/test_state.py @@ -1,6 +1,10 @@ +import sys + import pytest -from aiogram.dispatcher.fsm.state import State, StatesGroup, any_state +from aiogram.fsm.state import State, StatesGroup, any_state + +PY312_OR_GREATER = sys.version_info >= (3, 12) class TestState: @@ -72,10 +76,20 @@ class TestState: assert state(None, check) is result def test_state_in_unknown_class(self): - with pytest.raises(RuntimeError): + if PY312_OR_GREATER: + # Python 3.12+ does not wrap __set_name__ exceptions with RuntimeError anymore as part + # of PEP 678. See "Other Language Changes" in the changelogs: + # https://docs.python.org/3/whatsnew/3.12.html + with pytest.raises(ValueError): - class MyClass: - state1 = State() + class MyClass: + state1 = State() + + else: + with pytest.raises(RuntimeError): + + class MyClass: + state1 = State() class TestStatesGroup: diff --git a/tests/test_fsm/test_strategy.py b/tests/test_fsm/test_strategy.py new file mode 100644 index 00000000..1f6f2e93 --- /dev/null +++ b/tests/test_fsm/test_strategy.py @@ -0,0 +1,45 @@ +import pytest + +from aiogram.fsm.strategy import FSMStrategy, apply_strategy + +CHAT_ID = -42 +USER_ID = 42 +THREAD_ID = 1 + +PRIVATE = (USER_ID, USER_ID, None) +CHAT = (CHAT_ID, USER_ID, None) +THREAD = (CHAT_ID, USER_ID, THREAD_ID) + + +class TestStrategy: + @pytest.mark.parametrize( + "strategy,case,expected", + [ + [FSMStrategy.USER_IN_CHAT, CHAT, CHAT], + [FSMStrategy.USER_IN_CHAT, PRIVATE, PRIVATE], + [FSMStrategy.USER_IN_CHAT, THREAD, CHAT], + [FSMStrategy.CHAT, CHAT, (CHAT_ID, CHAT_ID, None)], + [FSMStrategy.CHAT, PRIVATE, (USER_ID, USER_ID, None)], + [FSMStrategy.CHAT, THREAD, (CHAT_ID, CHAT_ID, None)], + [FSMStrategy.GLOBAL_USER, CHAT, PRIVATE], + [FSMStrategy.GLOBAL_USER, PRIVATE, PRIVATE], + [FSMStrategy.GLOBAL_USER, THREAD, PRIVATE], + [FSMStrategy.USER_IN_TOPIC, CHAT, CHAT], + [FSMStrategy.USER_IN_TOPIC, PRIVATE, PRIVATE], + [FSMStrategy.USER_IN_TOPIC, THREAD, THREAD], + [FSMStrategy.CHAT_TOPIC, CHAT, (CHAT_ID, CHAT_ID, None)], + [FSMStrategy.CHAT_TOPIC, PRIVATE, PRIVATE], + [FSMStrategy.CHAT_TOPIC, THREAD, (CHAT_ID, CHAT_ID, THREAD_ID)], + ], + ) + def test_strategy(self, strategy, case, expected): + chat_id, user_id, thread_id = case + assert ( + apply_strategy( + chat_id=chat_id, + user_id=user_id, + thread_id=thread_id, + strategy=strategy, + ) + == expected + ) diff --git a/tests/test_dispatcher/test_webhook/__init__.py b/tests/test_handler/__init__.py similarity index 100% rename from tests/test_dispatcher/test_webhook/__init__.py rename to tests/test_handler/__init__.py diff --git a/tests/test_dispatcher/test_handler/test_base.py b/tests/test_handler/test_base.py similarity index 87% rename from tests/test_dispatcher/test_handler/test_base.py rename to tests/test_handler/test_base.py index 09a8882d..5f3b1225 100644 --- a/tests/test_dispatcher/test_handler/test_base.py +++ b/tests/test_handler/test_base.py @@ -7,11 +7,9 @@ import pytest from aiogram import Bot from aiogram.dispatcher.event.handler import HandlerObject -from aiogram.dispatcher.handler.base import BaseHandler +from aiogram.handlers import BaseHandler from aiogram.types import Chat, Message, Update -pytestmark = pytest.mark.asyncio - class MyHandler(BaseHandler): async def handle(self) -> Any: @@ -31,15 +29,17 @@ class TestBaseClassBasedHandler: async def test_bot_from_context(self): event = Update(update_id=42) - handler = MyHandler(event=event, key=42) bot = Bot("42:TEST") - - with pytest.raises(LookupError): - handler.bot - - Bot.set_current(bot) + handler = MyHandler(event=event, key=42, bot=bot) assert handler.bot == bot + async def test_bot_from_context_missing(self): + event = Update(update_id=42) + handler = MyHandler(event=event, key=42) + + with pytest.raises(RuntimeError): + handler.bot + async def test_bot_from_data(self): event = Update(update_id=42) bot = Bot("42:TEST") diff --git a/tests/test_dispatcher/test_handler/test_callback_query.py b/tests/test_handler/test_callback_query.py similarity index 86% rename from tests/test_dispatcher/test_handler/test_callback_query.py rename to tests/test_handler/test_callback_query.py index c33d9358..93ac9498 100644 --- a/tests/test_dispatcher/test_handler/test_callback_query.py +++ b/tests/test_handler/test_callback_query.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - -from aiogram.dispatcher.handler import CallbackQueryHandler +from aiogram.handlers import CallbackQueryHandler from aiogram.types import CallbackQuery, User -pytestmark = pytest.mark.asyncio - class TestCallbackQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_dispatcher/test_handler/test_chat_member.py b/tests/test_handler/test_chat_member.py similarity index 87% rename from tests/test_dispatcher/test_handler/test_chat_member.py rename to tests/test_handler/test_chat_member.py index 191b9002..f343b247 100644 --- a/tests/test_dispatcher/test_handler/test_chat_member.py +++ b/tests/test_handler/test_chat_member.py @@ -1,13 +1,9 @@ import datetime from typing import Any -import pytest - -from aiogram.dispatcher.handler.chat_member import ChatMemberHandler +from aiogram.handlers import ChatMemberHandler from aiogram.types import Chat, ChatMemberMember, ChatMemberUpdated, User -pytestmark = pytest.mark.asyncio - class TestChatMemberUpdated: async def test_attributes_aliases(self): diff --git a/tests/test_dispatcher/test_handler/test_chosen_inline_result.py b/tests/test_handler/test_chosen_inline_result.py similarity index 85% rename from tests/test_dispatcher/test_handler/test_chosen_inline_result.py rename to tests/test_handler/test_chosen_inline_result.py index 5c06aeec..62ac8aa7 100644 --- a/tests/test_dispatcher/test_handler/test_chosen_inline_result.py +++ b/tests/test_handler/test_chosen_inline_result.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - -from aiogram.dispatcher.handler import ChosenInlineResultHandler +from aiogram.handlers import ChosenInlineResultHandler from aiogram.types import ChosenInlineResult, User -pytestmark = pytest.mark.asyncio - class TestChosenInlineResultHandler: async def test_attributes_aliases(self): diff --git a/tests/test_dispatcher/test_handler/test_error.py b/tests/test_handler/test_error.py similarity index 81% rename from tests/test_dispatcher/test_handler/test_error.py rename to tests/test_handler/test_error.py index 58b4010a..fb9d88bf 100644 --- a/tests/test_dispatcher/test_handler/test_error.py +++ b/tests/test_handler/test_error.py @@ -1,10 +1,6 @@ from typing import Any -import pytest - -from aiogram.dispatcher.handler import ErrorHandler - -pytestmark = pytest.mark.asyncio +from aiogram.handlers import ErrorHandler class TestErrorHandler: diff --git a/tests/test_dispatcher/test_handler/test_inline_query.py b/tests/test_handler/test_inline_query.py similarity index 85% rename from tests/test_dispatcher/test_handler/test_inline_query.py rename to tests/test_handler/test_inline_query.py index 99fe65e7..d1bb7037 100644 --- a/tests/test_dispatcher/test_handler/test_inline_query.py +++ b/tests/test_handler/test_inline_query.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - -from aiogram.dispatcher.handler import InlineQueryHandler +from aiogram.handlers import InlineQueryHandler from aiogram.types import InlineQuery, User -pytestmark = pytest.mark.asyncio - class TestCallbackQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_dispatcher/test_handler/test_message.py b/tests/test_handler/test_message.py similarity index 90% rename from tests/test_dispatcher/test_handler/test_message.py rename to tests/test_handler/test_message.py index 643a5f51..7b5581a4 100644 --- a/tests/test_dispatcher/test_handler/test_message.py +++ b/tests/test_handler/test_message.py @@ -1,14 +1,10 @@ import datetime from typing import Any -import pytest - -from aiogram.dispatcher.filters import CommandObject -from aiogram.dispatcher.handler.message import MessageHandler, MessageHandlerCommandMixin +from aiogram.filters import CommandObject +from aiogram.handlers import MessageHandler, MessageHandlerCommandMixin from aiogram.types import Chat, Message, User -pytestmark = pytest.mark.asyncio - class MyHandler(MessageHandler): async def handle(self) -> Any: diff --git a/tests/test_dispatcher/test_handler/test_poll.py b/tests/test_handler/test_poll.py similarity index 82% rename from tests/test_dispatcher/test_handler/test_poll.py rename to tests/test_handler/test_poll.py index aa82bf78..9288b265 100644 --- a/tests/test_dispatcher/test_handler/test_poll.py +++ b/tests/test_handler/test_poll.py @@ -1,23 +1,20 @@ from typing import Any -import pytest - -from aiogram.dispatcher.handler import PollHandler +from aiogram.handlers import PollHandler from aiogram.types import Poll, PollOption -pytestmark = pytest.mark.asyncio - class TestShippingQueryHandler: async def test_attributes_aliases(self): 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_dispatcher/test_handler/test_pre_checkout_query.py b/tests/test_handler/test_pre_checkout_query.py similarity index 85% rename from tests/test_dispatcher/test_handler/test_pre_checkout_query.py rename to tests/test_handler/test_pre_checkout_query.py index 76de7d55..c764bf91 100644 --- a/tests/test_dispatcher/test_handler/test_pre_checkout_query.py +++ b/tests/test_handler/test_pre_checkout_query.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - -from aiogram.dispatcher.handler import PreCheckoutQueryHandler +from aiogram.handlers import PreCheckoutQueryHandler from aiogram.types import PreCheckoutQuery, User -pytestmark = pytest.mark.asyncio - class TestPreCheckoutQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_dispatcher/test_handler/test_shipping_query.py b/tests/test_handler/test_shipping_query.py similarity index 89% rename from tests/test_dispatcher/test_handler/test_shipping_query.py rename to tests/test_handler/test_shipping_query.py index 831a773a..51ba6b96 100644 --- a/tests/test_dispatcher/test_handler/test_shipping_query.py +++ b/tests/test_handler/test_shipping_query.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - -from aiogram.dispatcher.handler import ShippingQueryHandler +from aiogram.handlers import ShippingQueryHandler from aiogram.types import ShippingAddress, ShippingQuery, User -pytestmark = pytest.mark.asyncio - class TestShippingQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_issues/__init__.py b/tests/test_issues/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_issues/test_1317_state_vs_isolation.py b/tests/test_issues/test_1317_state_vs_isolation.py new file mode 100644 index 00000000..31613fa4 --- /dev/null +++ b/tests/test_issues/test_1317_state_vs_isolation.py @@ -0,0 +1,81 @@ +import asyncio +from datetime import datetime + +from aiogram import Dispatcher +from aiogram.filters import Command +from aiogram.fsm.context import FSMContext +from aiogram.fsm.state import State, StatesGroup +from aiogram.fsm.storage.memory import SimpleEventIsolation +from aiogram.types import Chat, Message, Update, User +from tests.mocked_bot import MockedBot + + +class TestStateVSIsolation: + async def test_issue(self, bot: MockedBot): + dispatcher = Dispatcher(events_isolation=SimpleEventIsolation()) + first = 0 + second = 0 + third = 0 + stack = [] + + class TestState(StatesGroup): + foo = State() + bar = State() + baz = State() + + @dispatcher.message(Command("test")) + async def command_top(message: Message, state: FSMContext): + nonlocal first + first += 1 + stack.append("command") + await state.set_state(TestState.foo) + + @dispatcher.message(TestState.foo) + async def handle_foo(message: Message, state: FSMContext): + nonlocal second + second += 1 + stack.append("foo") + await state.set_state(TestState.bar) + + @dispatcher.message(TestState.bar) + async def handle_bar(message: Message, state: FSMContext): + nonlocal third + third += 1 + stack.append("bar") + await state.set_state(None) + + @dispatcher.message() + async def handle_all(message: Message): + stack.append("all") + + await asyncio.gather( + *( + dispatcher.feed_update(bot, update) + for update in [ + create_message_update(index=1, text="/test"), + create_message_update(index=2, text="foo"), + create_message_update(index=3, text="bar"), + create_message_update(index=4, text="baz"), + ] + ) + ) + + # Before bug fix: + # first == 1, second == 3, third == 0, stack == ["command", "foo", "foo", "foo"] + assert first == 1 + assert second == 1 + assert third == 1 + assert stack == ["command", "foo", "bar", "all"] + + +def create_message_update(index: int, text: str): + return Update( + update_id=index, + message=Message( + message_id=index, + date=datetime.now(), + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test", username="test"), + text=text, + ), + ) 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_issues/test_bot_context_is_usable.py b/tests/test_issues/test_bot_context_is_usable.py new file mode 100644 index 00000000..f3db6b99 --- /dev/null +++ b/tests/test_issues/test_bot_context_is_usable.py @@ -0,0 +1,27 @@ +from datetime import datetime + +from aiogram import Dispatcher, Router +from aiogram.enums import ChatType +from aiogram.filters import Command +from aiogram.methods import SendMessage +from aiogram.types import Chat, Message, Update, User +from tests.mocked_bot import MockedBot + +issue_router = Router() + + +@issue_router.message(Command("test")) +async def my_handler(message: Message): + await message.answer("PASS") + return True + + +async def test_something(bot: MockedBot): + dp = Dispatcher() + dp.include_router(issue_router) + bot.add_result_for(method=SendMessage, ok=True) + chat = Chat(id=666, type=ChatType.PRIVATE) + user = User(id=666, is_bot=False, first_name="User") + msg = Message(message_id=1, date=datetime.now(), from_user=user, chat=chat, text="/test") + result = await dp.feed_update(bot, Update(message=msg, update_id=1)) + assert result is True diff --git a/tests/test_utils/test_backoff.py b/tests/test_utils/test_backoff.py index b409e22a..13a0f256 100644 --- a/tests/test_utils/test_backoff.py +++ b/tests/test_utils/test_backoff.py @@ -3,17 +3,21 @@ import pytest from aiogram.utils.backoff import Backoff, BackoffConfig BACKOFF_CONFIG = BackoffConfig(min_delay=0.1, max_delay=1.0, factor=2.0, jitter=0.0) -pytestmark = pytest.mark.asyncio 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): @@ -22,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 new file mode 100644 index 00000000..8c0d76c2 --- /dev/null +++ b/tests/test_utils/test_callback_answer.py @@ -0,0 +1,220 @@ +from unittest.mock import AsyncMock, MagicMock, patch + +import pytest + +from aiogram.exceptions import CallbackAnswerException +from aiogram.methods import AnswerCallbackQuery +from aiogram.types import CallbackQuery, User +from aiogram.utils.callback_answer import CallbackAnswer, CallbackAnswerMiddleware + + +class TestCallbackAnswer: + @pytest.mark.parametrize( + "name,value", + [ + ["answered", True], + ["answered", False], + ["disabled", True], + ["disabled", False], + ["text", "test"], + ["text", None], + ["show_alert", True], + ["show_alert", False], + ["show_alert", None], + ["url", "https://example.com"], + ["url", None], + ["cache_time", None], + ["cache_time", 10], + ], + ) + def test_getters(self, name, value): + kwargs = { + "answered": False, + name: value, + } + instance = CallbackAnswer(**kwargs) + result = getattr(instance, name) + assert result == value + + @pytest.mark.parametrize( + "name,value", + [ + ["disabled", True], + ["disabled", False], + ["text", None], + ["text", ""], + ["text", "test"], + ["show_alert", None], + ["show_alert", True], + ["show_alert", False], + ["url", None], + ["url", "https://example.com"], + ["cache_time", None], + ["cache_time", 0], + ["cache_time", 10], + ], + ) + def test_setter_allowed(self, name, value): + instance = CallbackAnswer(answered=False) + setattr(instance, name, value) + assert getattr(instance, name) == value + + @pytest.mark.parametrize( + "name", + [ + "disabled", + "text", + "show_alert", + "url", + "cache_time", + ], + ) + def test_setter_blocked(self, name): + instance = CallbackAnswer(answered=True) + with pytest.raises(CallbackAnswerException): + setattr(instance, name, "test") + + def test_disable(self): + instance = CallbackAnswer(answered=False) + assert not instance.disabled + instance.disable() + assert instance.disabled + + def test_str(self): + instance = CallbackAnswer(answered=False, text="test") + assert str(instance) == "CallbackAnswer(answered=False, disabled=False, text='test')" + + +class TestCallbackAnswerMiddleware: + @pytest.mark.parametrize( + "init_kwargs,flag_properties,expected", + [ + [ + {}, + True, + { + "answered": False, + "disabled": False, + "text": None, + "show_alert": None, + "url": None, + "cache_time": None, + }, + ], + [ + { + "pre": True, + "text": "test", + "show_alert": True, + "url": "https://example.com", + "cache_time": 5, + }, + True, + { + "answered": True, + "disabled": False, + "text": "test", + "show_alert": True, + "url": "https://example.com", + "cache_time": 5, + }, + ], + [ + { + "pre": False, + "text": "test", + "show_alert": True, + "url": "https://example.com", + "cache_time": 5, + }, + { + "pre": True, + "disabled": True, + "text": "another test", + "show_alert": False, + "url": "https://example.com/game.html", + "cache_time": 10, + }, + { + "answered": True, + "disabled": True, + "text": "another test", + "show_alert": False, + "url": "https://example.com/game.html", + "cache_time": 10, + }, + ], + ], + ) + def test_construct_answer(self, init_kwargs, flag_properties, expected): + middleware = CallbackAnswerMiddleware(**init_kwargs) + callback_answer = middleware.construct_callback_answer(properties=flag_properties) + for key, value in expected.items(): + assert getattr(callback_answer, key) == value + + def test_answer(self): + middleware = CallbackAnswerMiddleware() + event = CallbackQuery( + id="1", + from_user=User(id=42, first_name="Test", is_bot=False), + chat_instance="test", + ) + callback_answer = CallbackAnswer( + answered=False, + disabled=False, + text="another test", + show_alert=False, + url="https://example.com/game.html", + cache_time=10, + ) + method = middleware.answer(event=event, callback_answer=callback_answer) + + assert isinstance(method, AnswerCallbackQuery) + assert method.text == callback_answer.text + assert method.show_alert == callback_answer.show_alert + assert method.url == callback_answer.url + assert method.cache_time == callback_answer.cache_time + + @pytest.mark.parametrize( + "properties,expected_stack", + [ + [{"answered": False}, ["handler", "answer"]], + [{"answered": True}, ["answer", "handler"]], + [{"disabled": True}, ["handler"]], + ], + ) + async def test_call(self, properties, expected_stack): + stack = [] + event = CallbackQuery( + id="1", + from_user=User(id=42, first_name="Test", is_bot=False), + chat_instance="test", + ) + + async def handler(*args, **kwargs): + stack.append("handler") + + async def answer(*args, **kwargs): + 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, + ), + ): + await middleware(handler, event, {}) + + assert stack == expected_stack + + async def test_invalid_event_type(self): + middleware = CallbackAnswerMiddleware() + handler = AsyncMock() + await middleware(handler, None, {}) + handler.assert_awaited() diff --git a/tests/test_utils/test_chat_action.py b/tests/test_utils/test_chat_action.py index caf05e33..d893b074 100644 --- a/tests/test_utils/test_chat_action.py +++ b/tests/test_utils/test_chat_action.py @@ -1,6 +1,7 @@ import asyncio import time from datetime import datetime +from unittest.mock import AsyncMock, patch import pytest @@ -10,18 +11,11 @@ from aiogram.types import Chat, Message, User from aiogram.utils.chat_action import ChatActionMiddleware, ChatActionSender from tests.mocked_bot import MockedBot -try: - from asynctest import CoroutineMock, patch -except ImportError: - from unittest.mock import AsyncMock as CoroutineMock # type: ignore - from unittest.mock import patch - -pytestmarm = pytest.mark.asyncio - class TestChatActionSender: - async def test_wait(self, bot: Bot, loop: asyncio.BaseEventLoop): + async def test_wait(self, bot: Bot): sender = ChatActionSender.typing(bot=bot, chat_id=42) + loop = asyncio.get_running_loop() loop.call_soon(sender._close_event.set) start = time.monotonic() await sender._wait(1) @@ -43,10 +37,9 @@ class TestChatActionSender: "upload_video_note", ], ) - @pytest.mark.parametrize("pass_bot", [True, False]) - async def test_factory(self, action: str, bot: MockedBot, pass_bot: bool): + async def test_factory(self, action: str, bot: MockedBot): sender_factory = getattr(ChatActionSender, action) - sender = sender_factory(chat_id=42, bot=bot if pass_bot else None) + sender = sender_factory(chat_id=42, bot=bot) assert isinstance(sender, ChatActionSender) assert sender.action == action assert sender.chat_id == 42 @@ -55,14 +48,18 @@ class TestChatActionSender: async def test_worker(self, bot: Bot): with patch( "aiogram.client.bot.Bot.send_chat_action", - new_callable=CoroutineMock, + new_callable=AsyncMock, ) as mocked_send_chat_action: async with ChatActionSender.typing( bot=bot, chat_id=42, interval=0.01, initial_sleep=0 ): await asyncio.sleep(0.1) assert mocked_send_chat_action.await_count > 1 - mocked_send_chat_action.assert_awaited_with(action="typing", chat_id=42) + mocked_send_chat_action.assert_awaited_with( + action="typing", + chat_id=42, + message_thread_id=None, + ) async def test_contextmanager(self, bot: MockedBot): sender: ChatActionSender = ChatActionSender.typing(bot=bot, chat_id=42) @@ -99,13 +96,16 @@ class TestChatActionMiddleware: handler1 = flags.chat_action(value)(handler) middleware = ChatActionMiddleware() - with patch( - "aiogram.utils.chat_action.ChatActionSender._run", - new_callable=CoroutineMock, - ) as mocked_run, patch( - "aiogram.utils.chat_action.ChatActionSender._stop", - new_callable=CoroutineMock, - ) 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 new file mode 100644 index 00000000..34f32d1c --- /dev/null +++ b/tests/test_utils/test_chat_member.py @@ -0,0 +1,95 @@ +from datetime import datetime + +import pytest + +from aiogram.types import ( + ChatMember, + ChatMemberAdministrator, + ChatMemberBanned, + ChatMemberLeft, + ChatMemberMember, + ChatMemberOwner, + ChatMemberRestricted, + User, +) +from aiogram.utils.chat_member import ChatMemberAdapter + +USER = User( + id=42, + first_name="John Doe", + is_bot=False, +).model_dump() + +CHAT_MEMBER_ADMINISTRATOR = ChatMemberAdministrator( + user=USER, + can_be_edited=False, + can_manage_chat=True, + can_change_info=True, + can_delete_messages=True, + can_invite_users=True, + can_restrict_members=True, + can_pin_messages=True, + can_manage_topics=False, + can_promote_members=False, + can_manage_video_chats=True, + can_post_stories=True, + can_edit_stories=True, + can_delete_stories=True, + is_anonymous=False, + can_manage_voice_chats=False, +).model_dump() + +CHAT_MEMBER_BANNED = ChatMemberBanned( + user=USER, + until_date=datetime.now(), +).model_dump() + +CHAT_MEMBER_LEFT = ChatMemberLeft( + user=USER, +).model_dump() + +CHAT_MEMBER_MEMBER = ChatMemberMember( + user=USER, +).model_dump() + +CHAT_MEMBER_OWNER = ChatMemberOwner( + user=USER, + is_anonymous=True, +).model_dump() + +CHAT_MEMBER_RESTRICTED = ChatMemberRestricted( + user=USER, + is_member=True, + can_send_messages=False, + can_send_audios=False, + can_send_documents=False, + can_send_photos=False, + can_send_videos=False, + can_send_video_notes=False, + can_send_voice_notes=False, + 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, + can_manage_topics=False, + until_date=datetime.now(), +).model_dump() + + +@pytest.mark.parametrize( + ("data", "resolved_type"), + [ + (CHAT_MEMBER_ADMINISTRATOR, ChatMemberAdministrator), + (CHAT_MEMBER_BANNED, ChatMemberBanned), + (CHAT_MEMBER_LEFT, ChatMemberLeft), + (CHAT_MEMBER_MEMBER, ChatMemberMember), + (CHAT_MEMBER_OWNER, ChatMemberOwner), + (CHAT_MEMBER_RESTRICTED, ChatMemberRestricted), + ], +) +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 78dce6a3..e90bcaf3 100644 --- a/tests/test_utils/test_deep_linking.py +++ b/tests/test_utils/test_deep_linking.py @@ -2,10 +2,10 @@ import pytest from aiogram.utils.deep_linking import ( create_start_link, + create_startapp_link, create_startgroup_link, - decode_payload, - encode_payload, ) +from aiogram.utils.payload import decode_payload, encode_payload from tests.mocked_bot import MockedBot PAYLOADS = [ @@ -14,16 +14,16 @@ PAYLOADS = [ "aaBBccDDeeFF5544332211", -12345678901234567890, 12345678901234567890, + "underscore_and-dash", ] WRONG_PAYLOADS = [ "@BotFather", "Some:special$characters#=", "spaces spaces spaces", 1234567890123456789.0, + "has`backtick", ] -pytestmark = pytest.mark.asyncio - @pytest.fixture(params=PAYLOADS, name="payload") def payload_fixture(request): @@ -48,11 +48,46 @@ 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) assert decoded == str(payload) + async def test_custom_encode_decode(self, payload: str): + from Cryptodome.Cipher import AES + from Cryptodome.Util.Padding import pad, unpad + + class Cryptor: + def __init__(self, key: str): + self.key = key.encode("utf-8") + self.mode = AES.MODE_ECB # never use ECB in strong systems obviously + self.size = 32 + + @property + def cipher(self): + return AES.new(self.key, self.mode) + + def encrypt(self, data: bytes) -> bytes: + return self.cipher.encrypt(pad(data, self.size)) + + def decrypt(self, data: bytes) -> bytes: + decrypted_data = self.cipher.decrypt(data) + return unpad(decrypted_data, self.size) + + cryptor = Cryptor("abcdefghijklmnop") + encoded_payload = encode_payload(payload, encoder=cryptor.encrypt) + decoded_payload = decode_payload(encoded_payload, decoder=cryptor.decrypt) + + assert decoded_payload == str(payload) + async def test_get_start_link_with_encoding(self, bot: MockedBot, wrong_payload: str): # define link link = await create_start_link(bot, wrong_payload, encode=True) @@ -62,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 new file mode 100644 index 00000000..25a81ba2 --- /dev/null +++ b/tests/test_utils/test_formatting.py @@ -0,0 +1,446 @@ +from datetime import datetime, timezone + +import pytest + +from aiogram.enums import MessageEntityType +from aiogram.types import MessageEntity, User +from aiogram.utils.formatting import ( + BlockQuote, + Bold, + BotCommand, + CashTag, + Code, + CustomEmoji, + DateTime, + Email, + ExpandableBlockQuote, + HashTag, + Italic, + PhoneNumber, + Pre, + Spoiler, + Strikethrough, + Text, + TextLink, + TextMention, + Underline, + Url, + _apply_entity, + as_key_value, + as_line, + as_list, + as_marked_list, + as_marked_section, + as_numbered_list, + as_numbered_section, + as_section, +) +from aiogram.utils.text_decorations import html_decoration + + +class TestNode: + @pytest.mark.parametrize( + "node,result", + [ + [ + Text("test"), + "test", + ], + [ + HashTag("#test"), + "#test", + ], + [ + CashTag("$TEST"), + "$TEST", + ], + [ + BotCommand("/test"), + "/test", + ], + [ + Url("https://example.com"), + "https://example.com", + ], + [ + Email("test@example.com"), + "test@example.com", + ], + [ + PhoneNumber("test"), + "test", + ], + [ + Bold("test"), + "test", + ], + [ + Italic("test"), + "test", + ], + [ + Underline("test"), + "test", + ], + [ + Strikethrough("test"), + "test", + ], + [ + Spoiler("test"), + "test", + ], + [ + Code("test"), + "test", + ], + [ + Pre("test", language="python"), + '
test
', + ], + [ + TextLink("test", url="https://example.com"), + 'test', + ], + [ + TextMention("test", user=User(id=42, is_bot=False, first_name="Test")), + 'test', + ], + [ + CustomEmoji("test", custom_emoji_id="42"), + 'test', + ], + [ + BlockQuote("test"), + "
test
", + ], + [ + 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): + text, entities = node.render() + if node.type: + assert len(entities) == 1 + entity = entities[0] + assert entity.type == node.type + + content = html_decoration.unparse(text, entities) + assert content == result + + def test_render_text(self): + node = Text("Hello, ", "World", "!") + text, entities = node.render() + assert text == "Hello, World!" + assert not entities + + def test_render_nested(self): + node = Text( + Text("Hello, ", Bold("World"), "!"), + "\n", + Text(Bold("This ", Underline("is"), " test", Italic("!"))), + "\n", + HashTag("#test"), + ) + text, entities = node.render() + assert text == "Hello, World!\nThis is test!\n#test" + assert entities == [ + MessageEntity(type="bold", offset=7, length=5), + MessageEntity(type="bold", offset=14, length=13), + MessageEntity(type="underline", offset=19, length=2), + MessageEntity(type="italic", offset=26, length=1), + MessageEntity(type="hashtag", offset=28, length=5), + ] + + def test_as_kwargs_default(self): + node = Text("Hello, ", Bold("World"), "!") + result = node.as_kwargs() + assert "text" in result + assert "entities" in result + assert "parse_mode" in result + + def test_as_kwargs_custom(self): + node = Text("Hello, ", Bold("World"), "!") + result = node.as_kwargs( + text_key="caption", + entities_key="custom_entities", + parse_mode_key="custom_parse_mode", + ) + assert "text" not in result + assert "caption" in result + assert "entities" not in result + assert "custom_entities" in result + 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!" + + def test_as_markdown(self): + node = Text("Hello, ", Bold("World"), "!") + assert node.as_markdown() == r"Hello, *World*\!" + + def test_replace(self): + node0 = Text("test0", param0="test1") + node1 = node0.replace("test1", "test2", param1="test1") + assert node0._body != node1._body + assert node0._params != node1._params + assert "param1" not in node0._params + assert "param1" in node1._params + + def test_add(self): + node0 = Text("Hello") + node1 = Bold("World") + + node2 = node0 + Text(", ") + node1 + "!" + assert node0 != node2 + assert node1 != node2 + assert len(node0._body) == 1 + assert len(node1._body) == 1 + assert len(node2._body) == 3 + + text, entities = node2.render() + assert text == "Hello, World!" + + def test_getitem_position(self): + node = Text("Hello, ", Bold("World"), "!") + with pytest.raises(TypeError): + node[2] + + def test_getitem_empty_slice(self): + node = Text("Hello, ", Bold("World"), "!") + new_node = node[:] + assert new_node is not node + assert isinstance(new_node, Text) + assert new_node._body == node._body + + def test_getitem_slice_zero(self): + node = Text("Hello, ", Bold("World"), "!") + new_node = node[2:2] + assert node is not new_node + assert isinstance(new_node, Text) + assert not new_node._body + + def test_getitem_slice_simple(self): + node = Text("Hello, ", Bold("World"), "!") + new_node = node[2:10] + assert isinstance(new_node, Text) + text, entities = new_node.render() + assert text == "llo, Wor" + assert len(entities) == 1 + assert entities[0].type == MessageEntityType.BOLD + + def test_getitem_slice_inside_child(self): + node = Text("Hello, ", Bold("World"), "!") + new_node = node[8:10] + assert isinstance(new_node, Text) + text, entities = new_node.render() + assert text == "or" + assert len(entities) == 1 + assert entities[0].type == MessageEntityType.BOLD + + def test_getitem_slice_tail(self): + node = Text("Hello, ", Bold("World"), "!") + new_node = node[12:13] + assert isinstance(new_node, Text) + text, entities = new_node.render() + assert text == "!" + assert not entities + + def test_from_entities(self): + # Most of the cases covered by text_decorations module + + node = Strikethrough.from_entities( + text="test1 test2 test3 test4 test5 test6 test7", + entities=[ + MessageEntity(type="bold", offset=6, length=29), + MessageEntity(type="underline", offset=12, length=5), + MessageEntity(type="italic", offset=24, length=5), + ], + ) + assert len(node._body) == 3 + assert isinstance(node, Strikethrough) + rendered = node.as_html() + assert rendered == "test1 test2 test3 test4 test5 test6 test7" + + def test_pretty_string(self): + node = Strikethrough.from_entities( + text="X", + entities=[ + MessageEntity( + type=MessageEntityType.CUSTOM_EMOJI, + offset=0, + length=1, + custom_emoji_id="42", + ), + ], + ) + assert ( + node.as_pretty_string(indent=True) + == """Strikethrough( + CustomEmoji( + 'X', + custom_emoji_id='42' + ) +)""" + ) + + +class TestHashTag: + def test_only_one_element_in_body(self): + with pytest.raises(ValueError): + HashTag("test", "test") + + def test_body_is_not_str(self): + with pytest.raises(ValueError): + HashTag(Text("test")) + + def test_with_no_prefix(self): + node = HashTag("test") + assert node._body == ("#test",) + + def test_with_prefix(self): + node = HashTag("#test") + assert node._body == ("#test",) + + +class TestCashTag: + def test_only_one_element_in_body(self): + with pytest.raises(ValueError): + CashTag("test", "test") + + def test_body_is_not_str(self): + with pytest.raises(ValueError): + CashTag(Text("test")) + + def test_with_no_prefix(self): + node = CashTag("USD") + assert node._body == ("$USD",) + + def test_with_prefix(self): + node = CashTag("$USD") + assert node._body == ("$USD",) + + +class TestUtils: + def test_apply_entity(self): + node = _apply_entity( + MessageEntity(type=MessageEntityType.BOLD, offset=0, length=4), "test" + ) + 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) + assert len(node._body) == 4 # 3 + '\n' + + def test_line_with_sep(self): + node = as_line("test", "test", "test", sep=" ") + assert isinstance(node, Text) + assert len(node._body) == 6 # 3 + 2 * ' ' + '\n' + + def test_as_line_single_element_with_sep(self): + node = as_line("test", sep=" ") + assert isinstance(node, Text) + assert len(node._body) == 2 # 1 + '\n' + + def test_as_list(self): + node = as_list("test", "test", "test") + assert isinstance(node, Text) + assert len(node._body) == 5 # 3 + 2 * '\n' between lines + + def test_as_marked_list(self): + node = as_marked_list("test 1", "test 2", "test 3") + assert node.as_html() == "- test 1\n- test 2\n- test 3" + + def test_as_numbered_list(self): + node = as_numbered_list("test 1", "test 2", "test 3", start=5) + assert node.as_html() == "5. test 1\n6. test 2\n7. test 3" + + def test_as_section(self): + node = as_section("title", "test 1", "test 2", "test 3") + assert node.as_html() == "title\ntest 1test 2test 3" + + def test_as_marked_section(self): + node = as_marked_section("Section", "test 1", "test 2", "test 3") + assert node.as_html() == "Section\n- test 1\n- test 2\n- test 3" + + def test_as_numbered_section(self): + node = as_numbered_section("Section", "test 1", "test 2", "test 3", start=5) + assert node.as_html() == "Section\n5. test 1\n6. test 2\n7. test 3" + + def test_as_key_value(self): + node = as_key_value("key", "test 1") + assert node.as_html() == "key: test 1" diff --git a/tests/test_utils/test_helper.py b/tests/test_utils/test_helper.py deleted file mode 100644 index 466db4ef..00000000 --- a/tests/test_utils/test_helper.py +++ /dev/null @@ -1,181 +0,0 @@ -import pytest - -from aiogram.utils.helper import Default, Helper, HelperMode, Item, ListItem, OrderedHelper - - -class TestHelper: - def test_items_all(self): - class MyHelper(Helper): - A = Item() - B = Item() - C = Item() - D = Item() - - assert set(MyHelper.all()) == {"A", "B", "C", "D"} - - def test_listed_items_all(self): - class MyHelper(Helper): - A = ListItem() - B = ListItem() - C = ListItem() - D = ListItem() - - assert set(MyHelper.all()) == {"A", "B", "C", "D"} - - def test_listed_items_combinations(self): - class MyHelper(Helper): - A = ListItem() - B = ListItem() - C = ListItem() - D = ListItem() - - assert (MyHelper.A | MyHelper.B) == ["A", "B"] - assert (MyHelper.C & MyHelper.D) == ["C", "D"] - assert MyHelper.A.add(MyHelper.D) == ["A", "D"] - assert MyHelper.B + MyHelper.D == ["B", "D"] - - def test_wrong_name(self): - with pytest.raises(RuntimeError): - - class MyHelper(Helper): - kaboom = Item() - - def test_not_a_helper_subclass(self): - with pytest.raises(RuntimeError): - - class NotAHelperSubclass: - A = Item() - - -class TestHelperMode: - def test_helper_mode_all(self): - assert set(HelperMode.all()) == { - "SCREAMING_SNAKE_CASE", - "lowerCamelCase", - "CamelCase", - "snake_case", - "lowercase", - } - - def test_screaming_snake_case(self): - class MyHelper(Helper): - mode = HelperMode.SCREAMING_SNAKE_CASE - - FOO = Item() - BAR_BAZ = Item() - - assert MyHelper.FOO == "FOO" - assert MyHelper.BAR_BAZ == "BAR_BAZ" - - def test_lower_camel_case(self): - class MyHelper(Helper): - mode = HelperMode.lowerCamelCase - - FOO = Item() - BAR_BAZ = Item() - - assert MyHelper.FOO == "foo" - assert MyHelper.BAR_BAZ == "barBaz" - - def test_camel_case(self): - class MyHelper(Helper): - mode = HelperMode.CamelCase - - FOO = Item() - BAR_BAZ = Item() - - assert MyHelper.FOO == "Foo" - assert MyHelper.BAR_BAZ == "BarBaz" - - def test_snake_case(self): - class MyHelper(Helper): - mode = HelperMode.snake_case - - FOO = Item() - BAR_BAZ = Item() - - assert MyHelper.FOO == "foo" - assert MyHelper.BAR_BAZ == "bar_baz" - - def test_lowercase(self): - class MyHelper(Helper): - mode = HelperMode.lowercase - - FOO = Item() - BAR_BAZ = Item() - - assert MyHelper.FOO == "foo" - assert MyHelper.BAR_BAZ == "barbaz" - - def test_extended_converters(self): - assert HelperMode.apply("test_text", mode=HelperMode.SCREAMING_SNAKE_CASE) == "TEST_TEXT" - assert HelperMode.apply("TestText", mode=HelperMode.SCREAMING_SNAKE_CASE) == "TEST_TEXT" - assert HelperMode.apply("test_text", mode=HelperMode.snake_case) == "test_text" - assert HelperMode.apply("foo", mode=lambda m: m.upper()) == "FOO" - - -class TestOrderedHelper: - def test_items_are_ordered(self): - class MyOrderedHelper(OrderedHelper): - A = Item() - D = Item() - C = Item() - B = Item() - - assert MyOrderedHelper.all() == ["A", "D", "C", "B"] - - def test_list_items_are_ordered(self): - class MyOrderedHelper(OrderedHelper): - A = ListItem() - D = ListItem() - C = ListItem() - B = ListItem() - - assert MyOrderedHelper.all() == ["A", "D", "C", "B"] - - -class TestDefaultDescriptor: - def test_descriptor_fs(self): - obj = type("ClassA", (), {})() - default_x_val = "some_x" - x = Default(default_x_val) - - # we can omit owner, usually it's just obj.__class__ - assert x.__get__(instance=obj, owner=None) == default_x_val - assert x.__get__(instance=obj, owner=obj.__class__) == default_x_val - - new_x_val = "new_x" - assert x.__set__(instance=obj, value=new_x_val) is None - - with pytest.raises(AttributeError) as exc: - x.__set__(instance=obj.__class__, value="will never be set") - assert "Instance cannot be class or None" in str(exc.value) - - assert x.__get__(instance=obj, owner=obj.__class__) == new_x_val - - with pytest.raises(AttributeError) as exc: - x.__delete__(instance=obj.__class__) - assert "Instance cannot be class or None" in str(exc.value) - - x.__delete__(instance=obj) - assert x.__get__(instance=obj, owner=obj.__class__) == default_x_val - - def test_init(self): - class A: - x = Default(fget=lambda a_inst: "nothing") - - assert isinstance(A.__dict__["x"], Default) - - a = A() - assert a.x == "nothing" - - x = Default("x") - assert x.__get__(None, None) == "x" - assert x.fget(None) == x.__get__(None, None) - - def test_nullability(self): - class A: - x = Default(default=None, fget=None) - - assert A.x is None - assert A().x is None diff --git a/tests/test_utils/test_i18n.py b/tests/test_utils/test_i18n.py index 31843080..d6dc2444 100644 --- a/tests/test_utils/test_i18n.py +++ b/tests/test_utils/test_i18n.py @@ -1,13 +1,18 @@ -from typing import Any, Dict +from typing import Any import pytest from aiogram import Dispatcher -from aiogram.dispatcher.fsm.context import FSMContext -from aiogram.dispatcher.fsm.storage.base import StorageKey -from aiogram.dispatcher.fsm.storage.memory import MemoryStorage +from aiogram.fsm.context import FSMContext +from aiogram.fsm.storage.base import StorageKey +from aiogram.fsm.storage.memory import MemoryStorage from aiogram.types import Update, User -from aiogram.utils.i18n import ConstI18nMiddleware, FSMI18nMiddleware, I18n, SimpleI18nMiddleware +from aiogram.utils.i18n import ( + ConstI18nMiddleware, + FSMI18nMiddleware, + I18n, + SimpleI18nMiddleware, +) from aiogram.utils.i18n.context import get_i18n, gettext, lazy_gettext from tests.conftest import DATA_DIR from tests.mocked_bot import MockedBot @@ -22,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"} @@ -51,27 +60,27 @@ class TestI18nCore: @pytest.mark.parametrize( "locale,case,result", [ - [None, dict(singular="test"), "test"], - [None, dict(singular="test", locale="uk"), "тест"], - ["en", dict(singular="test", locale="uk"), "тест"], - ["uk", dict(singular="test", locale="uk"), "тест"], - ["uk", dict(singular="test"), "тест"], - ["it", dict(singular="test"), "test"], - [None, dict(singular="test", n=2), "test"], - [None, dict(singular="test", n=2, locale="uk"), "тест"], - ["en", dict(singular="test", n=2, locale="uk"), "тест"], - ["uk", dict(singular="test", n=2, locale="uk"), "тест"], - ["uk", dict(singular="test", n=2), "тест"], - ["it", dict(singular="test", n=2), "test"], - [None, dict(singular="test", plural="test2", n=2), "test2"], - [None, dict(singular="test", plural="test2", n=2, locale="uk"), "test2"], - ["en", dict(singular="test", plural="test2", n=2, locale="uk"), "test2"], - ["uk", dict(singular="test", plural="test2", n=2, locale="uk"), "test2"], - ["uk", dict(singular="test", plural="test2", n=2), "test2"], - ["it", dict(singular="test", plural="test2", n=2), "test2"], + [None, {"singular": "test"}, "test"], + [None, {"singular": "test", "locale": "uk"}, "тест"], + ["en", {"singular": "test", "locale": "uk"}, "тест"], + ["uk", {"singular": "test", "locale": "uk"}, "тест"], + ["uk", {"singular": "test"}, "тест"], + ["it", {"singular": "test"}, "test"], + [None, {"singular": "test", "n": 2}, "test"], + [None, {"singular": "test", "n": 2, "locale": "uk"}, "тест"], + ["en", {"singular": "test", "n": 2, "locale": "uk"}, "тест"], + ["uk", {"singular": "test", "n": 2, "locale": "uk"}, "тест"], + ["uk", {"singular": "test", "n": 2}, "тест"], + ["it", {"singular": "test", "n": 2}, "test"], + [None, {"singular": "test", "plural": "test2", "n": 2}, "test2"], + [None, {"singular": "test", "plural": "test2", "n": 2, "locale": "uk"}, "test2"], + ["en", {"singular": "test", "plural": "test2", "n": 2, "locale": "uk"}, "test2"], + ["uk", {"singular": "test", "plural": "test2", "n": 2, "locale": "uk"}, "test2"], + ["uk", {"singular": "test", "plural": "test2", "n": 2}, "test2"], + ["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(): @@ -87,7 +96,6 @@ async def next_call(event, data): return gettext("test") -@pytest.mark.asyncio class TestSimpleI18nMiddleware: @pytest.mark.parametrize( "event_from_user,result", @@ -111,8 +119,17 @@ class TestSimpleI18nMiddleware: middleware = SimpleI18nMiddleware(i18n=i18n) middleware.setup(router=dp) - assert middleware not in dp.update.outer_middlewares - assert middleware in dp.message.outer_middlewares + assert middleware in dp.message.outer_middleware + assert middleware in dp.callback_query.outer_middleware + + async def test_setup_exclude(self, i18n: I18n): + dp = Dispatcher() + middleware = SimpleI18nMiddleware(i18n=i18n) + middleware.setup(router=dp, exclude={"message"}) + + assert middleware not in dp.update.outer_middleware + assert middleware not in dp.message.outer_middleware + assert middleware in dp.callback_query.outer_middleware async def test_get_unknown_locale(self, i18n: I18n): dp = Dispatcher() @@ -132,34 +149,58 @@ class TestSimpleI18nMiddleware: ) assert locale == i18n.default_locale + async def test_custom_keys(self, i18n: I18n): + async def handler(event, data): + return data + + middleware = SimpleI18nMiddleware( + i18n=i18n, i18n_key="translator", middleware_key="middleware" + ) + context: dict[str, Any] = await middleware(handler, None, {}) + assert "translator" in context + assert context["translator"] == i18n + assert "middleware" in context + assert context["middleware"] == middleware + -@pytest.mark.asyncio class TestConstI18nMiddleware: async def test_middleware(self, i18n: I18n): middleware = ConstI18nMiddleware(i18n=i18n, locale="uk") result = await middleware( next_call, Update(update_id=42), - {"event_from_user": User(id=42, is_bot=False, language_code="it", first_name="Test")}, + { + "event_from_user": User( + id=42, is_bot=False, language_code="it", first_name="Test" + ), + }, ) assert result == "тест" -@pytest.mark.asyncio class TestFSMI18nMiddleware: async def test_middleware(self, i18n: I18n, bot: MockedBot): middleware = FSMI18nMiddleware(i18n=i18n) storage = MemoryStorage() - state = FSMContext( - bot=bot, storage=storage, key=StorageKey(user_id=42, chat_id=42, bot_id=bot.id) - ) + state = FSMContext(storage=storage, key=StorageKey(user_id=42, chat_id=42, bot_id=bot.id)) data = { "event_from_user": User(id=42, is_bot=False, language_code="it", first_name="Test"), "state": state, } result = await middleware(next_call, Update(update_id=42), data) assert result == "test" + await middleware.set_locale(state, "uk") assert i18n.current_locale == "uk" + result = await middleware(next_call, Update(update_id=42), data) assert result == "тест" + + async def test_without_state(self, i18n: I18n, bot: MockedBot): + middleware = FSMI18nMiddleware(i18n=i18n) + data = { + "event_from_user": User(id=42, is_bot=False, language_code="it", first_name="Test"), + } + result = await middleware(next_call, Update(update_id=42), data) + assert i18n.current_locale == "en" + assert result == "test" diff --git a/tests/test_utils/test_imports.py b/tests/test_utils/test_imports.py deleted file mode 100644 index e877201c..00000000 --- a/tests/test_utils/test_imports.py +++ /dev/null @@ -1,29 +0,0 @@ -import pytest - -import aiogram -from aiogram.utils.imports import import_module - - -class TestImports: - def test_bad_type(self): - with pytest.raises(ValueError, match=r"Target should be string not"): - import_module(42) - - @pytest.mark.parametrize("value", ["module", "module:", ":attribute"]) - def test_bad_format(self, value): - with pytest.raises(ValueError, match='must be in format ":"'): - import_module(value) - - @pytest.mark.parametrize("value", ["module", "aiogram.KABOOM", "aiogram.KABOOM.TEST"]) - def test_bad_value(self, value): - with pytest.raises(ValueError, match="Could not import module"): - import_module(f"{value}:attribute") - - def test_has_no_attribute(self): - with pytest.raises(ValueError, match="has no attribute"): - import_module("aiogram:KABOOM") - - def test_imported(self): - value = import_module("aiogram:__version__") - isinstance(value, str) - assert value == aiogram.__version__ diff --git a/tests/test_utils/test_keyboard.py b/tests/test_utils/test_keyboard.py index 9923064f..b374e7ac 100644 --- a/tests/test_utils/test_keyboard.py +++ b/tests/test_utils/test_keyboard.py @@ -1,13 +1,17 @@ import pytest -from aiogram.dispatcher.filters.callback_data import CallbackData +from aiogram.filters.callback_data import CallbackData from aiogram.types import ( InlineKeyboardButton, InlineKeyboardMarkup, KeyboardButton, ReplyKeyboardMarkup, ) -from aiogram.utils.keyboard import InlineKeyboardBuilder, KeyboardBuilder, ReplyKeyboardBuilder +from aiogram.utils.keyboard import ( + InlineKeyboardBuilder, + KeyboardBuilder, + ReplyKeyboardBuilder, +) class MyCallback(CallbackData, prefix="test"): @@ -57,36 +61,38 @@ class TestKeyboardBuilder: with pytest.raises(ValueError): assert builder._validate_row( - row=(KeyboardButton(text=f"test {index}") for index in range(10)) + row=( + KeyboardButton(text=f"test {index}") for index in range(builder.max_width + 5) + ) ) with pytest.raises(ValueError): assert builder._validate_row( - row=[KeyboardButton(text=f"test {index}") for index in range(10)] + row=[ + KeyboardButton(text=f"test {index}") for index in range(builder.max_width + 5) + ] ) - for count in range(9): + for count in range(11): assert builder._validate_row( row=[KeyboardButton(text=f"test {index}") for index in range(count)] ) - def test_validate_markup(self): + def test_validate_markup_invalid_type(self): builder = ReplyKeyboardBuilder() - with pytest.raises(ValueError): builder._validate_markup(markup=()) + def test_validate_markup_too_many_buttons(self): + builder = ReplyKeyboardBuilder() with pytest.raises(ValueError): builder._validate_markup( markup=[ - [KeyboardButton(text=f"{row}.{col}") for col in range(8)] for row in range(15) + [KeyboardButton(text=f"{row}.{col}") for col in range(builder.max_width)] + for row in range(builder.max_buttons) ] ) - assert builder._validate_markup( - markup=[[KeyboardButton(text=f"{row}.{col}") for col in range(8)] for row in range(8)] - ) - def test_validate_size(self): builder = ReplyKeyboardBuilder() with pytest.raises(ValueError): @@ -98,7 +104,7 @@ class TestKeyboardBuilder: builder._validate_size(0) with pytest.raises(ValueError): - builder._validate_size(10) + builder._validate_size(builder.max_width + 5) for size in range(1, 9): builder._validate_size(size) @@ -122,12 +128,6 @@ class TestKeyboardBuilder: InlineKeyboardBuilder(markup=[[InlineKeyboardButton(text="test")]]), InlineKeyboardButton(text="test2"), ], - [ - KeyboardBuilder( - button_type=InlineKeyboardButton, markup=[[InlineKeyboardButton(text="test")]] - ), - InlineKeyboardButton(text="test2"), - ], ], ) def test_copy(self, builder, button): @@ -149,7 +149,14 @@ class TestKeyboardBuilder: @pytest.mark.parametrize( "count,rows,last_columns", - [[0, 0, 0], [3, 1, 3], [8, 1, 8], [9, 2, 1], [16, 2, 8], [19, 3, 3]], + [ + [0, 0, 0], + [3, 1, 3], + [8, 1, 8], + [12, 2, 2], + [16, 2, 6], + [22, 3, 2], + ], ) def test_add(self, count: int, rows: int, last_columns: int): builder = ReplyKeyboardBuilder() @@ -163,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, ): @@ -178,8 +195,8 @@ class TestKeyboardBuilder: [0, False, [2], []], [1, False, [2], [1]], [3, False, [2], [2, 1]], - [10, False, [], [8, 2]], [10, False, [3, 2, 1], [3, 2, 1, 1, 1, 1, 1]], + [12, False, [], [10, 2]], [12, True, [3, 2, 1], [3, 2, 1, 3, 2, 1]], ], ) @@ -190,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"), ], ], @@ -224,3 +293,114 @@ 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", + [ + [ + ReplyKeyboardMarkup( + keyboard=[ + [KeyboardButton(text="test-1"), KeyboardButton(text="test-2")], + [KeyboardButton(text="test-3")], + ] + ), + ReplyKeyboardBuilder, + ], + [ + InlineKeyboardMarkup( + inline_keyboard=[ + [InlineKeyboardButton(text="test-1"), InlineKeyboardButton(text="test-2")], + [InlineKeyboardButton(text="test-3")], + ] + ), + InlineKeyboardBuilder, + ], + ], + ) + def test_from_markup(self, markup, builder_type): + builder = builder_type.from_markup(markup) + assert len(builder.export()) == 2 + assert len(list(builder.buttons)) == 3 + + def test_attach(self): + builder = ReplyKeyboardBuilder( + markup=[ + [ + KeyboardButton(text="test1"), + KeyboardButton(text="test2"), + KeyboardButton(text="test3"), + ] + ] + ) + builder.adjust(2) + builder.attach(ReplyKeyboardBuilder(markup=[[KeyboardButton(text="test2")]])) + markup = builder.export() + assert len(markup) == 3 + assert len(markup[0]) == 2 + assert len(markup[1]) == 1 + assert len(markup[2]) == 1 + + def test_attach_invalid_button_type(self): + builder = ReplyKeyboardBuilder( + markup=[ + [ + KeyboardButton(text="test1"), + KeyboardButton(text="test2"), + KeyboardButton(text="test3"), + ] + ] + ) + with pytest.raises(ValueError): + builder.attach(InlineKeyboardBuilder(markup=[[InlineKeyboardButton(text="test2")]])) + + def test_attach_not_builder(self): + builder = ReplyKeyboardBuilder( + markup=[ + [ + KeyboardButton(text="test1"), + KeyboardButton(text="test2"), + KeyboardButton(text="test3"), + ] + ] + ) + with pytest.raises(ValueError): + builder.attach(KeyboardButton(text="test2")) diff --git a/tests/test_utils/test_link.py b/tests/test_utils/test_link.py index 4dbfe8a2..c2ac5514 100644 --- a/tests/test_utils/test_link.py +++ b/tests/test_utils/test_link.py @@ -1,24 +1,83 @@ -from typing import Any, Dict +from itertools import product +from typing import Any +from urllib.parse import parse_qs import pytest -from aiogram.utils.link import create_telegram_link, create_tg_link +from aiogram.utils.link import ( + BRANCH, + create_channel_bot_link, + create_telegram_link, + create_tg_link, + docs_url, +) class TestLink: @pytest.mark.parametrize( "base,params,result", - [["user", dict(id=42), "tg://user?id=42"]], + [["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( "base,params,result", [ - ["username", dict(), "https://t.me/username"], - ["username", dict(start="test"), "https://t.me/username?start=test"], + ["username", {}, "https://t.me/username"], + ["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): + assert ( + docs_url("test.html", fragment_="test") + == f"https://docs.aiogram.dev/en/{BRANCH}/test.html#test" + ) + + def test_docs(self): + assert docs_url("test.html") == f"https://docs.aiogram.dev/en/{BRANCH}/test.html" + + +class TestCreateChannelBotLink: + def test_without_params(self): + assert create_channel_bot_link("test_bot") == "https://t.me/test_bot" + + def test_parameter(self): + assert ( + create_channel_bot_link("test_bot", parameter="parameter in group") + == "https://t.me/test_bot?startgroup=parameter+in+group" + ) + + def test_permissions(self): + # Is bad idea to put over 2k cases into parameterized test, + # so I've preferred to implement it inside the test + + params = { + "change_info", + "post_messages", + "edit_messages", + "delete_messages", + "restrict_members", + "invite_users", + "pin_messages", + "promote_members", + "manage_video_chats", + "anonymous", + "manage_chat", + } + + variants = product([True, False], repeat=len(params)) + 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 + + link = create_channel_bot_link("test", **kwargs) + query = parse_qs(link.split("?", maxsplit=1)[-1], max_num_fields=1) + assert "admin" in query + admin = query["admin"][0] + assert set(admin.split("+")) == set(kwargs) diff --git a/tests/test_utils/test_magic_filter.py b/tests/test_utils/test_magic_filter.py index 4a1d05f3..097c8365 100644 --- a/tests/test_utils/test_magic_filter.py +++ b/tests/test_utils/test_magic_filter.py @@ -19,3 +19,17 @@ class TestMagicFilter: result = magic.resolve(MyObject(text="123")) assert isinstance(result, dict) assert isinstance(result["match"], Match) + + def test_operation_as_not_none(self): + # Issue: https://github.com/aiogram/aiogram/issues/1281 + magic = F.cast(int).as_("value") + + result = magic.resolve("0") + assert result == {"value": 0} + + def test_operation_as_not_none_iterable(self): + # Issue: https://github.com/aiogram/aiogram/issues/1281 + magic = F.as_("value") + + result = magic.resolve([]) + assert result is None diff --git a/tests/test_utils/test_markdown.py b/tests/test_utils/test_markdown.py index 815b1c5d..7759ab4c 100644 --- a/tests/test_utils/test_markdown.py +++ b/tests/test_utils/test_markdown.py @@ -1,10 +1,13 @@ -from typing import Any, Callable, Optional, Tuple +from collections.abc import Callable +from typing import Any import pytest from aiogram.utils.markdown import ( + blockquote, bold, code, + hblockquote, hbold, hcode, hide_link, @@ -54,9 +57,25 @@ class TestMarkdown: None, '', ], + [blockquote, ("spam", "eggs"), " ", ">spam eggs"], + pytest.param( + blockquote, + ("spam", "eggs"), + "\n", + ">spam\n>eggs", + id="Markdown V2 blockquote multiline", + ), + [hblockquote, ("spam", "eggs"), " ", "
spam eggs
"], + pytest.param( + hblockquote, + ("spam", "eggs"), + "\n", + "
spam\neggs
", + id="HTML blockquote multiline", + ), ], ) 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_media_group.py b/tests/test_utils/test_media_group.py new file mode 100644 index 00000000..eae63a95 --- /dev/null +++ b/tests/test_utils/test_media_group.py @@ -0,0 +1,94 @@ +import pytest + +from aiogram.types import ( + InputMediaAudio, + InputMediaDocument, + InputMediaPhoto, + InputMediaVideo, + MessageEntity, +) +from aiogram.utils.media_group import MediaGroupBuilder + + +class TestMediaGroupBuilder: + def test_add_incorrect_media(self): + builder = MediaGroupBuilder() + with pytest.raises(ValueError): + builder._add("test") + + def test_add_more_than_10_media(self): + builder = MediaGroupBuilder() + for _ in range(10): + builder.add_photo("test") + with pytest.raises(ValueError): + builder.add_photo("test") + + def test_extend(self): + builder = MediaGroupBuilder() + media = InputMediaPhoto(media="test") + + builder._extend([media, media]) + assert len(builder._media) == 2 + + def test_add_audio(self): + builder = MediaGroupBuilder() + builder.add_audio("test") + assert isinstance(builder._media[0], InputMediaAudio) + + def test_add_photo(self): + builder = MediaGroupBuilder() + builder.add_photo("test") + assert isinstance(builder._media[0], InputMediaPhoto) + + def test_add_video(self): + builder = MediaGroupBuilder() + builder.add_video("test") + assert isinstance(builder._media[0], InputMediaVideo) + + def test_add_document(self): + builder = MediaGroupBuilder() + builder.add_document("test") + assert isinstance(builder._media[0], InputMediaDocument) + + @pytest.mark.parametrize( + "type,result_type", + [ + ("audio", InputMediaAudio), + ("photo", InputMediaPhoto), + ("video", InputMediaVideo), + ("document", InputMediaDocument), + ], + ) + def test_add(self, type, result_type): + builder = MediaGroupBuilder() + builder.add(type=type, media="test") + assert isinstance(builder._media[0], result_type) + + def test_add_unknown_type(self): + builder = MediaGroupBuilder() + with pytest.raises(ValueError): + builder.add(type="unknown", media="test") + + def test_build(self): + builder = MediaGroupBuilder() + builder.add_photo("test") + assert builder.build() == builder._media + + def test_build_empty(self): + builder = MediaGroupBuilder() + assert builder.build() == [] + + def test_build_with_caption(self): + builder = MediaGroupBuilder( + caption="override caption", + caption_entities=[MessageEntity(type="bold", offset=0, length=8)], + ) + builder.add_photo("test", caption="test") + builder.add_photo("test", caption="test") + builder.add_photo("test", caption="test") + + media = builder.build() + assert len(media) == 3 + assert media[0].caption == "override caption" + assert media[1].caption == "test" + assert media[2].caption == "test" diff --git a/tests/test_utils/test_serialization.py b/tests/test_utils/test_serialization.py new file mode 100644 index 00000000..f4343188 --- /dev/null +++ b/tests/test_utils/test_serialization.py @@ -0,0 +1,54 @@ +from datetime import datetime + +import pytest +from pydantic_core import PydanticSerializationError + +from aiogram.client.default import DefaultBotProperties +from aiogram.enums import ChatType, MessageEntityType, ParseMode +from aiogram.methods import SendMessage +from aiogram.types import Chat, LinkPreviewOptions, Message, MessageEntity, User +from aiogram.utils.serialization import ( + DeserializedTelegramObject, + deserialize_telegram_object, + deserialize_telegram_object_to_python, +) + + +class TestSerialize: + def test_deserialize(self): + method = SendMessage(chat_id=42, text="test", parse_mode="HTML") + deserialized = deserialize_telegram_object(method) + assert isinstance(deserialized, DeserializedTelegramObject) + assert isinstance(deserialized.data, dict) + assert deserialized.data["chat_id"] == 42 + + def test_deserialize_default(self): + message = Message( + message_id=42, + date=datetime.now(), + chat=Chat(id=42, type=ChatType.PRIVATE, first_name="Test"), + from_user=User(id=42, first_name="Test", is_bot=False), + text="https://example.com", + link_preview_options=LinkPreviewOptions(is_disabled=True), + entities=[MessageEntity(type=MessageEntityType.URL, length=19, offset=0)], + ) + with pytest.raises(PydanticSerializationError): + # https://github.com/aiogram/aiogram/issues/1450 + message.model_dump_json(exclude_none=True) + + deserialized = deserialize_telegram_object(message) + assert deserialized.data["link_preview_options"] == {"is_disabled": True} + assert isinstance(deserialized.data["date"], int) + + def test_deserialize_with_custom_default(self): + default = DefaultBotProperties(parse_mode="HTML") + method = SendMessage(chat_id=42, text="test") + + deserialized = deserialize_telegram_object(method, default=default) + assert deserialized.data["parse_mode"] == ParseMode.HTML + assert deserialized.data["parse_mode"] != method.parse_mode + + def test_deserialize_telegram_object_to_python(self): + method = SendMessage(chat_id=42, text="test", parse_mode="HTML") + deserialized = deserialize_telegram_object_to_python(method) + assert isinstance(deserialized, dict) diff --git a/tests/test_utils/test_text_decorations.py b/tests/test_utils/test_text_decorations.py index da171575..4ebd5f3a 100644 --- a/tests/test_utils/test_text_decorations.py +++ b/tests/test_utils/test_text_decorations.py @@ -1,9 +1,13 @@ -from typing import List, Optional +from datetime import datetime, timezone import pytest from aiogram.types import MessageEntity, User -from aiogram.utils.text_decorations import TextDecoration, html_decoration, markdown_decoration +from aiogram.utils.text_decorations import ( + TextDecoration, + html_decoration, + markdown_decoration, +) class TestTextDecoration: @@ -23,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"], [ @@ -47,11 +51,42 @@ class TestTextDecoration: 'test', ], [html_decoration, MessageEntity(type="url", offset=0, length=5), "test"], + [ + html_decoration, + MessageEntity(type="spoiler", offset=0, length=5), + "test", + ], + [ + html_decoration, + MessageEntity(type="custom_emoji", offset=0, length=5, custom_emoji_id="42"), + 'test', + ], [ html_decoration, MessageEntity(type="text_link", offset=0, length=5, url="https://aiogram.dev"), 'test', ], + [ + html_decoration, + MessageEntity(type="blockquote", offset=0, length=5), + "
test
", + ], + [ + html_decoration, + 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`"], @@ -76,6 +111,12 @@ class TestTextDecoration: [markdown_decoration, MessageEntity(type="bot_command", offset=0, length=5), "test"], [markdown_decoration, MessageEntity(type="email", offset=0, length=5), "test"], [markdown_decoration, MessageEntity(type="phone_number", offset=0, length=5), "test"], + [markdown_decoration, MessageEntity(type="spoiler", offset=0, length=5), "||test||"], + [ + markdown_decoration, + MessageEntity(type="custom_emoji", offset=0, length=5, custom_emoji_id="42"), + "![test](tg://emoji?emoji_id=42)", + ], [ markdown_decoration, MessageEntity( @@ -86,6 +127,37 @@ class TestTextDecoration: ), "[test](tg://user?id=42)", ], + [ + markdown_decoration, + MessageEntity(type="blockquote", offset=0, length=5), + ">test", + ], + [ + markdown_decoration, + 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( @@ -93,6 +165,46 @@ 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( + MessageEntity(type="unknown", offset=0, length=5), "" + ) + == "<test>" + ) + @pytest.mark.parametrize( "decorator,before,after", [ @@ -223,13 +335,56 @@ class TestTextDecoration: [MessageEntity(type="bold", offset=0, length=8, url=None, user=None)], "👋🏾 Hi!", ], + [ + html_decoration, + "#test", + [ + MessageEntity(type="hashtag", offset=0, length=5), + MessageEntity(type="bold", offset=0, length=5), + ], + "#test", + ], + [ + html_decoration, + "$TEST", + [ + MessageEntity(type="cashtag", offset=0, length=5), + MessageEntity(type="bold", offset=0, length=5), + ], + "$TEST", + ], + [ + html_decoration, + "test@example.com", + [ + MessageEntity(type="email", offset=0, length=16), + MessageEntity(type="bold", offset=0, length=16), + ], + "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.py b/tests/test_utils/test_web_app.py new file mode 100644 index 00000000..4b7c94c2 --- /dev/null +++ b/tests/test_utils/test_web_app.py @@ -0,0 +1,88 @@ +import pytest + +from aiogram.utils.web_app import ( + WebAppInitData, + check_webapp_signature, + parse_webapp_init_data, + safe_parse_webapp_init_data, +) + + +class TestWebApp: + @pytest.mark.parametrize( + "token,case,result", + [ + [ + "42:TEST", + "auth_date=1650385342" + "&user=%7B%22id%22%3A42%2C%22first_name%22%3A%22Test%22%7D" + "&query_id=test" + "&hash=46d2ea5e32911ec8d30999b56247654460c0d20949b6277af519e76271182803", + True, + ], + [ + "42:TEST", + "auth_date=1650385342" + "&user=%7B%22id%22%3A+%22123456789%22%2C+%22first_name%22%3A+%22PlaceholderFirstName%22%2C+%22last_name%22%3A+%22PlaceholderLastName+%5Cud83c%5Cuddfa%5Cud83c%5Cudde6%22%2C+%22username%22%3A+%22Latand%22%2C+%22language_code%22%3A+%22en%22%2C+%22is_premium%22%3A+%22true%22%2C+%22allows_write_to_pm%22%3A+%22true%22%7D" + "&query_id=test" + "&hash=b3c8b293f14ad0f7f0abcf769aea1209a72295d30a87eb0e74df855d32e53bfe", + True, + ], + [ + "42:INVALID", + "auth_date=1650385342" + "&user=%7B%22id%22%3A42%2C%22first_name%22%3A%22Test%22%7D" + "&query_id=test" + "&hash=46d2ea5e32911ec8d30999b56247654460c0d20949b6277af519e76271182803", + False, + ], + [ + "42:TEST", + "user=%7B%22id%22%3A42%2C%22first_name%22%3A%22Test%22%7D&query_id=test&hash=test", + False, + ], + [ + "42:TEST", + "user=%7B%22id%22%3A42%2C%22first_name%22%3A%22Test%22%7D&query_id=test", + False, + ], + ["42:TEST", "", False], + ["42:TEST", "test&foo=bar=baz", False], + ], + ) + def test_check_webapp_signature(self, token, case, result): + assert check_webapp_signature(token, case) is result + + def test_parse_web_app_init_data(self): + parsed = parse_webapp_init_data( + "auth_date=1650385342" + "&user=%7B%22id%22%3A42%2C%22first_name%22%3A%22Test%22%7D" + "&query_id=test" + "&hash=46d2ea5e32911ec8d30999b56247654460c0d20949b6277af519e76271182803", + ) + assert isinstance(parsed, WebAppInitData) + assert parsed.user + assert parsed.user.first_name == "Test" + assert parsed.user.id == 42 + assert parsed.query_id == "test" + assert parsed.hash == "46d2ea5e32911ec8d30999b56247654460c0d20949b6277af519e76271182803" + assert parsed.auth_date.year == 2022 + + def test_valid_safe_parse_webapp_init_data(self): + assert safe_parse_webapp_init_data( + "42:TEST", + "auth_date=1650385342" + "&user=%7B%22id%22%3A42%2C%22first_name%22%3A%22Test%22%7D" + "&query_id=test" + "&hash=46d2ea5e32911ec8d30999b56247654460c0d20949b6277af519e76271182803", + ) + + def test_invalid_safe_parse_webapp_init_data(self): + with pytest.raises(ValueError): + safe_parse_webapp_init_data( + "42:TOKEN", + "auth_date=1650385342" + "&user=%7B%22id%22%3A42%2C%22first_name%22%3A%22Test%22%7D" + "&query_id=test" + "&hash=test", + ) 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/__init__.py b/tests/test_webhook/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_dispatcher/test_webhook/test_aiohtt_server.py b/tests/test_webhook/test_aiohttp_server.py similarity index 53% rename from tests/test_dispatcher/test_webhook/test_aiohtt_server.py rename to tests/test_webhook/test_aiohttp_server.py index 7a044715..881e8fc7 100644 --- a/tests/test_dispatcher/test_webhook/test_aiohtt_server.py +++ b/tests/test_webhook/test_aiohttp_server.py @@ -2,31 +2,26 @@ 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 -from aiohttp import web +from aiohttp import MultipartReader, web from aiohttp.test_utils import TestClient from aiohttp.web_app import Application from aiogram import Dispatcher, F -from aiogram.dispatcher.webhook.aiohttp_server import ( +from aiogram.methods import GetMe, Request +from aiogram.types import BufferedInputFile, Message, User +from aiogram.webhook.aiohttp_server import ( SimpleRequestHandler, TokenBasedRequestHandler, ip_filter_middleware, setup_application, ) -from aiogram.dispatcher.webhook.security import IPFilter -from aiogram.methods import GetMe, Request -from aiogram.types import Message, User +from aiogram.webhook.security import IPFilter from tests.mocked_bot import MockedBot -try: - from asynctest import CoroutineMock, patch -except ImportError: - from unittest.mock import AsyncMock as CoroutineMock # type: ignore - from unittest.mock import patch - class TestAiohttpServer: def test_setup_application(self): @@ -78,16 +73,16 @@ class TestSimpleRequestHandler: }, ) - async def test(self, bot: MockedBot, aiohttp_client): + async def test_reply_into_webhook_file(self, bot: MockedBot, aiohttp_client): app = Application() dp = Dispatcher() - handler_event = Event() - @dp.message(F.text == "test") def handle_message(msg: Message): - handler_event.set() - return msg.answer("PASS") + return msg.answer_document( + caption="PASS", + document=BufferedInputFile(b"test", filename="test.txt"), + ) handler = SimpleRequestHandler( dispatcher=dp, @@ -99,29 +94,125 @@ class TestSimpleRequestHandler: resp = await self.make_reqest(client=client) assert resp.status == 200 - result = await resp.json() + 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 result["method"] == "sendDocument" + assert result["caption"] == "PASS" + assert result["document"].startswith("attach://") + assert result[result["document"][9:]] + + async def test_reply_into_webhook_text(self, bot: MockedBot, aiohttp_client): + app = Application() + dp = Dispatcher() + + @dp.message(F.text == "test") + def handle_message(msg: Message): + return msg.answer(text="PASS") + + handler = SimpleRequestHandler( + dispatcher=dp, + bot=bot, + handle_in_background=False, + ) + handler.register(app, path="/webhook") + client: TestClient = await aiohttp_client(app) + + resp = await self.make_reqest(client=client) + 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 result["method"] == "sendMessage" + assert result["text"] == "PASS" + + async def test_reply_into_webhook_unhandled(self, bot: MockedBot, aiohttp_client): + app = Application() + dp = Dispatcher() + + @dp.message(F.text == "test") + def handle_message(msg: Message): + return msg.answer(text="PASS") + + handler = SimpleRequestHandler( + dispatcher=dp, + bot=bot, + handle_in_background=False, + ) + handler.register(app, path="/webhook") + client: TestClient = await aiohttp_client(app) resp = await self.make_reqest(client=client, text="spam") assert resp.status == 200 - result = await resp.json() - 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() + dp = Dispatcher() + + handler_event = Event() + + @dp.message(F.text == "test") + def handle_message(msg: Message): + handler_event.set() + return msg.answer(text="PASS") + + handler = SimpleRequestHandler( + dispatcher=dp, + bot=bot, + handle_in_background=True, + ) + handler.register(app, path="/webhook") + client: TestClient = await aiohttp_client(app) - handler.handle_in_background = True with patch( "aiogram.dispatcher.dispatcher.Dispatcher.silent_call_request", - new_callable=CoroutineMock, + new_callable=AsyncMock, ) as mocked_silent_call_request: + method_called_event = asyncio.Event() + mocked_silent_call_request.side_effect = ( + lambda *args, **kwargs: method_called_event.set() + ) + 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(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 + # before asserting if it has been awaited. mocked_silent_call_request.assert_awaited() result = await resp.json() assert not result + async def test_verify_secret(self, bot: MockedBot, aiohttp_client): + app = Application() + dp = Dispatcher() + handler = SimpleRequestHandler( + dispatcher=dp, bot=bot, handle_in_background=False, secret_token="vasya228" + ) + handler.register(app, path="/webhook") + client: TestClient = await aiohttp_client(app) + resp = await self.make_reqest(client=client) + assert resp.status == 401 + class TestTokenBasedRequestHandler: + async def test_verify_secret(self, bot: MockedBot): + dispatcher = Dispatcher() + handler = TokenBasedRequestHandler(dispatcher=dispatcher) + assert handler.verify_secret("petro328", bot) + async def test_register(self): dispatcher = Dispatcher() app = Application() @@ -160,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/tests/test_dispatcher/test_webhook/test_security.py b/tests/test_webhook/test_security.py similarity index 95% rename from tests/test_dispatcher/test_webhook/test_security.py rename to tests/test_webhook/test_security.py index 6a9b84a0..f5b05ba5 100644 --- a/tests/test_dispatcher/test_webhook/test_security.py +++ b/tests/test_webhook/test_security.py @@ -2,7 +2,7 @@ from ipaddress import IPv4Address, IPv4Network import pytest -from aiogram.dispatcher.webhook.security import IPFilter +from aiogram.webhook.security import IPFilter class TestSecurity: @@ -36,6 +36,7 @@ class TestSecurity: assert len(ip_filter._allowed_ips) == 5116 assert "91.108.4.50" in ip_filter assert "149.154.160.20" in ip_filter + assert "91.108.6.79" in ip_filter @pytest.mark.parametrize( "ip,ip_range", 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" }, +]
+ + + + + +

Test links:

+
+

Test permissions:

+ +
+
+ Data passed to webview. + +
+
+
+ Theme params +
+