From cf2980a9c1f6aa960b6260a9cb32a65d76a765d7 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Mon, 6 May 2024 23:27:54 +0300 Subject: [PATCH] Full support of Bot API 7.3 (#1480) * Added full support of Bot API * Added full support of Bot API * Fixed tests * Added changelog * Bump version --- .apiversion | 2 +- .butcher/methods/copyMessage/entity.json | 6 +- .../editMessageLiveLocation/entity.json | 8 + .butcher/methods/getChat/entity.json | 6 +- .../methods/promoteChatMember/entity.json | 6 +- .butcher/methods/sendAnimation/entity.json | 6 +- .butcher/methods/sendAudio/entity.json | 6 +- .butcher/methods/sendContact/entity.json | 6 +- .butcher/methods/sendDice/entity.json | 6 +- .butcher/methods/sendDocument/entity.json | 6 +- .butcher/methods/sendGame/entity.json | 6 +- .butcher/methods/sendLocation/entity.json | 12 +- .butcher/methods/sendMessage/entity.json | 6 +- .butcher/methods/sendPhoto/entity.json | 6 +- .butcher/methods/sendPoll/default.yml | 1 + .butcher/methods/sendPoll/entity.json | 36 +- .butcher/methods/sendPoll/replace.yml | 12 + .butcher/methods/sendSticker/entity.json | 6 +- .butcher/methods/sendVenue/entity.json | 6 +- .butcher/methods/sendVideo/entity.json | 6 +- .butcher/methods/sendVideoNote/entity.json | 6 +- .butcher/methods/sendVoice/entity.json | 12 +- .butcher/schema/schema.json | 964 +++++++++++++----- .butcher/types/BackgroundFill/entity.json | 16 + .butcher/types/BackgroundFill/subtypes.yml | 1 + .../entity.json | 33 + .../types/BackgroundFillGradient/entity.json | 49 + .../types/BackgroundFillSolid/entity.json | 33 + .butcher/types/BackgroundType/entity.json | 16 + .butcher/types/BackgroundType/subtypes.yml | 1 + .../types/BackgroundTypeChatTheme/entity.json | 33 + .butcher/types/BackgroundTypeFill/entity.json | 41 + .../types/BackgroundTypePattern/entity.json | 65 ++ .../types/BackgroundTypeWallpaper/entity.json | 57 ++ .butcher/types/Birthdate/entity.json | 6 +- .butcher/types/BusinessIntro/entity.json | 6 +- .butcher/types/BusinessLocation/entity.json | 6 +- .../types/BusinessMessagesDeleted/entity.json | 6 +- .../types/BusinessOpeningHours/entity.json | 6 +- .../BusinessOpeningHoursInterval/entity.json | 6 +- .butcher/types/Chat/entity.json | 574 +++++++---- .../types/ChatAdministratorRights/entity.json | 6 +- .butcher/types/ChatBackground/entity.json | 25 + .butcher/types/ChatFullInfo/entity.json | 361 +++++++ .butcher/types/ChatFullInfo/replace.yml | 7 + .../types/ChatMemberAdministrator/entity.json | 6 +- .butcher/types/ChatMemberUpdated/entity.json | 8 + .butcher/types/ForceReply/entity.json | 6 +- .../types/InlineKeyboardButton/entity.json | 30 +- .../InlineQueryResultLocation/entity.json | 6 +- .../InputLocationMessageContent/entity.json | 6 +- .butcher/types/InputPollOption/default.yml | 1 + .butcher/types/InputPollOption/entity.json | 41 + .../KeyboardButtonRequestChat/entity.json | 6 +- .../KeyboardButtonRequestUsers/entity.json | 18 +- .butcher/types/Message/entity.json | 8 + .butcher/types/Poll/entity.json | 8 + .butcher/types/PollOption/entity.json | 8 + .../types/ReplyKeyboardMarkup/entity.json | 6 +- .../types/ReplyKeyboardRemove/entity.json | 6 +- .butcher/types/SharedUser/entity.json | 6 +- CHANGES/1480.feature.rst | 1 + README.rst | 2 +- aiogram/__meta__.py | 4 +- aiogram/client/bot.py | 62 +- aiogram/enums/content_type.py | 1 + aiogram/methods/copy_message.py | 2 +- aiogram/methods/edit_message_live_location.py | 4 + aiogram/methods/get_chat.py | 8 +- aiogram/methods/promote_chat_member.py | 2 +- aiogram/methods/send_animation.py | 3 +- aiogram/methods/send_audio.py | 2 +- aiogram/methods/send_contact.py | 2 +- aiogram/methods/send_dice.py | 2 +- aiogram/methods/send_document.py | 3 +- aiogram/methods/send_game.py | 2 +- aiogram/methods/send_location.py | 4 +- aiogram/methods/send_message.py | 2 +- aiogram/methods/send_photo.py | 3 +- aiogram/methods/send_poll.py | 20 +- aiogram/methods/send_sticker.py | 2 +- aiogram/methods/send_venue.py | 2 +- aiogram/methods/send_video.py | 3 +- aiogram/methods/send_video_note.py | 2 +- aiogram/methods/send_voice.py | 5 +- aiogram/types/__init__.py | 24 + aiogram/types/background_fill.py | 13 + .../background_fill_freeform_gradient.py | 33 + aiogram/types/background_fill_gradient.py | 45 + aiogram/types/background_fill_solid.py | 33 + aiogram/types/background_type.py | 14 + aiogram/types/background_type_chat_theme.py | 33 + aiogram/types/background_type_fill.py | 47 + aiogram/types/background_type_pattern.py | 63 ++ aiogram/types/background_type_wallpaper.py | 54 + aiogram/types/birthdate.py | 2 +- aiogram/types/business_intro.py | 2 +- aiogram/types/business_location.py | 2 +- aiogram/types/business_messages_deleted.py | 2 +- aiogram/types/business_opening_hours.py | 2 +- .../types/business_opening_hours_interval.py | 2 +- aiogram/types/chat.py | 377 ++++--- aiogram/types/chat_administrator_rights.py | 2 +- aiogram/types/chat_background.py | 44 + aiogram/types/chat_full_info.py | 218 ++++ aiogram/types/chat_join_request.py | 93 +- aiogram/types/chat_member_administrator.py | 2 +- aiogram/types/chat_member_updated.py | 51 +- aiogram/types/force_reply.py | 2 +- aiogram/types/inline_keyboard_button.py | 8 +- aiogram/types/inline_query_result_location.py | 2 +- .../types/input_location_message_content.py | 2 +- aiogram/types/input_poll_option.py | 47 + aiogram/types/keyboard_button_request_chat.py | 2 +- .../types/keyboard_button_request_users.py | 6 +- aiogram/types/message.py | 118 ++- aiogram/types/poll.py | 4 + aiogram/types/poll_option.py | 21 +- aiogram/types/reply_keyboard_markup.py | 2 +- aiogram/types/reply_keyboard_remove.py | 2 +- aiogram/types/shared_user.py | 2 +- docs/api/methods/get_chat.rst | 6 +- docs/api/types/background_fill.rst | 10 + .../background_fill_freeform_gradient.rst | 10 + docs/api/types/background_fill_gradient.rst | 10 + docs/api/types/background_fill_solid.rst | 10 + docs/api/types/background_type.rst | 10 + docs/api/types/background_type_chat_theme.rst | 10 + docs/api/types/background_type_fill.rst | 10 + docs/api/types/background_type_pattern.rst | 10 + docs/api/types/background_type_wallpaper.rst | 10 + docs/api/types/chat_background.rst | 10 + docs/api/types/chat_full_info.rst | 10 + docs/api/types/index.rst | 12 + docs/api/types/input_poll_option.rst | 10 + tests/test_api/test_methods/test_get_chat.py | 16 +- tests/test_api/test_types/test_message.py | 17 + 137 files changed, 3422 insertions(+), 929 deletions(-) create mode 100644 .butcher/types/BackgroundFill/entity.json create mode 100644 .butcher/types/BackgroundFill/subtypes.yml create mode 100644 .butcher/types/BackgroundFillFreeformGradient/entity.json create mode 100644 .butcher/types/BackgroundFillGradient/entity.json create mode 100644 .butcher/types/BackgroundFillSolid/entity.json create mode 100644 .butcher/types/BackgroundType/entity.json create mode 100644 .butcher/types/BackgroundType/subtypes.yml create mode 100644 .butcher/types/BackgroundTypeChatTheme/entity.json create mode 100644 .butcher/types/BackgroundTypeFill/entity.json create mode 100644 .butcher/types/BackgroundTypePattern/entity.json create mode 100644 .butcher/types/BackgroundTypeWallpaper/entity.json create mode 100644 .butcher/types/ChatBackground/entity.json create mode 100644 .butcher/types/ChatFullInfo/entity.json create mode 100644 .butcher/types/ChatFullInfo/replace.yml create mode 100644 .butcher/types/InputPollOption/default.yml create mode 100644 .butcher/types/InputPollOption/entity.json create mode 100644 CHANGES/1480.feature.rst create mode 100644 aiogram/types/background_fill.py create mode 100644 aiogram/types/background_fill_freeform_gradient.py create mode 100644 aiogram/types/background_fill_gradient.py create mode 100644 aiogram/types/background_fill_solid.py create mode 100644 aiogram/types/background_type.py create mode 100644 aiogram/types/background_type_chat_theme.py create mode 100644 aiogram/types/background_type_fill.py create mode 100644 aiogram/types/background_type_pattern.py create mode 100644 aiogram/types/background_type_wallpaper.py create mode 100644 aiogram/types/chat_background.py create mode 100644 aiogram/types/chat_full_info.py create mode 100644 aiogram/types/input_poll_option.py create mode 100644 docs/api/types/background_fill.rst create mode 100644 docs/api/types/background_fill_freeform_gradient.rst create mode 100644 docs/api/types/background_fill_gradient.rst create mode 100644 docs/api/types/background_fill_solid.rst create mode 100644 docs/api/types/background_type.rst create mode 100644 docs/api/types/background_type_chat_theme.rst create mode 100644 docs/api/types/background_type_fill.rst create mode 100644 docs/api/types/background_type_pattern.rst create mode 100644 docs/api/types/background_type_wallpaper.rst create mode 100644 docs/api/types/chat_background.rst create mode 100644 docs/api/types/chat_full_info.rst create mode 100644 docs/api/types/input_poll_option.rst diff --git a/.apiversion b/.apiversion index 5904f7ad..f9941623 100644 --- a/.apiversion +++ b/.apiversion @@ -1 +1 @@ -7.2 +7.3 diff --git a/.butcher/methods/copyMessage/entity.json b/.butcher/methods/copyMessage/entity.json index 83697db9..bcf1a586 100644 --- a/.butcher/methods/copyMessage/entity.json +++ b/.butcher/methods/copyMessage/entity.json @@ -94,9 +94,9 @@ { "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 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 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 reply keyboard or to force a reply from the user.\n", + "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" }, { diff --git a/.butcher/methods/editMessageLiveLocation/entity.json b/.butcher/methods/editMessageLiveLocation/entity.json index 65b639f3..f2079277 100644 --- a/.butcher/methods/editMessageLiveLocation/entity.json +++ b/.butcher/methods/editMessageLiveLocation/entity.json @@ -51,6 +51,14 @@ "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, diff --git a/.butcher/methods/getChat/entity.json b/.butcher/methods/getChat/entity.json index 53f3a5b9..586bf6dd 100644 --- a/.butcher/methods/getChat/entity.json +++ b/.butcher/methods/getChat/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "getchat", "name": "getChat", - "description": "Use this method to get up to date information about the chat. Returns a Chat object on success.", - "html_description": "

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

", - "rst_description": "Use this method to get up to date information about the chat. Returns a :class:`aiogram.types.chat.Chat` object on success.", + "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", diff --git a/.butcher/methods/promoteChatMember/entity.json b/.butcher/methods/promoteChatMember/entity.json index c2bbcb62..3203b082 100644 --- a/.butcher/methods/promoteChatMember/entity.json +++ b/.butcher/methods/promoteChatMember/entity.json @@ -102,9 +102,9 @@ { "type": "Boolean", "required": false, - "description": "Pass True if the administrator can edit stories posted by other users", - "html_description": "Pass True if the administrator can edit stories posted by other users", - "rst_description": "Pass :code:`True` if the administrator can edit stories posted by other users\n", + "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" }, { diff --git a/.butcher/methods/sendAnimation/entity.json b/.butcher/methods/sendAnimation/entity.json index 1bf8309f..dbba06a6 100644 --- a/.butcher/methods/sendAnimation/entity.json +++ b/.butcher/methods/sendAnimation/entity.json @@ -134,9 +134,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" }, { diff --git a/.butcher/methods/sendAudio/entity.json b/.butcher/methods/sendAudio/entity.json index ed6e0de6..0d23ce57 100644 --- a/.butcher/methods/sendAudio/entity.json +++ b/.butcher/methods/sendAudio/entity.json @@ -126,9 +126,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" }, { diff --git a/.butcher/methods/sendContact/entity.json b/.butcher/methods/sendContact/entity.json index dff7c071..4bb9a05b 100644 --- a/.butcher/methods/sendContact/entity.json +++ b/.butcher/methods/sendContact/entity.json @@ -94,9 +94,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" }, { diff --git a/.butcher/methods/sendDice/entity.json b/.butcher/methods/sendDice/entity.json index eebb0ab7..602a206d 100644 --- a/.butcher/methods/sendDice/entity.json +++ b/.butcher/methods/sendDice/entity.json @@ -70,9 +70,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" }, { diff --git a/.butcher/methods/sendDocument/entity.json b/.butcher/methods/sendDocument/entity.json index cdb32b8a..86618480 100644 --- a/.butcher/methods/sendDocument/entity.json +++ b/.butcher/methods/sendDocument/entity.json @@ -110,9 +110,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" }, { diff --git a/.butcher/methods/sendGame/entity.json b/.butcher/methods/sendGame/entity.json index 909ade99..2b56c023 100644 --- a/.butcher/methods/sendGame/entity.json +++ b/.butcher/methods/sendGame/entity.json @@ -70,9 +70,9 @@ { "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. Not supported for messages sent on behalf of a business account.", - "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. Not supported for messages sent on behalf of a business account.", - "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. Not supported for messages sent on behalf of a business account.\n", + "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" }, { diff --git a/.butcher/methods/sendLocation/entity.json b/.butcher/methods/sendLocation/entity.json index e91683fb..1364f263 100644 --- a/.butcher/methods/sendLocation/entity.json +++ b/.butcher/methods/sendLocation/entity.json @@ -62,9 +62,9 @@ { "type": "Integer", "required": false, - "description": "Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400.", - "html_description": "Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400.", - "rst_description": "Period in seconds for which the location will be updated (see `Live Locations `_, should be between 60 and 86400.\n", + "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" }, { @@ -110,9 +110,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" }, { diff --git a/.butcher/methods/sendMessage/entity.json b/.butcher/methods/sendMessage/entity.json index a70826ef..ba6b39c1 100644 --- a/.butcher/methods/sendMessage/entity.json +++ b/.butcher/methods/sendMessage/entity.json @@ -94,9 +94,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" }, { diff --git a/.butcher/methods/sendPhoto/entity.json b/.butcher/methods/sendPhoto/entity.json index c9c69a72..e40a1727 100644 --- a/.butcher/methods/sendPhoto/entity.json +++ b/.butcher/methods/sendPhoto/entity.json @@ -102,9 +102,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" }, { diff --git a/.butcher/methods/sendPoll/default.yml b/.butcher/methods/sendPoll/default.yml index 482ea7de..26ac273c 100644 --- a/.butcher/methods/sendPoll/default.yml +++ b/.butcher/methods/sendPoll/default.yml @@ -1,2 +1,3 @@ explanation_parse_mode: parse_mode +question_parse_mode: parse_mode protect_content: protect_content diff --git a/.butcher/methods/sendPoll/entity.json b/.butcher/methods/sendPoll/entity.json index c3517737..b67cd201 100644 --- a/.butcher/methods/sendPoll/entity.json +++ b/.butcher/methods/sendPoll/entity.json @@ -44,11 +44,27 @@ "name": "question" }, { - "type": "Array of String", + "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 answer options, 2-10 strings 1-100 characters each", - "html_description": "A JSON-serialized list of answer options, 2-10 strings 1-100 characters each", - "rst_description": "A JSON-serialized list of answer options, 2-10 strings 1-100 characters each\n", + "description": "A JSON-serialized list of 2-10 answer options", + "html_description": "A JSON-serialized list of 2-10 answer options", + "rst_description": "A JSON-serialized list of 2-10 answer options\n", "name": "options" }, { @@ -102,9 +118,9 @@ { "type": "Array of MessageEntity", "required": false, - "description": "A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of parse_mode", - "html_description": "A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of parse_mode", - "rst_description": "A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of *parse_mode*\n", + "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" }, { @@ -158,9 +174,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" }, { diff --git a/.butcher/methods/sendPoll/replace.yml b/.butcher/methods/sendPoll/replace.yml index be2dac51..4bd38a64 100644 --- a/.butcher/methods/sendPoll/replace.yml +++ b/.butcher/methods/sendPoll/replace.yml @@ -9,3 +9,15 @@ annotations: 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/entity.json b/.butcher/methods/sendSticker/entity.json index 36a8c5cf..9943ba8e 100644 --- a/.butcher/methods/sendSticker/entity.json +++ b/.butcher/methods/sendSticker/entity.json @@ -78,9 +78,9 @@ { "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 reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.", - "html_description": "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. Not supported for messages sent on behalf of a business account.", - "rst_description": "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. Not supported for messages sent on behalf of a business account.\n", + "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" }, { diff --git a/.butcher/methods/sendVenue/entity.json b/.butcher/methods/sendVenue/entity.json index c1363c55..9580be75 100644 --- a/.butcher/methods/sendVenue/entity.json +++ b/.butcher/methods/sendVenue/entity.json @@ -126,9 +126,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" }, { diff --git a/.butcher/methods/sendVideo/entity.json b/.butcher/methods/sendVideo/entity.json index 4f877661..3d78154b 100644 --- a/.butcher/methods/sendVideo/entity.json +++ b/.butcher/methods/sendVideo/entity.json @@ -142,9 +142,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" }, { diff --git a/.butcher/methods/sendVideoNote/entity.json b/.butcher/methods/sendVideoNote/entity.json index 857185c9..618b5493 100644 --- a/.butcher/methods/sendVideoNote/entity.json +++ b/.butcher/methods/sendVideoNote/entity.json @@ -94,9 +94,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" }, { diff --git a/.butcher/methods/sendVoice/entity.json b/.butcher/methods/sendVoice/entity.json index 819d6cab..1c8e7f41 100644 --- a/.butcher/methods/sendVoice/entity.json +++ b/.butcher/methods/sendVoice/entity.json @@ -7,9 +7,9 @@ "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 (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 (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 (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.", + "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", @@ -102,9 +102,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" }, { diff --git a/.butcher/schema/schema.json b/.butcher/schema/schema.json index 94bf6573..2964e91a 100644 --- a/.butcher/schema/schema.json +++ b/.butcher/schema/schema.json @@ -1,7 +1,7 @@ { "api": { - "version": "7.2", - "release_date": "2024-03-31" + "version": "7.3", + "release_date": "2024-05-06" }, "items": [ { @@ -549,9 +549,75 @@ }, { "type": "String", - "description": "Type of chat, can be either 'private', 'group', 'supergroup' or 'channel'", - "html_description": "Type of chat, can be either “private”, “group”, “supergroup” or “channel”", - "rst_description": "Type of chat, can be either 'private', 'group', 'supergroup' or 'channel'\n", + "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 + } + ], + "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 }, @@ -595,283 +661,291 @@ "name": "is_forum", "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. 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", + "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. 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", + "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. 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", + "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. 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", + "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. 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", + "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. 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", + "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. 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", + "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": "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", + "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": "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 - }, { "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", + "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. 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", + "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. 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", + "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. 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", + "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. 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", + "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. 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", + "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. 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", + "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. 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", + "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. 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", + "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 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", + "description": "True, if all users directly joining the supergroup need to be approved by supergroup administrators", + "html_description": "Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators", + "rst_description": "*Optional*. :code:`True`, if all users directly joining the supergroup need to be approved by supergroup administrators\n", "name": "join_by_request", "required": false }, { "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", + "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. 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", + "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). 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", + "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. 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", + "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": "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", + "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. 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", + "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. 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", + "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. 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", + "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. 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", + "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. 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", + "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. 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", + "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 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", + "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. 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", + "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. 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", + "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. 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", + "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. 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", + "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 } @@ -1397,6 +1471,14 @@ "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": "ForumTopicCreated", "description": "Service message: forum topic created", @@ -2705,6 +2787,14 @@ "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 that voted for this option", @@ -2716,6 +2806,40 @@ ], "category": "types" }, + { + "anchor": "inputpolloption", + "name": "InputPollOption", + "description": "This object contains information about one answer option in a poll to send.", + "html_description": "

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

", + "rst_description": "This object contains information about one answer option in a poll to send.", + "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", @@ -2781,6 +2905,14 @@ "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", @@ -3092,6 +3224,304 @@ ], "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", @@ -3191,9 +3621,9 @@ { "anchor": "shareduser", "name": "SharedUser", - "description": "This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUser button.", - "html_description": "

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

", - "rst_description": "This object contains information about a user that was shared with the bot using a :class:`aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser` button.", + "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", @@ -3765,9 +4195,9 @@ { "anchor": "replykeyboardmarkup", "name": "ReplyKeyboardMarkup", - "description": "This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).", - "html_description": "

This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).

", - "rst_description": "This object represents a `custom keyboard `_ with reply options (see `Introduction to bots `_ for details and examples).", + "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", @@ -3927,25 +4357,25 @@ }, { "type": "Boolean", - "description": "Pass True to request the users' first and last name", - "html_description": "Optional. Pass True to request the users' first and last name", - "rst_description": "*Optional*. Pass :code:`True` to request the users' first and last name\n", + "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' username", - "html_description": "Optional. Pass True to request the users' username", - "rst_description": "*Optional*. Pass :code:`True` to request the users' username\n", + "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' photo", - "html_description": "Optional. Pass True to request the users' photo", - "rst_description": "*Optional*. Pass :code:`True` to request the users' photo\n", + "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 } @@ -3955,9 +4385,9 @@ { "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 сhat 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 сhat 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 сhat if appropriate `More about requesting chats » `_", + "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", @@ -4071,9 +4501,9 @@ { "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).", - "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).

", - "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`).", + "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", @@ -4137,17 +4567,17 @@ }, { "type": "String", - "description": "Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes", - "html_description": "Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes", - "rst_description": "*Optional*. Data to be sent in a `callback query `_ to the bot when button is pressed, 1-64 bytes\n", + "description": "Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business account.", + "html_description": "Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business account.", + "rst_description": "*Optional*. Data to be sent in a `callback query `_ to the bot when button is pressed, 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business account.\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.", - "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.", - "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.\n", + "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 }, @@ -4161,25 +4591,25 @@ }, { "type": "String", - "description": "If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted.", - "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.", - "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.\n", + "description": "If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent on behalf of a Telegram Business account.", + "html_description": "Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent on behalf of a Telegram Business account.", + "rst_description": "*Optional*. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent on behalf of a Telegram Business account.\n", "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.", - "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.", - "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.\n", + "description": "If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.\n\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent on behalf of a Telegram Business account.", + "html_description": "Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.
\n
\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent on behalf of a Telegram Business account.", + "rst_description": "*Optional*. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.\n\n\n\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent on behalf of a Telegram Business account.\n", "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", - "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", - "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\n", + "description": "If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account.", + "html_description": "Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account.", + "rst_description": "*Optional*. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account.\n", "name": "switch_inline_query_chosen_chat", "required": false }, @@ -4363,9 +4793,9 @@ { "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.\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.

\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 `_.\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.", + "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", @@ -4599,9 +5029,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can edit stories posted by other users", - "html_description": "True, if the administrator can edit stories posted by other users", - "rst_description": ":code:`True`, if the administrator can edit stories posted by other users\n", + "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 }, @@ -4703,6 +5133,14 @@ "name": "invite_link", "required": false }, + { + "type": "Boolean", + "description": "True, if the user joined the chat after sending a direct join request and being approved by an administrator", + "html_description": "Optional. True, if the user joined the chat after sending a direct join request and being approved by an administrator", + "rst_description": "*Optional*. True, if the user joined the chat after sending a direct join request 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", @@ -4870,9 +5308,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can edit stories posted by other users", - "html_description": "True, if the administrator can edit stories posted by other users", - "rst_description": ":code:`True`, if the administrator can edit stories posted by other users\n", + "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 }, @@ -5350,9 +5788,9 @@ { "anchor": "birthdate", "name": "Birthdate", - "description": "", - "html_description": "", - "rst_description": "", + "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", @@ -5384,9 +5822,9 @@ { "anchor": "businessintro", "name": "BusinessIntro", - "description": "", - "html_description": "", - "rst_description": "", + "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", @@ -5418,9 +5856,9 @@ { "anchor": "businesslocation", "name": "BusinessLocation", - "description": "", - "html_description": "", - "rst_description": "", + "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", @@ -5444,9 +5882,9 @@ { "anchor": "businessopeninghoursinterval", "name": "BusinessOpeningHoursInterval", - "description": "", - "html_description": "", - "rst_description": "", + "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", @@ -5470,9 +5908,9 @@ { "anchor": "businessopeninghours", "name": "BusinessOpeningHours", - "description": "", - "html_description": "", - "rst_description": "", + "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", @@ -6396,9 +6834,9 @@ }, { "type": "Array of Integer", - "description": "A JSON-serialized list of identifiers of deleted messages in the chat of the business account", - "html_description": "A JSON-serialized list of identifiers of deleted messages in the chat of the business account", - "rst_description": "A JSON-serialized list of identifiers of deleted messages in the chat of the business account\n", + "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 } @@ -6967,9 +7405,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" } ], @@ -7181,9 +7619,9 @@ { "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 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 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 reply keyboard or to force a reply from the user.\n", + "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" } ], @@ -7353,9 +7791,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" } ], @@ -7483,9 +7921,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" } ], @@ -7597,9 +8035,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" } ], @@ -7743,9 +8181,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" } ], @@ -7881,9 +8319,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" } ], @@ -7892,9 +8330,9 @@ { "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 (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 (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 (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.", + "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", @@ -7987,9 +8425,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" } ], @@ -8085,9 +8523,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" } ], @@ -8217,9 +8655,9 @@ { "type": "Integer", "required": false, - "description": "Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400.", - "html_description": "Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400.", - "rst_description": "Period in seconds for which the location will be updated (see `Live Locations `_, should be between 60 and 86400.\n", + "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" }, { @@ -8265,9 +8703,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" } ], @@ -8395,9 +8833,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" } ], @@ -8493,9 +8931,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" } ], @@ -8541,11 +8979,27 @@ "name": "question" }, { - "type": "Array of String", + "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 answer options, 2-10 strings 1-100 characters each", - "html_description": "A JSON-serialized list of answer options, 2-10 strings 1-100 characters each", - "rst_description": "A JSON-serialized list of answer options, 2-10 strings 1-100 characters each\n", + "description": "A JSON-serialized list of 2-10 answer options", + "html_description": "A JSON-serialized list of 2-10 answer options", + "rst_description": "A JSON-serialized list of 2-10 answer options\n", "name": "options" }, { @@ -8599,9 +9053,9 @@ { "type": "Array of MessageEntity", "required": false, - "description": "A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of parse_mode", - "html_description": "A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of parse_mode", - "rst_description": "A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of *parse_mode*\n", + "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" }, { @@ -8655,9 +9109,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" } ], @@ -8729,9 +9183,9 @@ { "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account", - "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. Not supported for messages sent on behalf of a business account\n", + "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" } ], @@ -9097,9 +9551,9 @@ { "type": "Boolean", "required": false, - "description": "Pass True if the administrator can edit stories posted by other users", - "html_description": "Pass True if the administrator can edit stories posted by other users", - "rst_description": "Pass :code:`True` if the administrator can edit stories posted by other users\n", + "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" }, { @@ -9664,9 +10118,9 @@ { "anchor": "getchat", "name": "getChat", - "description": "Use this method to get up to date information about the chat. Returns a Chat object on success.", - "html_description": "

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

", - "rst_description": "Use this method to get up to date information about the chat. Returns a :class:`aiogram.types.chat.Chat` object on success.", + "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", @@ -10742,6 +11196,14 @@ "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, @@ -11300,9 +11762,9 @@ { "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 reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.", - "html_description": "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. Not supported for messages sent on behalf of a business account.", - "rst_description": "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. Not supported for messages sent on behalf of a business account.\n", + "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" } ], @@ -12865,9 +13327,9 @@ }, { "type": "Integer", - "description": "Period in seconds for which the location can be updated, should be between 60 and 86400.", - "html_description": "Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.", - "rst_description": "*Optional*. Period in seconds for which the location can be updated, should be between 60 and 86400.\n", + "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 }, @@ -13924,9 +14386,9 @@ }, { "type": "Integer", - "description": "Period in seconds for which the location can be updated, should be between 60 and 86400.", - "html_description": "Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.", - "rst_description": "*Optional*. Period in seconds for which the location can be updated, should be between 60 and 86400.\n", + "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 }, @@ -15885,9 +16347,9 @@ { "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. Not supported for messages sent on behalf of a business account.", - "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. Not supported for messages sent on behalf of a business account.", - "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. Not supported for messages sent on behalf of a business account.\n", + "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" } ], 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..1f286b9f --- /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 index b70055c6..0be28d72 100644 --- a/.butcher/types/Birthdate/entity.json +++ b/.butcher/types/Birthdate/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "birthdate", "name": "Birthdate", - "description": "", - "html_description": "", - "rst_description": "", + "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", diff --git a/.butcher/types/BusinessIntro/entity.json b/.butcher/types/BusinessIntro/entity.json index 4208d21f..8aa85394 100644 --- a/.butcher/types/BusinessIntro/entity.json +++ b/.butcher/types/BusinessIntro/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "businessintro", "name": "BusinessIntro", - "description": "", - "html_description": "", - "rst_description": "", + "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", diff --git a/.butcher/types/BusinessLocation/entity.json b/.butcher/types/BusinessLocation/entity.json index 0d3ddac3..d38d713b 100644 --- a/.butcher/types/BusinessLocation/entity.json +++ b/.butcher/types/BusinessLocation/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "businesslocation", "name": "BusinessLocation", - "description": "", - "html_description": "", - "rst_description": "", + "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", diff --git a/.butcher/types/BusinessMessagesDeleted/entity.json b/.butcher/types/BusinessMessagesDeleted/entity.json index 3eb82a8d..4a990c13 100644 --- a/.butcher/types/BusinessMessagesDeleted/entity.json +++ b/.butcher/types/BusinessMessagesDeleted/entity.json @@ -29,9 +29,9 @@ }, { "type": "Array of Integer", - "description": "A JSON-serialized list of identifiers of deleted messages in the chat of the business account", - "html_description": "A JSON-serialized list of identifiers of deleted messages in the chat of the business account", - "rst_description": "A JSON-serialized list of identifiers of deleted messages in the chat of the business account\n", + "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 } diff --git a/.butcher/types/BusinessOpeningHours/entity.json b/.butcher/types/BusinessOpeningHours/entity.json index 7632bbe0..448b2572 100644 --- a/.butcher/types/BusinessOpeningHours/entity.json +++ b/.butcher/types/BusinessOpeningHours/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "businessopeninghours", "name": "BusinessOpeningHours", - "description": "", - "html_description": "", - "rst_description": "", + "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", diff --git a/.butcher/types/BusinessOpeningHoursInterval/entity.json b/.butcher/types/BusinessOpeningHoursInterval/entity.json index 7c5dbf86..ea60e2ec 100644 --- a/.butcher/types/BusinessOpeningHoursInterval/entity.json +++ b/.butcher/types/BusinessOpeningHoursInterval/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "businessopeninghoursinterval", "name": "BusinessOpeningHoursInterval", - "description": "", - "html_description": "", - "rst_description": "", + "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", diff --git a/.butcher/types/Chat/entity.json b/.butcher/types/Chat/entity.json index 3a273c91..df2e25b1 100644 --- a/.butcher/types/Chat/entity.json +++ b/.butcher/types/Chat/entity.json @@ -21,9 +21,9 @@ }, { "type": "String", - "description": "Type of chat, can be either 'private', 'group', 'supergroup' or 'channel'", - "html_description": "Type of chat, can be either “private”, “group”, “supergroup” or “channel”", - "rst_description": "Type of chat, can be either 'private', 'group', 'supergroup' or 'channel'\n", + "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 }, @@ -68,12 +68,16 @@ "required": false }, { - "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 + "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", @@ -81,47 +85,11 @@ "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 - }, - { - "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 - }, - { - "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 - }, - { - "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 - }, - { - "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 - }, - { - "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 + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } }, { "type": "Array of ReactionType", @@ -129,15 +97,11 @@ "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 - }, - { - "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 + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } }, { "type": "String", @@ -145,39 +109,11 @@ "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 - }, - { - "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 - }, - { - "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 - }, - { - "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 - }, - { - "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 + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } }, { "type": "String", @@ -185,135 +121,59 @@ "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 + "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 + "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": "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 + "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": "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 + "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": "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 - }, - { - "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 - }, - { - "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 - }, - { - "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 - }, - { - "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 - }, - { - "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 - }, - { - "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 - }, - { - "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 - }, - { - "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 - }, - { - "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 - }, - { - "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 - }, - { - "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 - }, - { - "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 + "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", @@ -321,7 +181,11 @@ "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 + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } }, { "type": "String", @@ -329,7 +193,155 @@ "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 + "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", @@ -337,7 +349,11 @@ "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 + "required": false, + "deprecated": { + "version": "7.3", + "release_date": "2024-05-06" + } }, { "type": "ChatLocation", @@ -345,7 +361,131 @@ "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 + "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/ChatAdministratorRights/entity.json b/.butcher/types/ChatAdministratorRights/entity.json index b242ed93..21f5e36c 100644 --- a/.butcher/types/ChatAdministratorRights/entity.json +++ b/.butcher/types/ChatAdministratorRights/entity.json @@ -85,9 +85,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can edit stories posted by other users", - "html_description": "True, if the administrator can edit stories posted by other users", - "rst_description": ":code:`True`, if the administrator can edit stories posted by other users\n", + "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 }, 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/ChatFullInfo/entity.json b/.butcher/types/ChatFullInfo/entity.json new file mode 100644 index 00000000..bb1fe44a --- /dev/null +++ b/.butcher/types/ChatFullInfo/entity.json @@ -0,0 +1,361 @@ +{ + "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": "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": "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 need to be approved by supergroup administrators", + "html_description": "Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators", + "rst_description": "*Optional*. :code:`True`, if all users directly joining the supergroup 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": "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 + } + ], + "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/ChatMemberAdministrator/entity.json b/.butcher/types/ChatMemberAdministrator/entity.json index a52feb11..f217b3fe 100644 --- a/.butcher/types/ChatMemberAdministrator/entity.json +++ b/.butcher/types/ChatMemberAdministrator/entity.json @@ -109,9 +109,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can edit stories posted by other users", - "html_description": "True, if the administrator can edit stories posted by other users", - "rst_description": ":code:`True`, if the administrator can edit stories posted by other users\n", + "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 }, diff --git a/.butcher/types/ChatMemberUpdated/entity.json b/.butcher/types/ChatMemberUpdated/entity.json index fbec5160..0e5f0451 100644 --- a/.butcher/types/ChatMemberUpdated/entity.json +++ b/.butcher/types/ChatMemberUpdated/entity.json @@ -59,6 +59,14 @@ "name": "invite_link", "required": false }, + { + "type": "Boolean", + "description": "True, if the user joined the chat after sending a direct join request and being approved by an administrator", + "html_description": "Optional. True, if the user joined the chat after sending a direct join request and being approved by an administrator", + "rst_description": "*Optional*. True, if the user joined the chat after sending a direct join request 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", diff --git a/.butcher/types/ForceReply/entity.json b/.butcher/types/ForceReply/entity.json index e8ff7c60..30b2418e 100644 --- a/.butcher/types/ForceReply/entity.json +++ b/.butcher/types/ForceReply/entity.json @@ -7,9 +7,9 @@ "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.\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.

\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 `_.\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.", + "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", diff --git a/.butcher/types/InlineKeyboardButton/entity.json b/.butcher/types/InlineKeyboardButton/entity.json index 678b0cfb..2603d708 100644 --- a/.butcher/types/InlineKeyboardButton/entity.json +++ b/.butcher/types/InlineKeyboardButton/entity.json @@ -29,17 +29,17 @@ }, { "type": "String", - "description": "Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes", - "html_description": "Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes", - "rst_description": "*Optional*. Data to be sent in a `callback query `_ to the bot when button is pressed, 1-64 bytes\n", + "description": "Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business account.", + "html_description": "Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business account.", + "rst_description": "*Optional*. Data to be sent in a `callback query `_ to the bot when button is pressed, 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business account.\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.", - "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.", - "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.\n", + "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 }, @@ -53,25 +53,25 @@ }, { "type": "String", - "description": "If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted.", - "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.", - "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.\n", + "description": "If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent on behalf of a Telegram Business account.", + "html_description": "Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent on behalf of a Telegram Business account.", + "rst_description": "*Optional*. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent on behalf of a Telegram Business account.\n", "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.", - "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.", - "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.\n", + "description": "If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.\n\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent on behalf of a Telegram Business account.", + "html_description": "Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.
\n
\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent on behalf of a Telegram Business account.", + "rst_description": "*Optional*. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.\n\n\n\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent on behalf of a Telegram Business account.\n", "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", - "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", - "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\n", + "description": "If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account.", + "html_description": "Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account.", + "rst_description": "*Optional*. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account.\n", "name": "switch_inline_query_chosen_chat", "required": false }, diff --git a/.butcher/types/InlineQueryResultLocation/entity.json b/.butcher/types/InlineQueryResultLocation/entity.json index cf171e89..4bce223c 100644 --- a/.butcher/types/InlineQueryResultLocation/entity.json +++ b/.butcher/types/InlineQueryResultLocation/entity.json @@ -61,9 +61,9 @@ }, { "type": "Integer", - "description": "Period in seconds for which the location can be updated, should be between 60 and 86400.", - "html_description": "Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.", - "rst_description": "*Optional*. Period in seconds for which the location can be updated, should be between 60 and 86400.\n", + "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 }, diff --git a/.butcher/types/InputLocationMessageContent/entity.json b/.butcher/types/InputLocationMessageContent/entity.json index d77afb30..cc0546b4 100644 --- a/.butcher/types/InputLocationMessageContent/entity.json +++ b/.butcher/types/InputLocationMessageContent/entity.json @@ -37,9 +37,9 @@ }, { "type": "Integer", - "description": "Period in seconds for which the location can be updated, should be between 60 and 86400.", - "html_description": "Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.", - "rst_description": "*Optional*. Period in seconds for which the location can be updated, should be between 60 and 86400.\n", + "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 }, 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..7c0034a5 --- /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 send.", + "html_description": "

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

", + "rst_description": "This object contains information about one answer option in a poll to send.", + "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/KeyboardButtonRequestChat/entity.json b/.butcher/types/KeyboardButtonRequestChat/entity.json index 255df173..d7cb0d21 100644 --- a/.butcher/types/KeyboardButtonRequestChat/entity.json +++ b/.butcher/types/KeyboardButtonRequestChat/entity.json @@ -7,9 +7,9 @@ "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 сhat 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 сhat 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 сhat if appropriate `More about requesting chats » `_", + "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", diff --git a/.butcher/types/KeyboardButtonRequestUsers/entity.json b/.butcher/types/KeyboardButtonRequestUsers/entity.json index ed7a2141..59355b26 100644 --- a/.butcher/types/KeyboardButtonRequestUsers/entity.json +++ b/.butcher/types/KeyboardButtonRequestUsers/entity.json @@ -45,25 +45,25 @@ }, { "type": "Boolean", - "description": "Pass True to request the users' first and last name", - "html_description": "Optional. Pass True to request the users' first and last name", - "rst_description": "*Optional*. Pass :code:`True` to request the users' first and last name\n", + "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' username", - "html_description": "Optional. Pass True to request the users' username", - "rst_description": "*Optional*. Pass :code:`True` to request the users' username\n", + "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' photo", - "html_description": "Optional. Pass True to request the users' photo", - "rst_description": "*Optional*. Pass :code:`True` to request the users' photo\n", + "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 } diff --git a/.butcher/types/Message/entity.json b/.butcher/types/Message/entity.json index c190dcbb..4eaf9a3f 100644 --- a/.butcher/types/Message/entity.json +++ b/.butcher/types/Message/entity.json @@ -523,6 +523,14 @@ "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": "ForumTopicCreated", "description": "Service message: forum topic created", diff --git a/.butcher/types/Poll/entity.json b/.butcher/types/Poll/entity.json index dcf1bf7c..00b93cc3 100644 --- a/.butcher/types/Poll/entity.json +++ b/.butcher/types/Poll/entity.json @@ -27,6 +27,14 @@ "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", diff --git a/.butcher/types/PollOption/entity.json b/.butcher/types/PollOption/entity.json index 0b06084a..5c5efa26 100644 --- a/.butcher/types/PollOption/entity.json +++ b/.butcher/types/PollOption/entity.json @@ -19,6 +19,14 @@ "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 that voted for this option", diff --git a/.butcher/types/ReplyKeyboardMarkup/entity.json b/.butcher/types/ReplyKeyboardMarkup/entity.json index 366f7bc2..23f83ec3 100644 --- a/.butcher/types/ReplyKeyboardMarkup/entity.json +++ b/.butcher/types/ReplyKeyboardMarkup/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "replykeyboardmarkup", "name": "ReplyKeyboardMarkup", - "description": "This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).", - "html_description": "

This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).

", - "rst_description": "This object represents a `custom keyboard `_ with reply options (see `Introduction to bots `_ for details and examples).", + "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", diff --git a/.butcher/types/ReplyKeyboardRemove/entity.json b/.butcher/types/ReplyKeyboardRemove/entity.json index a1e5018c..48f49840 100644 --- a/.butcher/types/ReplyKeyboardRemove/entity.json +++ b/.butcher/types/ReplyKeyboardRemove/entity.json @@ -7,9 +7,9 @@ "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).", - "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).

", - "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`).", + "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", diff --git a/.butcher/types/SharedUser/entity.json b/.butcher/types/SharedUser/entity.json index 6e33fe97..af99a0b4 100644 --- a/.butcher/types/SharedUser/entity.json +++ b/.butcher/types/SharedUser/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "shareduser", "name": "SharedUser", - "description": "This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUser button.", - "html_description": "

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

