From f060c08d162f9ab936fd2ec732ab9e6d7e8adbc2 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 5 Jul 2025 03:02:44 +0300 Subject: [PATCH] Add support for Telegram Bot API 9.1 (#1704) * Add support for Telegram Bot API 9.1 features, including checklists, gifts, and new methods like `SendChecklist`, `EditMessageChecklist`, and `GetMyStarBalance`. Update changelog and improve `True` field descriptions. * Bump API Version * Refactor profile photo types to use `InputProfilePhotoType` enums instead of hardcoded literals * Refactor imports and clean up redundant code across methods, types, and webhook server classes --- .apiversion | 2 +- .butcher/enums/InputProfileType.yml | 2 +- .butcher/enums/InputStoryContentPhotoType.yml | 2 +- .../deleteBusinessMessages/entity.json | 6 +- .../methods/editMessageChecklist/entity.json | 57 ++ .../getBusinessAccountGifts/entity.json | 24 +- .butcher/methods/getMyStarBalance/entity.json | 16 + .../methods/promoteChatMember/entity.json | 12 +- .../entity.json | 4 +- .butcher/methods/sendChecklist/entity.json | 81 ++ .butcher/methods/sendPoll/entity.json | 6 +- .../entity.json | 4 +- .../entity.json | 4 +- .butcher/methods/upgradeGift/entity.json | 4 +- .butcher/schema/schema.json | 787 ++++++++++++++---- .butcher/types/AcceptedGiftTypes/entity.json | 16 +- .butcher/types/BusinessBotRights/entity.json | 198 ++--- .butcher/types/BusinessConnection/entity.json | 4 +- .../types/ChatAdministratorRights/entity.json | 12 +- .../types/ChatBoostSourceGiveaway/entity.json | 4 +- .../types/ChatMemberAdministrator/entity.json | 12 +- .../types/ChatMemberRestricted/entity.json | 6 +- .butcher/types/ChatMemberUpdated/entity.json | 8 +- .butcher/types/ChatPermissions/entity.json | 6 +- .butcher/types/Checklist/entity.json | 57 ++ .butcher/types/ChecklistTask/entity.json | 57 ++ .../types/ChecklistTasksAdded/entity.json | 33 + .butcher/types/ChecklistTasksDone/entity.json | 41 + .../DirectMessagePriceChanged/entity.json | 33 + .butcher/types/ExternalReplyInfo/entity.json | 8 + .butcher/types/GiftInfo/entity.json | 8 +- .butcher/types/InputChecklist/entity.json | 65 ++ .butcher/types/InputChecklistTask/entity.json | 49 ++ .../InputProfilePhotoAnimated/entity.json | 6 +- .../types/InputProfilePhotoStatic/entity.json | 6 +- .../types/InputStoryContentPhoto/entity.json | 6 +- .../types/InputStoryContentVideo/entity.json | 6 +- .butcher/types/Message/entity.json | 40 +- .butcher/types/OwnedGiftRegular/entity.json | 16 +- .butcher/types/OwnedGiftUnique/entity.json | 16 +- .butcher/types/OwnedGiftUnique/replace.yml | 5 + .butcher/types/ReactionTypeEmoji/entity.json | 4 +- .butcher/types/SuccessfulPayment/entity.json | 8 +- .../SwitchInlineQueryChosenChat/entity.json | 16 +- .butcher/types/TextQuote/entity.json | 4 +- .butcher/types/UniqueGiftInfo/entity.json | 22 +- .butcher/types/UniqueGiftInfo/replace.yml | 5 + .butcher/types/WriteAccessAllowed/entity.json | 8 +- CHANGES/1704.feature.rst | 25 + README.rst | 2 +- aiogram/__meta__.py | 2 +- aiogram/client/bot.py | 121 ++- aiogram/enums/content_type.py | 4 + aiogram/methods/__init__.py | 6 + aiogram/methods/delete_business_messages.py | 2 +- aiogram/methods/edit_message_checklist.py | 55 ++ aiogram/methods/get_business_account_gifts.py | 12 +- aiogram/methods/get_my_star_balance.py | 15 + aiogram/methods/promote_chat_member.py | 4 +- .../remove_business_account_profile_photo.py | 2 +- aiogram/methods/send_checklist.py | 67 ++ aiogram/methods/send_poll.py | 2 +- .../set_business_account_gift_settings.py | 2 +- .../set_business_account_profile_photo.py | 2 +- aiogram/methods/upgrade_gift.py | 2 +- aiogram/types/__init__.py | 14 + aiogram/types/accepted_gift_types.py | 8 +- aiogram/types/business_bot_rights.py | 45 +- aiogram/types/business_connection.py | 2 +- aiogram/types/chat.py | 4 +- aiogram/types/chat_administrator_rights.py | 4 +- aiogram/types/chat_boost_source_giveaway.py | 2 +- aiogram/types/chat_join_request.py | 4 +- aiogram/types/chat_member_administrator.py | 4 +- aiogram/types/chat_member_restricted.py | 2 +- aiogram/types/chat_member_updated.py | 6 +- aiogram/types/chat_permissions.py | 2 +- aiogram/types/checklist.py | 55 ++ aiogram/types/checklist_task.py | 55 ++ aiogram/types/checklist_tasks_added.py | 39 + aiogram/types/checklist_tasks_done.py | 46 + aiogram/types/direct_message_price_changed.py | 39 + aiogram/types/external_reply_info.py | 5 + aiogram/types/gift_info.py | 4 +- aiogram/types/inaccessible_message.py | 4 +- aiogram/types/input_checklist.py | 59 ++ aiogram/types/input_checklist_task.py | 50 ++ aiogram/types/input_profile_photo_animated.py | 2 +- aiogram/types/input_profile_photo_static.py | 2 +- aiogram/types/input_story_content_photo.py | 2 +- aiogram/types/input_story_content_video.py | 2 +- aiogram/types/message.py | 36 +- aiogram/types/owned_gift_regular.py | 8 +- aiogram/types/owned_gift_unique.py | 9 +- aiogram/types/reaction_type_emoji.py | 2 +- aiogram/types/successful_payment.py | 4 +- .../types/switch_inline_query_chosen_chat.py | 8 +- aiogram/types/text_quote.py | 2 +- aiogram/types/unique_gift_info.py | 11 +- aiogram/types/write_access_allowed.py | 4 +- aiogram/webhook/aiohttp_server.py | 4 +- docs/api/methods/edit_message_checklist.rst | 45 + docs/api/methods/get_my_star_balance.rst | 38 + docs/api/methods/index.rst | 3 + docs/api/methods/send_checklist.rst | 45 + docs/api/types/checklist.rst | 10 + docs/api/types/checklist_task.rst | 10 + docs/api/types/checklist_tasks_added.rst | 10 + docs/api/types/checklist_tasks_done.rst | 10 + .../types/direct_message_price_changed.rst | 10 + docs/api/types/index.rst | 7 + docs/api/types/input_checklist.rst | 10 + docs/api/types/input_checklist_task.rst | 10 + .../test_edit_message_checklist.py | 35 + .../test_methods/test_get_my_star_balance.py | 18 + .../test_methods/test_send_checklist.py | 34 + tests/test_api/test_types/test_message.py | 66 ++ 117 files changed, 2565 insertions(+), 466 deletions(-) create mode 100644 .butcher/methods/editMessageChecklist/entity.json create mode 100644 .butcher/methods/getMyStarBalance/entity.json create mode 100644 .butcher/methods/sendChecklist/entity.json create mode 100644 .butcher/types/Checklist/entity.json create mode 100644 .butcher/types/ChecklistTask/entity.json create mode 100644 .butcher/types/ChecklistTasksAdded/entity.json create mode 100644 .butcher/types/ChecklistTasksDone/entity.json create mode 100644 .butcher/types/DirectMessagePriceChanged/entity.json create mode 100644 .butcher/types/InputChecklist/entity.json create mode 100644 .butcher/types/InputChecklistTask/entity.json create mode 100644 .butcher/types/OwnedGiftUnique/replace.yml create mode 100644 .butcher/types/UniqueGiftInfo/replace.yml create mode 100644 CHANGES/1704.feature.rst create mode 100644 aiogram/methods/edit_message_checklist.py create mode 100644 aiogram/methods/get_my_star_balance.py create mode 100644 aiogram/methods/send_checklist.py create mode 100644 aiogram/types/checklist.py create mode 100644 aiogram/types/checklist_task.py create mode 100644 aiogram/types/checklist_tasks_added.py create mode 100644 aiogram/types/checklist_tasks_done.py create mode 100644 aiogram/types/direct_message_price_changed.py create mode 100644 aiogram/types/input_checklist.py create mode 100644 aiogram/types/input_checklist_task.py create mode 100644 docs/api/methods/edit_message_checklist.rst create mode 100644 docs/api/methods/get_my_star_balance.rst create mode 100644 docs/api/methods/send_checklist.rst create mode 100644 docs/api/types/checklist.rst create mode 100644 docs/api/types/checklist_task.rst create mode 100644 docs/api/types/checklist_tasks_added.rst create mode 100644 docs/api/types/checklist_tasks_done.rst create mode 100644 docs/api/types/direct_message_price_changed.rst create mode 100644 docs/api/types/input_checklist.rst create mode 100644 docs/api/types/input_checklist_task.rst create mode 100644 tests/test_api/test_methods/test_edit_message_checklist.py create mode 100644 tests/test_api/test_methods/test_get_my_star_balance.py create mode 100644 tests/test_api/test_methods/test_send_checklist.py diff --git a/.apiversion b/.apiversion index dd98ee6c..28a21864 100644 --- a/.apiversion +++ b/.apiversion @@ -1 +1 @@ -9.0 +9.1 diff --git a/.butcher/enums/InputProfileType.yml b/.butcher/enums/InputProfileType.yml index 6a1660af..4128aa83 100644 --- a/.butcher/enums/InputProfileType.yml +++ b/.butcher/enums/InputProfileType.yml @@ -5,7 +5,7 @@ description: | Source: https://core.telegram.org/bots/api#inputprofilephoto multi_parse: attribute: type - regexp: "must be '([a-z_]+)'" + regexp: "must be *([a-z_]+)*" entities: - InputProfilePhotoStatic - InputProfilePhotoAnimated diff --git a/.butcher/enums/InputStoryContentPhotoType.yml b/.butcher/enums/InputStoryContentPhotoType.yml index f4464de3..1e3792bd 100644 --- a/.butcher/enums/InputStoryContentPhotoType.yml +++ b/.butcher/enums/InputStoryContentPhotoType.yml @@ -5,7 +5,7 @@ description: | Source: https://core.telegram.org/bots/api#inputstorycontentphoto multi_parse: attribute: type - regexp: "must be '([a-z_]+)'" + regexp: "must be *([a-z_]+)*" entities: - InputStoryContentPhoto - InputStoryContentVideo diff --git a/.butcher/methods/deleteBusinessMessages/entity.json b/.butcher/methods/deleteBusinessMessages/entity.json index d4948805..42659b6a 100644 --- a/.butcher/methods/deleteBusinessMessages/entity.json +++ b/.butcher/methods/deleteBusinessMessages/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "deletebusinessmessages", "name": "deleteBusinessMessages", - "description": "Delete messages on behalf of a business account. Requires the can_delete_outgoing_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.", - "html_description": "

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

", - "rst_description": "Delete messages on behalf of a business account. Requires the *can_delete_outgoing_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success.", + "description": "Delete messages on behalf of a business account. Requires the can_delete_sent_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.", + "html_description": "

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

", + "rst_description": "Delete messages on behalf of a business account. Requires the *can_delete_sent_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success.", "annotations": [ { "type": "String", diff --git a/.butcher/methods/editMessageChecklist/entity.json b/.butcher/methods/editMessageChecklist/entity.json new file mode 100644 index 00000000..9b5912c5 --- /dev/null +++ b/.butcher/methods/editMessageChecklist/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "editmessagechecklist", + "name": "editMessageChecklist", + "description": "Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.", + "html_description": "

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

", + "rst_description": "Use this method to edit a checklist on behalf of a connected business account. On success, the edited :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent", + "html_description": "Unique identifier of the business connection on behalf of which the message will be sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target chat", + "html_description": "Unique identifier for the target chat", + "rst_description": "Unique identifier for the target chat\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target message", + "html_description": "Unique identifier for the target message", + "rst_description": "Unique identifier for the target message\n", + "name": "message_id" + }, + { + "type": "InputChecklist", + "required": true, + "description": "A JSON-serialized object for the new checklist", + "html_description": "A JSON-serialized object for the new checklist", + "rst_description": "A JSON-serialized object for the new checklist\n", + "name": "checklist" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for the new inline keyboard for the message", + "html_description": "A JSON-serialized object for the new inline keyboard for the message", + "rst_description": "A JSON-serialized object for the new inline keyboard for the message\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getBusinessAccountGifts/entity.json b/.butcher/methods/getBusinessAccountGifts/entity.json index a3ca0ff7..db228d53 100644 --- a/.butcher/methods/getBusinessAccountGifts/entity.json +++ b/.butcher/methods/getBusinessAccountGifts/entity.json @@ -23,48 +23,48 @@ "type": "Boolean", "required": false, "description": "Pass True to exclude gifts that aren't saved to the account's profile page", - "html_description": "Pass True to exclude gifts that aren't saved to the account's profile page", - "rst_description": "Pass True to exclude gifts that aren't saved to the account's profile page\n", + "html_description": "Pass True to exclude gifts that aren't saved to the account's profile page", + "rst_description": "Pass :code:`True` to exclude gifts that aren't saved to the account's profile page\n", "name": "exclude_unsaved" }, { "type": "Boolean", "required": false, "description": "Pass True to exclude gifts that are saved to the account's profile page", - "html_description": "Pass True to exclude gifts that are saved to the account's profile page", - "rst_description": "Pass True to exclude gifts that are saved to the account's profile page\n", + "html_description": "Pass True to exclude gifts that are saved to the account's profile page", + "rst_description": "Pass :code:`True` to exclude gifts that are saved to the account's profile page\n", "name": "exclude_saved" }, { "type": "Boolean", "required": false, "description": "Pass True to exclude gifts that can be purchased an unlimited number of times", - "html_description": "Pass True to exclude gifts that can be purchased an unlimited number of times", - "rst_description": "Pass True to exclude gifts that can be purchased an unlimited number of times\n", + "html_description": "Pass True to exclude gifts that can be purchased an unlimited number of times", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times\n", "name": "exclude_unlimited" }, { "type": "Boolean", "required": false, "description": "Pass True to exclude gifts that can be purchased a limited number of times", - "html_description": "Pass True to exclude gifts that can be purchased a limited number of times", - "rst_description": "Pass True to exclude gifts that can be purchased a limited number of times\n", + "html_description": "Pass True to exclude gifts that can be purchased a limited number of times", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times\n", "name": "exclude_limited" }, { "type": "Boolean", "required": false, "description": "Pass True to exclude unique gifts", - "html_description": "Pass True to exclude unique gifts", - "rst_description": "Pass True to exclude unique gifts\n", + "html_description": "Pass True to exclude unique gifts", + "rst_description": "Pass :code:`True` to exclude unique gifts\n", "name": "exclude_unique" }, { "type": "Boolean", "required": false, "description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", - "html_description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", - "rst_description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.\n", + "html_description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", + "rst_description": "Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.\n", "name": "sort_by_price" }, { diff --git a/.butcher/methods/getMyStarBalance/entity.json b/.butcher/methods/getMyStarBalance/entity.json new file mode 100644 index 00000000..813cbb7f --- /dev/null +++ b/.butcher/methods/getMyStarBalance/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "getmystarbalance", + "name": "getMyStarBalance", + "description": "A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a StarAmount object.", + "html_description": "

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

", + "rst_description": "A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a :class:`aiogram.types.star_amount.StarAmount` object.", + "annotations": [], + "category": "methods" + } +} diff --git a/.butcher/methods/promoteChatMember/entity.json b/.butcher/methods/promoteChatMember/entity.json index 3203b082..840f3a20 100644 --- a/.butcher/methods/promoteChatMember/entity.json +++ b/.butcher/methods/promoteChatMember/entity.json @@ -38,9 +38,9 @@ { "type": "Boolean", "required": false, - "description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "html_description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "rst_description": "Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.\n", + "description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "html_description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "rst_description": "Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.\n", "name": "can_manage_chat" }, { @@ -118,9 +118,9 @@ { "type": "Boolean", "required": false, - "description": "Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only", - "html_description": "Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only", - "rst_description": "Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only\n", + "description": "Pass True if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "html_description": "Pass True if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "rst_description": "Pass :code:`True` if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only\n", "name": "can_post_messages" }, { diff --git a/.butcher/methods/removeBusinessAccountProfilePhoto/entity.json b/.butcher/methods/removeBusinessAccountProfilePhoto/entity.json index 25b03338..f16a1ec1 100644 --- a/.butcher/methods/removeBusinessAccountProfilePhoto/entity.json +++ b/.butcher/methods/removeBusinessAccountProfilePhoto/entity.json @@ -23,8 +23,8 @@ "type": "Boolean", "required": false, "description": "Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.", - "html_description": "Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.", - "rst_description": "Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.\n", + "html_description": "Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.", + "rst_description": "Pass :code:`True` to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.\n", "name": "is_public" } ], diff --git a/.butcher/methods/sendChecklist/entity.json b/.butcher/methods/sendChecklist/entity.json new file mode 100644 index 00000000..119ee882 --- /dev/null +++ b/.butcher/methods/sendChecklist/entity.json @@ -0,0 +1,81 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendchecklist", + "name": "sendChecklist", + "description": "Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned.", + "html_description": "

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

", + "rst_description": "Use this method to send a checklist on behalf of a connected business account. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent", + "html_description": "Unique identifier of the business connection on behalf of which the message will be sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target chat", + "html_description": "Unique identifier for the target chat", + "rst_description": "Unique identifier for the target chat\n", + "name": "chat_id" + }, + { + "type": "InputChecklist", + "required": true, + "description": "A JSON-serialized object for the checklist to send", + "html_description": "A JSON-serialized object for the checklist to send", + "rst_description": "A JSON-serialized object for the checklist to send\n", + "name": "checklist" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message silently. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "String", + "required": false, + "description": "Unique identifier of the message effect to be added to the message", + "html_description": "Unique identifier of the message effect to be added to the message", + "rst_description": "Unique identifier of the message effect to be added to the message\n", + "name": "message_effect_id" + }, + { + "type": "ReplyParameters", + "required": false, + "description": "A JSON-serialized object for description of the message to reply to", + "html_description": "A JSON-serialized object for description of the message to reply to", + "rst_description": "A JSON-serialized object for description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard", + "html_description": "A JSON-serialized object for an inline keyboard", + "rst_description": "A JSON-serialized object for an inline keyboard\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendPoll/entity.json b/.butcher/methods/sendPoll/entity.json index 10a9b6ae..8d91e768 100644 --- a/.butcher/methods/sendPoll/entity.json +++ b/.butcher/methods/sendPoll/entity.json @@ -62,9 +62,9 @@ { "type": "Array of InputPollOption", "required": true, - "description": "A JSON-serialized list of 2-10 answer options", - "html_description": "A JSON-serialized list of 2-10 answer options", - "rst_description": "A JSON-serialized list of 2-10 answer options\n", + "description": "A JSON-serialized list of 2-12 answer options", + "html_description": "A JSON-serialized list of 2-12 answer options", + "rst_description": "A JSON-serialized list of 2-12 answer options\n", "name": "options" }, { diff --git a/.butcher/methods/setBusinessAccountGiftSettings/entity.json b/.butcher/methods/setBusinessAccountGiftSettings/entity.json index 2e3ad816..e9ca751b 100644 --- a/.butcher/methods/setBusinessAccountGiftSettings/entity.json +++ b/.butcher/methods/setBusinessAccountGiftSettings/entity.json @@ -23,8 +23,8 @@ "type": "Boolean", "required": true, "description": "Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field", - "html_description": "Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field", - "rst_description": "Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field\n", + "html_description": "Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field", + "rst_description": "Pass :code:`True`, if a button for sending a gift to the user or by the business account must always be shown in the input field\n", "name": "show_gift_button" }, { diff --git a/.butcher/methods/setBusinessAccountProfilePhoto/entity.json b/.butcher/methods/setBusinessAccountProfilePhoto/entity.json index 5815eb78..5195f7d4 100644 --- a/.butcher/methods/setBusinessAccountProfilePhoto/entity.json +++ b/.butcher/methods/setBusinessAccountProfilePhoto/entity.json @@ -31,8 +31,8 @@ "type": "Boolean", "required": false, "description": "Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.", - "html_description": "Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.", - "rst_description": "Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.\n", + "html_description": "Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.", + "rst_description": "Pass :code:`True` to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.\n", "name": "is_public" } ], diff --git a/.butcher/methods/upgradeGift/entity.json b/.butcher/methods/upgradeGift/entity.json index 971bbdee..9a6230f8 100644 --- a/.butcher/methods/upgradeGift/entity.json +++ b/.butcher/methods/upgradeGift/entity.json @@ -31,8 +31,8 @@ "type": "Boolean", "required": false, "description": "Pass True to keep the original gift text, sender and receiver in the upgraded gift", - "html_description": "Pass True to keep the original gift text, sender and receiver in the upgraded gift", - "rst_description": "Pass True to keep the original gift text, sender and receiver in the upgraded gift\n", + "html_description": "Pass True to keep the original gift text, sender and receiver in the upgraded gift", + "rst_description": "Pass :code:`True` to keep the original gift text, sender and receiver in the upgraded gift\n", "name": "keep_original_details" }, { diff --git a/.butcher/schema/schema.json b/.butcher/schema/schema.json index 57e6e931..b8ae6300 100644 --- a/.butcher/schema/schema.json +++ b/.butcher/schema/schema.json @@ -1,7 +1,7 @@ { "api": { - "version": "9.0", - "release_date": "2025-04-11" + "version": "9.1", + "release_date": "2025-07-03" }, "items": [ { @@ -1146,8 +1146,8 @@ { "type": "True", "description": "True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message", - "html_description": "Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message", - "rst_description": "*Optional*. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message\n", + "html_description": "Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message", + "rst_description": "*Optional*. :code:`True`, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message\n", "name": "is_from_offline", "required": false }, @@ -1306,8 +1306,8 @@ { "type": "True", "description": "True, if the caption must be shown above the message media", - "html_description": "Optional. True, if the caption must be shown above the message media", - "rst_description": "*Optional*. True, if the caption must be shown above the message media\n", + "html_description": "Optional. True, if the caption must be shown above the message media", + "rst_description": "*Optional*. :code:`True`, if the caption must be shown above the message media\n", "name": "show_caption_above_media", "required": false }, @@ -1319,6 +1319,14 @@ "name": "has_media_spoiler", "required": false }, + { + "type": "Checklist", + "description": "Message is a checklist", + "html_description": "Optional. Message is a checklist", + "rst_description": "*Optional*. Message is a checklist\n", + "name": "checklist", + "required": false + }, { "type": "Contact", "description": "Message is a shared contact, information about the contact", @@ -1567,6 +1575,30 @@ "name": "chat_background_set", "required": false }, + { + "type": "ChecklistTasksDone", + "description": "Service message: some tasks in a checklist were marked as done or not done", + "html_description": "Optional. Service message: some tasks in a checklist were marked as done or not done", + "rst_description": "*Optional*. Service message: some tasks in a checklist were marked as done or not done\n", + "name": "checklist_tasks_done", + "required": false + }, + { + "type": "ChecklistTasksAdded", + "description": "Service message: tasks were added to a checklist", + "html_description": "Optional. Service message: tasks were added to a checklist", + "rst_description": "*Optional*. Service message: tasks were added to a checklist\n", + "name": "checklist_tasks_added", + "required": false + }, + { + "type": "DirectMessagePriceChanged", + "description": "Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed", + "html_description": "Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed", + "rst_description": "*Optional*. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed\n", + "name": "direct_message_price_changed", + "required": false + }, { "type": "ForumTopicCreated", "description": "Service message: forum topic created", @@ -1867,8 +1899,8 @@ { "type": "True", "description": "True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.", - "html_description": "Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.", - "rst_description": "*Optional*. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.\n", + "html_description": "Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.", + "rst_description": "*Optional*. :code:`True`, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.\n", "name": "is_manual", "required": false } @@ -2002,6 +2034,14 @@ "name": "has_media_spoiler", "required": false }, + { + "type": "Checklist", + "description": "Message is a checklist", + "html_description": "Optional. Message is a checklist", + "rst_description": "*Optional*. Message is a checklist\n", + "name": "checklist", + "required": false + }, { "type": "Contact", "description": "Message is a shared contact, information about the contact", @@ -3253,6 +3293,266 @@ ], "category": "types" }, + { + "anchor": "checklisttask", + "name": "ChecklistTask", + "description": "Describes a task in a checklist.", + "html_description": "

Describes a task in a checklist.

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

Describes a checklist.

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

Describes a task to add to a checklist.

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

Describes a checklist to create.

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

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

", + "rst_description": "Describes a service message about checklist tasks marked as done or not done.", + "annotations": [ + { + "type": "Message", + "description": "Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "html_description": "Optional. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "rst_description": "*Optional*. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n", + "name": "checklist_message", + "required": false + }, + { + "type": "Array of Integer", + "description": "Identifiers of the tasks that were marked as done", + "html_description": "Optional. Identifiers of the tasks that were marked as done", + "rst_description": "*Optional*. Identifiers of the tasks that were marked as done\n", + "name": "marked_as_done_task_ids", + "required": false + }, + { + "type": "Array of Integer", + "description": "Identifiers of the tasks that were marked as not done", + "html_description": "Optional. Identifiers of the tasks that were marked as not done", + "rst_description": "*Optional*. Identifiers of the tasks that were marked as not done\n", + "name": "marked_as_not_done_task_ids", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "checklisttasksadded", + "name": "ChecklistTasksAdded", + "description": "Describes a service message about tasks added to a checklist.", + "html_description": "

Describes a service message about tasks added to a checklist.

", + "rst_description": "Describes a service message about tasks added to a checklist.", + "annotations": [ + { + "type": "Message", + "description": "Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "html_description": "Optional. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "rst_description": "*Optional*. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n", + "name": "checklist_message", + "required": false + }, + { + "type": "Array of ChecklistTask", + "description": "List of tasks added to the checklist", + "html_description": "List of tasks added to the checklist", + "rst_description": "List of tasks added to the checklist\n", + "name": "tasks", + "required": true + } + ], + "category": "types" + }, { "anchor": "location", "name": "Location", @@ -4003,8 +4303,8 @@ { "type": "Boolean", "description": "True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess", - "html_description": "Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess", - "rst_description": "*Optional*. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess `_\n", + "html_description": "Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess", + "rst_description": "*Optional*. :code:`True`, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess `_\n", "name": "from_request", "required": false }, @@ -4019,8 +4319,8 @@ { "type": "Boolean", "description": "True, if the access was granted when the bot was added to the attachment or side menu", - "html_description": "Optional. True, if the access was granted when the bot was added to the attachment or side menu", - "rst_description": "*Optional*. True, if the access was granted when the bot was added to the attachment or side menu\n", + "html_description": "Optional. True, if the access was granted when the bot was added to the attachment or side menu", + "rst_description": "*Optional*. :code:`True`, if the access was granted when the bot was added to the attachment or side menu\n", "name": "from_attachment_menu", "required": false } @@ -4108,6 +4408,32 @@ ], "category": "types" }, + { + "anchor": "directmessagepricechanged", + "name": "DirectMessagePriceChanged", + "description": "Describes a service message about a change in the price of direct messages sent to a channel chat.", + "html_description": "

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

", + "rst_description": "Describes a service message about a change in the price of direct messages sent to a channel chat.", + "annotations": [ + { + "type": "Boolean", + "description": "True, if direct messages are enabled for the channel chat; false otherwise", + "html_description": "True, if direct messages are enabled for the channel chat; false otherwise", + "rst_description": ":code:`True`, if direct messages are enabled for the channel chat; false otherwise\n", + "name": "are_direct_messages_enabled", + "required": true + }, + { + "type": "Integer", + "description": "The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.", + "html_description": "Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.", + "rst_description": "*Optional*. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.\n", + "name": "direct_message_star_count", + "required": false + } + ], + "category": "types" + }, { "anchor": "giveawaycreated", "name": "GiveawayCreated", @@ -5000,32 +5326,32 @@ { "type": "Boolean", "description": "True, if private chats with users can be chosen", - "html_description": "Optional. True, if private chats with users can be chosen", - "rst_description": "*Optional*. True, if private chats with users can be chosen\n", + "html_description": "Optional. True, if private chats with users can be chosen", + "rst_description": "*Optional*. :code:`True`, if private chats with users can be chosen\n", "name": "allow_user_chats", "required": false }, { "type": "Boolean", "description": "True, if private chats with bots can be chosen", - "html_description": "Optional. True, if private chats with bots can be chosen", - "rst_description": "*Optional*. True, if private chats with bots can be chosen\n", + "html_description": "Optional. True, if private chats with bots can be chosen", + "rst_description": "*Optional*. :code:`True`, if private chats with bots can be chosen\n", "name": "allow_bot_chats", "required": false }, { "type": "Boolean", "description": "True, if group and supergroup chats can be chosen", - "html_description": "Optional. True, if group and supergroup chats can be chosen", - "rst_description": "*Optional*. True, if group and supergroup chats can be chosen\n", + "html_description": "Optional. True, if group and supergroup chats can be chosen", + "rst_description": "*Optional*. :code:`True`, if group and supergroup chats can be chosen\n", "name": "allow_group_chats", "required": false }, { "type": "Boolean", "description": "True, if channel chats can be chosen", - "html_description": "Optional. True, if channel chats can be chosen", - "rst_description": "*Optional*. True, if channel chats can be chosen\n", + "html_description": "Optional. True, if channel chats can be chosen", + "rst_description": "*Optional*. :code:`True`, if channel chats can be chosen\n", "name": "allow_channel_chats", "required": false } @@ -5307,9 +5633,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "html_description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.\n", + "description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "html_description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.\n", "name": "can_manage_chat", "required": true }, @@ -5387,9 +5713,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can post messages in the channel, or access channel statistics; for channels only", - "html_description": "Optional. True, if the administrator can post messages in the channel, or access channel statistics; for channels only", - "rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only\n", + "description": "True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "html_description": "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only\n", "name": "can_post_messages", "required": false }, @@ -5478,16 +5804,16 @@ { "type": "Boolean", "description": "True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator", - "html_description": "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator", - "rst_description": "*Optional*. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator\n", + "html_description": "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator", + "rst_description": "*Optional*. :code:`True`, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator\n", "name": "via_join_request", "required": false }, { "type": "Boolean", "description": "True, if the user joined the chat via a chat folder invite link", - "html_description": "Optional. True, if the user joined the chat via a chat folder invite link", - "rst_description": "*Optional*. True, if the user joined the chat via a chat folder invite link\n", + "html_description": "Optional. True, if the user joined the chat via a chat folder invite link", + "rst_description": "*Optional*. :code:`True`, if the user joined the chat via a chat folder invite link\n", "name": "via_chat_folder_invite_link", "required": false } @@ -5586,9 +5912,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "html_description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.\n", + "description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "html_description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.\n", "name": "can_manage_chat", "required": true }, @@ -5666,9 +5992,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can post messages in the channel, or access channel statistics; for channels only", - "html_description": "Optional. True, if the administrator can post messages in the channel, or access channel statistics; for channels only", - "rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only\n", + "description": "True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "html_description": "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only\n", "name": "can_post_messages", "required": false }, @@ -5830,9 +6156,9 @@ }, { "type": "Boolean", - "description": "True, if the user is allowed to send polls", - "html_description": "True, if the user is allowed to send polls", - "rst_description": ":code:`True`, if the user is allowed to send polls\n", + "description": "True, if the user is allowed to send polls and checklists", + "html_description": "True, if the user is allowed to send polls and checklists", + "rst_description": ":code:`True`, if the user is allowed to send polls and checklists\n", "name": "can_send_polls", "required": true }, @@ -6078,9 +6404,9 @@ }, { "type": "Boolean", - "description": "True, if the user is allowed to send polls", - "html_description": "Optional. True, if the user is allowed to send polls", - "rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls\n", + "description": "True, if the user is allowed to send polls and checklists", + "html_description": "Optional. True, if the user is allowed to send polls and checklists", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls and checklists\n", "name": "can_send_polls", "required": false }, @@ -6647,8 +6973,8 @@ { "type": "String", "description": "Reaction emoji. Currently, it can be one of \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"", - "html_description": "Reaction emoji. Currently, it can be one of \"\"👍\"/\", \"\"👎\"/\", \"\"❤\"/\", \"\"🔥\"/\", \"\"🥰\"/\", \"\"👏\"/\", \"\"😁\"/\", \"\"🤔\"/\", \"\"🤯\"/\", \"\"😱\"/\", \"\"🤬\"/\", \"\"😢\"/\", \"\"🎉\"/\", \"\"🤩\"/\", \"\"🤮\"/\", \"\"💩\"/\", \"\"🙏\"/\", \"\"👌\"/\", \"\"🕊\"/\", \"\"🤡\"/\", \"\"🥱\"/\", \"\"🥴\"/\", \"\"😍\"/\", \"\"🐳\"/\", \"\"❤‍🔥\"/\", \"\"🌚\"/\", \"\"🌭\"/\", \"\"💯\"/\", \"\"🤣\"/\", \"\"⚡\"/\", \"\"🍌\"/\", \"\"🏆\"/\", \"\"💔\"/\", \"\"🤨\"/\", \"\"😐\"/\", \"\"🍓\"/\", \"\"🍾\"/\", \"\"💋\"/\", \"\"🖕\"/\", \"\"😈\"/\", \"\"😴\"/\", \"\"😭\"/\", \"\"🤓\"/\", \"\"👻\"/\", \"\"👨‍💻\"/\", \"\"👀\"/\", \"\"🎃\"/\", \"\"🙈\"/\", \"\"😇\"/\", \"\"😨\"/\", \"\"🤝\"/\", \"\"✍\"/\", \"\"🤗\"/\", \"\"🫡\"/\", \"\"🎅\"/\", \"\"🎄\"/\", \"\"☃\"/\", \"\"💅\"/\", \"\"🤪\"/\", \"\"🗿\"/\", \"\"🆒\"/\", \"\"💘\"/\", \"\"🙉\"/\", \"\"🦄\"/\", \"\"😘\"/\", \"\"💊\"/\", \"\"🙊\"/\", \"\"😎\"/\", \"\"👾\"/\", \"\"🤷‍♂\"/\", \"\"🤷\"/\", \"\"🤷‍♀\"/\", \"\"😡\"/\"", - "rst_description": "Reaction emoji. Currently, it can be one of \"๐Ÿ‘\", \"๐Ÿ‘Ž\", \"โค\", \"๐Ÿ”ฅ\", \"๐Ÿฅฐ\", \"๐Ÿ‘\", \"๐Ÿ˜\", \"๐Ÿค”\", \"๐Ÿคฏ\", \"๐Ÿ˜ฑ\", \"๐Ÿคฌ\", \"๐Ÿ˜ข\", \"๐ŸŽ‰\", \"๐Ÿคฉ\", \"๐Ÿคฎ\", \"๐Ÿ’ฉ\", \"๐Ÿ™\", \"๐Ÿ‘Œ\", \"๐Ÿ•Š\", \"๐Ÿคก\", \"๐Ÿฅฑ\", \"๐Ÿฅด\", \"๐Ÿ˜\", \"๐Ÿณ\", \"โคโ€๐Ÿ”ฅ\", \"๐ŸŒš\", \"๐ŸŒญ\", \"๐Ÿ’ฏ\", \"๐Ÿคฃ\", \"โšก\", \"๐ŸŒ\", \"๐Ÿ†\", \"๐Ÿ’”\", \"๐Ÿคจ\", \"๐Ÿ˜\", \"๐Ÿ“\", \"๐Ÿพ\", \"๐Ÿ’‹\", \"๐Ÿ–•\", \"๐Ÿ˜ˆ\", \"๐Ÿ˜ด\", \"๐Ÿ˜ญ\", \"๐Ÿค“\", \"๐Ÿ‘ป\", \"๐Ÿ‘จโ€๐Ÿ’ป\", \"๐Ÿ‘€\", \"๐ŸŽƒ\", \"๐Ÿ™ˆ\", \"๐Ÿ˜‡\", \"๐Ÿ˜จ\", \"๐Ÿค\", \"โœ\", \"๐Ÿค—\", \"๐Ÿซก\", \"๐ŸŽ…\", \"๐ŸŽ„\", \"โ˜ƒ\", \"๐Ÿ’…\", \"๐Ÿคช\", \"๐Ÿ—ฟ\", \"๐Ÿ†’\", \"๐Ÿ’˜\", \"๐Ÿ™‰\", \"๐Ÿฆ„\", \"๐Ÿ˜˜\", \"๐Ÿ’Š\", \"๐Ÿ™Š\", \"๐Ÿ˜Ž\", \"๐Ÿ‘พ\", \"๐Ÿคทโ€โ™‚\", \"๐Ÿคท\", \"๐Ÿคทโ€โ™€\", \"๐Ÿ˜ก\"\n", + "html_description": "Reaction emoji. Currently, it can be one of \"\"❤\"/\", \"\"👍\"/\", \"\"👎\"/\", \"\"🔥\"/\", \"\"🥰\"/\", \"\"👏\"/\", \"\"😁\"/\", \"\"🤔\"/\", \"\"🤯\"/\", \"\"😱\"/\", \"\"🤬\"/\", \"\"😢\"/\", \"\"🎉\"/\", \"\"🤩\"/\", \"\"🤮\"/\", \"\"💩\"/\", \"\"🙏\"/\", \"\"👌\"/\", \"\"🕊\"/\", \"\"🤡\"/\", \"\"🥱\"/\", \"\"🥴\"/\", \"\"😍\"/\", \"\"🐳\"/\", \"\"❤‍🔥\"/\", \"\"🌚\"/\", \"\"🌭\"/\", \"\"💯\"/\", \"\"🤣\"/\", \"\"⚡\"/\", \"\"🍌\"/\", \"\"🏆\"/\", \"\"💔\"/\", \"\"🤨\"/\", \"\"😐\"/\", \"\"🍓\"/\", \"\"🍾\"/\", \"\"💋\"/\", \"\"🖕\"/\", \"\"😈\"/\", \"\"😴\"/\", \"\"😭\"/\", \"\"🤓\"/\", \"\"👻\"/\", \"\"👨‍💻\"/\", \"\"👀\"/\", \"\"🎃\"/\", \"\"🙈\"/\", \"\"😇\"/\", \"\"😨\"/\", \"\"🤝\"/\", \"\"✍\"/\", \"\"🤗\"/\", \"\"🫡\"/\", \"\"🎅\"/\", \"\"🎄\"/\", \"\"☃\"/\", \"\"💅\"/\", \"\"🤪\"/\", \"\"🗿\"/\", \"\"🆒\"/\", \"\"💘\"/\", \"\"🙉\"/\", \"\"🦄\"/\", \"\"😘\"/\", \"\"💊\"/\", \"\"🙊\"/\", \"\"😎\"/\", \"\"👾\"/\", \"\"🤷‍♂\"/\", \"\"🤷\"/\", \"\"🤷‍♀\"/\", \"\"😡\"/\"", + "rst_description": "Reaction emoji. Currently, it can be one of \"โค\", \"๐Ÿ‘\", \"๐Ÿ‘Ž\", \"๐Ÿ”ฅ\", \"๐Ÿฅฐ\", \"๐Ÿ‘\", \"๐Ÿ˜\", \"๐Ÿค”\", \"๐Ÿคฏ\", \"๐Ÿ˜ฑ\", \"๐Ÿคฌ\", \"๐Ÿ˜ข\", \"๐ŸŽ‰\", \"๐Ÿคฉ\", \"๐Ÿคฎ\", \"๐Ÿ’ฉ\", \"๐Ÿ™\", \"๐Ÿ‘Œ\", \"๐Ÿ•Š\", \"๐Ÿคก\", \"๐Ÿฅฑ\", \"๐Ÿฅด\", \"๐Ÿ˜\", \"๐Ÿณ\", \"โคโ€๐Ÿ”ฅ\", \"๐ŸŒš\", \"๐ŸŒญ\", \"๐Ÿ’ฏ\", \"๐Ÿคฃ\", \"โšก\", \"๐ŸŒ\", \"๐Ÿ†\", \"๐Ÿ’”\", \"๐Ÿคจ\", \"๐Ÿ˜\", \"๐Ÿ“\", \"๐Ÿพ\", \"๐Ÿ’‹\", \"๐Ÿ–•\", \"๐Ÿ˜ˆ\", \"๐Ÿ˜ด\", \"๐Ÿ˜ญ\", \"๐Ÿค“\", \"๐Ÿ‘ป\", \"๐Ÿ‘จโ€๐Ÿ’ป\", \"๐Ÿ‘€\", \"๐ŸŽƒ\", \"๐Ÿ™ˆ\", \"๐Ÿ˜‡\", \"๐Ÿ˜จ\", \"๐Ÿค\", \"โœ\", \"๐Ÿค—\", \"๐Ÿซก\", \"๐ŸŽ…\", \"๐ŸŽ„\", \"โ˜ƒ\", \"๐Ÿ’…\", \"๐Ÿคช\", \"๐Ÿ—ฟ\", \"๐Ÿ†’\", \"๐Ÿ’˜\", \"๐Ÿ™‰\", \"๐Ÿฆ„\", \"๐Ÿ˜˜\", \"๐Ÿ’Š\", \"๐Ÿ™Š\", \"๐Ÿ˜Ž\", \"๐Ÿ‘พ\", \"๐Ÿคทโ€โ™‚\", \"๐Ÿคท\", \"๐Ÿคทโ€โ™€\", \"๐Ÿ˜ก\"\n", "name": "emoji", "required": true } @@ -7195,8 +7521,8 @@ { "type": "True", "description": "True, if the gift can be upgraded to a unique gift", - "html_description": "Optional. True, if the gift can be upgraded to a unique gift", - "rst_description": "*Optional*. True, if the gift can be upgraded to a unique gift\n", + "html_description": "Optional. True, if the gift can be upgraded to a unique gift", + "rst_description": "*Optional*. :code:`True`, if the gift can be upgraded to a unique gift\n", "name": "can_be_upgraded", "required": false }, @@ -7219,8 +7545,8 @@ { "type": "True", "description": "True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", - "html_description": "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", - "rst_description": "*Optional*. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them\n", + "html_description": "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", + "rst_description": "*Optional*. :code:`True`, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them\n", "name": "is_private", "required": false } @@ -7244,12 +7570,20 @@ }, { "type": "String", - "description": "Origin of the gift. Currently, either 'upgrade' or 'transfer'", - "html_description": "Origin of the gift. Currently, either “upgrade” or “transfer”", - "rst_description": "Origin of the gift. Currently, either 'upgrade' or 'transfer'\n", + "description": "Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, or 'resale' for gifts bought from other users", + "html_description": "Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, or “resale” for gifts bought from other users", + "rst_description": "Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, or 'resale' for gifts bought from other users\n", "name": "origin", "required": true }, + { + "type": "Integer", + "description": "For gifts bought from other users, the price paid for the gift", + "html_description": "Optional. For gifts bought from other users, the price paid for the gift", + "rst_description": "*Optional*. For gifts bought from other users, the price paid for the gift\n", + "name": "last_resale_star_count", + "required": false + }, { "type": "String", "description": "Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts", @@ -7265,6 +7599,14 @@ "rst_description": "*Optional*. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift\n", "name": "transfer_star_count", "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "html_description": "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now\n", + "name": "next_transfer_date", + "required": false } ], "category": "types" @@ -7344,32 +7686,32 @@ { "type": "True", "description": "True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", - "html_description": "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", - "rst_description": "*Optional*. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them\n", + "html_description": "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", + "rst_description": "*Optional*. :code:`True`, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them\n", "name": "is_private", "required": false }, { "type": "True", "description": "True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", - "html_description": "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", - "rst_description": "*Optional*. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only\n", + "html_description": "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only\n", "name": "is_saved", "required": false }, { "type": "True", "description": "True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only", - "html_description": "Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only", - "rst_description": "*Optional*. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only\n", + "html_description": "Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only\n", "name": "can_be_upgraded", "required": false }, { "type": "True", "description": "True, if the gift was refunded and isn't available anymore", - "html_description": "Optional. True, if the gift was refunded and isn't available anymore", - "rst_description": "*Optional*. True, if the gift was refunded and isn't available anymore\n", + "html_description": "Optional. True, if the gift was refunded and isn't available anymore", + "rst_description": "*Optional*. :code:`True`, if the gift was refunded and isn't available anymore\n", "name": "was_refunded", "required": false }, @@ -7442,16 +7784,16 @@ { "type": "True", "description": "True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", - "html_description": "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", - "rst_description": "*Optional*. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only\n", + "html_description": "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only\n", "name": "is_saved", "required": false }, { "type": "True", "description": "True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only", - "html_description": "Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only", - "rst_description": "*Optional*. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only\n", + "html_description": "Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only\n", "name": "can_be_transferred", "required": false }, @@ -7462,6 +7804,14 @@ "rst_description": "*Optional*. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift\n", "name": "transfer_star_count", "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "html_description": "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now\n", + "name": "next_transfer_date", + "required": false } ], "category": "types" @@ -7510,32 +7860,32 @@ { "type": "Boolean", "description": "True, if unlimited regular gifts are accepted", - "html_description": "True, if unlimited regular gifts are accepted", - "rst_description": "True, if unlimited regular gifts are accepted\n", + "html_description": "True, if unlimited regular gifts are accepted", + "rst_description": ":code:`True`, if unlimited regular gifts are accepted\n", "name": "unlimited_gifts", "required": true }, { "type": "Boolean", "description": "True, if limited regular gifts are accepted", - "html_description": "True, if limited regular gifts are accepted", - "rst_description": "True, if limited regular gifts are accepted\n", + "html_description": "True, if limited regular gifts are accepted", + "rst_description": ":code:`True`, if limited regular gifts are accepted\n", "name": "limited_gifts", "required": true }, { "type": "Boolean", "description": "True, if unique gifts or gifts that can be upgraded to unique for free are accepted", - "html_description": "True, if unique gifts or gifts that can be upgraded to unique for free are accepted", - "rst_description": "True, if unique gifts or gifts that can be upgraded to unique for free are accepted\n", + "html_description": "True, if unique gifts or gifts that can be upgraded to unique for free are accepted", + "rst_description": ":code:`True`, if unique gifts or gifts that can be upgraded to unique for free are accepted\n", "name": "unique_gifts", "required": true }, { "type": "Boolean", "description": "True, if a Telegram Premium subscription is accepted", - "html_description": "True, if a Telegram Premium subscription is accepted", - "rst_description": "True, if a Telegram Premium subscription is accepted\n", + "html_description": "True, if a Telegram Premium subscription is accepted", + "rst_description": ":code:`True`, if a Telegram Premium subscription is accepted\n", "name": "premium_subscription", "required": true } @@ -7997,8 +8347,8 @@ { "type": "True", "description": "True, if the giveaway was completed, but there was no user to win the prize", - "html_description": "Optional. True, if the giveaway was completed, but there was no user to win the prize", - "rst_description": "*Optional*. True, if the giveaway was completed, but there was no user to win the prize\n", + "html_description": "Optional. True, if the giveaway was completed, but there was no user to win the prize", + "rst_description": "*Optional*. :code:`True`, if the giveaway was completed, but there was no user to win the prize\n", "name": "is_unclaimed", "required": false } @@ -8143,112 +8493,112 @@ { "type": "True", "description": "True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours", - "html_description": "Optional. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours", - "rst_description": "*Optional*. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours\n", + "html_description": "Optional. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours", + "rst_description": "*Optional*. :code:`True`, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours\n", "name": "can_reply", "required": false }, { "type": "True", "description": "True, if the bot can mark incoming private messages as read", - "html_description": "Optional. True, if the bot can mark incoming private messages as read", - "rst_description": "*Optional*. True, if the bot can mark incoming private messages as read\n", + "html_description": "Optional. True, if the bot can mark incoming private messages as read", + "rst_description": "*Optional*. :code:`True`, if the bot can mark incoming private messages as read\n", "name": "can_read_messages", "required": false }, { "type": "True", "description": "True, if the bot can delete messages sent by the bot", - "html_description": "Optional. True, if the bot can delete messages sent by the bot", - "rst_description": "*Optional*. True, if the bot can delete messages sent by the bot\n", - "name": "can_delete_outgoing_messages", + "html_description": "Optional. True, if the bot can delete messages sent by the bot", + "rst_description": "*Optional*. :code:`True`, if the bot can delete messages sent by the bot\n", + "name": "can_delete_sent_messages", "required": false }, { "type": "True", "description": "True, if the bot can delete all private messages in managed chats", - "html_description": "Optional. True, if the bot can delete all private messages in managed chats", - "rst_description": "*Optional*. True, if the bot can delete all private messages in managed chats\n", + "html_description": "Optional. True, if the bot can delete all private messages in managed chats", + "rst_description": "*Optional*. :code:`True`, if the bot can delete all private messages in managed chats\n", "name": "can_delete_all_messages", "required": false }, { "type": "True", "description": "True, if the bot can edit the first and last name of the business account", - "html_description": "Optional. True, if the bot can edit the first and last name of the business account", - "rst_description": "*Optional*. True, if the bot can edit the first and last name of the business account\n", + "html_description": "Optional. True, if the bot can edit the first and last name of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can edit the first and last name of the business account\n", "name": "can_edit_name", "required": false }, { "type": "True", "description": "True, if the bot can edit the bio of the business account", - "html_description": "Optional. True, if the bot can edit the bio of the business account", - "rst_description": "*Optional*. True, if the bot can edit the bio of the business account\n", + "html_description": "Optional. True, if the bot can edit the bio of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can edit the bio of the business account\n", "name": "can_edit_bio", "required": false }, { "type": "True", "description": "True, if the bot can edit the profile photo of the business account", - "html_description": "Optional. True, if the bot can edit the profile photo of the business account", - "rst_description": "*Optional*. True, if the bot can edit the profile photo of the business account\n", + "html_description": "Optional. True, if the bot can edit the profile photo of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can edit the profile photo of the business account\n", "name": "can_edit_profile_photo", "required": false }, { "type": "True", "description": "True, if the bot can edit the username of the business account", - "html_description": "Optional. True, if the bot can edit the username of the business account", - "rst_description": "*Optional*. True, if the bot can edit the username of the business account\n", + "html_description": "Optional. True, if the bot can edit the username of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can edit the username of the business account\n", "name": "can_edit_username", "required": false }, { "type": "True", "description": "True, if the bot can change the privacy settings pertaining to gifts for the business account", - "html_description": "Optional. True, if the bot can change the privacy settings pertaining to gifts for the business account", - "rst_description": "*Optional*. True, if the bot can change the privacy settings pertaining to gifts for the business account\n", + "html_description": "Optional. True, if the bot can change the privacy settings pertaining to gifts for the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can change the privacy settings pertaining to gifts for the business account\n", "name": "can_change_gift_settings", "required": false }, { "type": "True", "description": "True, if the bot can view gifts and the amount of Telegram Stars owned by the business account", - "html_description": "Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account", - "rst_description": "*Optional*. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account\n", + "html_description": "Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can view gifts and the amount of Telegram Stars owned by the business account\n", "name": "can_view_gifts_and_stars", "required": false }, { "type": "True", "description": "True, if the bot can convert regular gifts owned by the business account to Telegram Stars", - "html_description": "Optional. True, if the bot can convert regular gifts owned by the business account to Telegram Stars", - "rst_description": "*Optional*. True, if the bot can convert regular gifts owned by the business account to Telegram Stars\n", + "html_description": "Optional. True, if the bot can convert regular gifts owned by the business account to Telegram Stars", + "rst_description": "*Optional*. :code:`True`, if the bot can convert regular gifts owned by the business account to Telegram Stars\n", "name": "can_convert_gifts_to_stars", "required": false }, { "type": "True", "description": "True, if the bot can transfer and upgrade gifts owned by the business account", - "html_description": "Optional. True, if the bot can transfer and upgrade gifts owned by the business account", - "rst_description": "*Optional*. True, if the bot can transfer and upgrade gifts owned by the business account\n", + "html_description": "Optional. True, if the bot can transfer and upgrade gifts owned by the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can transfer and upgrade gifts owned by the business account\n", "name": "can_transfer_and_upgrade_gifts", "required": false }, { "type": "True", "description": "True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts", - "html_description": "Optional. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts", - "rst_description": "*Optional*. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts\n", + "html_description": "Optional. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts", + "rst_description": "*Optional*. :code:`True`, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts\n", "name": "can_transfer_stars", "required": false }, { "type": "True", "description": "True, if the bot can post, edit and delete stories on behalf of the business account", - "html_description": "Optional. True, if the bot can post, edit and delete stories on behalf of the business account", - "rst_description": "*Optional*. True, if the bot can post, edit and delete stories on behalf of the business account\n", + "html_description": "Optional. True, if the bot can post, edit and delete stories on behalf of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can post, edit and delete stories on behalf of the business account\n", "name": "can_manage_stories", "required": false } @@ -8305,8 +8655,8 @@ { "type": "Boolean", "description": "True, if the connection is active", - "html_description": "True, if the connection is active", - "rst_description": "True, if the connection is active\n", + "html_description": "True, if the connection is active", + "rst_description": ":code:`True`, if the connection is active\n", "name": "is_enabled", "required": true } @@ -8960,9 +9310,9 @@ "annotations": [ { "type": "String", - "description": "Type of the profile photo, must be 'static'", - "html_description": "Type of the profile photo, must be “static”", - "rst_description": "Type of the profile photo, must be 'static'\n", + "description": "Type of the profile photo, must be static", + "html_description": "Type of the profile photo, must be static", + "rst_description": "Type of the profile photo, must be *static*\n", "name": "type", "required": true }, @@ -8986,9 +9336,9 @@ "annotations": [ { "type": "String", - "description": "Type of the profile photo, must be 'animated'", - "html_description": "Type of the profile photo, must be “animated”", - "rst_description": "Type of the profile photo, must be 'animated'\n", + "description": "Type of the profile photo, must be animated", + "html_description": "Type of the profile photo, must be animated", + "rst_description": "Type of the profile photo, must be *animated*\n", "name": "type", "required": true }, @@ -9029,9 +9379,9 @@ "annotations": [ { "type": "String", - "description": "Type of the content, must be 'photo'", - "html_description": "Type of the content, must be “photo”", - "rst_description": "Type of the content, must be 'photo'\n", + "description": "Type of the content, must be photo", + "html_description": "Type of the content, must be photo", + "rst_description": "Type of the content, must be *photo*\n", "name": "type", "required": true }, @@ -9055,9 +9405,9 @@ "annotations": [ { "type": "String", - "description": "Type of the content, must be 'video'", - "html_description": "Type of the content, must be “video”", - "rst_description": "Type of the content, must be 'video'\n", + "description": "Type of the content, must be video", + "html_description": "Type of the content, must be video", + "rst_description": "Type of the content, must be *video*\n", "name": "type", "required": true }, @@ -11198,9 +11548,9 @@ { "type": "Array of InputPollOption", "required": true, - "description": "A JSON-serialized list of 2-10 answer options", - "html_description": "A JSON-serialized list of 2-10 answer options", - "rst_description": "A JSON-serialized list of 2-10 answer options\n", + "description": "A JSON-serialized list of 2-12 answer options", + "html_description": "A JSON-serialized list of 2-12 answer options", + "rst_description": "A JSON-serialized list of 2-12 answer options\n", "name": "options" }, { @@ -11334,6 +11684,80 @@ ], "category": "methods" }, + { + "anchor": "sendchecklist", + "name": "sendChecklist", + "description": "Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned.", + "html_description": "

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

", + "rst_description": "Use this method to send a checklist on behalf of a connected business account. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent", + "html_description": "Unique identifier of the business connection on behalf of which the message will be sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target chat", + "html_description": "Unique identifier for the target chat", + "rst_description": "Unique identifier for the target chat\n", + "name": "chat_id" + }, + { + "type": "InputChecklist", + "required": true, + "description": "A JSON-serialized object for the checklist to send", + "html_description": "A JSON-serialized object for the checklist to send", + "rst_description": "A JSON-serialized object for the checklist to send\n", + "name": "checklist" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message silently. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "String", + "required": false, + "description": "Unique identifier of the message effect to be added to the message", + "html_description": "Unique identifier of the message effect to be added to the message", + "rst_description": "Unique identifier of the message effect to be added to the message\n", + "name": "message_effect_id" + }, + { + "type": "ReplyParameters", + "required": false, + "description": "A JSON-serialized object for description of the message to reply to", + "html_description": "A JSON-serialized object for description of the message to reply to", + "rst_description": "A JSON-serialized object for description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard", + "html_description": "A JSON-serialized object for an inline keyboard", + "rst_description": "A JSON-serialized object for an inline keyboard\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, { "anchor": "senddice", "name": "sendDice", @@ -11754,9 +12178,9 @@ { "type": "Boolean", "required": false, - "description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "html_description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "rst_description": "Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.\n", + "description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "html_description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "rst_description": "Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.\n", "name": "can_manage_chat" }, { @@ -11834,9 +12258,9 @@ { "type": "Boolean", "required": false, - "description": "Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only", - "html_description": "Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only", - "rst_description": "Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only\n", + "description": "Pass True if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "html_description": "Pass True if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "rst_description": "Pass :code:`True` if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only\n", "name": "can_post_messages" }, { @@ -13688,6 +14112,56 @@ ], "category": "methods" }, + { + "anchor": "editmessagechecklist", + "name": "editMessageChecklist", + "description": "Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.", + "html_description": "

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

", + "rst_description": "Use this method to edit a checklist on behalf of a connected business account. On success, the edited :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent", + "html_description": "Unique identifier of the business connection on behalf of which the message will be sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target chat", + "html_description": "Unique identifier for the target chat", + "rst_description": "Unique identifier for the target chat\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target message", + "html_description": "Unique identifier for the target message", + "rst_description": "Unique identifier for the target message\n", + "name": "message_id" + }, + { + "type": "InputChecklist", + "required": true, + "description": "A JSON-serialized object for the new checklist", + "html_description": "A JSON-serialized object for the new checklist", + "rst_description": "A JSON-serialized object for the new checklist\n", + "name": "checklist" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for the new inline keyboard for the message", + "html_description": "A JSON-serialized object for the new inline keyboard for the message", + "rst_description": "A JSON-serialized object for the new inline keyboard for the message\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, { "anchor": "editmessagereplymarkup", "name": "editMessageReplyMarkup", @@ -14090,9 +14564,9 @@ { "anchor": "deletebusinessmessages", "name": "deleteBusinessMessages", - "description": "Delete messages on behalf of a business account. Requires the can_delete_outgoing_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.", - "html_description": "

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

", - "rst_description": "Delete messages on behalf of a business account. Requires the *can_delete_outgoing_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success.", + "description": "Delete messages on behalf of a business account. Requires the can_delete_sent_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.", + "html_description": "

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

", + "rst_description": "Delete messages on behalf of a business account. Requires the *can_delete_sent_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success.", "annotations": [ { "type": "String", @@ -14226,8 +14700,8 @@ "type": "Boolean", "required": false, "description": "Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.", - "html_description": "Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.", - "rst_description": "Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.\n", + "html_description": "Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.", + "rst_description": "Pass :code:`True` to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.\n", "name": "is_public" } ], @@ -14252,8 +14726,8 @@ "type": "Boolean", "required": false, "description": "Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.", - "html_description": "Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.", - "rst_description": "Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.\n", + "html_description": "Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.", + "rst_description": "Pass :code:`True` to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.\n", "name": "is_public" } ], @@ -14278,8 +14752,8 @@ "type": "Boolean", "required": true, "description": "Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field", - "html_description": "Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field", - "rst_description": "Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field\n", + "html_description": "Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field", + "rst_description": "Pass :code:`True`, if a button for sending a gift to the user or by the business account must always be shown in the input field\n", "name": "show_gift_button" }, { @@ -14356,48 +14830,48 @@ "type": "Boolean", "required": false, "description": "Pass True to exclude gifts that aren't saved to the account's profile page", - "html_description": "Pass True to exclude gifts that aren't saved to the account's profile page", - "rst_description": "Pass True to exclude gifts that aren't saved to the account's profile page\n", + "html_description": "Pass True to exclude gifts that aren't saved to the account's profile page", + "rst_description": "Pass :code:`True` to exclude gifts that aren't saved to the account's profile page\n", "name": "exclude_unsaved" }, { "type": "Boolean", "required": false, "description": "Pass True to exclude gifts that are saved to the account's profile page", - "html_description": "Pass True to exclude gifts that are saved to the account's profile page", - "rst_description": "Pass True to exclude gifts that are saved to the account's profile page\n", + "html_description": "Pass True to exclude gifts that are saved to the account's profile page", + "rst_description": "Pass :code:`True` to exclude gifts that are saved to the account's profile page\n", "name": "exclude_saved" }, { "type": "Boolean", "required": false, "description": "Pass True to exclude gifts that can be purchased an unlimited number of times", - "html_description": "Pass True to exclude gifts that can be purchased an unlimited number of times", - "rst_description": "Pass True to exclude gifts that can be purchased an unlimited number of times\n", + "html_description": "Pass True to exclude gifts that can be purchased an unlimited number of times", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times\n", "name": "exclude_unlimited" }, { "type": "Boolean", "required": false, "description": "Pass True to exclude gifts that can be purchased a limited number of times", - "html_description": "Pass True to exclude gifts that can be purchased a limited number of times", - "rst_description": "Pass True to exclude gifts that can be purchased a limited number of times\n", + "html_description": "Pass True to exclude gifts that can be purchased a limited number of times", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times\n", "name": "exclude_limited" }, { "type": "Boolean", "required": false, "description": "Pass True to exclude unique gifts", - "html_description": "Pass True to exclude unique gifts", - "rst_description": "Pass True to exclude unique gifts\n", + "html_description": "Pass True to exclude unique gifts", + "rst_description": "Pass :code:`True` to exclude unique gifts\n", "name": "exclude_unique" }, { "type": "Boolean", "required": false, "description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", - "html_description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", - "rst_description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.\n", + "html_description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", + "rst_description": "Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.\n", "name": "sort_by_price" }, { @@ -14472,8 +14946,8 @@ "type": "Boolean", "required": false, "description": "Pass True to keep the original gift text, sender and receiver in the upgraded gift", - "html_description": "Pass True to keep the original gift text, sender and receiver in the upgraded gift", - "rst_description": "Pass True to keep the original gift text, sender and receiver in the upgraded gift\n", + "html_description": "Pass True to keep the original gift text, sender and receiver in the upgraded gift", + "rst_description": "Pass :code:`True` to keep the original gift text, sender and receiver in the upgraded gift\n", "name": "keep_original_details" }, { @@ -18752,6 +19226,15 @@ ], "category": "methods" }, + { + "anchor": "getmystarbalance", + "name": "getMyStarBalance", + "description": "A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a StarAmount object.", + "html_description": "

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

", + "rst_description": "A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a :class:`aiogram.types.star_amount.StarAmount` object.", + "annotations": [], + "category": "methods" + }, { "anchor": "getstartransactions", "name": "getStarTransactions", @@ -19090,16 +19573,16 @@ { "type": "True", "description": "True, if the payment is a recurring payment for a subscription", - "html_description": "Optional. True, if the payment is a recurring payment for a subscription", - "rst_description": "*Optional*. True, if the payment is a recurring payment for a subscription\n", + "html_description": "Optional. True, if the payment is a recurring payment for a subscription", + "rst_description": "*Optional*. :code:`True`, if the payment is a recurring payment for a subscription\n", "name": "is_recurring", "required": false }, { "type": "True", "description": "True, if the payment is the first payment for a subscription", - "html_description": "Optional. True, if the payment is the first payment for a subscription", - "rst_description": "*Optional*. True, if the payment is the first payment for a subscription\n", + "html_description": "Optional. True, if the payment is the first payment for a subscription", + "rst_description": "*Optional*. :code:`True`, if the payment is the first payment for a subscription\n", "name": "is_first_recurring", "required": false }, diff --git a/.butcher/types/AcceptedGiftTypes/entity.json b/.butcher/types/AcceptedGiftTypes/entity.json index 982a27d2..705f4f65 100644 --- a/.butcher/types/AcceptedGiftTypes/entity.json +++ b/.butcher/types/AcceptedGiftTypes/entity.json @@ -14,32 +14,32 @@ { "type": "Boolean", "description": "True, if unlimited regular gifts are accepted", - "html_description": "True, if unlimited regular gifts are accepted", - "rst_description": "True, if unlimited regular gifts are accepted\n", + "html_description": "True, if unlimited regular gifts are accepted", + "rst_description": ":code:`True`, if unlimited regular gifts are accepted\n", "name": "unlimited_gifts", "required": true }, { "type": "Boolean", "description": "True, if limited regular gifts are accepted", - "html_description": "True, if limited regular gifts are accepted", - "rst_description": "True, if limited regular gifts are accepted\n", + "html_description": "True, if limited regular gifts are accepted", + "rst_description": ":code:`True`, if limited regular gifts are accepted\n", "name": "limited_gifts", "required": true }, { "type": "Boolean", "description": "True, if unique gifts or gifts that can be upgraded to unique for free are accepted", - "html_description": "True, if unique gifts or gifts that can be upgraded to unique for free are accepted", - "rst_description": "True, if unique gifts or gifts that can be upgraded to unique for free are accepted\n", + "html_description": "True, if unique gifts or gifts that can be upgraded to unique for free are accepted", + "rst_description": ":code:`True`, if unique gifts or gifts that can be upgraded to unique for free are accepted\n", "name": "unique_gifts", "required": true }, { "type": "Boolean", "description": "True, if a Telegram Premium subscription is accepted", - "html_description": "True, if a Telegram Premium subscription is accepted", - "rst_description": "True, if a Telegram Premium subscription is accepted\n", + "html_description": "True, if a Telegram Premium subscription is accepted", + "rst_description": ":code:`True`, if a Telegram Premium subscription is accepted\n", "name": "premium_subscription", "required": true } diff --git a/.butcher/types/BusinessBotRights/entity.json b/.butcher/types/BusinessBotRights/entity.json index 79e9e77d..7dc99a03 100644 --- a/.butcher/types/BusinessBotRights/entity.json +++ b/.butcher/types/BusinessBotRights/entity.json @@ -14,114 +14,126 @@ { "type": "True", "description": "True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours", - "html_description": "Optional. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours", - "rst_description": "*Optional*. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours\n", + "html_description": "Optional. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours", + "rst_description": "*Optional*. :code:`True`, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours\n", "name": "can_reply", "required": false }, { "type": "True", "description": "True, if the bot can mark incoming private messages as read", - "html_description": "Optional. True, if the bot can mark incoming private messages as read", - "rst_description": "*Optional*. True, if the bot can mark incoming private messages as read\n", + "html_description": "Optional. True, if the bot can mark incoming private messages as read", + "rst_description": "*Optional*. :code:`True`, if the bot can mark incoming private messages as read\n", "name": "can_read_messages", "required": false }, + { + "type": "True", + "description": "True, if the bot can delete messages sent by the bot", + "html_description": "Optional. True, if the bot can delete messages sent by the bot", + "rst_description": "*Optional*. :code:`True`, if the bot can delete messages sent by the bot\n", + "name": "can_delete_sent_messages", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can delete all private messages in managed chats", + "html_description": "Optional. True, if the bot can delete all private messages in managed chats", + "rst_description": "*Optional*. :code:`True`, if the bot can delete all private messages in managed chats\n", + "name": "can_delete_all_messages", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can edit the first and last name of the business account", + "html_description": "Optional. True, if the bot can edit the first and last name of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can edit the first and last name of the business account\n", + "name": "can_edit_name", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can edit the bio of the business account", + "html_description": "Optional. True, if the bot can edit the bio of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can edit the bio of the business account\n", + "name": "can_edit_bio", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can edit the profile photo of the business account", + "html_description": "Optional. True, if the bot can edit the profile photo of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can edit the profile photo of the business account\n", + "name": "can_edit_profile_photo", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can edit the username of the business account", + "html_description": "Optional. True, if the bot can edit the username of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can edit the username of the business account\n", + "name": "can_edit_username", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can change the privacy settings pertaining to gifts for the business account", + "html_description": "Optional. True, if the bot can change the privacy settings pertaining to gifts for the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can change the privacy settings pertaining to gifts for the business account\n", + "name": "can_change_gift_settings", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can view gifts and the amount of Telegram Stars owned by the business account", + "html_description": "Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can view gifts and the amount of Telegram Stars owned by the business account\n", + "name": "can_view_gifts_and_stars", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can convert regular gifts owned by the business account to Telegram Stars", + "html_description": "Optional. True, if the bot can convert regular gifts owned by the business account to Telegram Stars", + "rst_description": "*Optional*. :code:`True`, if the bot can convert regular gifts owned by the business account to Telegram Stars\n", + "name": "can_convert_gifts_to_stars", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can transfer and upgrade gifts owned by the business account", + "html_description": "Optional. True, if the bot can transfer and upgrade gifts owned by the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can transfer and upgrade gifts owned by the business account\n", + "name": "can_transfer_and_upgrade_gifts", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts", + "html_description": "Optional. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts", + "rst_description": "*Optional*. :code:`True`, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts\n", + "name": "can_transfer_stars", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can post, edit and delete stories on behalf of the business account", + "html_description": "Optional. True, if the bot can post, edit and delete stories on behalf of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can post, edit and delete stories on behalf of the business account\n", + "name": "can_manage_stories", + "required": false + }, { "type": "True", "description": "True, if the bot can delete messages sent by the bot", "html_description": "Optional. True, if the bot can delete messages sent by the bot", "rst_description": "*Optional*. True, if the bot can delete messages sent by the bot\n", "name": "can_delete_outgoing_messages", - "required": false - }, - { - "type": "True", - "description": "True, if the bot can delete all private messages in managed chats", - "html_description": "Optional. True, if the bot can delete all private messages in managed chats", - "rst_description": "*Optional*. True, if the bot can delete all private messages in managed chats\n", - "name": "can_delete_all_messages", - "required": false - }, - { - "type": "True", - "description": "True, if the bot can edit the first and last name of the business account", - "html_description": "Optional. True, if the bot can edit the first and last name of the business account", - "rst_description": "*Optional*. True, if the bot can edit the first and last name of the business account\n", - "name": "can_edit_name", - "required": false - }, - { - "type": "True", - "description": "True, if the bot can edit the bio of the business account", - "html_description": "Optional. True, if the bot can edit the bio of the business account", - "rst_description": "*Optional*. True, if the bot can edit the bio of the business account\n", - "name": "can_edit_bio", - "required": false - }, - { - "type": "True", - "description": "True, if the bot can edit the profile photo of the business account", - "html_description": "Optional. True, if the bot can edit the profile photo of the business account", - "rst_description": "*Optional*. True, if the bot can edit the profile photo of the business account\n", - "name": "can_edit_profile_photo", - "required": false - }, - { - "type": "True", - "description": "True, if the bot can edit the username of the business account", - "html_description": "Optional. True, if the bot can edit the username of the business account", - "rst_description": "*Optional*. True, if the bot can edit the username of the business account\n", - "name": "can_edit_username", - "required": false - }, - { - "type": "True", - "description": "True, if the bot can change the privacy settings pertaining to gifts for the business account", - "html_description": "Optional. True, if the bot can change the privacy settings pertaining to gifts for the business account", - "rst_description": "*Optional*. True, if the bot can change the privacy settings pertaining to gifts for the business account\n", - "name": "can_change_gift_settings", - "required": false - }, - { - "type": "True", - "description": "True, if the bot can view gifts and the amount of Telegram Stars owned by the business account", - "html_description": "Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account", - "rst_description": "*Optional*. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account\n", - "name": "can_view_gifts_and_stars", - "required": false - }, - { - "type": "True", - "description": "True, if the bot can convert regular gifts owned by the business account to Telegram Stars", - "html_description": "Optional. True, if the bot can convert regular gifts owned by the business account to Telegram Stars", - "rst_description": "*Optional*. True, if the bot can convert regular gifts owned by the business account to Telegram Stars\n", - "name": "can_convert_gifts_to_stars", - "required": false - }, - { - "type": "True", - "description": "True, if the bot can transfer and upgrade gifts owned by the business account", - "html_description": "Optional. True, if the bot can transfer and upgrade gifts owned by the business account", - "rst_description": "*Optional*. True, if the bot can transfer and upgrade gifts owned by the business account\n", - "name": "can_transfer_and_upgrade_gifts", - "required": false - }, - { - "type": "True", - "description": "True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts", - "html_description": "Optional. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts", - "rst_description": "*Optional*. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts\n", - "name": "can_transfer_stars", - "required": false - }, - { - "type": "True", - "description": "True, if the bot can post, edit and delete stories on behalf of the business account", - "html_description": "Optional. True, if the bot can post, edit and delete stories on behalf of the business account", - "rst_description": "*Optional*. True, if the bot can post, edit and delete stories on behalf of the business account\n", - "name": "can_manage_stories", - "required": false + "required": false, + "deprecated": { + "version": "9.1", + "release_date": "2025-07-03" + } } ], "category": "types" diff --git a/.butcher/types/BusinessConnection/entity.json b/.butcher/types/BusinessConnection/entity.json index 1f8f9402..1eeec3df 100644 --- a/.butcher/types/BusinessConnection/entity.json +++ b/.butcher/types/BusinessConnection/entity.json @@ -54,8 +54,8 @@ { "type": "Boolean", "description": "True, if the connection is active", - "html_description": "True, if the connection is active", - "rst_description": "True, if the connection is active\n", + "html_description": "True, if the connection is active", + "rst_description": ":code:`True`, if the connection is active\n", "name": "is_enabled", "required": true }, diff --git a/.butcher/types/ChatAdministratorRights/entity.json b/.butcher/types/ChatAdministratorRights/entity.json index 21f5e36c..77e09e49 100644 --- a/.butcher/types/ChatAdministratorRights/entity.json +++ b/.butcher/types/ChatAdministratorRights/entity.json @@ -21,9 +21,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "html_description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.\n", + "description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "html_description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.\n", "name": "can_manage_chat", "required": true }, @@ -101,9 +101,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can post messages in the channel, or access channel statistics; for channels only", - "html_description": "Optional. True, if the administrator can post messages in the channel, or access channel statistics; for channels only", - "rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only\n", + "description": "True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "html_description": "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only\n", "name": "can_post_messages", "required": false }, diff --git a/.butcher/types/ChatBoostSourceGiveaway/entity.json b/.butcher/types/ChatBoostSourceGiveaway/entity.json index a530eaf0..f6850a07 100644 --- a/.butcher/types/ChatBoostSourceGiveaway/entity.json +++ b/.butcher/types/ChatBoostSourceGiveaway/entity.json @@ -46,8 +46,8 @@ { "type": "True", "description": "True, if the giveaway was completed, but there was no user to win the prize", - "html_description": "Optional. True, if the giveaway was completed, but there was no user to win the prize", - "rst_description": "*Optional*. True, if the giveaway was completed, but there was no user to win the prize\n", + "html_description": "Optional. True, if the giveaway was completed, but there was no user to win the prize", + "rst_description": "*Optional*. :code:`True`, if the giveaway was completed, but there was no user to win the prize\n", "name": "is_unclaimed", "required": false } diff --git a/.butcher/types/ChatMemberAdministrator/entity.json b/.butcher/types/ChatMemberAdministrator/entity.json index f217b3fe..2e14b4ce 100644 --- a/.butcher/types/ChatMemberAdministrator/entity.json +++ b/.butcher/types/ChatMemberAdministrator/entity.json @@ -45,9 +45,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "html_description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.\n", + "description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "html_description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.\n", "name": "can_manage_chat", "required": true }, @@ -125,9 +125,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can post messages in the channel, or access channel statistics; for channels only", - "html_description": "Optional. True, if the administrator can post messages in the channel, or access channel statistics; for channels only", - "rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only\n", + "description": "True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "html_description": "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only\n", "name": "can_post_messages", "required": false }, diff --git a/.butcher/types/ChatMemberRestricted/entity.json b/.butcher/types/ChatMemberRestricted/entity.json index e822ae41..75ea1fc0 100644 --- a/.butcher/types/ChatMemberRestricted/entity.json +++ b/.butcher/types/ChatMemberRestricted/entity.json @@ -93,9 +93,9 @@ }, { "type": "Boolean", - "description": "True, if the user is allowed to send polls", - "html_description": "True, if the user is allowed to send polls", - "rst_description": ":code:`True`, if the user is allowed to send polls\n", + "description": "True, if the user is allowed to send polls and checklists", + "html_description": "True, if the user is allowed to send polls and checklists", + "rst_description": ":code:`True`, if the user is allowed to send polls and checklists\n", "name": "can_send_polls", "required": true }, diff --git a/.butcher/types/ChatMemberUpdated/entity.json b/.butcher/types/ChatMemberUpdated/entity.json index e76773dc..e20b3ee6 100644 --- a/.butcher/types/ChatMemberUpdated/entity.json +++ b/.butcher/types/ChatMemberUpdated/entity.json @@ -62,16 +62,16 @@ { "type": "Boolean", "description": "True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator", - "html_description": "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator", - "rst_description": "*Optional*. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator\n", + "html_description": "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator", + "rst_description": "*Optional*. :code:`True`, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator\n", "name": "via_join_request", "required": false }, { "type": "Boolean", "description": "True, if the user joined the chat via a chat folder invite link", - "html_description": "Optional. True, if the user joined the chat via a chat folder invite link", - "rst_description": "*Optional*. True, if the user joined the chat via a chat folder invite link\n", + "html_description": "Optional. True, if the user joined the chat via a chat folder invite link", + "rst_description": "*Optional*. :code:`True`, if the user joined the chat via a chat folder invite link\n", "name": "via_chat_folder_invite_link", "required": false } diff --git a/.butcher/types/ChatPermissions/entity.json b/.butcher/types/ChatPermissions/entity.json index b3209460..c488ef9f 100644 --- a/.butcher/types/ChatPermissions/entity.json +++ b/.butcher/types/ChatPermissions/entity.json @@ -69,9 +69,9 @@ }, { "type": "Boolean", - "description": "True, if the user is allowed to send polls", - "html_description": "Optional. True, if the user is allowed to send polls", - "rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls\n", + "description": "True, if the user is allowed to send polls and checklists", + "html_description": "Optional. True, if the user is allowed to send polls and checklists", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls and checklists\n", "name": "can_send_polls", "required": false }, diff --git a/.butcher/types/Checklist/entity.json b/.butcher/types/Checklist/entity.json new file mode 100644 index 00000000..0d415f2a --- /dev/null +++ b/.butcher/types/Checklist/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "checklist", + "name": "Checklist", + "description": "Describes a checklist.", + "html_description": "

Describes a checklist.

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

Describes a task in a checklist.

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

Describes a service message about tasks added to a checklist.

", + "rst_description": "Describes a service message about tasks added to a checklist.", + "annotations": [ + { + "type": "Message", + "description": "Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "html_description": "Optional. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "rst_description": "*Optional*. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n", + "name": "checklist_message", + "required": false + }, + { + "type": "Array of ChecklistTask", + "description": "List of tasks added to the checklist", + "html_description": "List of tasks added to the checklist", + "rst_description": "List of tasks added to the checklist\n", + "name": "tasks", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChecklistTasksDone/entity.json b/.butcher/types/ChecklistTasksDone/entity.json new file mode 100644 index 00000000..73ac9e8b --- /dev/null +++ b/.butcher/types/ChecklistTasksDone/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "checklisttasksdone", + "name": "ChecklistTasksDone", + "description": "Describes a service message about checklist tasks marked as done or not done.", + "html_description": "

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

", + "rst_description": "Describes a service message about checklist tasks marked as done or not done.", + "annotations": [ + { + "type": "Message", + "description": "Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "html_description": "Optional. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "rst_description": "*Optional*. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n", + "name": "checklist_message", + "required": false + }, + { + "type": "Array of Integer", + "description": "Identifiers of the tasks that were marked as done", + "html_description": "Optional. Identifiers of the tasks that were marked as done", + "rst_description": "*Optional*. Identifiers of the tasks that were marked as done\n", + "name": "marked_as_done_task_ids", + "required": false + }, + { + "type": "Array of Integer", + "description": "Identifiers of the tasks that were marked as not done", + "html_description": "Optional. Identifiers of the tasks that were marked as not done", + "rst_description": "*Optional*. Identifiers of the tasks that were marked as not done\n", + "name": "marked_as_not_done_task_ids", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/DirectMessagePriceChanged/entity.json b/.butcher/types/DirectMessagePriceChanged/entity.json new file mode 100644 index 00000000..7652323c --- /dev/null +++ b/.butcher/types/DirectMessagePriceChanged/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "directmessagepricechanged", + "name": "DirectMessagePriceChanged", + "description": "Describes a service message about a change in the price of direct messages sent to a channel chat.", + "html_description": "

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

", + "rst_description": "Describes a service message about a change in the price of direct messages sent to a channel chat.", + "annotations": [ + { + "type": "Boolean", + "description": "True, if direct messages are enabled for the channel chat; false otherwise", + "html_description": "True, if direct messages are enabled for the channel chat; false otherwise", + "rst_description": ":code:`True`, if direct messages are enabled for the channel chat; false otherwise\n", + "name": "are_direct_messages_enabled", + "required": true + }, + { + "type": "Integer", + "description": "The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.", + "html_description": "Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.", + "rst_description": "*Optional*. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.\n", + "name": "direct_message_star_count", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ExternalReplyInfo/entity.json b/.butcher/types/ExternalReplyInfo/entity.json index 312693a3..2eb4ed5c 100644 --- a/.butcher/types/ExternalReplyInfo/entity.json +++ b/.butcher/types/ExternalReplyInfo/entity.json @@ -131,6 +131,14 @@ "name": "has_media_spoiler", "required": false }, + { + "type": "Checklist", + "description": "Message is a checklist", + "html_description": "Optional. Message is a checklist", + "rst_description": "*Optional*. Message is a checklist\n", + "name": "checklist", + "required": false + }, { "type": "Contact", "description": "Message is a shared contact, information about the contact", diff --git a/.butcher/types/GiftInfo/entity.json b/.butcher/types/GiftInfo/entity.json index 17ff33e2..03af4484 100644 --- a/.butcher/types/GiftInfo/entity.json +++ b/.butcher/types/GiftInfo/entity.json @@ -46,8 +46,8 @@ { "type": "True", "description": "True, if the gift can be upgraded to a unique gift", - "html_description": "Optional. True, if the gift can be upgraded to a unique gift", - "rst_description": "*Optional*. True, if the gift can be upgraded to a unique gift\n", + "html_description": "Optional. True, if the gift can be upgraded to a unique gift", + "rst_description": "*Optional*. :code:`True`, if the gift can be upgraded to a unique gift\n", "name": "can_be_upgraded", "required": false }, @@ -70,8 +70,8 @@ { "type": "True", "description": "True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", - "html_description": "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", - "rst_description": "*Optional*. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them\n", + "html_description": "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", + "rst_description": "*Optional*. :code:`True`, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them\n", "name": "is_private", "required": false } diff --git a/.butcher/types/InputChecklist/entity.json b/.butcher/types/InputChecklist/entity.json new file mode 100644 index 00000000..706f52dd --- /dev/null +++ b/.butcher/types/InputChecklist/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputchecklist", + "name": "InputChecklist", + "description": "Describes a checklist to create.", + "html_description": "

Describes a checklist to create.

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

Describes a task to add to a checklist.

", + "rst_description": "Describes a task to add to a checklist.", + "annotations": [ + { + "type": "Integer", + "description": "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist", + "html_description": "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist", + "rst_description": "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Text of the task; 1-100 characters after entities parsing", + "html_description": "Text of the task; 1-100 characters after entities parsing", + "rst_description": "Text of the task; 1-100 characters after entities parsing\n", + "name": "text", + "required": true + }, + { + "type": "String", + "description": "Mode for parsing entities in the text. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the text. See formatting options for more details.", + "rst_description": "Optional. Mode for parsing entities in the text. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed.", + "html_description": "Optional. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed.", + "rst_description": "*Optional*. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities are allowed.\n", + "name": "text_entities", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputProfilePhotoAnimated/entity.json b/.butcher/types/InputProfilePhotoAnimated/entity.json index 13c83d63..01083ce1 100644 --- a/.butcher/types/InputProfilePhotoAnimated/entity.json +++ b/.butcher/types/InputProfilePhotoAnimated/entity.json @@ -13,9 +13,9 @@ "annotations": [ { "type": "String", - "description": "Type of the profile photo, must be 'animated'", - "html_description": "Type of the profile photo, must be “animated”", - "rst_description": "Type of the profile photo, must be 'animated'\n", + "description": "Type of the profile photo, must be animated", + "html_description": "Type of the profile photo, must be animated", + "rst_description": "Type of the profile photo, must be *animated*\n", "name": "type", "required": true }, diff --git a/.butcher/types/InputProfilePhotoStatic/entity.json b/.butcher/types/InputProfilePhotoStatic/entity.json index 887b5589..e2eaa906 100644 --- a/.butcher/types/InputProfilePhotoStatic/entity.json +++ b/.butcher/types/InputProfilePhotoStatic/entity.json @@ -13,9 +13,9 @@ "annotations": [ { "type": "String", - "description": "Type of the profile photo, must be 'static'", - "html_description": "Type of the profile photo, must be “static”", - "rst_description": "Type of the profile photo, must be 'static'\n", + "description": "Type of the profile photo, must be static", + "html_description": "Type of the profile photo, must be static", + "rst_description": "Type of the profile photo, must be *static*\n", "name": "type", "required": true }, diff --git a/.butcher/types/InputStoryContentPhoto/entity.json b/.butcher/types/InputStoryContentPhoto/entity.json index e7eccf4e..d7829f09 100644 --- a/.butcher/types/InputStoryContentPhoto/entity.json +++ b/.butcher/types/InputStoryContentPhoto/entity.json @@ -13,9 +13,9 @@ "annotations": [ { "type": "String", - "description": "Type of the content, must be 'photo'", - "html_description": "Type of the content, must be “photo”", - "rst_description": "Type of the content, must be 'photo'\n", + "description": "Type of the content, must be photo", + "html_description": "Type of the content, must be photo", + "rst_description": "Type of the content, must be *photo*\n", "name": "type", "required": true }, diff --git a/.butcher/types/InputStoryContentVideo/entity.json b/.butcher/types/InputStoryContentVideo/entity.json index 9f4796be..182825d2 100644 --- a/.butcher/types/InputStoryContentVideo/entity.json +++ b/.butcher/types/InputStoryContentVideo/entity.json @@ -13,9 +13,9 @@ "annotations": [ { "type": "String", - "description": "Type of the content, must be 'video'", - "html_description": "Type of the content, must be “video”", - "rst_description": "Type of the content, must be 'video'\n", + "description": "Type of the content, must be video", + "html_description": "Type of the content, must be video", + "rst_description": "Type of the content, must be *video*\n", "name": "type", "required": true }, diff --git a/.butcher/types/Message/entity.json b/.butcher/types/Message/entity.json index 82f9186e..1c8d8f16 100644 --- a/.butcher/types/Message/entity.json +++ b/.butcher/types/Message/entity.json @@ -166,8 +166,8 @@ { "type": "True", "description": "True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message", - "html_description": "Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message", - "rst_description": "*Optional*. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message\n", + "html_description": "Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message", + "rst_description": "*Optional*. :code:`True`, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message\n", "name": "is_from_offline", "required": false }, @@ -326,8 +326,8 @@ { "type": "True", "description": "True, if the caption must be shown above the message media", - "html_description": "Optional. True, if the caption must be shown above the message media", - "rst_description": "*Optional*. True, if the caption must be shown above the message media\n", + "html_description": "Optional. True, if the caption must be shown above the message media", + "rst_description": "*Optional*. :code:`True`, if the caption must be shown above the message media\n", "name": "show_caption_above_media", "required": false }, @@ -339,6 +339,14 @@ "name": "has_media_spoiler", "required": false }, + { + "type": "Checklist", + "description": "Message is a checklist", + "html_description": "Optional. Message is a checklist", + "rst_description": "*Optional*. Message is a checklist\n", + "name": "checklist", + "required": false + }, { "type": "Contact", "description": "Message is a shared contact, information about the contact", @@ -587,6 +595,30 @@ "name": "chat_background_set", "required": false }, + { + "type": "ChecklistTasksDone", + "description": "Service message: some tasks in a checklist were marked as done or not done", + "html_description": "Optional. Service message: some tasks in a checklist were marked as done or not done", + "rst_description": "*Optional*. Service message: some tasks in a checklist were marked as done or not done\n", + "name": "checklist_tasks_done", + "required": false + }, + { + "type": "ChecklistTasksAdded", + "description": "Service message: tasks were added to a checklist", + "html_description": "Optional. Service message: tasks were added to a checklist", + "rst_description": "*Optional*. Service message: tasks were added to a checklist\n", + "name": "checklist_tasks_added", + "required": false + }, + { + "type": "DirectMessagePriceChanged", + "description": "Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed", + "html_description": "Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed", + "rst_description": "*Optional*. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed\n", + "name": "direct_message_price_changed", + "required": false + }, { "type": "ForumTopicCreated", "description": "Service message: forum topic created", diff --git a/.butcher/types/OwnedGiftRegular/entity.json b/.butcher/types/OwnedGiftRegular/entity.json index 5e4e0f81..35390001 100644 --- a/.butcher/types/OwnedGiftRegular/entity.json +++ b/.butcher/types/OwnedGiftRegular/entity.json @@ -70,32 +70,32 @@ { "type": "True", "description": "True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", - "html_description": "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", - "rst_description": "*Optional*. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them\n", + "html_description": "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", + "rst_description": "*Optional*. :code:`True`, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them\n", "name": "is_private", "required": false }, { "type": "True", "description": "True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", - "html_description": "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", - "rst_description": "*Optional*. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only\n", + "html_description": "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only\n", "name": "is_saved", "required": false }, { "type": "True", "description": "True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only", - "html_description": "Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only", - "rst_description": "*Optional*. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only\n", + "html_description": "Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only\n", "name": "can_be_upgraded", "required": false }, { "type": "True", "description": "True, if the gift was refunded and isn't available anymore", - "html_description": "Optional. True, if the gift was refunded and isn't available anymore", - "rst_description": "*Optional*. True, if the gift was refunded and isn't available anymore\n", + "html_description": "Optional. True, if the gift was refunded and isn't available anymore", + "rst_description": "*Optional*. :code:`True`, if the gift was refunded and isn't available anymore\n", "name": "was_refunded", "required": false }, diff --git a/.butcher/types/OwnedGiftUnique/entity.json b/.butcher/types/OwnedGiftUnique/entity.json index e4c64ec7..7a9b46bb 100644 --- a/.butcher/types/OwnedGiftUnique/entity.json +++ b/.butcher/types/OwnedGiftUnique/entity.json @@ -54,16 +54,16 @@ { "type": "True", "description": "True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", - "html_description": "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", - "rst_description": "*Optional*. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only\n", + "html_description": "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only\n", "name": "is_saved", "required": false }, { "type": "True", "description": "True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only", - "html_description": "Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only", - "rst_description": "*Optional*. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only\n", + "html_description": "Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only\n", "name": "can_be_transferred", "required": false }, @@ -74,6 +74,14 @@ "rst_description": "*Optional*. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift\n", "name": "transfer_star_count", "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "html_description": "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now\n", + "name": "next_transfer_date", + "required": false } ], "category": "types" diff --git a/.butcher/types/OwnedGiftUnique/replace.yml b/.butcher/types/OwnedGiftUnique/replace.yml new file mode 100644 index 00000000..17326632 --- /dev/null +++ b/.butcher/types/OwnedGiftUnique/replace.yml @@ -0,0 +1,5 @@ +annotations: + next_transfer_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/ReactionTypeEmoji/entity.json b/.butcher/types/ReactionTypeEmoji/entity.json index d371dcd7..263c779c 100644 --- a/.butcher/types/ReactionTypeEmoji/entity.json +++ b/.butcher/types/ReactionTypeEmoji/entity.json @@ -22,8 +22,8 @@ { "type": "String", "description": "Reaction emoji. Currently, it can be one of \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"", - "html_description": "Reaction emoji. Currently, it can be one of \"\"👍\"/\", \"\"👎\"/\", \"\"❤\"/\", \"\"🔥\"/\", \"\"🥰\"/\", \"\"👏\"/\", \"\"😁\"/\", \"\"🤔\"/\", \"\"🤯\"/\", \"\"😱\"/\", \"\"🤬\"/\", \"\"😢\"/\", \"\"🎉\"/\", \"\"🤩\"/\", \"\"🤮\"/\", \"\"💩\"/\", \"\"🙏\"/\", \"\"👌\"/\", \"\"🕊\"/\", \"\"🤡\"/\", \"\"🥱\"/\", \"\"🥴\"/\", \"\"😍\"/\", \"\"🐳\"/\", \"\"❤‍🔥\"/\", \"\"🌚\"/\", \"\"🌭\"/\", \"\"💯\"/\", \"\"🤣\"/\", \"\"⚡\"/\", \"\"🍌\"/\", \"\"🏆\"/\", \"\"💔\"/\", \"\"🤨\"/\", \"\"😐\"/\", \"\"🍓\"/\", \"\"🍾\"/\", \"\"💋\"/\", \"\"🖕\"/\", \"\"😈\"/\", \"\"😴\"/\", \"\"😭\"/\", \"\"🤓\"/\", \"\"👻\"/\", \"\"👨‍💻\"/\", \"\"👀\"/\", \"\"🎃\"/\", \"\"🙈\"/\", \"\"😇\"/\", \"\"😨\"/\", \"\"🤝\"/\", \"\"✍\"/\", \"\"🤗\"/\", \"\"🫡\"/\", \"\"🎅\"/\", \"\"🎄\"/\", \"\"☃\"/\", \"\"💅\"/\", \"\"🤪\"/\", \"\"🗿\"/\", \"\"🆒\"/\", \"\"💘\"/\", \"\"🙉\"/\", \"\"🦄\"/\", \"\"😘\"/\", \"\"💊\"/\", \"\"🙊\"/\", \"\"😎\"/\", \"\"👾\"/\", \"\"🤷‍♂\"/\", \"\"🤷\"/\", \"\"🤷‍♀\"/\", \"\"😡\"/\"", - "rst_description": "Reaction emoji. Currently, it can be one of \"๐Ÿ‘\", \"๐Ÿ‘Ž\", \"โค\", \"๐Ÿ”ฅ\", \"๐Ÿฅฐ\", \"๐Ÿ‘\", \"๐Ÿ˜\", \"๐Ÿค”\", \"๐Ÿคฏ\", \"๐Ÿ˜ฑ\", \"๐Ÿคฌ\", \"๐Ÿ˜ข\", \"๐ŸŽ‰\", \"๐Ÿคฉ\", \"๐Ÿคฎ\", \"๐Ÿ’ฉ\", \"๐Ÿ™\", \"๐Ÿ‘Œ\", \"๐Ÿ•Š\", \"๐Ÿคก\", \"๐Ÿฅฑ\", \"๐Ÿฅด\", \"๐Ÿ˜\", \"๐Ÿณ\", \"โคโ€๐Ÿ”ฅ\", \"๐ŸŒš\", \"๐ŸŒญ\", \"๐Ÿ’ฏ\", \"๐Ÿคฃ\", \"โšก\", \"๐ŸŒ\", \"๐Ÿ†\", \"๐Ÿ’”\", \"๐Ÿคจ\", \"๐Ÿ˜\", \"๐Ÿ“\", \"๐Ÿพ\", \"๐Ÿ’‹\", \"๐Ÿ–•\", \"๐Ÿ˜ˆ\", \"๐Ÿ˜ด\", \"๐Ÿ˜ญ\", \"๐Ÿค“\", \"๐Ÿ‘ป\", \"๐Ÿ‘จโ€๐Ÿ’ป\", \"๐Ÿ‘€\", \"๐ŸŽƒ\", \"๐Ÿ™ˆ\", \"๐Ÿ˜‡\", \"๐Ÿ˜จ\", \"๐Ÿค\", \"โœ\", \"๐Ÿค—\", \"๐Ÿซก\", \"๐ŸŽ…\", \"๐ŸŽ„\", \"โ˜ƒ\", \"๐Ÿ’…\", \"๐Ÿคช\", \"๐Ÿ—ฟ\", \"๐Ÿ†’\", \"๐Ÿ’˜\", \"๐Ÿ™‰\", \"๐Ÿฆ„\", \"๐Ÿ˜˜\", \"๐Ÿ’Š\", \"๐Ÿ™Š\", \"๐Ÿ˜Ž\", \"๐Ÿ‘พ\", \"๐Ÿคทโ€โ™‚\", \"๐Ÿคท\", \"๐Ÿคทโ€โ™€\", \"๐Ÿ˜ก\"\n", + "html_description": "Reaction emoji. Currently, it can be one of \"\"❤\"/\", \"\"👍\"/\", \"\"👎\"/\", \"\"🔥\"/\", \"\"🥰\"/\", \"\"👏\"/\", \"\"😁\"/\", \"\"🤔\"/\", \"\"🤯\"/\", \"\"😱\"/\", \"\"🤬\"/\", \"\"😢\"/\", \"\"🎉\"/\", \"\"🤩\"/\", \"\"🤮\"/\", \"\"💩\"/\", \"\"🙏\"/\", \"\"👌\"/\", \"\"🕊\"/\", \"\"🤡\"/\", \"\"🥱\"/\", \"\"🥴\"/\", \"\"😍\"/\", \"\"🐳\"/\", \"\"❤‍🔥\"/\", \"\"🌚\"/\", \"\"🌭\"/\", \"\"💯\"/\", \"\"🤣\"/\", \"\"⚡\"/\", \"\"🍌\"/\", \"\"🏆\"/\", \"\"💔\"/\", \"\"🤨\"/\", \"\"😐\"/\", \"\"🍓\"/\", \"\"🍾\"/\", \"\"💋\"/\", \"\"🖕\"/\", \"\"😈\"/\", \"\"😴\"/\", \"\"😭\"/\", \"\"🤓\"/\", \"\"👻\"/\", \"\"👨‍💻\"/\", \"\"👀\"/\", \"\"🎃\"/\", \"\"🙈\"/\", \"\"😇\"/\", \"\"😨\"/\", \"\"🤝\"/\", \"\"✍\"/\", \"\"🤗\"/\", \"\"🫡\"/\", \"\"🎅\"/\", \"\"🎄\"/\", \"\"☃\"/\", \"\"💅\"/\", \"\"🤪\"/\", \"\"🗿\"/\", \"\"🆒\"/\", \"\"💘\"/\", \"\"🙉\"/\", \"\"🦄\"/\", \"\"😘\"/\", \"\"💊\"/\", \"\"🙊\"/\", \"\"😎\"/\", \"\"👾\"/\", \"\"🤷‍♂\"/\", \"\"🤷\"/\", \"\"🤷‍♀\"/\", \"\"😡\"/\"", + "rst_description": "Reaction emoji. Currently, it can be one of \"โค\", \"๐Ÿ‘\", \"๐Ÿ‘Ž\", \"๐Ÿ”ฅ\", \"๐Ÿฅฐ\", \"๐Ÿ‘\", \"๐Ÿ˜\", \"๐Ÿค”\", \"๐Ÿคฏ\", \"๐Ÿ˜ฑ\", \"๐Ÿคฌ\", \"๐Ÿ˜ข\", \"๐ŸŽ‰\", \"๐Ÿคฉ\", \"๐Ÿคฎ\", \"๐Ÿ’ฉ\", \"๐Ÿ™\", \"๐Ÿ‘Œ\", \"๐Ÿ•Š\", \"๐Ÿคก\", \"๐Ÿฅฑ\", \"๐Ÿฅด\", \"๐Ÿ˜\", \"๐Ÿณ\", \"โคโ€๐Ÿ”ฅ\", \"๐ŸŒš\", \"๐ŸŒญ\", \"๐Ÿ’ฏ\", \"๐Ÿคฃ\", \"โšก\", \"๐ŸŒ\", \"๐Ÿ†\", \"๐Ÿ’”\", \"๐Ÿคจ\", \"๐Ÿ˜\", \"๐Ÿ“\", \"๐Ÿพ\", \"๐Ÿ’‹\", \"๐Ÿ–•\", \"๐Ÿ˜ˆ\", \"๐Ÿ˜ด\", \"๐Ÿ˜ญ\", \"๐Ÿค“\", \"๐Ÿ‘ป\", \"๐Ÿ‘จโ€๐Ÿ’ป\", \"๐Ÿ‘€\", \"๐ŸŽƒ\", \"๐Ÿ™ˆ\", \"๐Ÿ˜‡\", \"๐Ÿ˜จ\", \"๐Ÿค\", \"โœ\", \"๐Ÿค—\", \"๐Ÿซก\", \"๐ŸŽ…\", \"๐ŸŽ„\", \"โ˜ƒ\", \"๐Ÿ’…\", \"๐Ÿคช\", \"๐Ÿ—ฟ\", \"๐Ÿ†’\", \"๐Ÿ’˜\", \"๐Ÿ™‰\", \"๐Ÿฆ„\", \"๐Ÿ˜˜\", \"๐Ÿ’Š\", \"๐Ÿ™Š\", \"๐Ÿ˜Ž\", \"๐Ÿ‘พ\", \"๐Ÿคทโ€โ™‚\", \"๐Ÿคท\", \"๐Ÿคทโ€โ™€\", \"๐Ÿ˜ก\"\n", "name": "emoji", "required": true } diff --git a/.butcher/types/SuccessfulPayment/entity.json b/.butcher/types/SuccessfulPayment/entity.json index 6a680660..4dabc153 100644 --- a/.butcher/types/SuccessfulPayment/entity.json +++ b/.butcher/types/SuccessfulPayment/entity.json @@ -46,16 +46,16 @@ { "type": "True", "description": "True, if the payment is a recurring payment for a subscription", - "html_description": "Optional. True, if the payment is a recurring payment for a subscription", - "rst_description": "*Optional*. True, if the payment is a recurring payment for a subscription\n", + "html_description": "Optional. True, if the payment is a recurring payment for a subscription", + "rst_description": "*Optional*. :code:`True`, if the payment is a recurring payment for a subscription\n", "name": "is_recurring", "required": false }, { "type": "True", "description": "True, if the payment is the first payment for a subscription", - "html_description": "Optional. True, if the payment is the first payment for a subscription", - "rst_description": "*Optional*. True, if the payment is the first payment for a subscription\n", + "html_description": "Optional. True, if the payment is the first payment for a subscription", + "rst_description": "*Optional*. :code:`True`, if the payment is the first payment for a subscription\n", "name": "is_first_recurring", "required": false }, diff --git a/.butcher/types/SwitchInlineQueryChosenChat/entity.json b/.butcher/types/SwitchInlineQueryChosenChat/entity.json index f36f3c33..08cf6edf 100644 --- a/.butcher/types/SwitchInlineQueryChosenChat/entity.json +++ b/.butcher/types/SwitchInlineQueryChosenChat/entity.json @@ -22,32 +22,32 @@ { "type": "Boolean", "description": "True, if private chats with users can be chosen", - "html_description": "Optional. True, if private chats with users can be chosen", - "rst_description": "*Optional*. True, if private chats with users can be chosen\n", + "html_description": "Optional. True, if private chats with users can be chosen", + "rst_description": "*Optional*. :code:`True`, if private chats with users can be chosen\n", "name": "allow_user_chats", "required": false }, { "type": "Boolean", "description": "True, if private chats with bots can be chosen", - "html_description": "Optional. True, if private chats with bots can be chosen", - "rst_description": "*Optional*. True, if private chats with bots can be chosen\n", + "html_description": "Optional. True, if private chats with bots can be chosen", + "rst_description": "*Optional*. :code:`True`, if private chats with bots can be chosen\n", "name": "allow_bot_chats", "required": false }, { "type": "Boolean", "description": "True, if group and supergroup chats can be chosen", - "html_description": "Optional. True, if group and supergroup chats can be chosen", - "rst_description": "*Optional*. True, if group and supergroup chats can be chosen\n", + "html_description": "Optional. True, if group and supergroup chats can be chosen", + "rst_description": "*Optional*. :code:`True`, if group and supergroup chats can be chosen\n", "name": "allow_group_chats", "required": false }, { "type": "Boolean", "description": "True, if channel chats can be chosen", - "html_description": "Optional. True, if channel chats can be chosen", - "rst_description": "*Optional*. True, if channel chats can be chosen\n", + "html_description": "Optional. True, if channel chats can be chosen", + "rst_description": "*Optional*. :code:`True`, if channel chats can be chosen\n", "name": "allow_channel_chats", "required": false } diff --git a/.butcher/types/TextQuote/entity.json b/.butcher/types/TextQuote/entity.json index f1be593c..2f7c767c 100644 --- a/.butcher/types/TextQuote/entity.json +++ b/.butcher/types/TextQuote/entity.json @@ -38,8 +38,8 @@ { "type": "True", "description": "True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.", - "html_description": "Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.", - "rst_description": "*Optional*. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.\n", + "html_description": "Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.", + "rst_description": "*Optional*. :code:`True`, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.\n", "name": "is_manual", "required": false } diff --git a/.butcher/types/UniqueGiftInfo/entity.json b/.butcher/types/UniqueGiftInfo/entity.json index d3ac7ded..696a433f 100644 --- a/.butcher/types/UniqueGiftInfo/entity.json +++ b/.butcher/types/UniqueGiftInfo/entity.json @@ -21,12 +21,20 @@ }, { "type": "String", - "description": "Origin of the gift. Currently, either 'upgrade' or 'transfer'", - "html_description": "Origin of the gift. Currently, either “upgrade” or “transfer”", - "rst_description": "Origin of the gift. Currently, either 'upgrade' or 'transfer'\n", + "description": "Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, or 'resale' for gifts bought from other users", + "html_description": "Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, or “resale” for gifts bought from other users", + "rst_description": "Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, or 'resale' for gifts bought from other users\n", "name": "origin", "required": true }, + { + "type": "Integer", + "description": "For gifts bought from other users, the price paid for the gift", + "html_description": "Optional. For gifts bought from other users, the price paid for the gift", + "rst_description": "*Optional*. For gifts bought from other users, the price paid for the gift\n", + "name": "last_resale_star_count", + "required": false + }, { "type": "String", "description": "Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts", @@ -42,6 +50,14 @@ "rst_description": "*Optional*. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift\n", "name": "transfer_star_count", "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "html_description": "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now\n", + "name": "next_transfer_date", + "required": false } ], "category": "types" diff --git a/.butcher/types/UniqueGiftInfo/replace.yml b/.butcher/types/UniqueGiftInfo/replace.yml new file mode 100644 index 00000000..17326632 --- /dev/null +++ b/.butcher/types/UniqueGiftInfo/replace.yml @@ -0,0 +1,5 @@ +annotations: + next_transfer_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/WriteAccessAllowed/entity.json b/.butcher/types/WriteAccessAllowed/entity.json index d054736a..50d990bc 100644 --- a/.butcher/types/WriteAccessAllowed/entity.json +++ b/.butcher/types/WriteAccessAllowed/entity.json @@ -14,8 +14,8 @@ { "type": "Boolean", "description": "True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess", - "html_description": "Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess", - "rst_description": "*Optional*. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess `_\n", + "html_description": "Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess", + "rst_description": "*Optional*. :code:`True`, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess `_\n", "name": "from_request", "required": false }, @@ -30,8 +30,8 @@ { "type": "Boolean", "description": "True, if the access was granted when the bot was added to the attachment or side menu", - "html_description": "Optional. True, if the access was granted when the bot was added to the attachment or side menu", - "rst_description": "*Optional*. True, if the access was granted when the bot was added to the attachment or side menu\n", + "html_description": "Optional. True, if the access was granted when the bot was added to the attachment or side menu", + "rst_description": "*Optional*. :code:`True`, if the access was granted when the bot was added to the attachment or side menu\n", "name": "from_attachment_menu", "required": false } diff --git a/CHANGES/1704.feature.rst b/CHANGES/1704.feature.rst new file mode 100644 index 00000000..e5b9e2dd --- /dev/null +++ b/CHANGES/1704.feature.rst @@ -0,0 +1,25 @@ +Added full support for the `Bot API 9.1 `_: + +**Checklists** + +- Added the class :class:`aiogram.types.checklist_task.ChecklistTask` representing a task in a checklist. +- Added the class :class:`aiogram.types.checklist.Checklist` representing a checklist. +- Added the class :class:`aiogram.types.input_checklist_task.InputChecklistTask` representing a task to add to a checklist. +- Added the class :class:`aiogram.types.input_checklist.InputChecklist` representing a checklist to create. +- Added the field :code:`checklist` to the classes :class:`aiogram.types.message.Message` and :class:`aiogram.types.external_reply_info.ExternalReplyInfo`, describing a checklist in a message. +- Added the class :class:`aiogram.types.checklist_tasks_done.ChecklistTasksDone` and the field :code:`checklist_tasks_done` to the class :class:`aiogram.types.message.Message`, describing a service message about status changes for tasks in a checklist (i.e., marked as done/not done). +- Added the class :class:`aiogram.types.checklist_tasks_added.ChecklistTasksAdded` and the field :code:`checklist_tasks_added` to the class :class:`aiogram.types.message.Message`, describing a service message about the addition of new tasks to a checklist. +- Added the method :class:`aiogram.methods.send_checklist.SendChecklist`, allowing bots to send a checklist on behalf of a business account. +- Added the method :class:`aiogram.methods.edit_message_checklist.EditMessageChecklist`, allowing bots to edit a checklist on behalf of a business account. + +**Gifts** + +- Added the field :code:`next_transfer_date` to the classes :class:`aiogram.types.owned_gift_unique.OwnedGiftUnique` and :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`. +- Added the field :code:`last_resale_star_count` to the class :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`. +- Added "resale" as the possible value of the field :code:`origin` in the class :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`. + +**General** + +- Increased the maximum number of options in a poll to 12. +- Added the method :class:`aiogram.methods.get_my_star_balance.GetMyStarBalance`, allowing bots to get their current balance of Telegram Stars. +- Added the class :class:`aiogram.types.direct_message_price_changed.DirectMessagePriceChanged` and the field :code:`direct_message_price_changed` to the class :class:`aiogram.types.message.Message`, describing a service message about a price change for direct messages sent to the channel chat. diff --git a/README.rst b/README.rst index fe350f6d..6f01d92d 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 9.0 `_ and gets fast updates to the latest versions of the Bot API +- Supports `Telegram Bot API 9.1 `_ 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 569721c6..65d37b08 100644 --- a/aiogram/__meta__.py +++ b/aiogram/__meta__.py @@ -1,2 +1,2 @@ __version__ = "3.20.0.post0" -__api_version__ = "9.0" +__api_version__ = "9.1" diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index 255ac861..908a20ba 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -58,6 +58,7 @@ from ..methods import ( EditForumTopic, EditGeneralForumTopic, EditMessageCaption, + EditMessageChecklist, EditMessageLiveLocation, EditMessageMedia, EditMessageReplyMarkup, @@ -86,6 +87,7 @@ from ..methods import ( GetMyDescription, GetMyName, GetMyShortDescription, + GetMyStarBalance, GetStarTransactions, GetStickerSet, GetUpdates, @@ -113,6 +115,7 @@ from ..methods import ( SendAnimation, SendAudio, SendChatAction, + SendChecklist, SendContact, SendDice, SendDocument, @@ -198,6 +201,7 @@ from ..types import ( InlineKeyboardMarkup, InlineQueryResultsButton, InlineQueryResultUnion, + InputChecklist, InputFile, InputFileUnion, InputMediaUnion, @@ -2009,7 +2013,7 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param user_id: Unique identifier of the target user :param is_anonymous: Pass :code:`True` if the administrator's presence in the chat is hidden - :param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. + :param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege. :param can_delete_messages: Pass :code:`True` if the administrator can delete messages of other users :param can_manage_video_chats: Pass :code:`True` if the administrator can manage video chats :param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics @@ -2019,7 +2023,7 @@ class Bot: :param can_post_stories: Pass :code:`True` if the administrator can post stories to the chat :param can_edit_stories: Pass :code:`True` if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive :param can_delete_stories: Pass :code:`True` if the administrator can delete stories posted by other users - :param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only + :param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only :param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only :param can_pin_messages: Pass :code:`True` if the administrator can pin messages; for supergroups only :param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only @@ -2955,7 +2959,7 @@ 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 2-10 answer options + :param options: A JSON-serialized list of 2-12 answer options :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed @@ -4943,7 +4947,7 @@ class Bot: request_timeout: Optional[int] = None, ) -> bool: """ - Delete messages on behalf of a business account. Requires the *can_delete_outgoing_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success. + Delete messages on behalf of a business account. Requires the *can_delete_sent_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#deletebusinessmessages @@ -5039,12 +5043,12 @@ class Bot: Source: https://core.telegram.org/bots/api#getbusinessaccountgifts :param business_connection_id: Unique identifier of the business connection - :param exclude_unsaved: Pass True to exclude gifts that aren't saved to the account's profile page - :param exclude_saved: Pass True to exclude gifts that are saved to the account's profile page - :param exclude_unlimited: Pass True to exclude gifts that can be purchased an unlimited number of times - :param exclude_limited: Pass True to exclude gifts that can be purchased a limited number of times - :param exclude_unique: Pass True to exclude unique gifts - :param sort_by_price: Pass True to sort results by gift price instead of send date. Sorting is applied before pagination. + :param exclude_unsaved: Pass :code:`True` to exclude gifts that aren't saved to the account's profile page + :param exclude_saved: Pass :code:`True` to exclude gifts that are saved to the account's profile page + :param exclude_unlimited: Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times + :param exclude_limited: Pass :code:`True` to exclude gifts that can be purchased a limited number of times + :param exclude_unique: Pass :code:`True` to exclude unique gifts + :param sort_by_price: Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination. :param offset: Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results :param limit: The maximum number of gifts to be returned; 1-100. Defaults to 100 :param request_timeout: Request timeout @@ -5201,7 +5205,7 @@ class Bot: Source: https://core.telegram.org/bots/api#removebusinessaccountprofilephoto :param business_connection_id: Unique identifier of the business connection - :param is_public: Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo. + :param is_public: Pass :code:`True` to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo. :param request_timeout: Request timeout :return: Returns :code:`True` on success. """ @@ -5248,7 +5252,7 @@ class Bot: Source: https://core.telegram.org/bots/api#setbusinessaccountgiftsettings :param business_connection_id: Unique identifier of the business connection - :param show_gift_button: Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field + :param show_gift_button: Pass :code:`True`, if a button for sending a gift to the user or by the business account must always be shown in the input field :param accepted_gift_types: Types of gifts accepted by the business account :param request_timeout: Request timeout :return: Returns :code:`True` on success. @@ -5301,7 +5305,7 @@ class Bot: :param business_connection_id: Unique identifier of the business connection :param photo: The new profile photo to set - :param is_public: Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo. + :param is_public: Pass :code:`True` to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo. :param request_timeout: Request timeout :return: Returns :code:`True` on success. """ @@ -5403,7 +5407,7 @@ class Bot: :param business_connection_id: Unique identifier of the business connection :param owned_gift_id: Unique identifier of the regular gift that should be upgraded to a unique one - :param keep_original_details: Pass True to keep the original gift text, sender and receiver in the upgraded gift + :param keep_original_details: Pass :code:`True` to keep the original gift text, sender and receiver in the upgraded gift :param star_count: The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If :code:`gift.prepaid_upgrade_star_count > 0`, then pass 0, otherwise, the *can_transfer_stars* business bot right is required and :code:`gift.upgrade_star_count` must be passed. :param request_timeout: Request timeout :return: Returns :code:`True` on success. @@ -5416,3 +5420,92 @@ class Bot: star_count=star_count, ) return await self(call, request_timeout=request_timeout) + + async def edit_message_checklist( + self, + business_connection_id: str, + chat_id: int, + message_id: int, + checklist: InputChecklist, + reply_markup: Optional[InlineKeyboardMarkup] = None, + request_timeout: Optional[int] = None, + ) -> Message: + """ + Use this method to edit a checklist on behalf of a connected business account. On success, the edited :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#editmessagechecklist + + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param chat_id: Unique identifier for the target chat + :param message_id: Unique identifier for the target message + :param checklist: A JSON-serialized object for the new checklist + :param reply_markup: A JSON-serialized object for the new inline keyboard for the message + :param request_timeout: Request timeout + :return: On success, the edited :class:`aiogram.types.message.Message` is returned. + """ + + call = EditMessageChecklist( + business_connection_id=business_connection_id, + chat_id=chat_id, + message_id=message_id, + checklist=checklist, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def get_my_star_balance( + self, + request_timeout: Optional[int] = None, + ) -> StarAmount: + """ + A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a :class:`aiogram.types.star_amount.StarAmount` object. + + Source: https://core.telegram.org/bots/api#getmystarbalance + + :param request_timeout: Request timeout + :return: On success, returns a :class:`aiogram.types.star_amount.StarAmount` object. + """ + + call = GetMyStarBalance() + return await self(call, request_timeout=request_timeout) + + async def send_checklist( + self, + business_connection_id: str, + chat_id: int, + checklist: InputChecklist, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = None, + message_effect_id: Optional[str] = None, + reply_parameters: Optional[ReplyParameters] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + request_timeout: Optional[int] = None, + ) -> Message: + """ + Use this method to send a checklist on behalf of a connected business account. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendchecklist + + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param chat_id: Unique identifier for the target chat + :param checklist: A JSON-serialized object for the checklist to send + :param disable_notification: Sends the message silently. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the sent message from forwarding and saving + :param message_effect_id: Unique identifier of the message effect to be added to the message + :param reply_parameters: A JSON-serialized object for description of the message to reply to + :param reply_markup: A JSON-serialized object for an inline keyboard + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendChecklist( + business_connection_id=business_connection_id, + chat_id=chat_id, + checklist=checklist, + disable_notification=disable_notification, + protect_content=protect_content, + message_effect_id=message_effect_id, + reply_parameters=reply_parameters, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) diff --git a/aiogram/enums/content_type.py b/aiogram/enums/content_type.py index 96472c4d..1647ab25 100644 --- a/aiogram/enums/content_type.py +++ b/aiogram/enums/content_type.py @@ -19,6 +19,7 @@ class ContentType(str, Enum): VIDEO = "video" VIDEO_NOTE = "video_note" VOICE = "voice" + CHECKLIST = "checklist" CONTACT = "contact" DICE = "dice" GAME = "game" @@ -50,6 +51,9 @@ class ContentType(str, Enum): PROXIMITY_ALERT_TRIGGERED = "proximity_alert_triggered" BOOST_ADDED = "boost_added" CHAT_BACKGROUND_SET = "chat_background_set" + CHECKLIST_TASKS_DONE = "checklist_tasks_done" + CHECKLIST_TASKS_ADDED = "checklist_tasks_added" + DIRECT_MESSAGE_PRICE_CHANGED = "direct_message_price_changed" FORUM_TOPIC_CREATED = "forum_topic_created" FORUM_TOPIC_EDITED = "forum_topic_edited" FORUM_TOPIC_CLOSED = "forum_topic_closed" diff --git a/aiogram/methods/__init__.py b/aiogram/methods/__init__.py index a7d6283c..c8956c7e 100644 --- a/aiogram/methods/__init__.py +++ b/aiogram/methods/__init__.py @@ -36,6 +36,7 @@ from .edit_chat_subscription_invite_link import EditChatSubscriptionInviteLink from .edit_forum_topic import EditForumTopic from .edit_general_forum_topic import EditGeneralForumTopic from .edit_message_caption import EditMessageCaption +from .edit_message_checklist import EditMessageChecklist from .edit_message_live_location import EditMessageLiveLocation from .edit_message_media import EditMessageMedia from .edit_message_reply_markup import EditMessageReplyMarkup @@ -64,6 +65,7 @@ from .get_my_default_administrator_rights import GetMyDefaultAdministratorRights from .get_my_description import GetMyDescription from .get_my_name import GetMyName from .get_my_short_description import GetMyShortDescription +from .get_my_star_balance import GetMyStarBalance from .get_star_transactions import GetStarTransactions from .get_sticker_set import GetStickerSet from .get_updates import GetUpdates @@ -91,6 +93,7 @@ from .save_prepared_inline_message import SavePreparedInlineMessage from .send_animation import SendAnimation from .send_audio import SendAudio from .send_chat_action import SendChatAction +from .send_checklist import SendChecklist from .send_contact import SendContact from .send_dice import SendDice from .send_document import SendDocument @@ -191,6 +194,7 @@ __all__ = ( "EditForumTopic", "EditGeneralForumTopic", "EditMessageCaption", + "EditMessageChecklist", "EditMessageLiveLocation", "EditMessageMedia", "EditMessageReplyMarkup", @@ -219,6 +223,7 @@ __all__ = ( "GetMyDescription", "GetMyName", "GetMyShortDescription", + "GetMyStarBalance", "GetStarTransactions", "GetStickerSet", "GetUpdates", @@ -248,6 +253,7 @@ __all__ = ( "SendAnimation", "SendAudio", "SendChatAction", + "SendChecklist", "SendContact", "SendDice", "SendDocument", diff --git a/aiogram/methods/delete_business_messages.py b/aiogram/methods/delete_business_messages.py index 8301d40c..8edd74e5 100644 --- a/aiogram/methods/delete_business_messages.py +++ b/aiogram/methods/delete_business_messages.py @@ -7,7 +7,7 @@ from .base import TelegramMethod class DeleteBusinessMessages(TelegramMethod[bool]): """ - Delete messages on behalf of a business account. Requires the *can_delete_outgoing_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success. + Delete messages on behalf of a business account. Requires the *can_delete_sent_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#deletebusinessmessages """ diff --git a/aiogram/methods/edit_message_checklist.py b/aiogram/methods/edit_message_checklist.py new file mode 100644 index 00000000..f1895eef --- /dev/null +++ b/aiogram/methods/edit_message_checklist.py @@ -0,0 +1,55 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from ..types import InlineKeyboardMarkup, InputChecklist, Message +from .base import TelegramMethod + + +class EditMessageChecklist(TelegramMethod[Message]): + """ + Use this method to edit a checklist on behalf of a connected business account. On success, the edited :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#editmessagechecklist + """ + + __returning__ = Message + __api_method__ = "editMessageChecklist" + + business_connection_id: str + """Unique identifier of the business connection on behalf of which the message will be sent""" + chat_id: int + """Unique identifier for the target chat""" + message_id: int + """Unique identifier for the target message""" + checklist: InputChecklist + """A JSON-serialized object for the new checklist""" + reply_markup: Optional[InlineKeyboardMarkup] = None + """A JSON-serialized object for the new inline keyboard for the message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + chat_id: int, + message_id: int, + checklist: InputChecklist, + reply_markup: Optional[InlineKeyboardMarkup] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + chat_id=chat_id, + message_id=message_id, + checklist=checklist, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/get_business_account_gifts.py b/aiogram/methods/get_business_account_gifts.py index c187c47d..25050705 100644 --- a/aiogram/methods/get_business_account_gifts.py +++ b/aiogram/methods/get_business_account_gifts.py @@ -19,17 +19,17 @@ class GetBusinessAccountGifts(TelegramMethod[OwnedGifts]): business_connection_id: str """Unique identifier of the business connection""" exclude_unsaved: Optional[bool] = None - """Pass True to exclude gifts that aren't saved to the account's profile page""" + """Pass :code:`True` to exclude gifts that aren't saved to the account's profile page""" exclude_saved: Optional[bool] = None - """Pass True to exclude gifts that are saved to the account's profile page""" + """Pass :code:`True` to exclude gifts that are saved to the account's profile page""" exclude_unlimited: Optional[bool] = None - """Pass True to exclude gifts that can be purchased an unlimited number of times""" + """Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times""" exclude_limited: Optional[bool] = None - """Pass True to exclude gifts that can be purchased a limited number of times""" + """Pass :code:`True` to exclude gifts that can be purchased a limited number of times""" exclude_unique: Optional[bool] = None - """Pass True to exclude unique gifts""" + """Pass :code:`True` to exclude unique gifts""" sort_by_price: Optional[bool] = None - """Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.""" + """Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.""" offset: Optional[str] = None """Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results""" limit: Optional[int] = None diff --git a/aiogram/methods/get_my_star_balance.py b/aiogram/methods/get_my_star_balance.py new file mode 100644 index 00000000..e0c6e1ee --- /dev/null +++ b/aiogram/methods/get_my_star_balance.py @@ -0,0 +1,15 @@ +from __future__ import annotations + +from ..types import StarAmount +from .base import TelegramMethod + + +class GetMyStarBalance(TelegramMethod[StarAmount]): + """ + A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a :class:`aiogram.types.star_amount.StarAmount` object. + + Source: https://core.telegram.org/bots/api#getmystarbalance + """ + + __returning__ = StarAmount + __api_method__ = "getMyStarBalance" diff --git a/aiogram/methods/promote_chat_member.py b/aiogram/methods/promote_chat_member.py index 7ce66b56..2e501590 100644 --- a/aiogram/methods/promote_chat_member.py +++ b/aiogram/methods/promote_chat_member.py @@ -23,7 +23,7 @@ class PromoteChatMember(TelegramMethod[bool]): is_anonymous: Optional[bool] = None """Pass :code:`True` if the administrator's presence in the chat is hidden""" can_manage_chat: Optional[bool] = None - """Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.""" + """Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.""" can_delete_messages: Optional[bool] = None """Pass :code:`True` if the administrator can delete messages of other users""" can_manage_video_chats: Optional[bool] = None @@ -43,7 +43,7 @@ class PromoteChatMember(TelegramMethod[bool]): 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 - """Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only""" + """Pass :code:`True` if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only""" can_edit_messages: Optional[bool] = None """Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only""" can_pin_messages: Optional[bool] = None diff --git a/aiogram/methods/remove_business_account_profile_photo.py b/aiogram/methods/remove_business_account_profile_photo.py index 17768e39..47af0f24 100644 --- a/aiogram/methods/remove_business_account_profile_photo.py +++ b/aiogram/methods/remove_business_account_profile_photo.py @@ -18,7 +18,7 @@ class RemoveBusinessAccountProfilePhoto(TelegramMethod[bool]): business_connection_id: str """Unique identifier of the business connection""" is_public: Optional[bool] = None - """Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.""" + """Pass :code:`True` to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/send_checklist.py b/aiogram/methods/send_checklist.py new file mode 100644 index 00000000..1c5c685e --- /dev/null +++ b/aiogram/methods/send_checklist.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from ..types import InlineKeyboardMarkup, InputChecklist, Message, ReplyParameters +from .base import TelegramMethod + + +class SendChecklist(TelegramMethod[Message]): + """ + Use this method to send a checklist on behalf of a connected business account. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendchecklist + """ + + __returning__ = Message + __api_method__ = "sendChecklist" + + business_connection_id: str + """Unique identifier of the business connection on behalf of which the message will be sent""" + chat_id: int + """Unique identifier for the target chat""" + checklist: InputChecklist + """A JSON-serialized object for the checklist to send""" + disable_notification: Optional[bool] = None + """Sends the message silently. Users will receive a notification with no sound.""" + protect_content: Optional[bool] = None + """Protects the contents of the sent message from forwarding and saving""" + message_effect_id: Optional[str] = None + """Unique identifier of the message effect to be added to the message""" + reply_parameters: Optional[ReplyParameters] = None + """A JSON-serialized object for description of the message to reply to""" + reply_markup: Optional[InlineKeyboardMarkup] = None + """A JSON-serialized object for an inline keyboard""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + chat_id: int, + checklist: InputChecklist, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = None, + message_effect_id: Optional[str] = None, + reply_parameters: Optional[ReplyParameters] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + chat_id=chat_id, + checklist=checklist, + disable_notification=disable_notification, + protect_content=protect_content, + message_effect_id=message_effect_id, + reply_parameters=reply_parameters, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_poll.py b/aiogram/methods/send_poll.py index c98603a4..c4a511f2 100644 --- a/aiogram/methods/send_poll.py +++ b/aiogram/methods/send_poll.py @@ -32,7 +32,7 @@ class SendPoll(TelegramMethod[Message]): question: str """Poll question, 1-300 characters""" options: list[InputPollOptionUnion] - """A JSON-serialized list of 2-10 answer options""" + """A JSON-serialized list of 2-12 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 diff --git a/aiogram/methods/set_business_account_gift_settings.py b/aiogram/methods/set_business_account_gift_settings.py index ca6d3ad8..89f51361 100644 --- a/aiogram/methods/set_business_account_gift_settings.py +++ b/aiogram/methods/set_business_account_gift_settings.py @@ -19,7 +19,7 @@ class SetBusinessAccountGiftSettings(TelegramMethod[bool]): business_connection_id: str """Unique identifier of the business connection""" show_gift_button: bool - """Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field""" + """Pass :code:`True`, if a button for sending a gift to the user or by the business account must always be shown in the input field""" accepted_gift_types: AcceptedGiftTypes """Types of gifts accepted by the business account""" diff --git a/aiogram/methods/set_business_account_profile_photo.py b/aiogram/methods/set_business_account_profile_photo.py index f7ea51bc..330ceb65 100644 --- a/aiogram/methods/set_business_account_profile_photo.py +++ b/aiogram/methods/set_business_account_profile_photo.py @@ -21,7 +21,7 @@ class SetBusinessAccountProfilePhoto(TelegramMethod[bool]): photo: InputProfilePhotoUnion """The new profile photo to set""" is_public: Optional[bool] = None - """Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.""" + """Pass :code:`True` to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/upgrade_gift.py b/aiogram/methods/upgrade_gift.py index 15fccb80..c157ed08 100644 --- a/aiogram/methods/upgrade_gift.py +++ b/aiogram/methods/upgrade_gift.py @@ -20,7 +20,7 @@ class UpgradeGift(TelegramMethod[bool]): owned_gift_id: str """Unique identifier of the regular gift that should be upgraded to a unique one""" keep_original_details: Optional[bool] = None - """Pass True to keep the original gift text, sender and receiver in the upgraded gift""" + """Pass :code:`True` to keep the original gift text, sender and receiver in the upgraded gift""" star_count: Optional[int] = None """The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If :code:`gift.prepaid_upgrade_star_count > 0`, then pass 0, otherwise, the *can_transfer_stars* business bot right is required and :code:`gift.upgrade_star_count` must be passed.""" diff --git a/aiogram/types/__init__.py b/aiogram/types/__init__.py index 6ef43dd5..9bf6c74f 100644 --- a/aiogram/types/__init__.py +++ b/aiogram/types/__init__.py @@ -70,12 +70,17 @@ from .chat_member_updated import ChatMemberUpdated from .chat_permissions import ChatPermissions from .chat_photo import ChatPhoto from .chat_shared import ChatShared +from .checklist import Checklist +from .checklist_task import ChecklistTask +from .checklist_tasks_added import ChecklistTasksAdded +from .checklist_tasks_done import ChecklistTasksDone from .chosen_inline_result import ChosenInlineResult from .contact import Contact from .copy_text_button import CopyTextButton from .custom import DateTime from .date_time_union import DateTimeUnion from .dice import Dice +from .direct_message_price_changed import DirectMessagePriceChanged from .document import Document from .downloadable import Downloadable from .encrypted_credentials import EncryptedCredentials @@ -127,6 +132,8 @@ from .inline_query_result_venue import InlineQueryResultVenue from .inline_query_result_video import InlineQueryResultVideo from .inline_query_result_voice import InlineQueryResultVoice from .inline_query_results_button import InlineQueryResultsButton +from .input_checklist import InputChecklist +from .input_checklist_task import InputChecklistTask from .input_contact_message_content import InputContactMessageContent from .input_file import BufferedInputFile, FSInputFile, InputFile, URLInputFile from .input_file_union import InputFileUnion @@ -371,6 +378,10 @@ __all__ = ( "ChatPermissions", "ChatPhoto", "ChatShared", + "Checklist", + "ChecklistTask", + "ChecklistTasksAdded", + "ChecklistTasksDone", "ChosenInlineResult", "Contact", "ContentType", @@ -378,6 +389,7 @@ __all__ = ( "DateTime", "DateTimeUnion", "Dice", + "DirectMessagePriceChanged", "Document", "Downloadable", "EncryptedCredentials", @@ -430,6 +442,8 @@ __all__ = ( "InlineQueryResultVideo", "InlineQueryResultVoice", "InlineQueryResultsButton", + "InputChecklist", + "InputChecklistTask", "InputContactMessageContent", "InputFile", "InputFileUnion", diff --git a/aiogram/types/accepted_gift_types.py b/aiogram/types/accepted_gift_types.py index 2bf59463..990c8fb8 100644 --- a/aiogram/types/accepted_gift_types.py +++ b/aiogram/types/accepted_gift_types.py @@ -13,13 +13,13 @@ class AcceptedGiftTypes(TelegramObject): """ unlimited_gifts: bool - """True, if unlimited regular gifts are accepted""" + """:code:`True`, if unlimited regular gifts are accepted""" limited_gifts: bool - """True, if limited regular gifts are accepted""" + """:code:`True`, if limited regular gifts are accepted""" unique_gifts: bool - """True, if unique gifts or gifts that can be upgraded to unique for free are accepted""" + """:code:`True`, if unique gifts or gifts that can be upgraded to unique for free are accepted""" premium_subscription: bool - """True, if a Telegram Premium subscription is accepted""" + """:code:`True`, if a Telegram Premium subscription is accepted""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/business_bot_rights.py b/aiogram/types/business_bot_rights.py index 020a599e..b4a721ba 100644 --- a/aiogram/types/business_bot_rights.py +++ b/aiogram/types/business_bot_rights.py @@ -2,6 +2,8 @@ from __future__ import annotations from typing import TYPE_CHECKING, Any, Optional +from pydantic import Field + from .base import TelegramObject @@ -13,33 +15,40 @@ class BusinessBotRights(TelegramObject): """ can_reply: Optional[bool] = None - """*Optional*. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours""" + """*Optional*. :code:`True`, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours""" can_read_messages: Optional[bool] = None - """*Optional*. True, if the bot can mark incoming private messages as read""" - can_delete_outgoing_messages: Optional[bool] = None - """*Optional*. True, if the bot can delete messages sent by the bot""" + """*Optional*. :code:`True`, if the bot can mark incoming private messages as read""" + can_delete_sent_messages: Optional[bool] = None + """*Optional*. :code:`True`, if the bot can delete messages sent by the bot""" can_delete_all_messages: Optional[bool] = None - """*Optional*. True, if the bot can delete all private messages in managed chats""" + """*Optional*. :code:`True`, if the bot can delete all private messages in managed chats""" can_edit_name: Optional[bool] = None - """*Optional*. True, if the bot can edit the first and last name of the business account""" + """*Optional*. :code:`True`, if the bot can edit the first and last name of the business account""" can_edit_bio: Optional[bool] = None - """*Optional*. True, if the bot can edit the bio of the business account""" + """*Optional*. :code:`True`, if the bot can edit the bio of the business account""" can_edit_profile_photo: Optional[bool] = None - """*Optional*. True, if the bot can edit the profile photo of the business account""" + """*Optional*. :code:`True`, if the bot can edit the profile photo of the business account""" can_edit_username: Optional[bool] = None - """*Optional*. True, if the bot can edit the username of the business account""" + """*Optional*. :code:`True`, if the bot can edit the username of the business account""" can_change_gift_settings: Optional[bool] = None - """*Optional*. True, if the bot can change the privacy settings pertaining to gifts for the business account""" + """*Optional*. :code:`True`, if the bot can change the privacy settings pertaining to gifts for the business account""" can_view_gifts_and_stars: Optional[bool] = None - """*Optional*. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account""" + """*Optional*. :code:`True`, if the bot can view gifts and the amount of Telegram Stars owned by the business account""" can_convert_gifts_to_stars: Optional[bool] = None - """*Optional*. True, if the bot can convert regular gifts owned by the business account to Telegram Stars""" + """*Optional*. :code:`True`, if the bot can convert regular gifts owned by the business account to Telegram Stars""" can_transfer_and_upgrade_gifts: Optional[bool] = None - """*Optional*. True, if the bot can transfer and upgrade gifts owned by the business account""" + """*Optional*. :code:`True`, if the bot can transfer and upgrade gifts owned by the business account""" can_transfer_stars: Optional[bool] = None - """*Optional*. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts""" + """*Optional*. :code:`True`, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts""" can_manage_stories: Optional[bool] = None - """*Optional*. True, if the bot can post, edit and delete stories on behalf of the business account""" + """*Optional*. :code:`True`, if the bot can post, edit and delete stories on behalf of the business account""" + can_delete_outgoing_messages: Optional[bool] = Field( + None, json_schema_extra={"deprecated": True} + ) + """*Optional*. True, if the bot can delete messages sent by the bot + +.. deprecated:: API:9.1 + https://core.telegram.org/bots/api-changelog#july-3-2025""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -50,7 +59,7 @@ class BusinessBotRights(TelegramObject): *, can_reply: Optional[bool] = None, can_read_messages: Optional[bool] = None, - can_delete_outgoing_messages: Optional[bool] = None, + can_delete_sent_messages: Optional[bool] = None, can_delete_all_messages: Optional[bool] = None, can_edit_name: Optional[bool] = None, can_edit_bio: Optional[bool] = None, @@ -62,6 +71,7 @@ class BusinessBotRights(TelegramObject): can_transfer_and_upgrade_gifts: Optional[bool] = None, can_transfer_stars: Optional[bool] = None, can_manage_stories: Optional[bool] = None, + can_delete_outgoing_messages: Optional[bool] = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -71,7 +81,7 @@ class BusinessBotRights(TelegramObject): super().__init__( can_reply=can_reply, can_read_messages=can_read_messages, - can_delete_outgoing_messages=can_delete_outgoing_messages, + can_delete_sent_messages=can_delete_sent_messages, can_delete_all_messages=can_delete_all_messages, can_edit_name=can_edit_name, can_edit_bio=can_edit_bio, @@ -83,5 +93,6 @@ class BusinessBotRights(TelegramObject): can_transfer_and_upgrade_gifts=can_transfer_and_upgrade_gifts, can_transfer_stars=can_transfer_stars, can_manage_stories=can_manage_stories, + can_delete_outgoing_messages=can_delete_outgoing_messages, **__pydantic_kwargs, ) diff --git a/aiogram/types/business_connection.py b/aiogram/types/business_connection.py index d3470bed..d8f76256 100644 --- a/aiogram/types/business_connection.py +++ b/aiogram/types/business_connection.py @@ -28,7 +28,7 @@ class BusinessConnection(TelegramObject): date: DateTime """Date the connection was established in Unix time""" is_enabled: bool - """True, if the connection is active""" + """:code:`True`, if the connection is active""" rights: Optional[BusinessBotRights] = None """*Optional*. Rights of the business bot""" can_reply: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py index e54e84cd..16382076 100644 --- a/aiogram/types/chat.py +++ b/aiogram/types/chat.py @@ -1029,7 +1029,7 @@ class Chat(TelegramObject): :param user_id: Unique identifier of the target user :param is_anonymous: Pass :code:`True` if the administrator's presence in the chat is hidden - :param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. + :param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege. :param can_delete_messages: Pass :code:`True` if the administrator can delete messages of other users :param can_manage_video_chats: Pass :code:`True` if the administrator can manage video chats :param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics @@ -1039,7 +1039,7 @@ class Chat(TelegramObject): :param can_post_stories: Pass :code:`True` if the administrator can post stories to the chat :param can_edit_stories: Pass :code:`True` if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive :param can_delete_stories: Pass :code:`True` if the administrator can delete stories posted by other users - :param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only + :param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only :param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only :param can_pin_messages: Pass :code:`True` if the administrator can pin messages; for supergroups only :param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only diff --git a/aiogram/types/chat_administrator_rights.py b/aiogram/types/chat_administrator_rights.py index 0b205780..fc069261 100644 --- a/aiogram/types/chat_administrator_rights.py +++ b/aiogram/types/chat_administrator_rights.py @@ -18,7 +18,7 @@ class ChatAdministratorRights(TelegramObject): is_anonymous: bool """:code:`True`, if the user's presence in the chat is hidden""" can_manage_chat: bool - """:code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.""" + """:code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.""" can_delete_messages: bool """:code:`True`, if the administrator can delete messages of other users""" can_manage_video_chats: bool @@ -38,7 +38,7 @@ class ChatAdministratorRights(TelegramObject): can_delete_stories: bool """:code:`True`, if the administrator can delete stories posted by other users""" can_post_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only""" + """*Optional*. :code:`True`, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only""" can_edit_messages: Optional[bool] = None """*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only""" can_pin_messages: Optional[bool] = None diff --git a/aiogram/types/chat_boost_source_giveaway.py b/aiogram/types/chat_boost_source_giveaway.py index 3e109ddc..a1babf0d 100644 --- a/aiogram/types/chat_boost_source_giveaway.py +++ b/aiogram/types/chat_boost_source_giveaway.py @@ -25,7 +25,7 @@ class ChatBoostSourceGiveaway(ChatBoostSource): prize_star_count: Optional[int] = None """*Optional*. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only""" is_unclaimed: Optional[bool] = None - """*Optional*. True, if the giveaway was completed, but there was no user to win the prize""" + """*Optional*. :code:`True`, if the giveaway was completed, but there was no user to win the prize""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/chat_join_request.py b/aiogram/types/chat_join_request.py index 33385af7..769d1b26 100644 --- a/aiogram/types/chat_join_request.py +++ b/aiogram/types/chat_join_request.py @@ -1724,7 +1724,7 @@ class ChatJoinRequest(TelegramObject): Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options + :param options: A JSON-serialized list of 2-12 answer options :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed @@ -1822,7 +1822,7 @@ class ChatJoinRequest(TelegramObject): Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options + :param options: A JSON-serialized list of 2-12 answer options :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed diff --git a/aiogram/types/chat_member_administrator.py b/aiogram/types/chat_member_administrator.py index 10552f74..27dc8757 100644 --- a/aiogram/types/chat_member_administrator.py +++ b/aiogram/types/chat_member_administrator.py @@ -25,7 +25,7 @@ class ChatMemberAdministrator(ChatMember): is_anonymous: bool """:code:`True`, if the user's presence in the chat is hidden""" can_manage_chat: bool - """:code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.""" + """:code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.""" can_delete_messages: bool """:code:`True`, if the administrator can delete messages of other users""" can_manage_video_chats: bool @@ -45,7 +45,7 @@ class ChatMemberAdministrator(ChatMember): can_delete_stories: bool """:code:`True`, if the administrator can delete stories posted by other users""" can_post_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only""" + """*Optional*. :code:`True`, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only""" can_edit_messages: Optional[bool] = None """*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only""" can_pin_messages: Optional[bool] = None diff --git a/aiogram/types/chat_member_restricted.py b/aiogram/types/chat_member_restricted.py index edda75e4..1466350f 100644 --- a/aiogram/types/chat_member_restricted.py +++ b/aiogram/types/chat_member_restricted.py @@ -38,7 +38,7 @@ class ChatMemberRestricted(ChatMember): can_send_voice_notes: bool """:code:`True`, if the user is allowed to send voice notes""" can_send_polls: bool - """:code:`True`, if the user is allowed to send polls""" + """:code:`True`, if the user is allowed to send polls and checklists""" can_send_other_messages: bool """:code:`True`, if the user is allowed to send animations, games, stickers and use inline bots""" can_add_web_page_previews: bool diff --git a/aiogram/types/chat_member_updated.py b/aiogram/types/chat_member_updated.py index c6fa10dd..9c08776d 100644 --- a/aiogram/types/chat_member_updated.py +++ b/aiogram/types/chat_member_updated.py @@ -65,9 +65,9 @@ class ChatMemberUpdated(TelegramObject): 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 without using an invite link and being approved by an administrator""" + """*Optional*. :code:`True`, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator""" via_chat_folder_invite_link: Optional[bool] = None - """*Optional*. True, if the user joined the chat via a chat folder invite link""" + """*Optional*. :code:`True`, if the user joined the chat via a chat folder invite link""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -908,7 +908,7 @@ class ChatMemberUpdated(TelegramObject): Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options + :param options: A JSON-serialized list of 2-12 answer options :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed diff --git a/aiogram/types/chat_permissions.py b/aiogram/types/chat_permissions.py index 6270cc3f..38775b89 100644 --- a/aiogram/types/chat_permissions.py +++ b/aiogram/types/chat_permissions.py @@ -27,7 +27,7 @@ class ChatPermissions(MutableTelegramObject): can_send_voice_notes: Optional[bool] = None """*Optional*. :code:`True`, if the user is allowed to send voice notes""" can_send_polls: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send polls""" + """*Optional*. :code:`True`, if the user is allowed to send polls and checklists""" can_send_other_messages: Optional[bool] = None """*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots""" can_add_web_page_previews: Optional[bool] = None diff --git a/aiogram/types/checklist.py b/aiogram/types/checklist.py new file mode 100644 index 00000000..21393719 --- /dev/null +++ b/aiogram/types/checklist.py @@ -0,0 +1,55 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from .base import TelegramObject + +if TYPE_CHECKING: + from .checklist_task import ChecklistTask + from .message_entity import MessageEntity + + +class Checklist(TelegramObject): + """ + Describes a checklist. + + Source: https://core.telegram.org/bots/api#checklist + """ + + title: str + """Title of the checklist""" + tasks: list[ChecklistTask] + """List of tasks in the checklist""" + title_entities: Optional[list[MessageEntity]] = None + """*Optional*. Special entities that appear in the checklist title""" + others_can_add_tasks: Optional[bool] = None + """*Optional*. :code:`True`, if users other than the creator of the list can add tasks to the list""" + others_can_mark_tasks_as_done: Optional[bool] = None + """*Optional*. :code:`True`, if users other than the creator of the list can mark tasks as done or not done""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + title: str, + tasks: list[ChecklistTask], + title_entities: Optional[list[MessageEntity]] = None, + others_can_add_tasks: Optional[bool] = None, + others_can_mark_tasks_as_done: 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__( + title=title, + tasks=tasks, + title_entities=title_entities, + others_can_add_tasks=others_can_add_tasks, + others_can_mark_tasks_as_done=others_can_mark_tasks_as_done, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/checklist_task.py b/aiogram/types/checklist_task.py new file mode 100644 index 00000000..8a50f021 --- /dev/null +++ b/aiogram/types/checklist_task.py @@ -0,0 +1,55 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from .base import TelegramObject + +if TYPE_CHECKING: + from .message_entity import MessageEntity + from .user import User + + +class ChecklistTask(TelegramObject): + """ + Describes a task in a checklist. + + Source: https://core.telegram.org/bots/api#checklisttask + """ + + id: int + """Unique identifier of the task""" + text: str + """Text of the task""" + text_entities: Optional[list[MessageEntity]] = None + """*Optional*. Special entities that appear in the task text""" + completed_by_user: Optional[User] = None + """*Optional*. User that completed the task; omitted if the task wasn't completed""" + completion_date: Optional[int] = None + """*Optional*. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: int, + text: str, + text_entities: Optional[list[MessageEntity]] = None, + completed_by_user: Optional[User] = None, + completion_date: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + id=id, + text=text, + text_entities=text_entities, + completed_by_user=completed_by_user, + completion_date=completion_date, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/checklist_tasks_added.py b/aiogram/types/checklist_tasks_added.py new file mode 100644 index 00000000..50a78679 --- /dev/null +++ b/aiogram/types/checklist_tasks_added.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from .base import TelegramObject + +if TYPE_CHECKING: + from .checklist_task import ChecklistTask + from .message import Message + + +class ChecklistTasksAdded(TelegramObject): + """ + Describes a service message about tasks added to a checklist. + + Source: https://core.telegram.org/bots/api#checklisttasksadded + """ + + tasks: list[ChecklistTask] + """List of tasks added to the checklist""" + checklist_message: Optional[Message] = None + """*Optional*. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the *reply_to_message* field even if it itself is a reply.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + tasks: list[ChecklistTask], + checklist_message: Optional[Message] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(tasks=tasks, checklist_message=checklist_message, **__pydantic_kwargs) diff --git a/aiogram/types/checklist_tasks_done.py b/aiogram/types/checklist_tasks_done.py new file mode 100644 index 00000000..22ede538 --- /dev/null +++ b/aiogram/types/checklist_tasks_done.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from .base import TelegramObject + +if TYPE_CHECKING: + from .message import Message + + +class ChecklistTasksDone(TelegramObject): + """ + Describes a service message about checklist tasks marked as done or not done. + + Source: https://core.telegram.org/bots/api#checklisttasksdone + """ + + checklist_message: Optional[Message] = None + """*Optional*. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the *reply_to_message* field even if it itself is a reply.""" + marked_as_done_task_ids: Optional[list[int]] = None + """*Optional*. Identifiers of the tasks that were marked as done""" + marked_as_not_done_task_ids: Optional[list[int]] = None + """*Optional*. Identifiers of the tasks that were marked as not done""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + checklist_message: Optional[Message] = None, + marked_as_done_task_ids: Optional[list[int]] = None, + marked_as_not_done_task_ids: Optional[list[int]] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + checklist_message=checklist_message, + marked_as_done_task_ids=marked_as_done_task_ids, + marked_as_not_done_task_ids=marked_as_not_done_task_ids, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/direct_message_price_changed.py b/aiogram/types/direct_message_price_changed.py new file mode 100644 index 00000000..415d818a --- /dev/null +++ b/aiogram/types/direct_message_price_changed.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from .base import TelegramObject + + +class DirectMessagePriceChanged(TelegramObject): + """ + Describes a service message about a change in the price of direct messages sent to a channel chat. + + Source: https://core.telegram.org/bots/api#directmessagepricechanged + """ + + are_direct_messages_enabled: bool + """:code:`True`, if direct messages are enabled for the channel chat; false otherwise""" + direct_message_star_count: Optional[int] = None + """*Optional*. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + are_direct_messages_enabled: bool, + direct_message_star_count: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + are_direct_messages_enabled=are_direct_messages_enabled, + direct_message_star_count=direct_message_star_count, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/external_reply_info.py b/aiogram/types/external_reply_info.py index 776cdb28..da3675b2 100644 --- a/aiogram/types/external_reply_info.py +++ b/aiogram/types/external_reply_info.py @@ -8,6 +8,7 @@ if TYPE_CHECKING: from .animation import Animation from .audio import Audio from .chat import Chat + from .checklist import Checklist from .contact import Contact from .dice import Dice from .document import Document @@ -66,6 +67,8 @@ class ExternalReplyInfo(TelegramObject): """*Optional*. Message is a voice message, information about the file""" has_media_spoiler: Optional[bool] = None """*Optional*. :code:`True`, if the message media is covered by a spoiler animation""" + checklist: Optional[Checklist] = None + """*Optional*. Message is a checklist""" contact: Optional[Contact] = None """*Optional*. Message is a shared contact, information about the contact""" dice: Optional[Dice] = None @@ -107,6 +110,7 @@ class ExternalReplyInfo(TelegramObject): video_note: Optional[VideoNote] = None, voice: Optional[Voice] = None, has_media_spoiler: Optional[bool] = None, + checklist: Optional[Checklist] = None, contact: Optional[Contact] = None, dice: Optional[Dice] = None, game: Optional[Game] = None, @@ -138,6 +142,7 @@ class ExternalReplyInfo(TelegramObject): video_note=video_note, voice=voice, has_media_spoiler=has_media_spoiler, + checklist=checklist, contact=contact, dice=dice, game=game, diff --git a/aiogram/types/gift_info.py b/aiogram/types/gift_info.py index ba7d8f40..7f817b09 100644 --- a/aiogram/types/gift_info.py +++ b/aiogram/types/gift_info.py @@ -25,13 +25,13 @@ class GiftInfo(TelegramObject): prepaid_upgrade_star_count: Optional[int] = None """*Optional*. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift""" can_be_upgraded: Optional[bool] = None - """*Optional*. True, if the gift can be upgraded to a unique gift""" + """*Optional*. :code:`True`, if the gift can be upgraded to a unique gift""" text: Optional[str] = None """*Optional*. Text of the message that was added to the gift""" entities: Optional[list[MessageEntity]] = None """*Optional*. Special entities that appear in the text""" is_private: Optional[bool] = None - """*Optional*. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them""" + """*Optional*. :code:`True`, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inaccessible_message.py b/aiogram/types/inaccessible_message.py index 8322ad9c..13debc3b 100644 --- a/aiogram/types/inaccessible_message.py +++ b/aiogram/types/inaccessible_message.py @@ -1687,7 +1687,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options + :param options: A JSON-serialized list of 2-12 answer options :param business_connection_id: Unique identifier of the 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 @@ -1788,7 +1788,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options + :param options: A JSON-serialized list of 2-12 answer options :param business_connection_id: Unique identifier of the 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 diff --git a/aiogram/types/input_checklist.py b/aiogram/types/input_checklist.py new file mode 100644 index 00000000..9a0cd40d --- /dev/null +++ b/aiogram/types/input_checklist.py @@ -0,0 +1,59 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from .base import TelegramObject + +if TYPE_CHECKING: + from .input_checklist_task import InputChecklistTask + from .message_entity import MessageEntity + + +class InputChecklist(TelegramObject): + """ + Describes a checklist to create. + + Source: https://core.telegram.org/bots/api#inputchecklist + """ + + title: str + """Title of the checklist; 1-255 characters after entities parsing""" + tasks: list[InputChecklistTask] + """List of 1-30 tasks in the checklist""" + parse_mode: Optional[str] = None + """Optional. Mode for parsing entities in the title. See `formatting options `_ for more details.""" + title_entities: Optional[list[MessageEntity]] = None + """*Optional*. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities are allowed.""" + others_can_add_tasks: Optional[bool] = None + """*Optional*. Pass :code:`True` if other users can add tasks to the checklist""" + others_can_mark_tasks_as_done: Optional[bool] = None + """*Optional*. Pass :code:`True` if other users can mark tasks as done or not done in the checklist""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + title: str, + tasks: list[InputChecklistTask], + parse_mode: Optional[str] = None, + title_entities: Optional[list[MessageEntity]] = None, + others_can_add_tasks: Optional[bool] = None, + others_can_mark_tasks_as_done: 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__( + title=title, + tasks=tasks, + parse_mode=parse_mode, + title_entities=title_entities, + others_can_add_tasks=others_can_add_tasks, + others_can_mark_tasks_as_done=others_can_mark_tasks_as_done, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_checklist_task.py b/aiogram/types/input_checklist_task.py new file mode 100644 index 00000000..17b62ac8 --- /dev/null +++ b/aiogram/types/input_checklist_task.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from .base import TelegramObject + +if TYPE_CHECKING: + from .message_entity import MessageEntity + + +class InputChecklistTask(TelegramObject): + """ + Describes a task to add to a checklist. + + Source: https://core.telegram.org/bots/api#inputchecklisttask + """ + + id: int + """Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist""" + text: str + """Text of the task; 1-100 characters after entities parsing""" + parse_mode: Optional[str] = None + """Optional. Mode for parsing entities in the text. See `formatting options `_ for more details.""" + text_entities: Optional[list[MessageEntity]] = None + """*Optional*. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities are allowed.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: int, + text: str, + parse_mode: Optional[str] = None, + 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__( + id=id, + text=text, + parse_mode=parse_mode, + text_entities=text_entities, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_profile_photo_animated.py b/aiogram/types/input_profile_photo_animated.py index 985b1e03..a617e223 100644 --- a/aiogram/types/input_profile_photo_animated.py +++ b/aiogram/types/input_profile_photo_animated.py @@ -16,7 +16,7 @@ class InputProfilePhotoAnimated(InputProfilePhoto): """ type: Literal[InputProfilePhotoType.ANIMATED] = InputProfilePhotoType.ANIMATED - """Type of the profile photo, must be 'animated'""" + """Type of the profile photo, must be *animated*""" animation: InputFileUnion """The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `""" main_frame_timestamp: Optional[float] = None diff --git a/aiogram/types/input_profile_photo_static.py b/aiogram/types/input_profile_photo_static.py index 710f6b8a..08c655bc 100644 --- a/aiogram/types/input_profile_photo_static.py +++ b/aiogram/types/input_profile_photo_static.py @@ -16,7 +16,7 @@ class InputProfilePhotoStatic(InputProfilePhoto): """ type: Literal[InputProfilePhotoType.STATIC] = InputProfilePhotoType.STATIC - """Type of the profile photo, must be 'static'""" + """Type of the profile photo, must be *static*""" photo: InputFileUnion """The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `""" diff --git a/aiogram/types/input_story_content_photo.py b/aiogram/types/input_story_content_photo.py index 5fe4877f..c4b31fe3 100644 --- a/aiogram/types/input_story_content_photo.py +++ b/aiogram/types/input_story_content_photo.py @@ -15,7 +15,7 @@ class InputStoryContentPhoto(InputStoryContent): """ type: Literal[InputStoryContentType.PHOTO] = InputStoryContentType.PHOTO - """Type of the content, must be 'photo'""" + """Type of the content, must be *photo*""" photo: str """The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `""" diff --git a/aiogram/types/input_story_content_video.py b/aiogram/types/input_story_content_video.py index 484f5ad0..443ef787 100644 --- a/aiogram/types/input_story_content_video.py +++ b/aiogram/types/input_story_content_video.py @@ -15,7 +15,7 @@ class InputStoryContentVideo(InputStoryContent): """ type: Literal[InputStoryContentType.VIDEO] = InputStoryContentType.VIDEO - """Type of the content, must be 'video'""" + """Type of the content, must be *video*""" video: str """The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the video was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `""" duration: Optional[float] = None diff --git a/aiogram/types/message.py b/aiogram/types/message.py index fd9a60f5..89a7002d 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -56,9 +56,13 @@ if TYPE_CHECKING: from .chat_boost_added import ChatBoostAdded from .chat_id_union import ChatIdUnion from .chat_shared import ChatShared + from .checklist import Checklist + from .checklist_tasks_added import ChecklistTasksAdded + from .checklist_tasks_done import ChecklistTasksDone from .contact import Contact from .date_time_union import DateTimeUnion from .dice import Dice + from .direct_message_price_changed import DirectMessagePriceChanged from .document import Document from .external_reply_info import ExternalReplyInfo from .forum_topic_closed import ForumTopicClosed @@ -164,7 +168,7 @@ class Message(MaybeInaccessibleMessage): has_protected_content: Optional[bool] = None """*Optional*. :code:`True`, if the message can't be forwarded""" is_from_offline: Optional[bool] = None - """*Optional*. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message""" + """*Optional*. :code:`True`, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message""" media_group_id: Optional[str] = None """*Optional*. The unique identifier of a media message group this message belongs to""" author_signature: Optional[str] = None @@ -204,9 +208,11 @@ class Message(MaybeInaccessibleMessage): caption_entities: Optional[list[MessageEntity]] = None """*Optional*. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption""" show_caption_above_media: Optional[bool] = None - """*Optional*. True, if the caption must be shown above the message media""" + """*Optional*. :code:`True`, if the caption must be shown above the message media""" has_media_spoiler: Optional[bool] = None """*Optional*. :code:`True`, if the message media is covered by a spoiler animation""" + checklist: Optional[Checklist] = None + """*Optional*. Message is a checklist""" contact: Optional[Contact] = None """*Optional*. Message is a shared contact, information about the contact""" dice: Optional[Dice] = None @@ -269,6 +275,12 @@ class Message(MaybeInaccessibleMessage): """*Optional*. Service message: user boosted the chat""" chat_background_set: Optional[ChatBackground] = None """*Optional*. Service message: chat background set""" + checklist_tasks_done: Optional[ChecklistTasksDone] = None + """*Optional*. Service message: some tasks in a checklist were marked as done or not done""" + checklist_tasks_added: Optional[ChecklistTasksAdded] = None + """*Optional*. Service message: tasks were added to a checklist""" + direct_message_price_changed: Optional[DirectMessagePriceChanged] = None + """*Optional*. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed""" forum_topic_created: Optional[ForumTopicCreated] = None """*Optional*. Service message: forum topic created""" forum_topic_edited: Optional[ForumTopicEdited] = None @@ -387,6 +399,7 @@ class Message(MaybeInaccessibleMessage): caption_entities: Optional[list[MessageEntity]] = None, show_caption_above_media: Optional[bool] = None, has_media_spoiler: Optional[bool] = None, + checklist: Optional[Checklist] = None, contact: Optional[Contact] = None, dice: Optional[Dice] = None, game: Optional[Game] = None, @@ -418,6 +431,9 @@ class Message(MaybeInaccessibleMessage): proximity_alert_triggered: Optional[ProximityAlertTriggered] = None, boost_added: Optional[ChatBoostAdded] = None, chat_background_set: Optional[ChatBackground] = None, + checklist_tasks_done: Optional[ChecklistTasksDone] = None, + checklist_tasks_added: Optional[ChecklistTasksAdded] = None, + direct_message_price_changed: Optional[DirectMessagePriceChanged] = None, forum_topic_created: Optional[ForumTopicCreated] = None, forum_topic_edited: Optional[ForumTopicEdited] = None, forum_topic_closed: Optional[ForumTopicClosed] = None, @@ -490,6 +506,7 @@ class Message(MaybeInaccessibleMessage): caption_entities=caption_entities, show_caption_above_media=show_caption_above_media, has_media_spoiler=has_media_spoiler, + checklist=checklist, contact=contact, dice=dice, game=game, @@ -521,6 +538,9 @@ class Message(MaybeInaccessibleMessage): proximity_alert_triggered=proximity_alert_triggered, boost_added=boost_added, chat_background_set=chat_background_set, + checklist_tasks_done=checklist_tasks_done, + checklist_tasks_added=checklist_tasks_added, + direct_message_price_changed=direct_message_price_changed, forum_topic_created=forum_topic_created, forum_topic_edited=forum_topic_edited, forum_topic_closed=forum_topic_closed, @@ -570,6 +590,8 @@ class Message(MaybeInaccessibleMessage): return ContentType.VIDEO_NOTE if self.voice: return ContentType.VOICE + if self.checklist: + return ContentType.CHECKLIST if self.contact: return ContentType.CONTACT if self.venue: @@ -660,6 +682,12 @@ class Message(MaybeInaccessibleMessage): return ContentType.CHAT_BACKGROUND_SET if self.boost_added: return ContentType.BOOST_ADDED + if self.checklist_tasks_done: + return ContentType.CHECKLIST_TASKS_DONE + if self.checklist_tasks_added: + return ContentType.CHECKLIST_TASKS_ADDED + if self.direct_message_price_changed: + return ContentType.DIRECT_MESSAGE_PRICE_CHANGED if self.refunded_payment: return ContentType.REFUNDED_PAYMENT if self.gift: @@ -2281,7 +2309,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options + :param options: A JSON-serialized list of 2-12 answer options :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` @@ -2378,7 +2406,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options + :param options: A JSON-serialized list of 2-12 answer options :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` diff --git a/aiogram/types/owned_gift_regular.py b/aiogram/types/owned_gift_regular.py index 73fd9983..53eb1260 100644 --- a/aiogram/types/owned_gift_regular.py +++ b/aiogram/types/owned_gift_regular.py @@ -34,13 +34,13 @@ class OwnedGiftRegular(OwnedGift): entities: Optional[list[MessageEntity]] = None """*Optional*. Special entities that appear in the text""" is_private: Optional[bool] = None - """*Optional*. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them""" + """*Optional*. :code:`True`, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them""" is_saved: Optional[bool] = None - """*Optional*. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only""" + """*Optional*. :code:`True`, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only""" can_be_upgraded: Optional[bool] = None - """*Optional*. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only""" + """*Optional*. :code:`True`, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only""" was_refunded: Optional[bool] = None - """*Optional*. True, if the gift was refunded and isn't available anymore""" + """*Optional*. :code:`True`, if the gift was refunded and isn't available anymore""" convert_star_count: Optional[int] = None """*Optional*. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars""" prepaid_upgrade_star_count: Optional[int] = None diff --git a/aiogram/types/owned_gift_unique.py b/aiogram/types/owned_gift_unique.py index 98a143c7..a3a9bcb2 100644 --- a/aiogram/types/owned_gift_unique.py +++ b/aiogram/types/owned_gift_unique.py @@ -4,6 +4,7 @@ from typing import TYPE_CHECKING, Any, Literal, Optional from aiogram.enums import OwnedGiftType +from .custom import DateTime from .owned_gift import OwnedGift if TYPE_CHECKING: @@ -29,11 +30,13 @@ class OwnedGiftUnique(OwnedGift): sender_user: Optional[User] = None """*Optional*. Sender of the gift if it is a known user""" is_saved: Optional[bool] = None - """*Optional*. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only""" + """*Optional*. :code:`True`, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only""" can_be_transferred: Optional[bool] = None - """*Optional*. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only""" + """*Optional*. :code:`True`, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only""" transfer_star_count: Optional[int] = None """*Optional*. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift""" + next_transfer_date: Optional[DateTime] = None + """*Optional*. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -50,6 +53,7 @@ class OwnedGiftUnique(OwnedGift): is_saved: Optional[bool] = None, can_be_transferred: Optional[bool] = None, transfer_star_count: Optional[int] = None, + next_transfer_date: Optional[DateTime] = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -65,5 +69,6 @@ class OwnedGiftUnique(OwnedGift): is_saved=is_saved, can_be_transferred=can_be_transferred, transfer_star_count=transfer_star_count, + next_transfer_date=next_transfer_date, **__pydantic_kwargs, ) diff --git a/aiogram/types/reaction_type_emoji.py b/aiogram/types/reaction_type_emoji.py index a209fe2f..e1a3128b 100644 --- a/aiogram/types/reaction_type_emoji.py +++ b/aiogram/types/reaction_type_emoji.py @@ -14,7 +14,7 @@ class ReactionTypeEmoji(ReactionType): type: Literal[ReactionTypeType.EMOJI] = ReactionTypeType.EMOJI """Type of the reaction, always 'emoji'""" emoji: str - """Reaction emoji. Currently, it can be one of "๐Ÿ‘", "๐Ÿ‘Ž", "โค", "๐Ÿ”ฅ", "๐Ÿฅฐ", "๐Ÿ‘", "๐Ÿ˜", "๐Ÿค”", "๐Ÿคฏ", "๐Ÿ˜ฑ", "๐Ÿคฌ", "๐Ÿ˜ข", "๐ŸŽ‰", "๐Ÿคฉ", "๐Ÿคฎ", "๐Ÿ’ฉ", "๐Ÿ™", "๐Ÿ‘Œ", "๐Ÿ•Š", "๐Ÿคก", "๐Ÿฅฑ", "๐Ÿฅด", "๐Ÿ˜", "๐Ÿณ", "โคโ€๐Ÿ”ฅ", "๐ŸŒš", "๐ŸŒญ", "๐Ÿ’ฏ", "๐Ÿคฃ", "โšก", "๐ŸŒ", "๐Ÿ†", "๐Ÿ’”", "๐Ÿคจ", "๐Ÿ˜", "๐Ÿ“", "๐Ÿพ", "๐Ÿ’‹", "๐Ÿ–•", "๐Ÿ˜ˆ", "๐Ÿ˜ด", "๐Ÿ˜ญ", "๐Ÿค“", "๐Ÿ‘ป", "๐Ÿ‘จโ€๐Ÿ’ป", "๐Ÿ‘€", "๐ŸŽƒ", "๐Ÿ™ˆ", "๐Ÿ˜‡", "๐Ÿ˜จ", "๐Ÿค", "โœ", "๐Ÿค—", "๐Ÿซก", "๐ŸŽ…", "๐ŸŽ„", "โ˜ƒ", "๐Ÿ’…", "๐Ÿคช", "๐Ÿ—ฟ", "๐Ÿ†’", "๐Ÿ’˜", "๐Ÿ™‰", "๐Ÿฆ„", "๐Ÿ˜˜", "๐Ÿ’Š", "๐Ÿ™Š", "๐Ÿ˜Ž", "๐Ÿ‘พ", "๐Ÿคทโ€โ™‚", "๐Ÿคท", "๐Ÿคทโ€โ™€", "๐Ÿ˜ก" """ + """Reaction emoji. Currently, it can be one of "โค", "๐Ÿ‘", "๐Ÿ‘Ž", "๐Ÿ”ฅ", "๐Ÿฅฐ", "๐Ÿ‘", "๐Ÿ˜", "๐Ÿค”", "๐Ÿคฏ", "๐Ÿ˜ฑ", "๐Ÿคฌ", "๐Ÿ˜ข", "๐ŸŽ‰", "๐Ÿคฉ", "๐Ÿคฎ", "๐Ÿ’ฉ", "๐Ÿ™", "๐Ÿ‘Œ", "๐Ÿ•Š", "๐Ÿคก", "๐Ÿฅฑ", "๐Ÿฅด", "๐Ÿ˜", "๐Ÿณ", "โคโ€๐Ÿ”ฅ", "๐ŸŒš", "๐ŸŒญ", "๐Ÿ’ฏ", "๐Ÿคฃ", "โšก", "๐ŸŒ", "๐Ÿ†", "๐Ÿ’”", "๐Ÿคจ", "๐Ÿ˜", "๐Ÿ“", "๐Ÿพ", "๐Ÿ’‹", "๐Ÿ–•", "๐Ÿ˜ˆ", "๐Ÿ˜ด", "๐Ÿ˜ญ", "๐Ÿค“", "๐Ÿ‘ป", "๐Ÿ‘จโ€๐Ÿ’ป", "๐Ÿ‘€", "๐ŸŽƒ", "๐Ÿ™ˆ", "๐Ÿ˜‡", "๐Ÿ˜จ", "๐Ÿค", "โœ", "๐Ÿค—", "๐Ÿซก", "๐ŸŽ…", "๐ŸŽ„", "โ˜ƒ", "๐Ÿ’…", "๐Ÿคช", "๐Ÿ—ฟ", "๐Ÿ†’", "๐Ÿ’˜", "๐Ÿ™‰", "๐Ÿฆ„", "๐Ÿ˜˜", "๐Ÿ’Š", "๐Ÿ™Š", "๐Ÿ˜Ž", "๐Ÿ‘พ", "๐Ÿคทโ€โ™‚", "๐Ÿคท", "๐Ÿคทโ€โ™€", "๐Ÿ˜ก" """ if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/successful_payment.py b/aiogram/types/successful_payment.py index de2a9518..d8a8e03e 100644 --- a/aiogram/types/successful_payment.py +++ b/aiogram/types/successful_payment.py @@ -28,9 +28,9 @@ class SuccessfulPayment(TelegramObject): subscription_expiration_date: Optional[int] = None """*Optional*. Expiration date of the subscription, in Unix time; for recurring payments only""" is_recurring: Optional[bool] = None - """*Optional*. True, if the payment is a recurring payment for a subscription""" + """*Optional*. :code:`True`, if the payment is a recurring payment for a subscription""" is_first_recurring: Optional[bool] = None - """*Optional*. True, if the payment is the first payment for a subscription""" + """*Optional*. :code:`True`, if the payment is the first payment for a subscription""" shipping_option_id: Optional[str] = None """*Optional*. Identifier of the shipping option chosen by the user""" order_info: Optional[OrderInfo] = None diff --git a/aiogram/types/switch_inline_query_chosen_chat.py b/aiogram/types/switch_inline_query_chosen_chat.py index 9a25dca5..0ff9b598 100644 --- a/aiogram/types/switch_inline_query_chosen_chat.py +++ b/aiogram/types/switch_inline_query_chosen_chat.py @@ -13,13 +13,13 @@ class SwitchInlineQueryChosenChat(TelegramObject): query: Optional[str] = None """*Optional*. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted""" allow_user_chats: Optional[bool] = None - """*Optional*. True, if private chats with users can be chosen""" + """*Optional*. :code:`True`, if private chats with users can be chosen""" allow_bot_chats: Optional[bool] = None - """*Optional*. True, if private chats with bots can be chosen""" + """*Optional*. :code:`True`, if private chats with bots can be chosen""" allow_group_chats: Optional[bool] = None - """*Optional*. True, if group and supergroup chats can be chosen""" + """*Optional*. :code:`True`, if group and supergroup chats can be chosen""" allow_channel_chats: Optional[bool] = None - """*Optional*. True, if channel chats can be chosen""" + """*Optional*. :code:`True`, if channel chats can be chosen""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/text_quote.py b/aiogram/types/text_quote.py index 50f688eb..e7c7c1bd 100644 --- a/aiogram/types/text_quote.py +++ b/aiogram/types/text_quote.py @@ -22,7 +22,7 @@ class TextQuote(TelegramObject): entities: Optional[list[MessageEntity]] = None """*Optional*. Special entities that appear in the quote. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities are kept in quotes.""" is_manual: Optional[bool] = None - """*Optional*. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.""" + """*Optional*. :code:`True`, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/unique_gift_info.py b/aiogram/types/unique_gift_info.py index 1129936f..40e935a5 100644 --- a/aiogram/types/unique_gift_info.py +++ b/aiogram/types/unique_gift_info.py @@ -3,6 +3,7 @@ from __future__ import annotations from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject +from .custom import DateTime if TYPE_CHECKING: from .unique_gift import UniqueGift @@ -18,11 +19,15 @@ class UniqueGiftInfo(TelegramObject): gift: UniqueGift """Information about the gift""" origin: str - """Origin of the gift. Currently, either 'upgrade' or 'transfer'""" + """Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, or 'resale' for gifts bought from other users""" + last_resale_star_count: Optional[int] = None + """*Optional*. For gifts bought from other users, the price paid for the gift""" owned_gift_id: Optional[str] = None """*Optional*. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts""" transfer_star_count: Optional[int] = None """*Optional*. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift""" + next_transfer_date: Optional[DateTime] = None + """*Optional*. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -33,8 +38,10 @@ class UniqueGiftInfo(TelegramObject): *, gift: UniqueGift, origin: str, + last_resale_star_count: Optional[int] = None, owned_gift_id: Optional[str] = None, transfer_star_count: Optional[int] = None, + next_transfer_date: Optional[DateTime] = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -44,7 +51,9 @@ class UniqueGiftInfo(TelegramObject): super().__init__( gift=gift, origin=origin, + last_resale_star_count=last_resale_star_count, owned_gift_id=owned_gift_id, transfer_star_count=transfer_star_count, + next_transfer_date=next_transfer_date, **__pydantic_kwargs, ) diff --git a/aiogram/types/write_access_allowed.py b/aiogram/types/write_access_allowed.py index 6b8e50a0..263a3277 100644 --- a/aiogram/types/write_access_allowed.py +++ b/aiogram/types/write_access_allowed.py @@ -11,11 +11,11 @@ class WriteAccessAllowed(TelegramObject): """ from_request: Optional[bool] = None - """*Optional*. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess `_""" + """*Optional*. :code:`True`, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess `_""" web_app_name: Optional[str] = None """*Optional*. Name of the Web App, if the access was granted when the Web App was launched from a link""" from_attachment_menu: Optional[bool] = None - """*Optional*. True, if the access was granted when the bot was added to the attachment or side menu""" + """*Optional*. :code:`True`, if the access was granted when the bot was added to the attachment or side menu""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/webhook/aiohttp_server.py b/aiogram/webhook/aiohttp_server.py index 04b61413..56c3ce0d 100644 --- a/aiogram/webhook/aiohttp_server.py +++ b/aiogram/webhook/aiohttp_server.py @@ -5,8 +5,8 @@ from asyncio import Transport from typing import Any, Awaitable, Callable, Dict, Optional, Set, Tuple, cast from aiohttp import JsonPayload, MultipartWriter, Payload, web -from aiohttp.web_app import Application from aiohttp.typedefs import Handler +from aiohttp.web_app import Application from aiohttp.web_middlewares import middleware from aiogram import Bot, Dispatcher, loggers @@ -111,7 +111,7 @@ class BaseRequestHandler(ABC): app.on_shutdown.append(self._handle_close) app.router.add_route("POST", path, self.handle, **kwargs) - async def _handle_close(self, app: Application) -> None: + async def _handle_close(self, *a: Any, **kw: Any) -> None: await self.close() @abstractmethod diff --git a/docs/api/methods/edit_message_checklist.rst b/docs/api/methods/edit_message_checklist.rst new file mode 100644 index 00000000..c5839f02 --- /dev/null +++ b/docs/api/methods/edit_message_checklist.rst @@ -0,0 +1,45 @@ +#################### +editMessageChecklist +#################### + +Returns: :obj:`Message` + +.. automodule:: aiogram.methods.edit_message_checklist + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: Message = await bot.edit_message_checklist(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.edit_message_checklist import EditMessageChecklist` +- alias: :code:`from aiogram.methods import EditMessageChecklist` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: Message = await bot(EditMessageChecklist(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return EditMessageChecklist(...) diff --git a/docs/api/methods/get_my_star_balance.rst b/docs/api/methods/get_my_star_balance.rst new file mode 100644 index 00000000..ef7ab550 --- /dev/null +++ b/docs/api/methods/get_my_star_balance.rst @@ -0,0 +1,38 @@ +################ +getMyStarBalance +################ + +Returns: :obj:`StarAmount` + +.. automodule:: aiogram.methods.get_my_star_balance + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: StarAmount = await bot.get_my_star_balance(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_my_star_balance import GetMyStarBalance` +- alias: :code:`from aiogram.methods import GetMyStarBalance` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: StarAmount = await bot(GetMyStarBalance(...)) diff --git a/docs/api/methods/index.rst b/docs/api/methods/index.rst index e71cd272..45431f19 100644 --- a/docs/api/methods/index.rst +++ b/docs/api/methods/index.rst @@ -86,6 +86,7 @@ Available methods send_animation send_audio send_chat_action + send_checklist send_contact send_dice send_document @@ -133,6 +134,7 @@ Updating messages delete_messages delete_story edit_message_caption + edit_message_checklist edit_message_live_location edit_message_media edit_message_reply_markup @@ -191,6 +193,7 @@ Payments answer_shipping_query create_invoice_link edit_user_star_subscription + get_my_star_balance get_star_transactions refund_star_payment send_invoice diff --git a/docs/api/methods/send_checklist.rst b/docs/api/methods/send_checklist.rst new file mode 100644 index 00000000..371a0a42 --- /dev/null +++ b/docs/api/methods/send_checklist.rst @@ -0,0 +1,45 @@ +############# +sendChecklist +############# + +Returns: :obj:`Message` + +.. automodule:: aiogram.methods.send_checklist + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: Message = await bot.send_checklist(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.send_checklist import SendChecklist` +- alias: :code:`from aiogram.methods import SendChecklist` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: Message = await bot(SendChecklist(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SendChecklist(...) diff --git a/docs/api/types/checklist.rst b/docs/api/types/checklist.rst new file mode 100644 index 00000000..9f7c9fa1 --- /dev/null +++ b/docs/api/types/checklist.rst @@ -0,0 +1,10 @@ +######### +Checklist +######### + + +.. automodule:: aiogram.types.checklist + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/checklist_task.rst b/docs/api/types/checklist_task.rst new file mode 100644 index 00000000..3a8c2eb5 --- /dev/null +++ b/docs/api/types/checklist_task.rst @@ -0,0 +1,10 @@ +############# +ChecklistTask +############# + + +.. automodule:: aiogram.types.checklist_task + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/checklist_tasks_added.rst b/docs/api/types/checklist_tasks_added.rst new file mode 100644 index 00000000..2cda87bb --- /dev/null +++ b/docs/api/types/checklist_tasks_added.rst @@ -0,0 +1,10 @@ +################### +ChecklistTasksAdded +################### + + +.. automodule:: aiogram.types.checklist_tasks_added + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/checklist_tasks_done.rst b/docs/api/types/checklist_tasks_done.rst new file mode 100644 index 00000000..42d6485f --- /dev/null +++ b/docs/api/types/checklist_tasks_done.rst @@ -0,0 +1,10 @@ +################## +ChecklistTasksDone +################## + + +.. automodule:: aiogram.types.checklist_tasks_done + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/direct_message_price_changed.rst b/docs/api/types/direct_message_price_changed.rst new file mode 100644 index 00000000..909ead18 --- /dev/null +++ b/docs/api/types/direct_message_price_changed.rst @@ -0,0 +1,10 @@ +######################### +DirectMessagePriceChanged +######################### + + +.. automodule:: aiogram.types.direct_message_price_changed + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/index.rst b/docs/api/types/index.rst index 731a321e..626c4145 100644 --- a/docs/api/types/index.rst +++ b/docs/api/types/index.rst @@ -70,9 +70,14 @@ Available types chat_permissions chat_photo chat_shared + checklist + checklist_task + checklist_tasks_added + checklist_tasks_done contact copy_text_button dice + direct_message_price_changed document external_reply_info file @@ -94,6 +99,8 @@ Available types inaccessible_message inline_keyboard_button inline_keyboard_markup + input_checklist + input_checklist_task input_file input_media input_media_animation diff --git a/docs/api/types/input_checklist.rst b/docs/api/types/input_checklist.rst new file mode 100644 index 00000000..4a591b74 --- /dev/null +++ b/docs/api/types/input_checklist.rst @@ -0,0 +1,10 @@ +############## +InputChecklist +############## + + +.. automodule:: aiogram.types.input_checklist + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_checklist_task.rst b/docs/api/types/input_checklist_task.rst new file mode 100644 index 00000000..8bbc80a7 --- /dev/null +++ b/docs/api/types/input_checklist_task.rst @@ -0,0 +1,10 @@ +################## +InputChecklistTask +################## + + +.. automodule:: aiogram.types.input_checklist_task + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/tests/test_api/test_methods/test_edit_message_checklist.py b/tests/test_api/test_methods/test_edit_message_checklist.py new file mode 100644 index 00000000..e154cf6f --- /dev/null +++ b/tests/test_api/test_methods/test_edit_message_checklist.py @@ -0,0 +1,35 @@ +import datetime + +from aiogram.methods import EditMessageChecklist +from aiogram.types import Chat, InputChecklist, InputChecklistTask, Message +from tests.mocked_bot import MockedBot + + +class TestEditMessageChecklist: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + EditMessageChecklist, + ok=True, + result=Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + ), + ) + + checklist = InputChecklist( + title="Updated Checklist", + tasks=[ + InputChecklistTask(id=1, text="Updated Task 1"), + InputChecklistTask(id=2, text="Updated Task 2"), + ], + ) + + response: Message = await bot.edit_message_checklist( + business_connection_id="test_connection", + chat_id=42, + message_id=42, + checklist=checklist, + ) + request = bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_my_star_balance.py b/tests/test_api/test_methods/test_get_my_star_balance.py new file mode 100644 index 00000000..7c9edd21 --- /dev/null +++ b/tests/test_api/test_methods/test_get_my_star_balance.py @@ -0,0 +1,18 @@ +from aiogram.methods import GetMyStarBalance +from aiogram.types import StarAmount +from tests.mocked_bot import MockedBot + + +class TestGetMyStarBalance: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetMyStarBalance, + ok=True, + result=StarAmount( + amount=100, + ), + ) + + response: StarAmount = await bot.get_my_star_balance() + request = bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_checklist.py b/tests/test_api/test_methods/test_send_checklist.py new file mode 100644 index 00000000..40c279f3 --- /dev/null +++ b/tests/test_api/test_methods/test_send_checklist.py @@ -0,0 +1,34 @@ +import datetime + +from aiogram.methods import SendChecklist +from aiogram.types import Chat, InputChecklist, InputChecklistTask, Message +from tests.mocked_bot import MockedBot + + +class TestSendChecklist: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + SendChecklist, + ok=True, + result=Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + ), + ) + + checklist = InputChecklist( + title="Test Checklist", + tasks=[ + InputChecklistTask(id=1, text="Task 1"), + InputChecklistTask(id=2, text="Task 2"), + ], + ) + + response: Message = await bot.send_checklist( + business_connection_id="test_connection", + chat_id=42, + checklist=checklist, + ) + 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 01f56cde..cd7fbd43 100644 --- a/tests/test_api/test_types/test_message.py +++ b/tests/test_api/test_types/test_message.py @@ -16,6 +16,7 @@ from aiogram.methods import ( PinChatMessage, SendAnimation, SendAudio, + SendChecklist, SendContact, SendDice, SendDocument, @@ -47,8 +48,13 @@ from aiogram.types import ( ChatBackground, ChatBoostAdded, ChatShared, + Checklist, + ChecklistTask, + ChecklistTasksAdded, + ChecklistTasksDone, Contact, Dice, + DirectMessagePriceChanged, Document, EncryptedCredentials, ForumTopicClosed, @@ -692,6 +698,58 @@ TEST_MESSAGE_UNIQUE_GIFT = Message( origin="upgrade", ), ) +TEST_MESSAGE_CHECKLIST = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), + checklist=Checklist( + title="Test Checklist", + tasks=[ + ChecklistTask( + id=1, + text="Task 1", + ), + ChecklistTask( + id=2, + text="Task 2", + ), + ], + ), +) +TEST_MESSAGE_CHECKLIST_TASKS_DONE = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), + checklist_tasks_done=ChecklistTasksDone( + marked_as_done_task_ids=[1, 2], + ), +) +TEST_MESSAGE_CHECKLIST_TASKS_ADDED = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), + checklist_tasks_added=ChecklistTasksAdded( + tasks=[ + ChecklistTask( + id=3, + text="New Task", + ), + ], + ), +) +TEST_MESSAGE_DIRECT_MESSAGE_PRICE_CHANGED = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), + direct_message_price_changed=DirectMessagePriceChanged( + are_direct_messages_enabled=True, + direct_message_star_count=50, + ), +) TEST_MESSAGE_PAID_MESSAGE_PRICE_CHANGED = Message( message_id=42, date=datetime.datetime.now(), @@ -713,6 +771,7 @@ MESSAGES_AND_CONTENT_TYPES = [ [TEST_MESSAGE_VIDEO, ContentType.VIDEO], [TEST_MESSAGE_VIDEO_NOTE, ContentType.VIDEO_NOTE], [TEST_MESSAGE_VOICE, ContentType.VOICE], + [TEST_MESSAGE_CHECKLIST, ContentType.CHECKLIST], [TEST_MESSAGE_CONTACT, ContentType.CONTACT], [TEST_MESSAGE_VENUE, ContentType.VENUE], [TEST_MESSAGE_LOCATION, ContentType.LOCATION], @@ -764,6 +823,9 @@ MESSAGES_AND_CONTENT_TYPES = [ [TEST_MESSAGE_WRITE_ACCESS_ALLOWED, ContentType.WRITE_ACCESS_ALLOWED], [TEST_MESSAGE_BOOST_ADDED, ContentType.BOOST_ADDED], [TEST_CHAT_BACKGROUND_SET, ContentType.CHAT_BACKGROUND_SET], + [TEST_MESSAGE_CHECKLIST_TASKS_DONE, ContentType.CHECKLIST_TASKS_DONE], + [TEST_MESSAGE_CHECKLIST_TASKS_ADDED, ContentType.CHECKLIST_TASKS_ADDED], + [TEST_MESSAGE_DIRECT_MESSAGE_PRICE_CHANGED, ContentType.DIRECT_MESSAGE_PRICE_CHANGED], [TEST_REFUND_PAYMENT, ContentType.REFUNDED_PAYMENT], [TEST_MESSAGE_GIFT, ContentType.GIFT], [TEST_MESSAGE_UNIQUE_GIFT, ContentType.UNIQUE_GIFT], @@ -783,6 +845,7 @@ MESSAGES_AND_COPY_METHODS = [ [TEST_MESSAGE_VIDEO, SendVideo], [TEST_MESSAGE_VIDEO_NOTE, SendVideoNote], [TEST_MESSAGE_VOICE, SendVoice], + [TEST_MESSAGE_CHECKLIST, None], [TEST_MESSAGE_CONTACT, SendContact], [TEST_MESSAGE_VENUE, SendVenue], [TEST_MESSAGE_LOCATION, SendLocation], @@ -828,6 +891,9 @@ MESSAGES_AND_COPY_METHODS = [ [TEST_MESSAGE_GIVEAWAY_WINNERS, None], [TEST_MESSAGE_BOOST_ADDED, None], [TEST_CHAT_BACKGROUND_SET, None], + [TEST_MESSAGE_CHECKLIST_TASKS_DONE, None], + [TEST_MESSAGE_CHECKLIST_TASKS_ADDED, None], + [TEST_MESSAGE_DIRECT_MESSAGE_PRICE_CHANGED, None], [TEST_REFUND_PAYMENT, None], [TEST_MESSAGE_GIFT, None], [TEST_MESSAGE_UNIQUE_GIFT, None],