", - "rst_description": "This object contains information about a user that was shared with the bot using a :class:`aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser` button.", + "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", diff --git a/CHANGES/1480.feature.rst b/CHANGES/1480.feature.rst new file mode 100644 index 00000000..384877d0 --- /dev/null +++ b/CHANGES/1480.feature.rst @@ -0,0 +1 @@ +Added full support of `Bot API 7.3 `_ diff --git a/README.rst b/README.rst index e84e60e3..2a8c00b1 100644 --- a/README.rst +++ b/README.rst @@ -52,7 +52,7 @@ Features - Asynchronous (`asyncio docs `_, :pep:`492`) - Has type hints (:pep:`484`) and can be used with `mypy `_ - Supports `PyPy `_ -- Supports `Telegram Bot API 7.2 `_ and gets fast updates to the latest versions of the Bot API +- Supports `Telegram Bot API 7.3 `_ and gets fast updates to the latest versions of the Bot API - Telegram Bot API integration code was `autogenerated `_ and can be easily re-generated when API gets updated - Updates router (Blueprints) - Has Finite State Machine diff --git a/aiogram/__meta__.py b/aiogram/__meta__.py index bdbcd36b..9fdb2027 100644 --- a/aiogram/__meta__.py +++ b/aiogram/__meta__.py @@ -1,2 +1,2 @@ -__version__ = "3.5.0" -__api_version__ = "7.2" +__version__ = "3.6.0" +__api_version__ = "7.3" diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index 52ba326a..3722bd4b 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -160,8 +160,8 @@ from ..types import ( BotName, BotShortDescription, BusinessConnection, - Chat, ChatAdministratorRights, + ChatFullInfo, ChatInviteLink, ChatMemberAdministrator, ChatMemberBanned, @@ -203,6 +203,7 @@ from ..types import ( InputMediaDocument, InputMediaPhoto, InputMediaVideo, + InputPollOption, InputSticker, LabeledPrice, LinkPreviewOptions, @@ -899,7 +900,7 @@ class Bot: :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :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 reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -1408,6 +1409,7 @@ class Bot: chat_id: Optional[Union[int, str]] = None, message_id: Optional[int] = None, inline_message_id: Optional[str] = None, + live_period: Optional[int] = None, horizontal_accuracy: Optional[float] = None, heading: Optional[int] = None, proximity_alert_radius: Optional[int] = None, @@ -1424,6 +1426,7 @@ class Bot: :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. @@ -1438,6 +1441,7 @@ class Bot: 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, @@ -1619,15 +1623,15 @@ class Bot: self, chat_id: Union[int, str], request_timeout: Optional[int] = None, - ) -> Chat: + ) -> ChatFullInfo: """ - Use this method to get up to date information about the chat. Returns a :class:`aiogram.types.chat.Chat` object on success. + Use this method to get up-to-date information about the chat. Returns a :class:`aiogram.types.chat_full_info.ChatFullInfo` object on success. 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.Chat` object on success. + :return: Returns a :class:`aiogram.types.chat_full_info.ChatFullInfo` object on success. """ call = GetChat( @@ -2087,7 +2091,7 @@ class Bot: :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 + :param can_edit_stories: Pass :code:`True` if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive :param can_delete_stories: Pass :code:`True` if the administrator can delete stories posted by other users :param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only :param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only @@ -2240,7 +2244,7 @@ class Bot: :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -2312,7 +2316,7 @@ class Bot: :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -2407,7 +2411,7 @@ class Bot: :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -2459,7 +2463,7 @@ class Bot: :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -2518,7 +2522,7 @@ class Bot: :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -2570,7 +2574,7 @@ class Bot: :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param 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. Not supported for messages sent on behalf of a business account. + :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 @@ -2727,13 +2731,13 @@ class Bot: :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only :param 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 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 reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -2842,7 +2846,7 @@ class Bot: :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -2904,7 +2908,7 @@ class Bot: :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -2933,9 +2937,11 @@ class Bot: self, chat_id: Union[int, str], question: str, - options: List[str], + options: List[Union[InputPollOption, str]], business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, + question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), + question_entities: Optional[List[MessageEntity]] = None, is_anonymous: Optional[bool] = None, type: Optional[str] = None, allows_multiple_answers: Optional[bool] = None, @@ -2963,23 +2969,25 @@ class Bot: :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 options: A JSON-serialized list of 2-10 answer options :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed + :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode :param 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 explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*. :param 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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -2992,6 +3000,8 @@ class Bot: 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, @@ -3041,7 +3051,7 @@ class Bot: :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :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. Not supported for messages sent on behalf of a business account. + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -3105,7 +3115,7 @@ class Bot: :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -3179,7 +3189,7 @@ class Bot: :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -3243,7 +3253,7 @@ class Bot: :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -3288,7 +3298,7 @@ class Bot: 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. + 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 @@ -3303,7 +3313,7 @@ class Bot: :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 diff --git a/aiogram/enums/content_type.py b/aiogram/enums/content_type.py index 20b01c43..4f631a62 100644 --- a/aiogram/enums/content_type.py +++ b/aiogram/enums/content_type.py @@ -45,6 +45,7 @@ class ContentType(str, Enum): PASSPORT_DATA = "passport_data" PROXIMITY_ALERT_TRIGGERED = "proximity_alert_triggered" BOOST_ADDED = "boost_added" + CHAT_BACKGROUND_SET = "chat_background_set" FORUM_TOPIC_CREATED = "forum_topic_created" FORUM_TOPIC_EDITED = "forum_topic_edited" FORUM_TOPIC_CLOSED = "forum_topic_closed" diff --git a/aiogram/methods/copy_message.py b/aiogram/methods/copy_message.py index 807b9755..c820a7db 100644 --- a/aiogram/methods/copy_message.py +++ b/aiogram/methods/copy_message.py @@ -50,7 +50,7 @@ class CopyMessage(TelegramMethod[MessageId]): 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.""" + """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" allow_sending_without_reply: Optional[bool] = Field( None, json_schema_extra={"deprecated": True} ) diff --git a/aiogram/methods/edit_message_live_location.py b/aiogram/methods/edit_message_live_location.py index 44406203..7c912196 100644 --- a/aiogram/methods/edit_message_live_location.py +++ b/aiogram/methods/edit_message_live_location.py @@ -26,6 +26,8 @@ class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]): """Required if *inline_message_id* is not specified. Identifier of the message to edit""" inline_message_id: Optional[str] = None """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" + live_period: Optional[int] = None + """New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current *live_period* by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then *live_period* remains unchanged""" horizontal_accuracy: Optional[float] = None """The radius of uncertainty for the location, measured in meters; 0-1500""" heading: Optional[int] = None @@ -47,6 +49,7 @@ class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]): chat_id: Optional[Union[int, str]] = None, message_id: Optional[int] = None, inline_message_id: Optional[str] = None, + live_period: Optional[int] = None, horizontal_accuracy: Optional[float] = None, heading: Optional[int] = None, proximity_alert_radius: Optional[int] = None, @@ -63,6 +66,7 @@ class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]): 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, diff --git a/aiogram/methods/get_chat.py b/aiogram/methods/get_chat.py index 9b80b490..6b6b9773 100644 --- a/aiogram/methods/get_chat.py +++ b/aiogram/methods/get_chat.py @@ -2,18 +2,18 @@ from __future__ import annotations from typing import TYPE_CHECKING, Any, Union -from ..types import Chat +from ..types import ChatFullInfo from .base import TelegramMethod -class GetChat(TelegramMethod[Chat]): +class GetChat(TelegramMethod[ChatFullInfo]): """ - Use this method to get up to date information about the chat. Returns a :class:`aiogram.types.chat.Chat` object on success. + Use this method to get up-to-date information about the chat. Returns a :class:`aiogram.types.chat_full_info.ChatFullInfo` object on success. Source: https://core.telegram.org/bots/api#getchat """ - __returning__ = Chat + __returning__ = ChatFullInfo __api_method__ = "getChat" chat_id: Union[int, str] diff --git a/aiogram/methods/promote_chat_member.py b/aiogram/methods/promote_chat_member.py index 9a0deac7..2ca410f0 100644 --- a/aiogram/methods/promote_chat_member.py +++ b/aiogram/methods/promote_chat_member.py @@ -38,7 +38,7 @@ class PromoteChatMember(TelegramMethod[bool]): can_post_stories: Optional[bool] = None """Pass :code:`True` if the administrator can post stories to the chat""" can_edit_stories: Optional[bool] = None - """Pass :code:`True` if the administrator can edit stories posted by other users""" + """Pass :code:`True` if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive""" can_delete_stories: Optional[bool] = None """Pass :code:`True` if the administrator can delete stories posted by other users""" can_post_messages: Optional[bool] = None diff --git a/aiogram/methods/send_animation.py b/aiogram/methods/send_animation.py index 42362c94..75dc3a50 100644 --- a/aiogram/methods/send_animation.py +++ b/aiogram/methods/send_animation.py @@ -6,7 +6,6 @@ from pydantic import Field from ..client.default import Default from ..types import ( - UNSET_PARSE_MODE, ForceReply, InlineKeyboardMarkup, InputFile, @@ -62,7 +61,7 @@ class SendAnimation(TelegramMethod[Message]): 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 a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account""" + """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" allow_sending_without_reply: Optional[bool] = Field( None, json_schema_extra={"deprecated": True} ) diff --git a/aiogram/methods/send_audio.py b/aiogram/methods/send_audio.py index b7d945d9..8a6af799 100644 --- a/aiogram/methods/send_audio.py +++ b/aiogram/methods/send_audio.py @@ -60,7 +60,7 @@ class SendAudio(TelegramMethod[Message]): 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 a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account""" + """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" allow_sending_without_reply: Optional[bool] = Field( None, json_schema_extra={"deprecated": True} ) diff --git a/aiogram/methods/send_contact.py b/aiogram/methods/send_contact.py index 49cfedc9..4f2435e7 100644 --- a/aiogram/methods/send_contact.py +++ b/aiogram/methods/send_contact.py @@ -49,7 +49,7 @@ class SendContact(TelegramMethod[Message]): 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 a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account""" + """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" allow_sending_without_reply: Optional[bool] = Field( None, json_schema_extra={"deprecated": True} ) diff --git a/aiogram/methods/send_dice.py b/aiogram/methods/send_dice.py index 40d7dcdf..bf49b5fc 100644 --- a/aiogram/methods/send_dice.py +++ b/aiogram/methods/send_dice.py @@ -43,7 +43,7 @@ class SendDice(TelegramMethod[Message]): 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 a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account""" + """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" allow_sending_without_reply: Optional[bool] = Field( None, json_schema_extra={"deprecated": True} ) diff --git a/aiogram/methods/send_document.py b/aiogram/methods/send_document.py index e4ac3dfe..d8279f18 100644 --- a/aiogram/methods/send_document.py +++ b/aiogram/methods/send_document.py @@ -6,7 +6,6 @@ from pydantic import Field from ..client.default import Default from ..types import ( - UNSET_PARSE_MODE, ForceReply, InlineKeyboardMarkup, InputFile, @@ -56,7 +55,7 @@ class SendDocument(TelegramMethod[Message]): 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 a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account""" + """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" allow_sending_without_reply: Optional[bool] = Field( None, json_schema_extra={"deprecated": True} ) diff --git a/aiogram/methods/send_game.py b/aiogram/methods/send_game.py index 4822bcdc..3fc546c3 100644 --- a/aiogram/methods/send_game.py +++ b/aiogram/methods/send_game.py @@ -34,7 +34,7 @@ class SendGame(TelegramMethod[Message]): reply_parameters: Optional[ReplyParameters] = None """Description of the message to reply to""" 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. Not supported for messages sent on behalf of a business account.""" + """A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.""" allow_sending_without_reply: Optional[bool] = Field( None, json_schema_extra={"deprecated": True} ) diff --git a/aiogram/methods/send_location.py b/aiogram/methods/send_location.py index 5c07a0c8..e425fbad 100644 --- a/aiogram/methods/send_location.py +++ b/aiogram/methods/send_location.py @@ -39,7 +39,7 @@ class SendLocation(TelegramMethod[Message]): horizontal_accuracy: Optional[float] = 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.""" + """Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.""" heading: Optional[int] = None """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 @@ -53,7 +53,7 @@ class SendLocation(TelegramMethod[Message]): 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 a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account""" + """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" allow_sending_without_reply: Optional[bool] = Field( None, json_schema_extra={"deprecated": True} ) diff --git a/aiogram/methods/send_message.py b/aiogram/methods/send_message.py index d55c6e49..be9cae31 100644 --- a/aiogram/methods/send_message.py +++ b/aiogram/methods/send_message.py @@ -51,7 +51,7 @@ class SendMessage(TelegramMethod[Message]): 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 a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account""" + """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" allow_sending_without_reply: Optional[bool] = Field( None, json_schema_extra={"deprecated": True} ) diff --git a/aiogram/methods/send_photo.py b/aiogram/methods/send_photo.py index acad7aac..75270bfe 100644 --- a/aiogram/methods/send_photo.py +++ b/aiogram/methods/send_photo.py @@ -6,7 +6,6 @@ from pydantic import Field from ..client.default import Default from ..types import ( - UNSET_PARSE_MODE, ForceReply, InlineKeyboardMarkup, InputFile, @@ -54,7 +53,7 @@ class SendPhoto(TelegramMethod[Message]): 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 a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account""" + """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" allow_sending_without_reply: Optional[bool] = Field( None, json_schema_extra={"deprecated": True} ) diff --git a/aiogram/methods/send_poll.py b/aiogram/methods/send_poll.py index d44fbb83..9ac92aca 100644 --- a/aiogram/methods/send_poll.py +++ b/aiogram/methods/send_poll.py @@ -7,9 +7,9 @@ from pydantic import Field from ..client.default import Default from ..types import ( - UNSET_PARSE_MODE, ForceReply, InlineKeyboardMarkup, + InputPollOption, Message, MessageEntity, ReplyKeyboardMarkup, @@ -33,12 +33,16 @@ class SendPoll(TelegramMethod[Message]): """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" question: str """Poll question, 1-300 characters""" - options: List[str] - """A JSON-serialized list of answer options, 2-10 strings 1-100 characters each""" + options: List[Union[InputPollOption, str]] + """A JSON-serialized list of 2-10 answer options""" business_connection_id: Optional[str] = None """Unique identifier of the business connection on behalf of which the message will be sent""" message_thread_id: Optional[int] = None """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" + question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + """Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed""" + question_entities: Optional[List[MessageEntity]] = None + """A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode*""" is_anonymous: Optional[bool] = None """:code:`True`, if the poll needs to be anonymous, defaults to :code:`True`""" type: Optional[str] = None @@ -52,7 +56,7 @@ class SendPoll(TelegramMethod[Message]): explanation_parse_mode: Optional[Union[str, Default]] = 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*""" + """A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode*""" open_period: Optional[int] = None """Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*.""" close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None @@ -68,7 +72,7 @@ class SendPoll(TelegramMethod[Message]): 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 a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account""" + """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" allow_sending_without_reply: Optional[bool] = Field( None, json_schema_extra={"deprecated": True} ) @@ -91,9 +95,11 @@ class SendPoll(TelegramMethod[Message]): *, chat_id: Union[int, str], question: str, - options: List[str], + options: List[Union[InputPollOption, str]], business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, + question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), + question_entities: Optional[List[MessageEntity]] = None, is_anonymous: Optional[bool] = None, type: Optional[str] = None, allows_multiple_answers: Optional[bool] = None, @@ -124,6 +130,8 @@ class SendPoll(TelegramMethod[Message]): 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, diff --git a/aiogram/methods/send_sticker.py b/aiogram/methods/send_sticker.py index 63bdcb33..47cba3b0 100644 --- a/aiogram/methods/send_sticker.py +++ b/aiogram/methods/send_sticker.py @@ -46,7 +46,7 @@ class SendSticker(TelegramMethod[Message]): 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. Not supported for messages sent on behalf of a business account.""" + """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" allow_sending_without_reply: Optional[bool] = Field( None, json_schema_extra={"deprecated": True} ) diff --git a/aiogram/methods/send_venue.py b/aiogram/methods/send_venue.py index 307446ef..4c40c0d9 100644 --- a/aiogram/methods/send_venue.py +++ b/aiogram/methods/send_venue.py @@ -57,7 +57,7 @@ class SendVenue(TelegramMethod[Message]): 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 a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account""" + """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" allow_sending_without_reply: Optional[bool] = Field( None, json_schema_extra={"deprecated": True} ) diff --git a/aiogram/methods/send_video.py b/aiogram/methods/send_video.py index b3eb3179..6f030930 100644 --- a/aiogram/methods/send_video.py +++ b/aiogram/methods/send_video.py @@ -6,7 +6,6 @@ from pydantic import Field from ..client.default import Default from ..types import ( - UNSET_PARSE_MODE, ForceReply, InlineKeyboardMarkup, InputFile, @@ -64,7 +63,7 @@ class SendVideo(TelegramMethod[Message]): 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 a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account""" + """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" allow_sending_without_reply: Optional[bool] = Field( None, json_schema_extra={"deprecated": True} ) diff --git a/aiogram/methods/send_video_note.py b/aiogram/methods/send_video_note.py index b4573fea..14a6cafc 100644 --- a/aiogram/methods/send_video_note.py +++ b/aiogram/methods/send_video_note.py @@ -50,7 +50,7 @@ class SendVideoNote(TelegramMethod[Message]): 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 a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account""" + """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" allow_sending_without_reply: Optional[bool] = Field( None, json_schema_extra={"deprecated": True} ) diff --git a/aiogram/methods/send_voice.py b/aiogram/methods/send_voice.py index 1e981c96..cd43a946 100644 --- a/aiogram/methods/send_voice.py +++ b/aiogram/methods/send_voice.py @@ -6,7 +6,6 @@ from pydantic import Field from ..client.default import Default from ..types import ( - UNSET_PARSE_MODE, ForceReply, InlineKeyboardMarkup, InputFile, @@ -21,7 +20,7 @@ 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 """ @@ -54,7 +53,7 @@ class SendVoice(TelegramMethod[Message]): 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 a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account""" + """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" allow_sending_without_reply: Optional[bool] = Field( None, json_schema_extra={"deprecated": True} ) diff --git a/aiogram/types/__init__.py b/aiogram/types/__init__.py index 184239e9..564e31c2 100644 --- a/aiogram/types/__init__.py +++ b/aiogram/types/__init__.py @@ -2,6 +2,15 @@ from typing import List, Literal, Optional, Union from .animation import Animation from .audio import Audio +from .background_fill import BackgroundFill +from .background_fill_freeform_gradient import BackgroundFillFreeformGradient +from .background_fill_gradient import BackgroundFillGradient +from .background_fill_solid import BackgroundFillSolid +from .background_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_wallpaper import BackgroundTypeWallpaper from .base import UNSET_PARSE_MODE, TelegramObject from .birthdate import Birthdate from .bot_command import BotCommand @@ -28,6 +37,7 @@ 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 @@ -36,6 +46,7 @@ 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_updated import ChatBoostUpdated +from .chat_full_info import ChatFullInfo from .chat_invite_link import ChatInviteLink from .chat_join_request import ChatJoinRequest from .chat_location import ChatLocation @@ -112,6 +123,7 @@ from .input_media_document import InputMediaDocument from .input_media_photo import InputMediaPhoto from .input_media_video import InputMediaVideo from .input_message_content import InputMessageContent +from .input_poll_option import InputPollOption from .input_sticker import InputSticker from .input_text_message_content import InputTextMessageContent from .input_venue_message_content import InputVenueMessageContent @@ -204,6 +216,15 @@ from .write_access_allowed import WriteAccessAllowed __all__ = ( "Animation", "Audio", + "BackgroundFill", + "BackgroundFillFreeformGradient", + "BackgroundFillGradient", + "BackgroundFillSolid", + "BackgroundType", + "BackgroundTypeChatTheme", + "BackgroundTypeFill", + "BackgroundTypePattern", + "BackgroundTypeWallpaper", "Birthdate", "BotCommand", "BotCommandScope", @@ -228,6 +249,7 @@ __all__ = ( "CallbackQuery", "Chat", "ChatAdministratorRights", + "ChatBackground", "ChatBoost", "ChatBoostAdded", "ChatBoostRemoved", @@ -236,6 +258,7 @@ __all__ = ( "ChatBoostSourceGiveaway", "ChatBoostSourcePremium", "ChatBoostUpdated", + "ChatFullInfo", "ChatInviteLink", "ChatJoinRequest", "ChatLocation", @@ -314,6 +337,7 @@ __all__ = ( "InputMediaPhoto", "InputMediaVideo", "InputMessageContent", + "InputPollOption", "InputSticker", "InputTextMessageContent", "InputVenueMessageContent", 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..916f6a73 --- /dev/null +++ b/aiogram/types/background_fill_freeform_gradient.py @@ -0,0 +1,33 @@ +from typing import TYPE_CHECKING, Any, List, 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_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..c506e4ea --- /dev/null +++ b/aiogram/types/background_type_fill.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal, Union + +from .background_type import BackgroundType + +if TYPE_CHECKING: + from .background_fill_freeform_gradient import BackgroundFillFreeformGradient + from .background_fill_gradient import BackgroundFillGradient + from .background_fill_solid import BackgroundFillSolid + + +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: Union[BackgroundFillSolid, BackgroundFillGradient, BackgroundFillFreeformGradient] + """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: Union[ + BackgroundFillSolid, BackgroundFillGradient, BackgroundFillFreeformGradient + ], + 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..29c383c2 --- /dev/null +++ b/aiogram/types/background_type_pattern.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal, Optional, Union + +from .background_type import BackgroundType + +if TYPE_CHECKING: + from .background_fill_freeform_gradient import BackgroundFillFreeformGradient + from .background_fill_gradient import BackgroundFillGradient + from .background_fill_solid import BackgroundFillSolid + from .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: Union[BackgroundFillSolid, BackgroundFillGradient, BackgroundFillFreeformGradient] + """The background fill that is combined with the pattern""" + intensity: int + """Intensity of the pattern when it is shown above the filled background; 0-100""" + is_inverted: Optional[bool] = None + """*Optional*. :code:`True`, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only""" + is_moving: Optional[bool] = None + """*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: Union[ + BackgroundFillSolid, BackgroundFillGradient, BackgroundFillFreeformGradient + ], + intensity: int, + is_inverted: Optional[bool] = None, + is_moving: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT 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_wallpaper.py b/aiogram/types/background_type_wallpaper.py new file mode 100644 index 00000000..4ad29050 --- /dev/null +++ b/aiogram/types/background_type_wallpaper.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal, Optional + +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: Optional[bool] = None + """*Optional*. :code:`True`, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12""" + is_moving: Optional[bool] = None + """*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: Optional[bool] = None, + is_moving: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT 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/birthdate.py b/aiogram/types/birthdate.py index ccb29889..69555540 100644 --- a/aiogram/types/birthdate.py +++ b/aiogram/types/birthdate.py @@ -7,7 +7,7 @@ from .base import TelegramObject class Birthdate(TelegramObject): """ - + Describes the birthdate of a user. Source: https://core.telegram.org/bots/api#birthdate """ diff --git a/aiogram/types/business_intro.py b/aiogram/types/business_intro.py index bd71c3c3..c360fbe9 100644 --- a/aiogram/types/business_intro.py +++ b/aiogram/types/business_intro.py @@ -10,7 +10,7 @@ if TYPE_CHECKING: class BusinessIntro(TelegramObject): """ - + Contains information about the start page settings of a Telegram Business account. Source: https://core.telegram.org/bots/api#businessintro """ diff --git a/aiogram/types/business_location.py b/aiogram/types/business_location.py index 549335be..af7989a0 100644 --- a/aiogram/types/business_location.py +++ b/aiogram/types/business_location.py @@ -10,7 +10,7 @@ if TYPE_CHECKING: class BusinessLocation(TelegramObject): """ - + Contains information about the location of a Telegram Business account. Source: https://core.telegram.org/bots/api#businesslocation """ diff --git a/aiogram/types/business_messages_deleted.py b/aiogram/types/business_messages_deleted.py index 5313e2a8..44bc45fa 100644 --- a/aiogram/types/business_messages_deleted.py +++ b/aiogram/types/business_messages_deleted.py @@ -20,7 +20,7 @@ class BusinessMessagesDeleted(TelegramObject): 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] - """A JSON-serialized list of identifiers of deleted messages in the chat of the business account""" + """The list of identifiers of deleted messages in the chat of the business account""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/business_opening_hours.py b/aiogram/types/business_opening_hours.py index ab1a6b66..7fd5c754 100644 --- a/aiogram/types/business_opening_hours.py +++ b/aiogram/types/business_opening_hours.py @@ -10,7 +10,7 @@ if TYPE_CHECKING: class BusinessOpeningHours(TelegramObject): """ - + Describes the opening hours of a business. Source: https://core.telegram.org/bots/api#businessopeninghours """ diff --git a/aiogram/types/business_opening_hours_interval.py b/aiogram/types/business_opening_hours_interval.py index 5968976a..52efd2c2 100644 --- a/aiogram/types/business_opening_hours_interval.py +++ b/aiogram/types/business_opening_hours_interval.py @@ -7,7 +7,7 @@ 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 """ diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py index 261c6e40..f44b01bf 100644 --- a/aiogram/types/chat.py +++ b/aiogram/types/chat.py @@ -3,6 +3,8 @@ from __future__ import annotations import datetime from typing import TYPE_CHECKING, Any, List, Optional, Union +from pydantic import Field + from .base import TelegramObject from .custom import DateTime @@ -60,7 +62,7 @@ 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'""" + """Type of the chat, can be either 'private', 'group', 'supergroup' or 'channel'""" title: Optional[str] = None """*Optional*. Title, for supergroups, channels and group chats""" username: Optional[str] = None @@ -71,76 +73,199 @@ class Chat(TelegramObject): """*Optional*. Last name of the other party in a private chat""" is_forum: Optional[bool] = None """*Optional*. :code:`True`, if the supergroup chat is a forum (has `topics `_ enabled)""" - photo: Optional[ChatPhoto] = None - """*Optional*. Chat photo. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - active_usernames: Optional[List[str]] = None - """*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`.""" - birthdate: Optional[Birthdate] = None - """*Optional*. For private chats, the date of birth of the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - business_intro: Optional[BusinessIntro] = None - """*Optional*. For private chats with business accounts, the intro of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - business_location: Optional[BusinessLocation] = None - """*Optional*. For private chats with business accounts, the location of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - business_opening_hours: Optional[BusinessOpeningHours] = None - """*Optional*. For private chats with business accounts, the opening hours of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - personal_chat: Optional[Chat] = None - """*Optional*. For private chats, the personal channel of the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - available_reactions: Optional[List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]]] = None - """*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`.""" - accent_color_id: Optional[int] = None - """*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`.""" - background_custom_emoji_id: Optional[str] = None - """*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`.""" - profile_accent_color_id: Optional[int] = None - """*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`.""" - profile_background_custom_emoji_id: Optional[str] = None - """*Optional*. Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - emoji_status_custom_emoji_id: Optional[str] = None - """*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`.""" - emoji_status_expiration_date: Optional[DateTime] = None - """*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`.""" - 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*. :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`.""" - has_restricted_voice_and_video_messages: Optional[bool] = None - """*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`.""" - join_to_send_messages: Optional[bool] = None - """*Optional*. :code:`True`, if users need to join the supergroup before they can send messages. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - join_by_request: Optional[bool] = None - """*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`.""" - 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 unprivileged user; in seconds. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - unrestrict_boost_count: Optional[int] = 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. 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_aggressive_anti_spam_enabled: Optional[bool] = None - """*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`.""" - has_hidden_members: Optional[bool] = None - """*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`.""" - has_protected_content: Optional[bool] = None - """*Optional*. :code:`True`, if messages from the chat can't be forwarded to other chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" - has_visible_history: Optional[bool] = None - """*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`.""" - 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`.""" - custom_emoji_sticker_set_name: Optional[str] = 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. 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`.""" + accent_color_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See `accent colors `_ for more details. Returned only in :class:`aiogram.methods.get_chat.GetChat`. Always returned in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + active_usernames: Optional[List[str]] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. If non-empty, the list of all `active chat usernames `_; for private chats, supergroups and channels. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + available_reactions: Optional[List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]]] = Field( + None, json_schema_extra={"deprecated": True} + ) + """*Optional*. List of available reactions allowed in the chat. If omitted, then all `emoji reactions `_ are allowed. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + background_custom_emoji_id: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + bio: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. Bio of the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + birthdate: Optional[Birthdate] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. For private chats, the date of birth of the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + business_intro: Optional[BusinessIntro] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. For private chats with business accounts, the intro of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + business_location: Optional[BusinessLocation] = Field( + None, json_schema_extra={"deprecated": True} + ) + """*Optional*. For private chats with business accounts, the location of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + business_opening_hours: Optional[BusinessOpeningHours] = Field( + None, json_schema_extra={"deprecated": True} + ) + """*Optional*. For private chats with business accounts, the opening hours of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + can_set_sticker_set: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. :code:`True`, if the bot can change the group sticker set. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + custom_emoji_sticker_set_name: Optional[str] = Field( + None, json_schema_extra={"deprecated": True} + ) + """*Optional*. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + description: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. Description, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + emoji_status_custom_emoji_id: Optional[str] = Field( + None, json_schema_extra={"deprecated": True} + ) + """*Optional*. Custom emoji identifier of the emoji status of the chat or the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + emoji_status_expiration_date: Optional[DateTime] = Field( + None, json_schema_extra={"deprecated": True} + ) + """*Optional*. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + has_aggressive_anti_spam_enabled: Optional[bool] = Field( + None, json_schema_extra={"deprecated": True} + ) + """*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + has_hidden_members: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. :code:`True`, if non-administrators can only get the list of bots and administrators in the chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + has_private_forwards: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. :code:`True`, if privacy settings of the other party in the private chat allows to use :code:`tg://user?id=` links only in chats with the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + has_protected_content: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. :code:`True`, if messages from the chat can't be forwarded to other chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + has_restricted_voice_and_video_messages: Optional[bool] = Field( + None, json_schema_extra={"deprecated": True} + ) + """*Optional*. :code:`True`, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + has_visible_history: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. :code:`True`, if new chat members will have access to old messages; available only to chat administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + invite_link: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. Primary invite link, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + join_by_request: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. :code:`True`, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + join_to_send_messages: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. :code:`True`, if users need to join the supergroup before they can send messages. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + linked_chat_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + location: Optional[ChatLocation] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. For supergroups, the location to which the supergroup is connected. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + message_auto_delete_time: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + permissions: Optional[ChatPermissions] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. Default chat member permissions, for groups and supergroups. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + personal_chat: Optional[Chat] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. For private chats, the personal channel of the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + photo: Optional[ChatPhoto] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. Chat photo. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + pinned_message: Optional[Message] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. The most recent pinned message (by sending date). Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + profile_accent_color_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. Identifier of the accent color for the chat's profile background. See `profile accent colors `_ for more details. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + profile_background_custom_emoji_id: Optional[str] = Field( + None, json_schema_extra={"deprecated": True} + ) + """*Optional*. Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + slow_mode_delay: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + sticker_set_name: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. For supergroups, name of group sticker set. Returned only in :class:`aiogram.methods.get_chat.GetChat`. + +.. deprecated:: API:7.3 + https://core.telegram.org/bots/api-changelog#may-6-2024""" + unrestrict_boost_count: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + """*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!!! @@ -156,43 +281,43 @@ class Chat(TelegramObject): first_name: Optional[str] = None, last_name: Optional[str] = None, is_forum: Optional[bool] = None, - photo: Optional[ChatPhoto] = None, + accent_color_id: Optional[int] = None, active_usernames: Optional[List[str]] = None, + available_reactions: Optional[ + List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]] + ] = None, + background_custom_emoji_id: Optional[str] = None, + bio: Optional[str] = None, birthdate: Optional[Birthdate] = None, business_intro: Optional[BusinessIntro] = None, business_location: Optional[BusinessLocation] = None, business_opening_hours: Optional[BusinessOpeningHours] = None, - personal_chat: Optional[Chat] = None, - available_reactions: Optional[ - List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]] - ] = None, - accent_color_id: Optional[int] = None, - background_custom_emoji_id: Optional[str] = None, - profile_accent_color_id: Optional[int] = None, - profile_background_custom_emoji_id: Optional[str] = None, - emoji_status_custom_emoji_id: Optional[str] = None, - emoji_status_expiration_date: Optional[DateTime] = None, - bio: Optional[str] = None, - has_private_forwards: Optional[bool] = None, - has_restricted_voice_and_video_messages: Optional[bool] = None, - join_to_send_messages: Optional[bool] = None, - join_by_request: Optional[bool] = None, - description: Optional[str] = None, - invite_link: Optional[str] = None, - pinned_message: Optional[Message] = None, - permissions: Optional[ChatPermissions] = None, - slow_mode_delay: Optional[int] = None, - unrestrict_boost_count: Optional[int] = None, - message_auto_delete_time: Optional[int] = None, - has_aggressive_anti_spam_enabled: Optional[bool] = None, - has_hidden_members: Optional[bool] = None, - has_protected_content: Optional[bool] = None, - has_visible_history: Optional[bool] = None, - sticker_set_name: Optional[str] = None, can_set_sticker_set: Optional[bool] = None, custom_emoji_sticker_set_name: Optional[str] = None, + description: Optional[str] = None, + emoji_status_custom_emoji_id: Optional[str] = None, + emoji_status_expiration_date: Optional[DateTime] = None, + has_aggressive_anti_spam_enabled: Optional[bool] = None, + has_hidden_members: Optional[bool] = None, + has_private_forwards: Optional[bool] = None, + has_protected_content: Optional[bool] = None, + has_restricted_voice_and_video_messages: Optional[bool] = None, + has_visible_history: Optional[bool] = None, + invite_link: Optional[str] = None, + join_by_request: Optional[bool] = None, + join_to_send_messages: Optional[bool] = None, linked_chat_id: Optional[int] = None, location: Optional[ChatLocation] = None, + message_auto_delete_time: Optional[int] = None, + permissions: Optional[ChatPermissions] = None, + personal_chat: Optional[Chat] = None, + photo: Optional[ChatPhoto] = None, + pinned_message: Optional[Message] = None, + profile_accent_color_id: Optional[int] = None, + profile_background_custom_emoji_id: Optional[str] = None, + slow_mode_delay: Optional[int] = None, + sticker_set_name: Optional[str] = None, + unrestrict_boost_count: Optional[int] = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -207,41 +332,41 @@ class Chat(TelegramObject): first_name=first_name, last_name=last_name, is_forum=is_forum, - photo=photo, + 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, - personal_chat=personal_chat, - available_reactions=available_reactions, - accent_color_id=accent_color_id, - 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, - 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, + 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, ) @@ -909,7 +1034,7 @@ class Chat(TelegramObject): :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 + :param can_edit_stories: Pass :code:`True` if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive :param can_delete_stories: Pass :code:`True` if the administrator can delete stories posted by other users :param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only :param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only diff --git a/aiogram/types/chat_administrator_rights.py b/aiogram/types/chat_administrator_rights.py index d2347906..0b205780 100644 --- a/aiogram/types/chat_administrator_rights.py +++ b/aiogram/types/chat_administrator_rights.py @@ -34,7 +34,7 @@ class ChatAdministratorRights(TelegramObject): 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""" + """:code:`True`, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive""" can_delete_stories: bool """:code:`True`, if the administrator can delete stories posted by other users""" can_post_messages: Optional[bool] = None diff --git a/aiogram/types/chat_background.py b/aiogram/types/chat_background.py new file mode 100644 index 00000000..937b4366 --- /dev/null +++ b/aiogram/types/chat_background.py @@ -0,0 +1,44 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Union + +if TYPE_CHECKING: + from .background_type_chat_theme import BackgroundTypeChatTheme + from .background_type_fill import BackgroundTypeFill + from .background_type_pattern import BackgroundTypePattern + from .background_type_wallpaper import BackgroundTypeWallpaper +from .base import TelegramObject + + +class ChatBackground(TelegramObject): + """ + This object represents a chat background. + + Source: https://core.telegram.org/bots/api#chatbackground + """ + + type: Union[ + BackgroundTypeFill, BackgroundTypeWallpaper, BackgroundTypePattern, BackgroundTypeChatTheme + ] + """Type of the background""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Union[ + BackgroundTypeFill, + BackgroundTypeWallpaper, + BackgroundTypePattern, + BackgroundTypeChatTheme, + ], + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT 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_full_info.py b/aiogram/types/chat_full_info.py new file mode 100644 index 00000000..7ec46f25 --- /dev/null +++ b/aiogram/types/chat_full_info.py @@ -0,0 +1,218 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, List, Optional, Union + +from .chat import Chat +from .custom import DateTime + +if TYPE_CHECKING: + 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_custom_emoji import ReactionTypeCustomEmoji + from .reaction_type_emoji import ReactionTypeEmoji + + +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""" + title: Optional[str] = None + """*Optional*. Title, for supergroups, channels and group chats""" + username: Optional[str] = None + """*Optional*. Username, for private chats, supergroups and channels if available""" + first_name: Optional[str] = None + """*Optional*. First name of the other party in a private chat""" + last_name: Optional[str] = None + """*Optional*. Last name of the other party in a private chat""" + is_forum: Optional[bool] = None + """*Optional*. :code:`True`, if the supergroup chat is a forum (has `topics `_ enabled)""" + photo: Optional[ChatPhoto] = None + """*Optional*. Chat photo""" + active_usernames: Optional[List[str]] = None + """*Optional*. If non-empty, the list of all `active chat usernames `_; for private chats, supergroups and channels""" + birthdate: Optional[Birthdate] = None + """*Optional*. For private chats, the date of birth of the user""" + business_intro: Optional[BusinessIntro] = None + """*Optional*. For private chats with business accounts, the intro of the business""" + business_location: Optional[BusinessLocation] = None + """*Optional*. For private chats with business accounts, the location of the business""" + business_opening_hours: Optional[BusinessOpeningHours] = None + """*Optional*. For private chats with business accounts, the opening hours of the business""" + personal_chat: Optional[Chat] = None + """*Optional*. For private chats, the personal channel of the user""" + available_reactions: Optional[List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]]] = None + """*Optional*. List of available reactions allowed in the chat. If omitted, then all `emoji reactions `_ are allowed.""" + background_custom_emoji_id: Optional[str] = None + """*Optional*. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background""" + profile_accent_color_id: Optional[int] = None + """*Optional*. Identifier of the accent color for the chat's profile background. See `profile accent colors `_ for more details.""" + profile_background_custom_emoji_id: Optional[str] = None + """*Optional*. Custom emoji identifier of the emoji chosen by the chat for its profile background""" + emoji_status_custom_emoji_id: Optional[str] = None + """*Optional*. Custom emoji identifier of the emoji status of the chat or the other party in a private chat""" + emoji_status_expiration_date: Optional[DateTime] = None + """*Optional*. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any""" + bio: Optional[str] = None + """*Optional*. Bio of the other party in a private chat""" + has_private_forwards: Optional[bool] = None + """*Optional*. :code:`True`, if privacy settings of the other party in the private chat allows to use :code:`tg://user?id=` links only in chats with the user""" + has_restricted_voice_and_video_messages: Optional[bool] = None + """*Optional*. :code:`True`, if the privacy settings of the other party restrict sending voice and video note messages in the private chat""" + join_to_send_messages: Optional[bool] = None + """*Optional*. :code:`True`, if users need to join the supergroup before they can send messages""" + join_by_request: Optional[bool] = None + """*Optional*. :code:`True`, if all users directly joining the supergroup need to be approved by supergroup administrators""" + description: Optional[str] = None + """*Optional*. Description, for groups, supergroups and channel chats""" + invite_link: Optional[str] = None + """*Optional*. Primary invite link, for groups, supergroups and channel chats""" + pinned_message: Optional[Message] = None + """*Optional*. The most recent pinned message (by sending date)""" + permissions: Optional[ChatPermissions] = None + """*Optional*. Default chat member permissions, for groups and supergroups""" + slow_mode_delay: Optional[int] = None + """*Optional*. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds""" + unrestrict_boost_count: Optional[int] = None + """*Optional*. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions""" + message_auto_delete_time: Optional[int] = None + """*Optional*. The time after which all messages sent to the chat will be automatically deleted; in seconds""" + has_aggressive_anti_spam_enabled: Optional[bool] = None + """*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.""" + has_hidden_members: Optional[bool] = None + """*Optional*. :code:`True`, if non-administrators can only get the list of bots and administrators in the chat""" + has_protected_content: Optional[bool] = None + """*Optional*. :code:`True`, if messages from the chat can't be forwarded to other chats""" + has_visible_history: Optional[bool] = None + """*Optional*. :code:`True`, if new chat members will have access to old messages; available only to chat administrators""" + sticker_set_name: Optional[str] = None + """*Optional*. For supergroups, name of the group sticker set""" + can_set_sticker_set: Optional[bool] = None + """*Optional*. :code:`True`, if the bot can change the group sticker set""" + custom_emoji_sticker_set_name: Optional[str] = None + """*Optional*. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group.""" + linked_chat_id: Optional[int] = None + """*Optional*. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.""" + location: Optional[ChatLocation] = None + """*Optional*. For supergroups, the location to which the supergroup is connected""" + + 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, + title: Optional[str] = None, + username: Optional[str] = None, + first_name: Optional[str] = None, + last_name: Optional[str] = None, + is_forum: Optional[bool] = None, + photo: Optional[ChatPhoto] = None, + active_usernames: Optional[List[str]] = None, + birthdate: Optional[Birthdate] = None, + business_intro: Optional[BusinessIntro] = None, + business_location: Optional[BusinessLocation] = None, + business_opening_hours: Optional[BusinessOpeningHours] = None, + personal_chat: Optional[Chat] = None, + available_reactions: Optional[ + List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]] + ] = None, + background_custom_emoji_id: Optional[str] = None, + profile_accent_color_id: Optional[int] = None, + profile_background_custom_emoji_id: Optional[str] = None, + emoji_status_custom_emoji_id: Optional[str] = None, + emoji_status_expiration_date: Optional[DateTime] = None, + bio: Optional[str] = None, + has_private_forwards: Optional[bool] = None, + has_restricted_voice_and_video_messages: Optional[bool] = None, + join_to_send_messages: Optional[bool] = None, + join_by_request: Optional[bool] = None, + description: Optional[str] = None, + invite_link: Optional[str] = None, + pinned_message: Optional[Message] = None, + permissions: Optional[ChatPermissions] = None, + slow_mode_delay: Optional[int] = None, + unrestrict_boost_count: Optional[int] = None, + message_auto_delete_time: Optional[int] = None, + has_aggressive_anti_spam_enabled: Optional[bool] = None, + has_hidden_members: Optional[bool] = None, + has_protected_content: Optional[bool] = None, + has_visible_history: Optional[bool] = None, + sticker_set_name: Optional[str] = None, + can_set_sticker_set: Optional[bool] = None, + custom_emoji_sticker_set_name: Optional[str] = None, + linked_chat_id: Optional[int] = None, + location: Optional[ChatLocation] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT 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, + title=title, + username=username, + first_name=first_name, + last_name=last_name, + is_forum=is_forum, + 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, + 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, + 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, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/chat_join_request.py b/aiogram/types/chat_join_request.py index d2144dad..4b38d85b 100644 --- a/aiogram/types/chat_join_request.py +++ b/aiogram/types/chat_join_request.py @@ -10,6 +10,7 @@ from .base import TelegramObject from .custom import DateTime if TYPE_CHECKING: + from .input_poll_option import InputPollOption from ..methods import ( ApproveChatJoinRequest, DeclineChatJoinRequest, @@ -196,7 +197,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -267,7 +268,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -343,7 +344,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -422,7 +423,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -500,7 +501,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -577,7 +578,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -645,7 +646,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -709,7 +710,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -777,7 +778,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -847,7 +848,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -905,7 +906,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_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. Not supported for messages sent on behalf of a business account. + :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` @@ -958,7 +959,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_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. Not supported for messages sent on behalf of a business account. + :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` @@ -1237,13 +1238,13 @@ class ChatJoinRequest(TelegramObject): :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only :param 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 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 reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -1307,13 +1308,13 @@ class ChatJoinRequest(TelegramObject): :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only :param 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 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 reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -1481,7 +1482,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -1548,7 +1549,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -1579,9 +1580,11 @@ class ChatJoinRequest(TelegramObject): def answer_poll( self, question: str, - options: List[str], + options: List[Union[InputPollOption, str]], business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, + question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), + question_entities: Optional[List[MessageEntity]] = None, is_anonymous: Optional[bool] = None, type: Optional[str] = None, allows_multiple_answers: Optional[bool] = None, @@ -1613,23 +1616,25 @@ class ChatJoinRequest(TelegramObject): Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each + :param options: A JSON-serialized list of 2-10 answer options :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed + :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode :param 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 explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*. :param 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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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_poll.SendPoll` @@ -1645,6 +1650,8 @@ class ChatJoinRequest(TelegramObject): 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, @@ -1667,9 +1674,11 @@ class ChatJoinRequest(TelegramObject): def answer_poll_pm( self, question: str, - options: List[str], + options: List[Union[InputPollOption, str]], business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, + question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), + question_entities: Optional[List[MessageEntity]] = None, is_anonymous: Optional[bool] = None, type: Optional[str] = None, allows_multiple_answers: Optional[bool] = None, @@ -1701,23 +1710,25 @@ class ChatJoinRequest(TelegramObject): Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each + :param options: A JSON-serialized list of 2-10 answer options :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed + :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode :param 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 explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*. :param 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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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_poll.SendPoll` @@ -1733,6 +1744,8 @@ class ChatJoinRequest(TelegramObject): 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, @@ -1783,7 +1796,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: 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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -1838,7 +1851,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: 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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -1895,7 +1908,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :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. Not supported for messages sent on behalf of a business account. + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -1953,7 +1966,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :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. Not supported for messages sent on behalf of a business account. + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -2023,7 +2036,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -2099,7 +2112,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -2179,7 +2192,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -2261,7 +2274,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -2331,7 +2344,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -2395,7 +2408,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -2447,7 +2460,7 @@ class ChatJoinRequest(TelegramObject): - :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 (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 @@ -2461,7 +2474,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -2514,7 +2527,7 @@ class ChatJoinRequest(TelegramObject): - :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 (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 @@ -2528,7 +2541,7 @@ class ChatJoinRequest(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` diff --git a/aiogram/types/chat_member_administrator.py b/aiogram/types/chat_member_administrator.py index 62667a01..10552f74 100644 --- a/aiogram/types/chat_member_administrator.py +++ b/aiogram/types/chat_member_administrator.py @@ -41,7 +41,7 @@ class ChatMemberAdministrator(ChatMember): 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""" + """:code:`True`, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive""" can_delete_stories: bool """:code:`True`, if the administrator can delete stories posted by other users""" can_post_messages: Optional[bool] = None diff --git a/aiogram/types/chat_member_updated.py b/aiogram/types/chat_member_updated.py index dbac44b9..6bf51bd7 100644 --- a/aiogram/types/chat_member_updated.py +++ b/aiogram/types/chat_member_updated.py @@ -10,6 +10,7 @@ from .base import TelegramObject from .custom import DateTime if TYPE_CHECKING: + from .input_poll_option import InputPollOption from ..methods import ( SendAnimation, SendAudio, @@ -86,6 +87,8 @@ class ChatMemberUpdated(TelegramObject): """New information about the chat member""" invite_link: Optional[ChatInviteLink] = None """*Optional*. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.""" + via_join_request: Optional[bool] = None + """*Optional*. True, if the user joined the chat after sending a direct join request and being approved by an administrator""" via_chat_folder_invite_link: Optional[bool] = None """*Optional*. True, if the user joined the chat via a chat folder invite link""" @@ -116,6 +119,7 @@ class ChatMemberUpdated(TelegramObject): ChatMemberBanned, ], invite_link: Optional[ChatInviteLink] = None, + via_join_request: Optional[bool] = None, via_chat_folder_invite_link: Optional[bool] = None, **__pydantic_kwargs: Any, ) -> None: @@ -130,6 +134,7 @@ class ChatMemberUpdated(TelegramObject): 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, ) @@ -176,7 +181,7 @@ class ChatMemberUpdated(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -252,7 +257,7 @@ class ChatMemberUpdated(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -330,7 +335,7 @@ class ChatMemberUpdated(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -398,7 +403,7 @@ class ChatMemberUpdated(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -466,7 +471,7 @@ class ChatMemberUpdated(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -524,7 +529,7 @@ class ChatMemberUpdated(TelegramObject): :param disable_notification: Sends the message `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_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. Not supported for messages sent on behalf of a business account. + :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` @@ -693,13 +698,13 @@ class ChatMemberUpdated(TelegramObject): :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only :param 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 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 reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -817,7 +822,7 @@ class ChatMemberUpdated(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -848,9 +853,11 @@ class ChatMemberUpdated(TelegramObject): def answer_poll( self, question: str, - options: List[str], + options: List[Union[InputPollOption, str]], business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, + question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), + question_entities: Optional[List[MessageEntity]] = None, is_anonymous: Optional[bool] = None, type: Optional[str] = None, allows_multiple_answers: Optional[bool] = None, @@ -882,23 +889,25 @@ class ChatMemberUpdated(TelegramObject): Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each + :param options: A JSON-serialized list of 2-10 answer options :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed + :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode :param 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 explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*. :param 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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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_poll.SendPoll` @@ -914,6 +923,8 @@ class ChatMemberUpdated(TelegramObject): 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, @@ -964,7 +975,7 @@ class ChatMemberUpdated(TelegramObject): :param disable_notification: 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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -1021,7 +1032,7 @@ class ChatMemberUpdated(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :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. Not supported for messages sent on behalf of a business account. + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -1091,7 +1102,7 @@ class ChatMemberUpdated(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -1171,7 +1182,7 @@ class ChatMemberUpdated(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -1241,7 +1252,7 @@ class ChatMemberUpdated(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -1293,7 +1304,7 @@ class ChatMemberUpdated(TelegramObject): - :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 (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 @@ -1307,7 +1318,7 @@ class ChatMemberUpdated(TelegramObject): :param disable_notification: Sends the message `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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` diff --git a/aiogram/types/force_reply.py b/aiogram/types/force_reply.py index 122d5db7..14b9c1c5 100644 --- a/aiogram/types/force_reply.py +++ b/aiogram/types/force_reply.py @@ -7,7 +7,7 @@ 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: diff --git a/aiogram/types/inline_keyboard_button.py b/aiogram/types/inline_keyboard_button.py index 22a55b09..7d799e85 100644 --- a/aiogram/types/inline_keyboard_button.py +++ b/aiogram/types/inline_keyboard_button.py @@ -23,17 +23,17 @@ class InlineKeyboardButton(MutableTelegramObject): 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 identifier without using a username, if this is allowed by their privacy settings.""" callback_data: Optional[str] = None - """*Optional*. Data to be sent in a `callback query `_ to the bot when button is pressed, 1-64 bytes""" + """*Optional*. Data to be sent in a `callback query `_ to the bot when button is pressed, 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business account.""" web_app: Optional[WebAppInfo] = 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.""" + """*Optional*. Description of the `Web App `_ that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method :class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account.""" login_url: Optional[LoginUrl] = None """*Optional*. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the `Telegram Login Widget `_.""" switch_inline_query: Optional[str] = None - """*Optional*. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted.""" + """*Optional*. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent on behalf of a Telegram Business account.""" switch_inline_query_current_chat: Optional[str] = None """*Optional*. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.""" switch_inline_query_chosen_chat: Optional[SwitchInlineQueryChosenChat] = None - """*Optional*. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field""" + """*Optional*. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account.""" callback_game: Optional[CallbackGame] = None """*Optional*. Description of the game that will be launched when the user presses the button.""" pay: Optional[bool] = None diff --git a/aiogram/types/inline_query_result_location.py b/aiogram/types/inline_query_result_location.py index 4e384e79..50b3ed8a 100644 --- a/aiogram/types/inline_query_result_location.py +++ b/aiogram/types/inline_query_result_location.py @@ -34,7 +34,7 @@ class InlineQueryResultLocation(InlineQueryResult): horizontal_accuracy: Optional[float] = 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.""" + """*Optional*. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.""" heading: Optional[int] = None """*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 diff --git a/aiogram/types/input_location_message_content.py b/aiogram/types/input_location_message_content.py index ee4678a6..83400c13 100644 --- a/aiogram/types/input_location_message_content.py +++ b/aiogram/types/input_location_message_content.py @@ -19,7 +19,7 @@ class InputLocationMessageContent(InputMessageContent): horizontal_accuracy: Optional[float] = 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.""" + """*Optional*. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.""" heading: Optional[int] = None """*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 diff --git a/aiogram/types/input_poll_option.py b/aiogram/types/input_poll_option.py new file mode 100644 index 00000000..2b07fd0b --- /dev/null +++ b/aiogram/types/input_poll_option.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, List, Optional, Union + +from .base import TelegramObject +from ..client.default import Default + +if TYPE_CHECKING: + from .message_entity import MessageEntity + + +class InputPollOption(TelegramObject): + """ + This object contains information about one answer option in a poll to send. + + Source: https://core.telegram.org/bots/api#inputpolloption + """ + + text: str + """Option text, 1-100 characters""" + text_parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + """*Optional*. Mode for parsing entities in the text. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed""" + text_entities: Optional[List[MessageEntity]] = None + """*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: Optional[Union[str, Default]] = Default("parse_mode"), + text_entities: Optional[List[MessageEntity]] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT 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/keyboard_button_request_chat.py b/aiogram/types/keyboard_button_request_chat.py index 7494cf11..018edcff 100644 --- a/aiogram/types/keyboard_button_request_chat.py +++ b/aiogram/types/keyboard_button_request_chat.py @@ -10,7 +10,7 @@ if TYPE_CHECKING: 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 сhat if appropriate `More about requesting chats » `_ + This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate. `More about requesting chats » `_. Source: https://core.telegram.org/bots/api#keyboardbuttonrequestchat """ diff --git a/aiogram/types/keyboard_button_request_users.py b/aiogram/types/keyboard_button_request_users.py index 28b7fae6..631f04b4 100644 --- a/aiogram/types/keyboard_button_request_users.py +++ b/aiogram/types/keyboard_button_request_users.py @@ -19,11 +19,11 @@ class KeyboardButtonRequestUsers(TelegramObject): max_quantity: Optional[int] = None """*Optional*. The maximum number of users to be selected; 1-10. Defaults to 1.""" request_name: Optional[bool] = None - """*Optional*. Pass :code:`True` to request the users' first and last name""" + """*Optional*. Pass :code:`True` to request the users' first and last names""" request_username: Optional[bool] = None - """*Optional*. Pass :code:`True` to request the users' username""" + """*Optional*. Pass :code:`True` to request the users' usernames""" request_photo: Optional[bool] = None - """*Optional*. Pass :code:`True` to request the users' photo""" + """*Optional*. Pass :code:`True` to request the users' photos""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 261489dc..d96febc7 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -3,7 +3,7 @@ from __future__ import annotations import datetime from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union -from pydantic import Field, computed_field +from pydantic import Field from aiogram.utils.text_decorations import ( TextDecoration, @@ -14,6 +14,7 @@ from aiogram.utils.text_decorations import ( from ..client.default import Default from ..enums import ContentType from .custom import DateTime +from .input_poll_option import InputPollOption from .maybe_inaccessible_message import MaybeInaccessibleMessage if TYPE_CHECKING: @@ -51,6 +52,7 @@ if TYPE_CHECKING: 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_shared import ChatShared from .contact import Contact @@ -96,7 +98,6 @@ if TYPE_CHECKING: from .reply_keyboard_markup import ReplyKeyboardMarkup from .reply_keyboard_remove import ReplyKeyboardRemove from .reply_parameters import ReplyParameters - from .shared_user import SharedUser from .sticker import Sticker from .story import Story from .successful_payment import SuccessfulPayment @@ -253,6 +254,8 @@ class Message(MaybeInaccessibleMessage): """*Optional*. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.""" boost_added: Optional[ChatBoostAdded] = None """*Optional*. Service message: user boosted the chat""" + chat_background_set: Optional[ChatBackground] = None + """*Optional*. Service message: chat background set""" forum_topic_created: Optional[ForumTopicCreated] = None """*Optional*. Service message: forum topic created""" forum_topic_edited: Optional[ForumTopicEdited] = None @@ -399,6 +402,7 @@ class Message(MaybeInaccessibleMessage): passport_data: Optional[PassportData] = None, proximity_alert_triggered: Optional[ProximityAlertTriggered] = None, boost_added: Optional[ChatBoostAdded] = None, + chat_background_set: Optional[ChatBackground] = None, forum_topic_created: Optional[ForumTopicCreated] = None, forum_topic_edited: Optional[ForumTopicEdited] = None, forum_topic_closed: Optional[ForumTopicClosed] = None, @@ -493,6 +497,7 @@ class Message(MaybeInaccessibleMessage): passport_data=passport_data, proximity_alert_triggered=proximity_alert_triggered, boost_added=boost_added, + chat_background_set=chat_background_set, forum_topic_created=forum_topic_created, forum_topic_edited=forum_topic_edited, forum_topic_closed=forum_topic_closed, @@ -625,6 +630,8 @@ class Message(MaybeInaccessibleMessage): 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 @@ -688,7 +695,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` """ @@ -768,7 +775,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -848,7 +855,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` """ @@ -926,7 +933,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -996,7 +1003,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` """ @@ -1061,7 +1068,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -1131,7 +1138,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` """ @@ -1202,7 +1209,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -1262,7 +1269,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param 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. Not supported for messages sent on behalf of a business account. + :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` """ @@ -1316,7 +1323,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param 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. Not supported for messages sent on behalf of a business account. + :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` @@ -1606,13 +1613,13 @@ class Message(MaybeInaccessibleMessage): :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 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 reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` """ @@ -1677,13 +1684,13 @@ class Message(MaybeInaccessibleMessage): :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 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 reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -1859,7 +1866,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -1931,7 +1938,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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 @@ -2001,7 +2008,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` """ @@ -2069,7 +2076,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -2104,7 +2111,9 @@ class Message(MaybeInaccessibleMessage): def reply_poll( self, question: str, - options: List[str], + options: List[Union[InputPollOption, str]], + question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), + question_entities: Optional[List[MessageEntity]] = None, is_anonymous: Optional[bool] = None, type: Optional[str] = None, allows_multiple_answers: Optional[bool] = None, @@ -2138,21 +2147,23 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each + :param options: A JSON-serialized list of 2-10 answer options + :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed + :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode :param 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 explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*. :param 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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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_poll.SendPoll` """ @@ -2172,6 +2183,8 @@ class Message(MaybeInaccessibleMessage): reply_to_message_id=self.message_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, @@ -2193,7 +2206,9 @@ class Message(MaybeInaccessibleMessage): def answer_poll( self, question: str, - options: List[str], + options: List[Union[InputPollOption, str]], + question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), + question_entities: Optional[List[MessageEntity]] = None, is_anonymous: Optional[bool] = None, type: Optional[str] = None, allows_multiple_answers: Optional[bool] = None, @@ -2227,21 +2242,23 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each + :param options: A JSON-serialized list of 2-10 answer options + :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed + :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode :param 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 explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*. :param 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_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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_poll.SendPoll` @@ -2261,6 +2278,8 @@ class Message(MaybeInaccessibleMessage): 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, @@ -2309,7 +2328,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` """ @@ -2365,7 +2384,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -2424,7 +2443,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :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. Not supported for messages sent on behalf of a business account. + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` """ @@ -2483,7 +2502,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :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. Not supported for messages sent on behalf of a business account. + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -2555,7 +2574,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` """ @@ -2632,7 +2651,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -2714,7 +2733,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` """ @@ -2797,7 +2816,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -2869,7 +2888,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` """ @@ -2934,7 +2953,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -2990,7 +3009,7 @@ class Message(MaybeInaccessibleMessage): - :code:`business_connection_id` - :code:`reply_to_message_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 (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 @@ -3002,7 +3021,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` """ @@ -3058,7 +3077,7 @@ class Message(MaybeInaccessibleMessage): - :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 (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 @@ -3070,7 +3089,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -3269,7 +3288,15 @@ class Message(MaybeInaccessibleMessage): if self.poll: 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, ).as_(self._bot) if self.dice: # Dice value can't be controlled @@ -3321,7 +3348,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_parameters: Description of the message to reply to - :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 reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :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` @@ -3578,6 +3605,7 @@ class Message(MaybeInaccessibleMessage): latitude: float, longitude: float, inline_message_id: Optional[str] = None, + live_period: Optional[int] = None, horizontal_accuracy: Optional[float] = None, heading: Optional[int] = None, proximity_alert_radius: Optional[int] = None, @@ -3598,6 +3626,7 @@ class Message(MaybeInaccessibleMessage): :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. @@ -3619,6 +3648,7 @@ class Message(MaybeInaccessibleMessage): 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, diff --git a/aiogram/types/poll.py b/aiogram/types/poll.py index ecf39f73..58052241 100644 --- a/aiogram/types/poll.py +++ b/aiogram/types/poll.py @@ -33,6 +33,8 @@ class Poll(TelegramObject): """Poll type, currently can be 'regular' or 'quiz'""" allows_multiple_answers: bool """:code:`True`, if the poll allows multiple answers""" + question_entities: Optional[List[MessageEntity]] = None + """*Optional*. Special entities that appear in the *question*. Currently, only custom emoji entities are allowed in poll questions""" correct_option_id: Optional[int] = None """*Optional*. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.""" explanation: Optional[str] = None @@ -59,6 +61,7 @@ class Poll(TelegramObject): is_anonymous: bool, type: str, allows_multiple_answers: bool, + question_entities: Optional[List[MessageEntity]] = None, correct_option_id: Optional[int] = None, explanation: Optional[str] = None, explanation_entities: Optional[List[MessageEntity]] = None, @@ -79,6 +82,7 @@ class Poll(TelegramObject): is_anonymous=is_anonymous, type=type, allows_multiple_answers=allows_multiple_answers, + question_entities=question_entities, correct_option_id=correct_option_id, explanation=explanation, explanation_entities=explanation_entities, diff --git a/aiogram/types/poll_option.py b/aiogram/types/poll_option.py index f3059f01..f380934c 100644 --- a/aiogram/types/poll_option.py +++ b/aiogram/types/poll_option.py @@ -1,9 +1,12 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, List, Optional from .base import TelegramObject +if TYPE_CHECKING: + from .message_entity import MessageEntity + class PollOption(TelegramObject): """ @@ -16,16 +19,28 @@ class PollOption(TelegramObject): """Option text, 1-100 characters""" voter_count: int """Number of users that voted for this option""" + text_entities: Optional[List[MessageEntity]] = None + """*Optional*. Special entities that appear in the option *text*. Currently, only custom emoji entities are allowed in poll option texts""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, text: str, voter_count: int, **__pydantic_kwargs: Any + __pydantic__self__, + *, + text: str, + voter_count: int, + text_entities: Optional[List[MessageEntity]] = None, + **__pydantic_kwargs: Any, ) -> None: # DO NOT 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, voter_count=voter_count, **__pydantic_kwargs) + super().__init__( + text=text, + voter_count=voter_count, + text_entities=text_entities, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/reply_keyboard_markup.py b/aiogram/types/reply_keyboard_markup.py index 057b123d..f3d6dabd 100644 --- a/aiogram/types/reply_keyboard_markup.py +++ b/aiogram/types/reply_keyboard_markup.py @@ -10,7 +10,7 @@ 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 """ diff --git a/aiogram/types/reply_keyboard_remove.py b/aiogram/types/reply_keyboard_remove.py index 9733ecf9..9c135a10 100644 --- a/aiogram/types/reply_keyboard_remove.py +++ b/aiogram/types/reply_keyboard_remove.py @@ -7,7 +7,7 @@ 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 """ diff --git a/aiogram/types/shared_user.py b/aiogram/types/shared_user.py index da157824..e160b894 100644 --- a/aiogram/types/shared_user.py +++ b/aiogram/types/shared_user.py @@ -10,7 +10,7 @@ if TYPE_CHECKING: class SharedUser(TelegramObject): """ - This object contains information about a user that was shared with the bot using a :class:`aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser` button. + 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 """ diff --git a/docs/api/methods/get_chat.rst b/docs/api/methods/get_chat.rst index c0c95236..d5fbc489 100644 --- a/docs/api/methods/get_chat.rst +++ b/docs/api/methods/get_chat.rst @@ -2,7 +2,7 @@ getChat ####### -Returns: :obj:`Chat` +Returns: :obj:`ChatFullInfo` .. automodule:: aiogram.methods.get_chat :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: Chat = await bot.get_chat(...) + result: ChatFullInfo = await bot.get_chat(...) Method as object @@ -35,4 +35,4 @@ With specific bot .. code-block:: python - result: Chat = await bot(GetChat(...)) + result: ChatFullInfo = await bot(GetChat(...)) 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/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_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/index.rst b/docs/api/types/index.rst index 1a0b9ee5..db2d9119 100644 --- a/docs/api/types/index.rst +++ b/docs/api/types/index.rst @@ -13,6 +13,15 @@ Available 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 @@ -35,6 +44,7 @@ Available types callback_query chat chat_administrator_rights + chat_background chat_boost chat_boost_added chat_boost_removed @@ -43,6 +53,7 @@ Available types chat_boost_source_giveaway chat_boost_source_premium chat_boost_updated + chat_full_info chat_invite_link chat_join_request chat_location @@ -84,6 +95,7 @@ Available types input_media_document input_media_photo input_media_video + input_poll_option keyboard_button keyboard_button_poll_type keyboard_button_request_chat 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/tests/test_api/test_methods/test_get_chat.py b/tests/test_api/test_methods/test_get_chat.py index 902b03b3..9f67b0c7 100644 --- a/tests/test_api/test_methods/test_get_chat.py +++ b/tests/test_api/test_methods/test_get_chat.py @@ -1,14 +1,22 @@ -from aiogram.methods import GetChat, Request -from aiogram.types import Chat +from aiogram.methods import GetChat +from aiogram.types import ChatFullInfo from tests.mocked_bot import MockedBot class TestGetChat: 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, + ), ) - response: Chat = await bot.get_chat(chat_id=-42) + response: ChatFullInfo = await bot.get_chat(chat_id=-42) request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_types/test_message.py b/tests/test_api/test_types/test_message.py index a17228b4..fd65119f 100644 --- a/tests/test_api/test_types/test_message.py +++ b/tests/test_api/test_types/test_message.py @@ -88,6 +88,9 @@ from aiogram.types import ( Voice, WebAppData, WriteAccessAllowed, + ChatBackground, + BackgroundTypeFill, + BackgroundFillSolid, ) from aiogram.types.message import ContentType, Message @@ -553,6 +556,18 @@ TEST_MESSAGE_BOOST_ADDED = Message( 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_MESSAGE_UNKNOWN = Message( message_id=42, date=datetime.datetime.now(), @@ -620,6 +635,7 @@ MESSAGES_AND_CONTENT_TYPES = [ [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_UNKNOWN, ContentType.UNKNOWN], ] @@ -678,6 +694,7 @@ MESSAGES_AND_COPY_METHODS = [ [TEST_MESSAGE_GIVEAWAY, None], [TEST_MESSAGE_GIVEAWAY_WINNERS, None], [TEST_MESSAGE_BOOST_ADDED, None], + [TEST_CHAT_BACKGROUND_SET, None], [TEST_MESSAGE_UNKNOWN, None], ]